mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/jpegtables: remove duplicate luma and chroma quantization tables
Duplicates of the standard JPEG quantization tables were found in the AGM, MSS34(dsp), NUV and VP31 codecs. This patch elimates those duplicates, placing a single copy in jpegquanttables.c.
This commit is contained in:
parent
9bed814e1d
commit
58bd7d97a4
9 changed files with 102 additions and 114 deletions
|
|
@ -22,33 +22,12 @@
|
|||
#include <stdint.h>
|
||||
#include "libavutil/common.h"
|
||||
#include "mss34dsp.h"
|
||||
|
||||
static const uint8_t luma_quant[64] = {
|
||||
16, 11, 10, 16, 24, 40, 51, 61,
|
||||
12, 12, 14, 19, 26, 58, 60, 55,
|
||||
14, 13, 16, 24, 40, 57, 69, 56,
|
||||
14, 17, 22, 29, 51, 87, 80, 62,
|
||||
18, 22, 37, 56, 68, 109, 103, 77,
|
||||
24, 35, 55, 64, 81, 104, 113, 92,
|
||||
49, 64, 78, 87, 103, 121, 120, 101,
|
||||
72, 92, 95, 98, 112, 100, 103, 99
|
||||
};
|
||||
|
||||
static const uint8_t chroma_quant[64] = {
|
||||
17, 18, 24, 47, 99, 99, 99, 99,
|
||||
18, 21, 26, 66, 99, 99, 99, 99,
|
||||
24, 26, 56, 99, 99, 99, 99, 99,
|
||||
47, 66, 99, 99, 99, 99, 99, 99,
|
||||
99, 99, 99, 99, 99, 99, 99, 99,
|
||||
99, 99, 99, 99, 99, 99, 99, 99,
|
||||
99, 99, 99, 99, 99, 99, 99, 99,
|
||||
99, 99, 99, 99, 99, 99, 99, 99
|
||||
};
|
||||
#include "jpegquanttables.h"
|
||||
|
||||
void ff_mss34_gen_quant_mat(uint16_t *qmat, int quality, int luma)
|
||||
{
|
||||
int i;
|
||||
const uint8_t *qsrc = luma ? luma_quant : chroma_quant;
|
||||
const uint8_t *qsrc = luma ? ff_mjpeg_std_luminance_quant_tbl : ff_mjpeg_std_chrominance_quant_tbl;
|
||||
|
||||
if (quality >= 50) {
|
||||
int scale = 200 - 2 * quality;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue