aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/f_metadata.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-25 19:00:28 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-18 02:03:36 +0200
commit527b853d1a72beb08ffaa63239d13b2c0c327c66 (patch)
treec9770f34258edf4dbe40ed33fda947801d8631cd /libavfilter/f_metadata.c
parentb3e89ad6466a2b2dd14a0a675aa97a61b81300b8 (diff)
downloadffmpeg-527b853d1a72beb08ffaa63239d13b2c0c327c66.tar.gz
avcodec/smacker: Replace implicit checks for overread by explicit ones
Using explicit checks has the advantage that one can combine several checks into one and does not have to check every time. E.g. reading a 16bit PCM sample involves two calls to get_vlc2(), each of which may read up to three times up to SMKTREE_BITS (= 9) bits. But given that the padding that the input packet is supposed to have is large enough, it is no problem to only check once for each sample. This turned out to be beneficial for performance: For GCC 9, the time for one call of smka_decode_frame() for the sample from ticket #2425 went down from 2055905 to 1804751 decicycles; for Clang 9 it went down from 1510538 to 1479680 decicycles. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/f_metadata.c')
0 files changed, 0 insertions, 0 deletions