[FFmpeg-devel] [PATCH v2 1/3] [GSoC] [AAC] aaccoder: Implement Perceptual Noise Substitution

Rostislav Pehlivanov atomnuker at gmail.com
Wed Apr 15 01:05:54 CEST 2015

You're right. Unfortunately letting the sf_idx be clipped to the minscale
(+SCALE_MAX_DIFF) causes clipped noise values to be reported by the
decoder. Seems like that magic number 4 you suggested might need to be
adjusted after all. I also tried testing to see if advancing the minscaler
based off of the noise sf_idx would work, but it didn't.
Still, something weird happens at around 1.295 constant value for the
threshold. The noise becomes clipped so increasing the value further yields
no change in result. Any idea what could be causing this sudden increase in
noise as the parameter is increased? Other than that the resolution of
energy and threshold values is low enough.

On 14 April 2015 at 22:06, Claudio Freire <klaussfreire at gmail.com> wrote:

> On Tue, Apr 14, 2015 at 4:52 PM, Rostislav Pehlivanov
> <atomnuker at gmail.com> wrote:
> > Uhh, can't replicate bug here (freshly built ffmpeg, just applied this
> patch
> > only), (md5 for file = 473edd68b91123c3a9c1825271012357). tried other
> files
> > and they encode and play fine. Spectrum also looks fine. I also tested
> other
> > random files out of the samples and they all seem file.
> > Know of any other problematic files?
> I did a pull, replaced:
> if (s->options.pns && start*freq_mul > NOISE_LOW_LIMIT && energy <
> uplim * 1.2f) {
> with
> if (s->options.pns && start*freq_mul > NOISE_LOW_LIMIT && energy <
> uplim * 2.2f) {
> And ran
> /home/claudiofreire/src/ffmpeg/ffmpeg -i
> /home/claudiofreire/tmp/audiosamples/ffsamples/aac/ct_faac-adts.aac
> -strict -2 -c:a aac -b:a 48k -cutoff 22050 -f adts -aac_pns 1 -y
> test.adts
> And got the assertion failure. You can try playing with that constant
> or simply commenting out the "energy < uplim * X" term to force all
> noise, and you will get it.

More information about the ffmpeg-devel mailing list