[FFmpeg-cvslog] avcodec/svq1dec: Increase size of VLC

Andreas Rheinhardt git at videolan.org
Tue Oct 31 22:15:08 EET 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Sep 26 23:34:58 2023 +0200| [460c6ae597ebcf55022390c9efbe94bd23cb57c4] | committer: Andreas Rheinhardt

avcodec/svq1dec: Increase size of VLC

It allows to reduce the number of maximum reloads by one.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=460c6ae597ebcf55022390c9efbe94bd23cb57c4
---

 libavcodec/svq1dec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 372420bffe..af02063a45 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -190,7 +190,7 @@ static int svq1_decode_block_intra(GetBitContext *bitbuf, uint8_t *pixels,
         height = 1 << ((3 + level) / 2);
 
         /* get number of stages (-1 skips vector, 0 for mean only) */
-        stages = get_vlc2(bitbuf, svq1_intra_multistage[level], 3, 3) - 1;
+        stages = get_vlc2(bitbuf, svq1_intra_multistage[level], 4, 2) - 1;
 
         if (stages == -1) {
             for (y = 0; y < height; y++)
@@ -779,7 +779,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, AVFrame *cur,
 
 static av_cold void svq1_static_init(void)
 {
-    static VLCElem table[168];
+    static VLCElem table[196];
     VLCInitState state = VLC_INIT_STATE(table);
 
     VLC_INIT_STATIC_TABLE(svq1_block_type, SVQ1_BLOCK_TYPE_VLC_BITS, 4,
@@ -792,7 +792,7 @@ static av_cold void svq1_static_init(void)
 
     for (int i = 0; i < 6; i++) {
         svq1_intra_multistage[i] =
-            ff_vlc_init_tables(&state, 3, 8,
+            ff_vlc_init_tables(&state, 4, 8,
                                &ff_svq1_intra_multistage_vlc[i][0][1], 2, 1,
                                &ff_svq1_intra_multistage_vlc[i][0][0], 2, 1, 0);
         svq1_inter_multistage[i] =



More information about the ffmpeg-cvslog mailing list