• Claudio Freire's avatar
    AAC: Fix M/S stereo encoding · 6394acaf
    Claudio Freire authored
    This patch fixes a pointer arithmetic bug in adjust_frame_information that resulted in heavily corrupted audio when using M/S encoding. Also, a backup copy of untransformed coefficients has to be kept around or attempts at re-processing the frame (which happens when hevavily overspending bits during transients) will result in re-encoding of the coefficients and subsequent corruption of the resulting stream.
    
    A/B testing shows the bug as corrected, but still cannot prove that M/S coding is a win at least in numbers. Limited listening tests do show improvement on M/S encoded samples in lower bitrates, but they're hidden among the other artifacts that remain to be corrected in the encoder.
    
    Some of the regressions flagged in the report do show poor stereo image (but not buggy), so M/S encoding is clearly not good enough yet to be defaulted to auto.
    
    In numbers, Patched against Unpatched, stereo_mode auto:
    
      Files: 114
      Bitrates: 6
      Tests: 683
    
      Serious Regressions: 0 (0%)
      Regressions: 0 (0%)
      Improvements: 227 (33%)
      Big improvements: 92 (13%)
      Worst regression - mybloodrusts.wv - 256k
        - StdDev: 28.61       pSNR: -0.43     maxdiff: 1372.00
      Best improvement - 60.wv - 384k
        - StdDev: -369.57     pSNR: 45.02     maxdiff: -13322.00
      Average          - StdDev: -80.56       pSNR: 2.49      maxdiff: -8858.00
    
    Patched against Unpatched stereo_mode ms_off shows no difference.
    
    Patched stereo_mode auto vs Unpatched stereo_mode ms_off shows a small average improvement, just not too significant:
    
      Serious Regressions: 0 (0%)
      Regressions: 10 (1%)
      Improvements: 45 (6%)
      Big improvements: 2 (0%)
      Worst regression - Illinois.wv - 256k
        - StdDev: 33.20       pSNR: -2.03     maxdiff: 477.00
      Best improvement - song_of_circomstances.flac - 384k
        - StdDev: -3.97       pSNR: 7.61      maxdiff: -826.00
      Average          - StdDev: -10.25       pSNR: 0.20      maxdiff: -281.00
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    6394acaf
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample 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...
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...
RELEASE_NOTES Loading commit data...
arch.mak Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
cmdutils_opencl.c Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
ffmpeg.c Loading commit data...
ffmpeg.h Loading commit data...
ffmpeg_dxva2.c Loading commit data...
ffmpeg_filter.c Loading commit data...
ffmpeg_opt.c Loading commit data...
ffmpeg_vda.c Loading commit data...
ffmpeg_vdpau.c Loading commit data...
ffplay.c Loading commit data...
ffprobe.c Loading commit data...
ffserver.c Loading commit data...
ffserver_config.c Loading commit data...
ffserver_config.h Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...