diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-06 15:53:48 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-16 19:07:29 +0300 |
commit | 9dbc37076978c2127606c70e0d6b6004a3224426 (patch) | |
tree | f6df31077bcd74dd1a9a1cfdef4fea1123728497 /libavcodec/dca_core.c | |
parent | 597bfff342666288a6a7b335eae859e2f8230659 (diff) |
avcodec/dca_core: Inline number of bits of scale factor VLCs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/dca_core.c')
-rw-r--r-- | libavcodec/dca_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index 96787fe95d..7dff6633df 100644 --- a/libavcodec/dca_core.c +++ b/libavcodec/dca_core.c @@ -362,7 +362,8 @@ static inline int parse_scale(DCACoreDecoder *s, int *scale_index, int sel) // If Huffman code was used, the difference of scales was encoded if (sel < 5) - *scale_index += dca_get_vlc(&s->gb, &ff_dca_vlc_scale_factor, sel); + *scale_index += get_vlc2(&s->gb, ff_dca_vlc_scale_factor[sel].table, + DCA_SCALES_VLC_BITS, 2); else *scale_index = get_bits(&s->gb, sel + 1); @@ -381,7 +382,8 @@ static inline int parse_joint_scale(DCACoreDecoder *s, int sel) // Absolute value was encoded even when Huffman code was used if (sel < 5) - scale_index = dca_get_vlc(&s->gb, &ff_dca_vlc_scale_factor, sel); + scale_index = get_vlc2(&s->gb, ff_dca_vlc_scale_factor[sel].table, + DCA_SCALES_VLC_BITS, 2); else scale_index = get_bits(&s->gb, sel + 1); |