1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-07 11:13:41 +02:00
FFmpeg/libavcodec/mips
Claudio Freire 01ecb7172b AAC encoder: Extensive improvements
This finalizes merging of the work in the patches in ticket #2686.

Improvements to twoloop and RC logic are extensive.

The non-exhaustive list of twoloop improvments includes:
 - Tweaks to distortion limits on the RD optimization phase of twoloop
 - Deeper search in twoloop
 - PNS information marking to let twoloop decide when to use it
   (turned out having the decision made separately wasn't working)
 - Tonal band detection and priorization
 - Better band energy conservation rules
 - Strict hole avoidance

For rate control:
 - Use psymodel's bit allocation to allow proper use of the bit
   reservoir. Don't work against the bit reservoir by moving lambda
   in the opposite direction when psymodel decides to allocate more/less
   bits to a frame.
 - Retry the encode if the effective rate lies outside a reasonable
   margin of psymodel's allocation or the selected ABR.
 - Log average lambda at the end. Useful info for everyone, but especially
   for tuning of the various encoder constants that relate to lambda
   feedback.

Psy:
 - Do not apply lowpass with a FIR filter, instead just let the coder
   zero bands above the cutoff. The FIR filter induces group delay,
   and while zeroing bands causes ripple, it's lost in the quantization
   noise.
 - Experimental VBR bit allocation code
 - Tweak automatic lowpass filter threshold to maximize audio bandwidth
   at all bitrates while still providing acceptable, stable quality.

I/S:
 - Phase decision fixes. Unrelated to #2686, but the bugs only surfaced
   when the merge was finalized. Measure I/S band energy accounting for
   phase, and prevent I/S and M/S from being applied both.

PNS:
 - Avoid marking short bands with PNS when they're part of a window
   group in which there's a large variation of energy from one window
   to the next. PNS can't preserve those and the effect is extremely
   noticeable.

M/S:
 - Implement BMLD protection similar to the specified in
   ISO-IEC/13818:7-2003, Appendix C Section 6.1. Since M/S decision
   doesn't conform to section 6.1, a different method had to be
   implemented, but should provide equivalent protection.
 - Move the decision logic closer to the method specified in
   ISO-IEC/13818:7-2003, Appendix C Section 6.1. Specifically,
   make sure M/S needs less bits than dual stereo.
 - Don't apply M/S in bands that are using I/S

Now, this of course needed adjustments in the compare targets and
fuzz factors of the AAC encoder's fate tests, but if wondering why
the targets go up (more distortion), consider the previous coder
was using too many bits on LF content (far more than required by
psy), and thus those signals will now be more distorted, not less.

The extra distortion isn't audible though, I carried extensive
ABX testing to make sure.

A very similar patch was also extensively tested by Kamendo2 in
the context of #2686.
2015-10-11 17:29:50 -03:00
..
aaccoder_mips.c AAC encoder: Extensive improvements 2015-10-11 17:29:50 -03:00
aacdec_mips.c
aacdec_mips.h
aacpsdsp_mips.c
aacpsy_mips.h
aacsbr_mips.c
aacsbr_mips.h
ac3dsp_mips.c
acelp_filters_mips.c
acelp_vectors_mips.c
amrwbdec_mips.c
amrwbdec_mips.h
blockdsp_init_mips.c blockdsp: remove high bitdepth parameter 2015-10-02 04:38:40 +02:00
blockdsp_mips.h
blockdsp_mmi.c
blockdsp_msa.c
celp_filters_mips.c
celp_math_mips.c
compute_antialias_fixed.h
compute_antialias_float.h
constants.c
constants.h
fft_mips.c
fmtconvert_mips.c
h263dsp_init_mips.c
h263dsp_mips.h
h263dsp_msa.c
h264chroma_init_mips.c
h264chroma_mips.h
h264chroma_mmi.c
h264chroma_msa.c
h264dsp_init_mips.c
h264dsp_mips.h
h264dsp_mmi.c
h264dsp_msa.c
h264idct_msa.c
h264pred_init_mips.c
h264pred_mips.h
h264pred_mmi.c
h264pred_msa.c
h264qpel_init_mips.c
h264qpel_mmi.c
h264qpel_msa.c
hevc_idct_msa.c
hevc_lpf_sao_msa.c
hevc_macros_msa.h
hevc_mc_bi_msa.c
hevc_mc_biw_msa.c
hevc_mc_uni_msa.c
hevc_mc_uniw_msa.c
hevcdsp_init_mips.c
hevcdsp_mips.h
hevcdsp_msa.c
hevcpred_init_mips.c
hevcpred_mips.h
hevcpred_msa.c avcodec/mips: build fix for MSA 2015-10-07 16:40:05 +02:00
hpeldsp_init_mips.c
hpeldsp_mips.h
hpeldsp_msa.c
idctdsp_init_mips.c avcodec: loongson delete invalid simple idct put and add optimization 2015-09-08 01:04:36 +02:00
idctdsp_mips.h
idctdsp_mmi.c
idctdsp_msa.c
iirfilter_mips.c
lsp_mips.h
Makefile
mathops.h
me_cmp_init_mips.c
me_cmp_mips.h
me_cmp_msa.c
mpegaudiodsp_mips_fixed.c
mpegaudiodsp_mips_float.c
mpegvideo_init_mips.c avcodec/mpegvideo: Change mpeg2 unquant to work with higher precission qscale 2015-09-18 02:39:17 +02:00
mpegvideo_mips.h
mpegvideo_mmi.c
mpegvideo_msa.c
mpegvideoencdsp_init_mips.c
mpegvideoencdsp_msa.c
pixblockdsp_init_mips.c
pixblockdsp_mips.h
pixblockdsp_mmi.c
pixblockdsp_msa.c
qpeldsp_init_mips.c
qpeldsp_mips.h
qpeldsp_msa.c
sbrdsp_mips.c
simple_idct_mmi.c avcodec: loongson delete invalid simple idct put and add optimization 2015-09-08 01:04:36 +02:00
simple_idct_msa.c
vp8_idct_msa.c
vp8_lpf_msa.c
vp8_mc_msa.c
vp8dsp_init_mips.c
vp8dsp_mips.h
vp9_idct_msa.c
vp9_intra_msa.c
vp9_lpf_msa.c avcodec/mips: build fix for MSA 64bit 2015-10-07 16:40:05 +02:00
vp9_mc_msa.c
vp9dsp_init_mips.c
vp9dsp_mips.h
xvid_idct_mmi.c
xvididct_init_mips.c
xvididct_mips.h