aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-03 04:45:34 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-20 18:58:38 +0200
commite7d6300c10834b782a2e2b274d4a9f1fc4cf8efe (patch)
tree8d1b2a5a465edb947e802551d5b187f640816ff9
parentf161d9449aa63282e7bee2cd80ecaf117e4d5530 (diff)
downloadffmpeg-e7d6300c10834b782a2e2b274d4a9f1fc4cf8efe.tar.gz
avcodec/mpeg4videodec: Use VLC symbol table
Possible now that MB_TYPE_L1 (which does not fit into an int16_t) is no longer used). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/mpeg4videodec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index ebbd845129..116dc1507e 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -67,7 +67,7 @@ static VLCElem studio_chroma_dc[528];
static const uint8_t mpeg4_block_count[4] = { 0, 6, 8, 12 };
-static const int mb_type_b_map[4] = {
+static const int16_t mb_type_b_map[4] = {
MB_TYPE_DIRECT2 | MB_TYPE_BIDIR_MV,
MB_TYPE_BIDIR_MV | MB_TYPE_16x16,
MB_TYPE_BACKWARD_MV | MB_TYPE_16x16,
@@ -1845,7 +1845,6 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64])
av_log(s->avctx, AV_LOG_ERROR, "illegal MB_type\n");
return AVERROR_INVALIDDATA;
}
- mb_type = mb_type_b_map[mb_type];
if (modb2) {
cbp = 0;
} else {
@@ -3794,9 +3793,10 @@ static av_cold void mpeg4_init_static(void)
VLC_INIT_STATIC_TABLE_FROM_LENGTHS(sprite_trajectory, SPRITE_TRAJ_VLC_BITS, 15,
ff_sprite_trajectory_lens, 1,
NULL, 0, 0, 0, 0);
- VLC_INIT_STATIC_TABLE(mb_type_b_vlc, MB_TYPE_B_VLC_BITS, 4,
- &ff_mb_type_b_tab[0][1], 2, 1,
- &ff_mb_type_b_tab[0][0], 2, 1, 0);
+ VLC_INIT_STATIC_SPARSE_TABLE(mb_type_b_vlc, MB_TYPE_B_VLC_BITS, 4,
+ &ff_mb_type_b_tab[0][1], 2, 1,
+ &ff_mb_type_b_tab[0][0], 2, 1,
+ mb_type_b_map, 2, 2, 0);
}
static av_cold int decode_init(AVCodecContext *avctx)