Re: [FFmpeg-devel] [PATCH] swr/resample: use fma when it is faster

2015-12-14 Thread Ganesh Ajjanagadde
On Sun, Dec 13, 2015 at 10:25 PM, Ronald S. Bultje wrote: > Hi, > > On Sun, Dec 13, 2015 at 7:29 PM, Ganesh Ajjanagadde > wrote: > >> The worst part is that it is a bad idea to do runtime dispatch on the >> fma() itself, as the function call overhead will be nonneglible, and >> so one can't creat

Re: [FFmpeg-devel] [PATCH] swr/resample: use fma when it is faster

2015-12-13 Thread Ronald S. Bultje
Hi, On Sun, Dec 13, 2015 at 7:29 PM, Ganesh Ajjanagadde wrote: > The worst part is that it is a bad idea to do runtime dispatch on the > fma() itself, as the function call overhead will be nonneglible, and > so one can't create a helper API in avutil or elsewhere. Thus, it can > only be used whe

Re: [FFmpeg-devel] [PATCH] swr/resample: use fma when it is faster

2015-12-13 Thread Ganesh Ajjanagadde
On Sun, Dec 13, 2015 at 6:55 PM, James Almer wrote: [...] > > FP_FAST_FMA is apparently not defined on mingw-w64 even though it supports > fma() and generates FMA3/4 instructions when targeting relevant CPUs. Guess some implementer took the "optional" literally and decided not to bother. > > I a

Re: [FFmpeg-devel] [PATCH] swr/resample: use fma when it is faster

2015-12-13 Thread James Almer
On 12/13/2015 8:08 PM, Ganesh Ajjanagadde wrote: > On Sun, Dec 13, 2015 at 5:55 PM, Ganesh Ajjanagadde > wrote: >> On Sun, Dec 13, 2015 at 5:47 PM, Ronald S. Bultje wrote: >>> Hi, >>> >>> On Sun, Dec 13, 2015 at 4:59 PM, Ganesh Ajjanagadde >>> wrote: fma is a faster function on archite

Re: [FFmpeg-devel] [PATCH] swr/resample: use fma when it is faster

2015-12-13 Thread Ganesh Ajjanagadde
On Sun, Dec 13, 2015 at 5:55 PM, Ganesh Ajjanagadde wrote: > On Sun, Dec 13, 2015 at 5:47 PM, Ronald S. Bultje wrote: >> Hi, >> >> On Sun, Dec 13, 2015 at 4:59 PM, Ganesh Ajjanagadde >> wrote: >>> >>> fma is a faster function on architectures supporting a native CPU >>> instruction for it. >>> T

Re: [FFmpeg-devel] [PATCH] swr/resample: use fma when it is faster

2015-12-13 Thread Ganesh Ajjanagadde
On Sun, Dec 13, 2015 at 5:47 PM, Ronald S. Bultje wrote: > Hi, > > On Sun, Dec 13, 2015 at 4:59 PM, Ganesh Ajjanagadde > wrote: >> >> fma is a faster function on architectures supporting a native CPU >> instruction for it. >> This may be tested by the ISO C optionally defined FP_FAST_FMA. Althoug

Re: [FFmpeg-devel] [PATCH] swr/resample: use fma when it is faster

2015-12-13 Thread Ronald S. Bultje
Hi, On Sun, Dec 13, 2015 at 4:59 PM, Ganesh Ajjanagadde wrote: > fma is a faster function on architectures supporting a native CPU > instruction for it. > This may be tested by the ISO C optionally defined FP_FAST_FMA. Although > in the x86 lineup this came fairly late > (from Haswell onwards, a

[FFmpeg-devel] [PATCH] swr/resample: use fma when it is faster

2015-12-13 Thread Ganesh Ajjanagadde
fma is a faster function on architectures supporting a native CPU instruction for it. This may be tested by the ISO C optionally defined FP_FAST_FMA. Although in the x86 lineup this came fairly late (from Haswell onwards, and hence is absent unless appropriate -march is passed), numerous other arc