Commit 8e607c74 authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov Committed by Michael Niedermayer

aacpsy: use a different metric for the spread of a band

This commit modifies 02dbed6e 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: 's avatarClaudio Freire <klaussfreire@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8f4cfda9
...@@ -787,7 +787,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel, ...@@ -787,7 +787,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
psy_band->threshold = band->thr; psy_band->threshold = band->thr;
psy_band->energy = band->energy; psy_band->energy = band->energy;
psy_band->spread = spread_en[w+g]; psy_band->spread = band->active_lines * 2.0f / band_sizes[g];
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment