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 avcodec: loongson remove useless macros in mipsfpu optimization 2015-07-06 21:16:53 +02:00
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 avcodec: loongson optimize blockdsp with mmi 2015-07-21 17:50:19 +02:00
blockdsp_mmi.c avcodec: loongson optimize blockdsp with mmi 2015-07-21 17:50:19 +02:00
blockdsp_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for block functions 2015-06-22 20:18:10 +02:00
celp_filters_mips.c
celp_math_mips.c
compute_antialias_fixed.h
compute_antialias_float.h
constants.c avcodec: loongson optimize h264qpel with mmi v1 2015-08-09 20:43:54 +02:00
constants.h avcodec: loongson optimize h264qpel with mmi v1 2015-08-09 20:43:54 +02:00
fft_mips.c
fmtconvert_mips.c
h263dsp_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for H263 lpf functions 2015-06-17 13:50:14 +02:00
h263dsp_mips.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for H263 lpf functions 2015-06-17 13:50:14 +02:00
h263dsp_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for H263 lpf functions 2015-06-17 13:50:14 +02:00
h264chroma_init_mips.c use mmi instead of loongson3 as simd-optimization flag 2015-07-07 03:46:57 +02:00
h264chroma_mips.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for AVC chroma mc functions 2015-06-11 12:24:02 +02:00
h264chroma_mmi.c avcodec: loongson3 optimized h264chroma put and avg with mmi 2015-06-02 13:40:16 +02:00
h264chroma_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for AVC chroma mc functions 2015-06-11 12:24:02 +02:00
h264dsp_init_mips.c avcodec: loongson optimize h264dsp idct and loop filter with mmi 2015-09-07 22:49:52 +02:00
h264dsp_mips.h avcodec: loongson optimize h264dsp idct and loop filter with mmi 2015-09-07 22:49:52 +02:00
h264dsp_mmi.c avcodec: loongson optimize h264dsp idct and loop filter with mmi 2015-09-07 22:49:52 +02:00
h264dsp_msa.c avcodec/mips: Restructure as per avutil/mips/generic_macros_msa.h 2015-05-28 11:57:11 +02:00
h264idct_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for AVC idct functions 2015-06-11 17:10:45 +02:00
h264pred_init_mips.c avcodec: loongson optimized h264pred with mmi v2 2015-08-05 22:52:52 +02:00
h264pred_mips.h avcodec: loongson optimized h264pred with mmi v2 2015-08-05 22:52:52 +02:00
h264pred_mmi.c avcodec: loongson optimized h264pred with mmi v2 2015-08-05 22:52:52 +02:00
h264pred_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for AVC intra prediction functions 2015-06-11 17:10:41 +02:00
h264qpel_init_mips.c avcodec: loongson optimize h264qpel with mmi v1 2015-08-09 20:43:54 +02:00
h264qpel_mmi.c avcodec: loongson optimize h264qpel with mmi v1 2015-08-09 20:43:54 +02:00
h264qpel_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for AVC qpel functions 2015-06-13 02:21:55 +02:00
hevc_idct_msa.c avcodec/mips: Add 'const' to static arrays in HEVC MSA code 2015-06-11 12:24:48 +02:00
hevc_lpf_sao_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC loop filter and sao functions 2015-06-10 13:14:50 +02:00
hevc_macros_msa.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC bi mc functions 2015-06-02 01:54:51 +02:00
hevc_mc_bi_msa.c mips/hevcdsp: fix string concatenation on macros 2015-07-30 20:44:32 -03:00
hevc_mc_biw_msa.c mips/hevcdsp: fix string concatenation on macros 2015-07-30 20:44:32 -03:00
hevc_mc_uni_msa.c mips/hevcdsp: fix string concatenation on macros 2015-07-30 20:44:32 -03:00
hevc_mc_uniw_msa.c mips/hevcdsp: fix string concatenation on macros 2015-07-30 20:44:32 -03:00
hevcdsp_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC loop filter and sao functions 2015-06-10 13:14:50 +02:00
hevcdsp_mips.h mips/hevcdsp: fix string concatenation on macros 2015-07-30 20:44:32 -03:00
hevcdsp_msa.c mips/hevcdsp: fix string concatenation on macros 2015-07-30 20:44:32 -03:00
hevcpred_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC intra prediction functions 2015-06-10 13:53:03 +02:00
hevcpred_mips.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC intra prediction functions 2015-06-10 13:53:03 +02:00
hevcpred_msa.c avcodec/mips: build fix for MSA 2015-10-07 16:40:05 +02:00
hpeldsp_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for hpel functions 2015-06-19 14:00:12 +02:00
hpeldsp_mips.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for hpel functions 2015-06-19 14:00:12 +02:00
hpeldsp_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for hpel functions 2015-06-19 14:00:12 +02:00
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 avcodec: loongson optimized idctdsp with mmi 2015-07-16 14:27:53 +02:00
idctdsp_mmi.c avcodec: loongson move simple idct functions to a separate file 2015-07-21 14:48:18 +02:00
idctdsp_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for idctdsp functions 2015-07-07 14:35:15 +02:00
iirfilter_mips.c avcodec: loongson remove useless macros in mipsfpu optimization 2015-07-06 21:16:53 +02:00
lsp_mips.h
Makefile avcodec: loongson optimize h264qpel with mmi v1 2015-08-09 20:43:54 +02:00
mathops.h avcodec/mips: loongson fix bugs in mathops optimization 2015-05-21 17:46:33 +02:00
me_cmp_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for me_cmp functions 2015-07-06 18:25:14 +02:00
me_cmp_mips.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for me_cmp functions 2015-07-06 18:25:14 +02:00
me_cmp_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for me_cmp functions 2015-07-06 18:25:14 +02:00
mpegaudiodsp_mips_fixed.c
mpegaudiodsp_mips_float.c avcodec: loongson remove useless macros in mipsfpu optimization 2015-07-06 21:16:53 +02:00
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 avcodec: loongson optimize mpeg2 dct unquantize intra and denoise dct 2015-09-02 16:53:32 +02:00
mpegvideo_mmi.c avcodec: loongson optimize mpeg2 dct unquantize intra and denoise dct 2015-09-02 16:53:32 +02:00
mpegvideo_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideo functions 2015-07-01 17:32:47 +02:00
mpegvideoencdsp_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functions 2015-07-06 18:25:01 +02:00
mpegvideoencdsp_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functions 2015-07-06 18:25:01 +02:00
pixblockdsp_init_mips.c avcodec: loongson optimize pixblockdsp with mmi 2015-07-22 12:11:31 +02:00
pixblockdsp_mips.h avcodec: loongson optimize pixblockdsp with mmi 2015-07-22 12:11:31 +02:00
pixblockdsp_mmi.c avcodec: loongson optimize pixblockdsp with mmi 2015-07-22 12:11:31 +02:00
pixblockdsp_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for pixblock functions 2015-06-29 12:03:43 +02:00
qpeldsp_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for qpel functions 2015-06-18 12:33:15 +02:00
qpeldsp_mips.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for qpel functions 2015-06-18 12:33:15 +02:00
qpeldsp_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for qpel functions 2015-06-18 12:33:15 +02:00
sbrdsp_mips.c avcodec: loongson remove useless macros in mipsfpu optimization 2015-07-06 21:16:53 +02:00
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 avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for idctdsp functions 2015-07-07 14:35:15 +02:00
vp8_idct_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP8 functions 2015-08-04 11:15:06 -04:00
vp8_lpf_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP8 functions 2015-08-04 11:15:06 -04:00
vp8_mc_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP8 functions 2015-08-04 11:15:06 -04:00
vp8dsp_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP8 functions 2015-08-04 11:15:06 -04:00
vp8dsp_mips.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP8 functions 2015-08-04 11:15:06 -04:00
vp9_idct_msa.c avcodec/mips/vp9_idct_msa: Replace __volatile__ by volatile 2015-07-23 17:38:01 +02:00
vp9_intra_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 intra functions 2015-07-24 22:51:34 +02:00
vp9_lpf_msa.c avcodec/mips: build fix for MSA 64bit 2015-10-07 16:40:05 +02:00
vp9_mc_msa.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 bilinear functions 2015-07-27 17:13:24 +02:00
vp9dsp_init_mips.c avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 bilinear functions 2015-07-27 17:13:24 +02:00
vp9dsp_mips.h avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 bilinear functions 2015-07-27 17:13:24 +02:00
xvid_idct_mmi.c avcodec: loongson optimize xvid idct with mmi 2015-07-21 14:48:23 +02:00
xvididct_init_mips.c avcodec: loongson optimize xvid idct with mmi 2015-07-21 14:48:23 +02:00
xvididct_mips.h avcodec: loongson optimize xvid idct with mmi 2015-07-21 14:48:23 +02:00