[MPlayer-dev-eng] -Wall

Zoltan Hidvegi mplayer at hzoli.2y.net
Sat Jun 5 09:33:27 CEST 2004


> In this specific case adding the following to each point end node on
> that control-flow originating if(dxy) would stop the warning:
> 
> ==============
> else uvdxy=0;
> ==============

You can do better than that by unswitching by chroma, i.e., move the
if (chroma) test outside, and duplicate the if(dxy)...else... stuff
with and without chroma.  And it may even be faster than the original
and no warning, and only a few more lines of code.

Also, with gcc there is a cheap way to `initialize' locals with an
__asm__("":"=X"(uvdxy)) statement.  This normally have zero overhead,
since it just tells gcc that there is something in the variable.  But
it can still add cost if the variable gets spilled, but probably not
in this case.  The fake initialization can be made a macro which could
either perform this asm trick, or could be no-op, or could initialize
the variable to random junk for debugging.

Zoli




More information about the MPlayer-dev-eng mailing list