diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-26 22:19:19 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-29 06:28:24 +0100 |
commit | d8b2fae3c73d92608abeaa04402fd05266e29bb2 (patch) | |
tree | 816e346a00f7a6036b48dc444c2550172d066860 /libavcodec/msmpeg4dec.c | |
parent | fbb81ea2c615b1189d21ea00127be205db36b342 (diff) | |
download | ffmpeg-d8b2fae3c73d92608abeaa04402fd05266e29bb2.tar.gz |
avcodec/msmpeg4: Inline number of motion vectors
Both motion vector tables have the same number of elements, hence one
can inline said number and remove the field containing the number of
elements from the structure.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/msmpeg4dec.c')
-rw-r--r-- | libavcodec/msmpeg4dec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 9501b101ca..405fda4b83 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -321,11 +321,11 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) memcpy(ff_rl_table[5].rl_vlc, ff_h263_rl_inter.rl_vlc, sizeof(ff_rl_table[5].rl_vlc)); mv = &ff_mv_tables[0]; - INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, mv->n + 1, + INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, MSMPEG4_MV_TABLES_NB_ELEMS + 1, mv->table_mv_bits, 1, 1, mv->table_mv_code, 2, 2, 3714); mv = &ff_mv_tables[1]; - INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, mv->n + 1, + INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, MSMPEG4_MV_TABLES_NB_ELEMS + 1, mv->table_mv_bits, 1, 1, mv->table_mv_code, 2, 2, 2694); @@ -836,7 +836,7 @@ void ff_msmpeg4_decode_motion(MpegEncContext *s, int *mx_ptr, int *my_ptr) mv = &ff_mv_tables[s->mv_table_index]; code = get_vlc2(&s->gb, mv->vlc.table, MV_VLC_BITS, 2); - if (code == mv->n) { + if (code == MSMPEG4_MV_TABLES_NB_ELEMS) { mx = get_bits(&s->gb, 6); my = get_bits(&s->gb, 6); } else { |