aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nutdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-08-31 18:55:19 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-01 11:05:38 +0200
commitd0b0fc7cb94f02a7de0d67cb3ba06a243b323a1d (patch)
treeb6c98d2f2df64c767ccca2a4aeac91f92792c329 /libavformat/nutdec.c
parent7332a23b848555780f3d24370c8314dd9f348a35 (diff)
downloadffmpeg-d0b0fc7cb94f02a7de0d67cb3ba06a243b323a1d.tar.gz
avcodec/magicyuv: Avoid copying values around pointlessly
When parsing Huffman tables, an array of HuffEntries (a struct containing a code's bitlength, its bits and its symbol) is used as intermediate tables in order to sort the entries (the order depends on both the length of the entries as well as on their symbols). After sorting them, the symbol and len components are copied into other arrays (the HuffEntries' code has never been set or used, despite using quite a lot of stack space) and the codes are generated. Afterwards, the VLC is created. Yet ff_init_vlc_sparse() can handle non-continuous arrays as input; there is no need to copy the entries at all. This commit implements this. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/nutdec.c')
0 files changed, 0 insertions, 0 deletions