aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-07-02 19:13:00 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-07-03 13:17:57 +0200
commit8e607c747eca582a4ef66fa85a27492f517cde1d (patch)
tree656d18c3b7710f293ada9f4765369d01244b58be /libavcodec
parent8f4cfda9721fa099f49869092295717d0b4cc133 (diff)
downloadffmpeg-8e607c747eca582a4ef66fa85a27492f517cde1d.tar.gz
aacpsy: use a different metric for the spread of a band
This commit modifies 02dbed6 to use band->active_lines to better gauge how much information is contained within a single band and thus allow the perceptual noise subsitution to more accurately determine which bands to code as noise. The spread[w+g] used before this patch behaved more like a low-pass filter for PNS band_types, which could mistakingly mark some low frequency bands as noise. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacpsy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 78232d4518..b16f6b94f0 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -787,7 +787,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
psy_band->threshold = band->thr;
psy_band->energy = band->energy;
- psy_band->spread = spread_en[w+g];
+ psy_band->spread = band->active_lines * 2.0f / band_sizes[g];
}
}