[FFmpeg-devel] [PATCH] avcodec/aacenc_is: replace pow(x, 0.75) by x/sqrtf(sqrtf(x))
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Thu Jan 14 15:43:34 CET 2016
On Wed, Jan 13, 2016 at 11:27 PM, Claudio Freire <klaussfreire at gmail.com> wrote:
> On Mon, Jan 11, 2016 at 7:23 PM, Ganesh Ajjanagadde
> <gajjanagadde at gmail.com> wrote:
>> This is quite an accurate approximation; testing shows ~ 2ulp error in
>> the floating point result. Tested with FATE.
>>
>> Alternatively, if one wants "full accuracy", one can use powf, or sqrt
>> instead of sqrtf. With powf, one gets 1 ulp error (theoretically should be 0, as
>> 0.75 is exactly representable) on GNU libm, with sqrt, 0 ulp error.
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>
>
> Pushed.
>
> Took the liberty of abstracting out the pow implementation we
> discussed on IRC into a utility function and push that. It's more
> readable, and next time we'll know clearly that's the way to go.
Good idea, thanks.
More information about the ffmpeg-devel
mailing list