summaryrefslogtreecommitdiffstats
path: root/libavcodec/aacpsy.c
diff options
context:
space:
mode:
authorClaudio Freire <claudiofreire@klaumptop.jampp.local>2015-03-01 20:11:12 -0300
committerMichael Niedermayer <michaelni@gmx.at>2015-03-02 13:31:31 +0100
commit84f4be424d52b05fabe0fe8cfb569c77fc0c1f7b (patch)
treeea6c8e9289a19487c9f4da81f4e5decdafa7ac78 /libavcodec/aacpsy.c
parentbfdd15c4e8b2ce20402ca9778fd6cfa4f95cd3a5 (diff)
downloadffmpeg-streaming-84f4be424d52b05fabe0fe8cfb569c77fc0c1f7b.zip
ffmpeg-streaming-84f4be424d52b05fabe0fe8cfb569c77fc0c1f7b.tar.gz
avcodec/aacpsy: Fix AAC Psy PE reduction calculation when multiple iterations are required
This is a small change, but it does have a big impact on bit allocation. all the regressions marked in the report have no audible difference (I didn't check them all though), but the improvements can be heard. This affects mostly high bit rates. It's related to issue #2686. In the report, A is the patched version, B is unpatched, all comparisons show deltas in the form (A-B), so a positive pSNR delta means a better quality in the patched version, and negative a regression. Regressions are only considered for pSNR deltas below -1db, they're considered serious below -6db. All measurements were done with tiny_psnr. The summary of the report inline for quick reading: Files: 58 Bitrates: 6 Tests: 347 Serious Regressions: 0 (0%) Regressions: 10 (2%) Improvements: 54 (15%) Big improvements: 26 (7%) Worst regression - sine_tester.flac - 384k - StdDev: 1.68 pSNR: -3.05 maxdiff: -178.00 Best improvement - 07 - Bound.flac - 384k - StdDev: -1700.05 pSNR: 20.64 maxdiff: -29595.00 Average - StdDev: -55.67 pSNR: 1.20 maxdiff: -1593.00 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacpsy.c')
-rw-r--r--libavcodec/aacpsy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 068fbcd..d1e65f6 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -717,7 +717,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
}
desired_pe_no_ah = FFMAX(desired_pe - (pe - pe_no_ah), 0.0f);
if (active_lines > 0.0f)
- reduction += calc_reduction_3gpp(a, desired_pe_no_ah, pe_no_ah, active_lines);
+ reduction = calc_reduction_3gpp(a, desired_pe_no_ah, pe_no_ah, active_lines);
pe = 0.0f;
for (w = 0; w < wi->num_windows*16; w += 16) {
OpenPOWER on IntegriCloud