aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mss34dsp.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2022-10-26 20:11:21 +1100
committerPeter Ross <pross@xvid.org>2022-10-26 20:30:25 +1100
commit58bd7d97a47da1065e2616d396938609b50ad1e4 (patch)
tree47b73bf18a25c15ed84eeb667f31fffa63a12497 /libavcodec/mss34dsp.c
parent9bed814e1d44e8374e9a4901e3f9b00ded0716fb (diff)
downloadffmpeg-58bd7d97a47da1065e2616d396938609b50ad1e4.tar.gz
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.
Diffstat (limited to 'libavcodec/mss34dsp.c')
-rw-r--r--libavcodec/mss34dsp.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/libavcodec/mss34dsp.c b/libavcodec/mss34dsp.c
index f3405658f7..3f08c03ed7 100644
--- a/libavcodec/mss34dsp.c
+++ b/libavcodec/mss34dsp.c
@@ -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;