• Rostislav Pehlivanov's avatar
    aacenc: implement Intensity Stereo encoding support · e8576dc8
    Rostislav Pehlivanov authored
    This commit implements intensity stereo coding support
    to the native aac encoder. This is a way to increase the efficiency
    of the encoder by zeroing the right channel's spectral coefficients
    (in a channel pair) and rederiving them in the decoder using information
    from the scalefactor indices of special band types. This commit
    confomrs to the official ISO 13818-7 specifications, although due to
    their ambiguity certain deviations have been taken to ensure maximum
    sound quality. This commit has been extensively tested and has shown
    to not result in audiable audio artifacts unless in extreme cases.
    This commit also adds an option, aac_is, which has the value of
    0 by default. Intensity Stereo is part of the scalable aac profile
    and is thus non-default.
    
    The way IS coding works is that it rederives the right channel's
    spectral coefficients from the left channel via the scalefactor
    index values left in the right channel. Since an entire band's
    spectral coefficients do not need to be coded, the encoder's
    efficiency jumps up and it unzeroes some high frequency values
    which it previously did not have enough bits to encode. That way
    less information is lost than the information lost by rederiving
    the spectral coefficients with some error. This is why the
    filesize of files encoded with IS do not decrease significantly.
    Users wishing that IS coding should reduce filesize are expected
    to reduce their encoding bitrates appropriately.
    
    This is V2 of the commit. The old version did not mark ms_mask as
    0 since M/S and IS coding are incompactible, which resulted in
    distortions with M/S coding enabled. This version also improves
    phase detection by measuring it for every spectral coefficient in
    the band and using a simple majority rule to determine whether the
    coefficients are in or out of phase. Also, the energy values per
    spectral coefficient were changed as to reflect the
    official specifications.
    Reviewed-by: 's avatarClaudio Freire <klaussfreire@gmail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    e8576dc8
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...
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...