]> git.sesse.net Git - ffmpeg/commit
avcodec/rv34: Simplify getting right VLC
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 22 Oct 2020 10:02:11 +0000 (12:02 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 26 Oct 2020 06:16:10 +0000 (07:16 +0100)
commit3a836f38f609940d883b8d8ed5e8a526e803da3c
treef1bf8041f54afebb81b53d7df60e6124f3bb6d81
parentf033e6d2e635820ec3deb9b936ed3f27ac7ad0a7
avcodec/rv34: Simplify getting right VLC

For both RealVideo 3.0 as well as RealVideo 4.0 the VLC table to use
depends upon the slice's quantization parameter; these are coded on five
bits in the bitstream and are therefore in the range of 0..31; yet the
last element here is not valid and therefore the quantizer is clipped to
the range 0..30 to get the index. But this is unnecessary: One can just
add one element more to the relevant array to avoid the clipping.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/rv34.c
libavcodec/rv34data.h