]> git.sesse.net Git - ffmpeg/commit
avcodec/smacker: Use symbols table
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 24 Jul 2020 17:57:56 +0000 (19:57 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 18 Sep 2020 00:08:11 +0000 (02:08 +0200)
commit43d02b4634de4882818cd226bba5952312df9a0a
treea15a257fbe5120af96b98c7a585fe6fa4b01f7a6
parent45ffbb756bd765a29e66dfd7b0ed02fd1d1d7024
avcodec/smacker: Use symbols table

Up until now, the return value of get_vlc2() has been used as an index
in an array that contained the value one is really interested in. Yet
since b613bacca9c256f1483c46847f713e47a0e9a5f6 this is no longer
necessary, as one can store the value that is right now stored in the
array in the VLC internal table.

This also means that all the information from the eight bit Huffman trees
are now stored in the corresponding VLC table; this will enable us to
remove several allocations lateron.

This improved performance: For GCC 9 the time for one call of
smka_decode_frame() for the sample from ticket #2425 decreased from
1811706 to 1794494 decicycles; for Clang 9 the number went from 1471663
to 1449420 decicycles.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/smacker.c