[MPlayer-dev-eng] [PATCH] use int_fast32_t in postproc/*

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Oct 10 13:44:07 CEST 2005


Hi,
On Wed, Oct 05, 2005 at 11:50:51AM -0500, Zoltan Hidvegi wrote:
> Cool, I'm all for changing everything to long.  But when you change

Any objections? It would be nice if as many people as possible could
test it, just in case I missed something important.
Otherwise I will apply probably tomorrow.
Btw.: If you have a x86 64 bit system, the main problem with the old
code was that mplayer -vo xv mf://*.png crashed. Just that you know what
to look out for.

> from unsigned to signed, watch out for divide and modulo by constant
> power of 2.  It's nice to write n/2, which is optimized to a shift if
> n is unsigned, but for signed n, C has this stupid round towards 0
> rule, which requires a bunch of extra instructions.  Scanning your

But if speed is an issue, things like n/2 should never be used, since it
relies on the compiler to optimize it into a shift instruction.

> patch, there are a few places where this happens (end = s + size/2
> like stuff), but it seems that all of those are outside of any loops,
> so happen only once per frame, so it's not really an issue.  Once can
> argue that size/2 is more readable than (size>>1), so it may be better
> to leave it.

I guess it is not neccessary to change it, but even if, it should be
done in a seperate patch anyway IMHO.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list