summaryrefslogtreecommitdiff
path: root/libavcodec/clearvideo.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-03 21:07:55 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-08 17:51:45 +0100
commite67e4d43bdd2fb1b38cd460a7760359ab2d3dcca (patch)
treedd1844aae206d309cbf8c3f2f0f40faee36ffdcf /libavcodec/clearvideo.c
parent222cc6ea26287bad018f73ae97212847182e5f1b (diff)
downloadffmpeg-e67e4d43bdd2fb1b38cd460a7760359ab2d3dcca.tar.gz
avcodec/clearvideo: Apply VLC offset during init
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/clearvideo.c')
-rw-r--r--libavcodec/clearvideo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c
index a5f9cc3ca2..ff6445b1de 100644
--- a/libavcodec/clearvideo.c
+++ b/libavcodec/clearvideo.c
@@ -88,7 +88,6 @@ static inline int decode_block(CLVContext *ctx, int16_t *blk, int has_ac,
memset(blk, 0, sizeof(*blk) * 64);
blk[0] = get_vlc2(gb, ctx->dc_vlc.table, CLV_VLC_BITS, 3);
- blk[0] -= 63;
if (!has_ac)
return 0;
@@ -712,9 +711,9 @@ static av_cold int clv_decode_init(AVCodecContext *avctx)
return AVERROR(ENOMEM);
ff_idctdsp_init(&c->idsp, avctx);
- ret = init_vlc(&c->dc_vlc, CLV_VLC_BITS, NUM_DC_CODES,
- clv_dc_bits, 1, 1,
- clv_dc_codes, 1, 1, 0);
+ ret = ff_init_vlc_from_lengths(&c->dc_vlc, CLV_VLC_BITS, NUM_DC_CODES,
+ clv_dc_lens, 1,
+ clv_dc_syms, 1, 1, -63, 0, avctx);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "Error initialising DC VLC\n");
return ret;