[MPlayer-dev-eng] [PATCH] af_scaletempo

Rich Felker dalias at aerifal.cx
Sat Sep 15 02:08:43 CEST 2007


On Fri, Sep 14, 2007 at 07:11:14PM -0400, Robert Juliano wrote:
> On Fri, Sep 14, 2007 at 01:21:30AM -0400, Rich Felker wrote:
> > Read what Reimar said. You don???t have to do any divisions in the inner
> > loop. Instead do them outside. No need for float which is bad anyway
> > because it needs alternative non-float code to support machines
> > without hardware float.
> > 
> > Rich
> 
> ROTFL, thanks for implying that I'm idiot who doesn't read
> the posts I respond to and could use basic computer science
> explained to me.

Eh, no disrespect intended. Some people here, ahem, are just a bit
abrupt in comments on code.

> Ok, SUM(MAX_INT * MAX_INT) easily overflows.  Yeah, I could
> use 64-bit ints to avoid dividing so often, but would that
> be faster than the float version.  Not on my system.  It's
> slower even with no division at all.

64bit add should be extremely fast. Are you sure you're not
introducing 64bit operations that aren't needed?

> I can only benchmark on systems I have access to.  On my
> system, the float version is 150x realtime, and the int
> version with the division is 80x realtime, plenty fast enough
> either way.  On old, slow systems this whole calculation can
> be skipped entirely and still produce decent results.

If performance only matters on slower systems, that's more of a reason
not to require float..

Rich



More information about the MPlayer-dev-eng mailing list