summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-24 21:28:34 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-18 02:09:34 +0200
commit010e345afe5d9744956dbc6253a4999e6851e7e9 (patch)
treebc585a965d63a7bdd4a87dbdfc8d73fb4483d494 /libavutil
parent43d02b4634de4882818cd226bba5952312df9a0a (diff)
avcodec/smacker: Avoid allocations for decoding Smacker
by using buffers on the stack instead. The fact that the effective lifetime of most of the allocated buffers doesn't overlap enables one to limit the stack space used to a fairly modest size (about 1.5 KiB). That all the buffers used in HuffContexts have always the same number of elements (namely 256) makes it possible to include the buffers directly in the HuffContext. Doing so also makes the length field redundant; it has therefore been removed. This is beneficial for performance: For GCC 9 the time for one call to smka_decode_frame() for the sample in ticket #2425 went down from 1794494 to 1709043 decicyles; for Clang 9 it decreased from 1449420 to 1355273 decicycles. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavutil')
0 files changed, 0 insertions, 0 deletions