• Claudio Freire's avatar
    AAC encoder: improve SF range utilization · ca203e99
    Claudio Freire authored
    This patch does 4 things, all of which interact and thus it
    woudln't be possible to commit them separately without causing
    either quality regressions or assertion failures.
    
    Fate comparison targets don't all reflect improvements in
    quality, yet listening tests show substantially improved quality
    and stability.
    
    1. Increase SF range utilization.
    
    The spec requires SF delta values to be constrained within the
    range -60..60. The previous code was applying that range to
    the whole SF array and not only the deltas of consecutive values,
    because doing so requires smarter code: zeroing or otherwise
    skipping a band may invalidate lots of SF choices.
    
    This patch implements that logic to allow the coders to utilize
    the full dynamic range of scalefactors, increasing quality quite
    considerably, and fixing delta-SF-related assertion failures,
    since now the limitation is enforced rather than asserted.
    
    2. PNS tweaks
    
    The previous modification makes big improvements in twoloop's
    efficiency, and every time that happens PNS logic needs to be
    tweaked accordingly to avoid it from stepping all over twoloop's
    decisions. This patch includes modifications of the sort.
    
    3. Account for lowpass cutoff during PSY analysis
    
    The closer PSY's allocation is to final allocation the better
    the quality is, and given these modifications, twoloop is now
    very efficient at avoiding holes. Thus, to compute accurate
    thresholds, PSY needs to account for the lowpass applied
    implicitly during twoloop (by zeroing high bands).
    
    This patch makes twoloop set the cutoff in psymodel's context
    the first time it runs, and makes PSY account for it during
    threshold computation, making PE and threshold computations
    closer to the final allocation and thus achieving better
    subjective quality.
    
    4. Tweaks to RC lambda tracking loop in relation to PNS
    
    Without this tweak some corner cases cause quality regressions.
    Basically, lambda needs to react faster to overall bitrate
    efficiency changes since now PNS can be quite successful in
    enforcing maximum bitrates, when PSY allocates too many bits
    to the lower bands, suppressing the signals RC logic uses to
    lower lambda in those cases and causing aggressive PNS.
    
    This tweak makes PNS much less aggressive, though it can still
    use some further tweaks.
    
    Also update MIPS specializations and adjust fuzz
    
    Also in lavc/mips/aacpsy_mips.h: remove trailing whitespace
    ca203e99
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...
.travis.yml 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_qsv.c Loading commit data...
ffmpeg_vdpau.c Loading commit data...
ffmpeg_videotoolbox.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...