[FFmpeg-devel] [libav-devel] [PATCH] aacpsy: avoid norm_fac becoming NaN

Michael Niedermayer michaelni at gmx.at
Wed Apr 22 01:18:01 CEST 2015


On Tue, Apr 21, 2015 at 06:50:20PM +0200, Andreas Cadhalpun wrote:
> On 21.04.2015 02:20, Claudio Freire wrote:
> > On Mon, Apr 20, 2015 at 9:13 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> On Mon, Apr 20, 2015 at 09:07:14PM -0300, Claudio Freire wrote:
> >>> On Mon, Apr 20, 2015 at 8:59 PM, Claudio Freire <klaussfreire at gmail.com> wrote:
> >>>> On Mon, Apr 20, 2015 at 8:32 PM, Andreas Cadhalpun
> >>>> <andreas.cadhalpun at googlemail.com> wrote:
> >>>>>>>> The long version:
> >>>>>>>>
> >>>>>>>> ath should approximate the shape of the absolute hearing threshold, so
> >>>>>>>> yes, it's best if it really uses the minimum, since that will prevent
> >>>>>>>> clipping of the ath curve and result in a more accurate threshold
> >>>>>>>> computation.
> >>>>>>>
> >>>>>>> So you agree with my patch fixing minath?
> >>>>>>> Or would you prefer a version with:
> >>>>>>>     minath = ath(3410 - 0.733 * ATH_ADD, ATH_ADD)
> >>>>>>
> >>>>>> Well, that's not really closer to the minimum (a few tests with gnuplot say).
> >>>>>
> >>>>> Are you sure your plots were done correctly?
> >>>>> Because I'm quite sure this is the correct first order approximation
> >>>>> of the minimum.
> >>>>>
> >>>>> For ATH_ADD = 4 this gives 3407.068, which is quite close to Michael's value
> >>>>> (3407.080774800152).
> >>>>
> >>>> I checked the formula several times, but still, I could have made a mistake.
> >>>
> >>>
> >>> This is what I did if you want to check it out (maybe you spot the mistake)
> >>>
> >>> gnuplot> ath(f,a) = _ath(f/1000.0, a)
> >>> gnuplot> _ath(f,a) = 3.64 * f**(-0.8) - 6.8 * exp(-0.6 * (f-3.4) *
> >>> (f-3.4)) + 6.0 * exp(-0.15 * (f-8.7) * (f-8.7)) + (0.6 + 0.04 * a) *
> >>> 0.001 * f * f * f
> >>           ^^^^^^^^^^
> >> missing * f
> > 
> > Much better now :)
> > 
> > So yes. I'd say it's a good change.
> 
> OK, patch attached.

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150422/ccd460c5/attachment.asc>


More information about the ffmpeg-devel mailing list