diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-02 18:48:39 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-20 18:58:38 +0200 |
commit | 0876b160d6d9fd4c960585927c4381baaffb15ad (patch) | |
tree | 5132bf162124fad8bc242f2235492502fed95b76 /libavcodec/h261dec.c | |
parent | 4cdd684e86136c42719632cbdcc7647d0f60f87f (diff) | |
download | ffmpeg-0876b160d6d9fd4c960585927c4381baaffb15ad.tar.gz |
avcodec/h261dec: Use VLC symbol table
This is possible now that MB_TYPE_CBP and MB_TYPE_QUANT
fit into an int16_t; only MB_TYPE_H261_FIL needs to
be remapped to MB_TYPE_CODEC_SPECIFIC.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h261dec.c')
-rw-r--r-- | libavcodec/h261dec.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 392f1aef1d..05279b9ec5 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -67,9 +67,10 @@ static av_cold void h261_decode_init_static(void) VLC_INIT_STATIC_TABLE(h261_mba_vlc, H261_MBA_VLC_BITS, 35, ff_h261_mba_bits, 1, 1, ff_h261_mba_code, 1, 1, 0); - VLC_INIT_STATIC_TABLE(h261_mtype_vlc, H261_MTYPE_VLC_BITS, 10, - ff_h261_mtype_bits, 1, 1, - ff_h261_mtype_code, 1, 1, 0); + VLC_INIT_STATIC_SPARSE_TABLE(h261_mtype_vlc, H261_MTYPE_VLC_BITS, 10, + ff_h261_mtype_bits, 1, 1, + ff_h261_mtype_code, 1, 1, + ff_h261_mtype_map, 2, 2, 0); VLC_INIT_STATIC_TABLE(h261_mv_vlc, H261_MV_VLC_BITS, 17, &ff_h261_mv_tab[0][1], 2, 1, &ff_h261_mv_tab[0][0], 2, 1, 0); @@ -418,8 +419,6 @@ static int h261_decode_mb(H261DecContext *h) com->mtype); return SLICE_ERROR; } - av_assert0(com->mtype < FF_ARRAY_ELEMS(ff_h261_mtype_map)); - com->mtype = ff_h261_mtype_map[com->mtype]; // Read mquant if (IS_QUANT(com->mtype)) |