aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-04 21:09:40 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-07 00:07:45 +0200
commitcca7f571bac7e5c7fb35f2faef5e4a23eb77516a (patch)
treeb0a07bb129b2305c3f1fbe0116b42e8ab56c1b9c
parentf050bc0506643cf2a7211634b4ba3310fa290190 (diff)
downloadffmpeg-cca7f571bac7e5c7fb35f2faef5e4a23eb77516a.tar.gz
avcodec/wmaprodec: Move applying offset to VLC creation
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/wmaprodec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 1909ce2dad..698841dcaf 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -320,7 +320,7 @@ static av_cold void decode_init_static(void)
{
INIT_VLC_STATIC_FROM_LENGTHS(&sf_vlc, SCALEVLCBITS, HUFF_SCALE_SIZE,
&scale_table[0][1], 2,
- &scale_table[0][0], 2, 1, 0, 0, 616);
+ &scale_table[0][0], 2, 1, -60, 0, 616);
INIT_VLC_STATIC_FROM_LENGTHS(&sf_rl_vlc, VLCBITS, HUFF_SCALE_RL_SIZE,
&scale_rl_table[0][1], 2,
&scale_rl_table[0][0], 2, 1, 0, 0, 1406);
@@ -1056,7 +1056,7 @@ static int decode_scale_factors(WMAProDecodeCtx* s)
s->channel[c].scale_factor_step = get_bits(&s->gb, 2) + 1;
val = 45 / s->channel[c].scale_factor_step;
for (sf = s->channel[c].scale_factors; sf < sf_end; sf++) {
- val += get_vlc2(&s->gb, sf_vlc.table, SCALEVLCBITS, SCALEMAXDEPTH) - 60;
+ val += get_vlc2(&s->gb, sf_vlc.table, SCALEVLCBITS, SCALEMAXDEPTH);
*sf = val;
}
} else {