aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideodata.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-28 12:06:38 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-31 12:01:33 +0100
commit908b7fcfb29712e5a9cacb005ad734c53e26e72c (patch)
treee69241d0b29a8ca0cd515262da04f398af203315 /libavcodec/mpegvideodata.c
parent920ce150c60b36b8039fd187a228c4e8df5dcfb5 (diff)
downloadffmpeg-908b7fcfb29712e5a9cacb005ad734c53e26e72c.tar.gz
avcodec/mpegvideodata: Join mpeg1/2 dc scale tables
Avoids relocations. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideodata.c')
-rw-r--r--libavcodec/mpegvideodata.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/libavcodec/mpegvideodata.c b/libavcodec/mpegvideodata.c
index b98e90cf43..68ad84276e 100644
--- a/libavcodec/mpegvideodata.c
+++ b/libavcodec/mpegvideodata.c
@@ -30,31 +30,23 @@ const uint8_t ff_mpeg2_non_linear_qscale[32] = {
56, 64, 72, 80, 88, 96, 104, 112,
};
-const uint8_t ff_mpeg1_dc_scale_table[32] = {
+const uint8_t ff_mpeg12_dc_scale_table[4][32] = {
+{
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-};
-
-static const uint8_t mpeg2_dc_scale_table1[32] = {
+},
+{
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
-};
-
-static const uint8_t mpeg2_dc_scale_table2[32] = {
+},
+{
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-};
-
-static const uint8_t mpeg2_dc_scale_table3[32] = {
+},
+{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-};
-
-const uint8_t *const ff_mpeg2_dc_scale_table[4] = {
- ff_mpeg1_dc_scale_table,
- mpeg2_dc_scale_table1,
- mpeg2_dc_scale_table2,
- mpeg2_dc_scale_table3,
+},
};
const uint8_t ff_alternate_horizontal_scan[64] = {