diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-05 02:29:26 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-08 17:51:46 +0100 |
commit | 76a4356a75fd1bb79101ac00bfb73303c369dfc8 (patch) | |
tree | b83c821922626bb189e2ca8ea460d3ac02ef8dd2 /libavfilter/af_asubboost.c | |
parent | b52e0d9504d1b45bc64489262facc8e48adb9bc2 (diff) | |
download | ffmpeg-76a4356a75fd1bb79101ac00bfb73303c369dfc8.tar.gz |
avcodec/atrac9dec: Don't create VLCs that are never used
The ATRAC9 decoder creates VLCs with parameters contained in
HuffmanCodebooks; some of these HuffmanCodebooks are empty and yet
VLCs (that were completely unused*) were created from them. Said VLC
contained a single table with 512 VLC_TYPE[2] entries, each of which
indicated that this is an invalid code. This commit stops creating said
VLCs.
*: read_coeffs_coarse() uses the HuffmanCodebook
at9_huffman_coeffs[cb][prec][cbi]. prec is c->precision_coarse[i] + 1
and every precision_coarse entry is in the 1..15 range after
calc_precision(), so prec is >= 2 (all codebooks with prec < 2 are
empty). The remaining empty codebooks are those with cb == 1 and cbi ==
0, yet this is impossible, too: cb is given by c->codebookset[i] and
this is always 0 if i < 8 (because those are never set to anything else
in calc_codebook_idx()) and cbi is given by at9_q_unit_to_codebookidx[i]
which is never zero if i >= 8.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/af_asubboost.c')
0 files changed, 0 insertions, 0 deletions