diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-06 04:06:48 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-16 18:07:29 +0200 |
commit | 3652114596096a2b015972e9db063323c408c91e (patch) | |
tree | 24102c6ab63d6acb5a40c930dfdf27a85c0f79ae /libavcodec/dca_core.c | |
parent | 9dbc37076978c2127606c70e0d6b6004a3224426 (diff) | |
download | ffmpeg-3652114596096a2b015972e9db063323c408c91e.tar.gz |
avcodec/dca_core: Don't use too big max_depth in get_vlc2()
Most of the VLCs used here have a max_depth of two;
some have a max_depth of one. Therefore one can just use two
and avoid the runtime check for whether one should
perform another round of LUT lookup in case the first read
did not read a complete codeword.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/dca_core.c')
-rw-r--r-- | libavcodec/dca_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index 7dff6633df..7b23a40df4 100644 --- a/libavcodec/dca_core.c +++ b/libavcodec/dca_core.c @@ -69,7 +69,7 @@ static const uint8_t block_code_nbits[7] = { static int dca_get_vlc(GetBitContext *s, DCAVLC *v, int i) { - return get_vlc2(s, v->vlc[i].table, v->vlc[i].bits, v->max_depth); + return get_vlc2(s, v->vlc[i].table, v->vlc[i].bits, 2); } static void get_array(GetBitContext *s, int32_t *array, int size, int n) |