• Andreas Rheinhardt's avatar
    avcodec/h261enc: Fix ac_vlc_length tables · 3a5202d0
    Andreas Rheinhardt authored
    These tables are supposed to contain the number of bits needed
    to encode a given (run, level) pair. Yet the number of bits
    for pairs needing the escape code was wrong (it only contained
    the escape code and not the bits needed for run and level).
    
    Furthermore, H.261 (a format with explicit end-of-block codes)
    does not work well together with the RLTable API from rl.c:
    The EOB code is the first one in ff_h261_rl_tcoeff's VLC table
    and has a run value of zero. Therefore the result of get_rl_index()
    is off by one for run == 0 and level values with explicit
    (run, level) pair.
    
    Fixing this necessitated changing the ref files of the
    vsynth*-h261-trellis tests. Both filesizes as well as PSNR
    decreased. If one used a qscale value of 11 for this test,
    one would have received files with about the same size as
    before this patch (with qscale 12), but with better PSNR.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    3a5202d0
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...