aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvenc_jpeg.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-01 00:26:32 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-08 17:51:46 +0100
commit70bbb4cce80ec2255b023b8f9e964dcf5d2ea9f6 (patch)
tree3ec10ee8985c2dec83bd2ffc098d4978e44fcf71 /libavcodec/qsvenc_jpeg.c
parente7f15f777dfef0904da3e066de198fd3632eba53 (diff)
downloadffmpeg-70bbb4cce80ec2255b023b8f9e964dcf5d2ea9f6.tar.gz
avcodec/mss4: Simplify creating VLC tables
The lengths of the codes used by the mss4 decoder are ascending from left to right and therefore the lengths can be run-length encoded and the codes can be easily derived from them. And this is how it is indeed done. Yet some things can nevertheless be improved: a) The number of entries of the current VLC is implicitly contained in the run-length table and needn't be externally prescribed. b) The maximum length of a code is just the length of the last code (given that the lengths are ascending), so there is no point in setting max_bits in the loop itself. c) One can offload the actual calculation of the codes to ff_init_vlc_from_lengths(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/qsvenc_jpeg.c')
0 files changed, 0 insertions, 0 deletions