diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-10-23 17:47:33 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-10-24 16:50:29 +0200 |
commit | 51eda4c394f1b0c1b8aee67b90e10150ddae2f7c (patch) | |
tree | 3733c4b2409d6faf6c432ff558a8be19c4bfa298 /libavcodec/imc.c | |
parent | 0dc42147b6843b133d4fa46bf1c2568a837b4bec (diff) | |
download | ffmpeg-51eda4c394f1b0c1b8aee67b90e10150ddae2f7c.tar.gz |
avcodec/imc: Inline constants
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r-- | libavcodec/imc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 6766d53643..70ad5b1dbd 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -110,6 +110,7 @@ typedef struct IMCContext { static VLC huffman_vlc[4][4]; +#define IMC_VLC_BITS 9 #define VLC_TABLES_SIZE 9512 static const int vlc_offsets[17] = { @@ -238,7 +239,7 @@ static av_cold int imc_decode_init(AVCodecContext *avctx) for (j = 0; j < 4; j++) { huffman_vlc[i][j].table = &vlc_tables[vlc_offsets[i * 4 + j]]; huffman_vlc[i][j].table_allocated = vlc_offsets[i * 4 + j + 1] - vlc_offsets[i * 4 + j]; - init_vlc(&huffman_vlc[i][j], 9, imc_huffman_sizes[i], + init_vlc(&huffman_vlc[i][j], IMC_VLC_BITS, imc_huffman_sizes[i], imc_huffman_lens[i][j], 1, 1, imc_huffman_bits[i][j], 2, 2, INIT_VLC_USE_NEW_STATIC); } @@ -348,7 +349,7 @@ static void imc_read_level_coeffs(IMCContext *q, int stream_format_code, levlCoeffs[0] = get_bits(&q->gb, 7); for (i = start; i < BANDS; i++) { levlCoeffs[i] = get_vlc2(&q->gb, hufftab[cb_sel[i]]->table, - hufftab[cb_sel[i]]->bits, 2); + IMC_VLC_BITS, 2); if (levlCoeffs[i] == 17) levlCoeffs[i] += get_bits(&q->gb, 4); } |