[MPlayer-dev-eng] [PATCH] af_scaletempo

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Sep 15 10:10:54 CEST 2007


Hello,
On Fri, Sep 14, 2007 at 07:11:14PM -0400, Robert Juliano wrote:
[...]
> BTW, I more than read what Reimer says, I try his suggestions,
> and he's 0 for 2 on optimization suggestions, so far.  Even
> so, I respect him because often he's spot on, yet humble enough
> to encourage testing his suggestions.
> 
> 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.

That is not unexpected and I don't consider optimizing the int code
necessary for applying this, I just pointed out some obvious slowdowns.
I still have Athlons and Pentium2 in use and that is where the int code
will make sense and that division will kill performance.
As for going to 64 bit for the sum: probably that can be avoided by
shifting the result of the multiplication with little to no loss of
precision.
But shift will be horribly slow on Pentium4. Which leads to the
interesting question, what is the system you are one? Fast float and
slow int sounds a lot like at least Intel ;-).
I understand that there isn't much point in optimizing something you
can't benchmark well, so don't feel obligated to implement it, the other
things I suggested are more relevant, esp. the mplayer.c part.
This patch is getting rather old and I think it is getting time to get
it in :-)

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list