Re: [FFmpeg-devel] [PATCH 0/9] improve rounding across FFmpeg

2015-12-01 Thread Ganesh Ajjanagadde
On Tue, Dec 1, 2015 at 7:39 PM, Lou Logan wrote: > On Tue, 1 Dec 2015 19:27:49 -0500, Ganesh Ajjanagadde wrote: > >> The slowness comes from the generate code, e.g llrint compiles down to >> a single asm instruction cvttsd2si, while floor(x + 0.5) needs to do >> multiple things. > > How much slow

Re: [FFmpeg-devel] [PATCH 0/9] improve rounding across FFmpeg

2015-12-01 Thread Lou Logan
On Tue, 1 Dec 2015 19:27:49 -0500, Ganesh Ajjanagadde wrote: > The slowness comes from the generate code, e.g llrint compiles down to > a single asm instruction cvttsd2si, while floor(x + 0.5) needs to do > multiple things. How much slower is it? ___ f

[FFmpeg-devel] [PATCH 0/9] improve rounding across FFmpeg

2015-12-01 Thread Ganesh Ajjanagadde
Currently, there are numerous instances where the appropriate libm rounding functions lrint, llrint, rint, etc are not used and instead ad-hoc, slow, and sometimes risky floor(x + 0.5) and the like are being used. The risk comes from the fact that such a thing is broken for negative values and val