diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-29 20:34:01 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-31 23:42:05 +0100 |
commit | be1f5bae3134db6addd98feb120f69978c6b5fdd (patch) | |
tree | 585c19d1ee6732844efd437589d8ad05cf5e0151 | |
parent | 4425aa4be5d6e2307d8756642621452e0abc7c1b (diff) | |
download | ffmpeg-be1f5bae3134db6addd98feb120f69978c6b5fdd.tar.gz |
avcodec/svq1dec: Increase nb_bits of VLC to read it in one go
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r-- | libavcodec/svq1dec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 7aea138060..9c1fccb1b9 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -43,6 +43,7 @@ #include "mathops.h" #include "svq1.h" +#define SVQ1_BLOCK_TYPE_VLC_BITS 3 static VLC svq1_block_type; static VLC svq1_motion_component; static VLC svq1_intra_multistage[6]; @@ -456,7 +457,8 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, HpelDSPContext *hdsp, int result = 0; /* get block type */ - block_type = get_vlc2(bitbuf, svq1_block_type.table, 2, 2); + block_type = get_vlc2(bitbuf, svq1_block_type.table, + SVQ1_BLOCK_TYPE_VLC_BITS, 1); /* reset motion vectors */ if (block_type == SVQ1_BLOCK_SKIP || block_type == SVQ1_BLOCK_INTRA) { @@ -765,9 +767,9 @@ err: static av_cold void svq1_static_init(void) { - INIT_VLC_STATIC(&svq1_block_type, 2, 4, + INIT_VLC_STATIC(&svq1_block_type, SVQ1_BLOCK_TYPE_VLC_BITS, 4, &ff_svq1_block_type_vlc[0][1], 2, 1, - &ff_svq1_block_type_vlc[0][0], 2, 1, 6); + &ff_svq1_block_type_vlc[0][0], 2, 1, 8); INIT_VLC_STATIC(&svq1_motion_component, 7, 33, &ff_mvtab[0][1], 2, 1, |