On 8/1/20, Andreas Rheinhardt <andreas.rheinha...@gmail.com> wrote: > 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. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > --- > libavcodec/smacker.c | 39 ++++++++++++++++++++++++++++++--------- > 1 file changed, 30 insertions(+), 9 deletions(-) >
Should be OK if tested under ASAN. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".