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>
This commit is contained in:
Andreas Rheinhardt 2022-09-06 04:06:48 +02:00
parent 9dbc370769
commit 3652114596

View File

@ -69,7 +69,7 @@ static const uint8_t block_code_nbits[7] = {
static int dca_get_vlc(GetBitContext *s, DCAVLC *v, int i) 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) static void get_array(GetBitContext *s, int32_t *array, int size, int n)