[MPlayer-dev-eng] [PATCH] VF Overlay

Uoti Urpala uoti.urpala at pp1.inet.fi
Sat Aug 8 02:46:46 CEST 2009


On Fri, 2009-08-07 at 19:56 -0400, Jason Tackaberry wrote:
> > >> +    int i, y, q = w / 8, r = w % 8;
> > > 
> > > Ugh, why use division?
> > 
> > What'd you prefer ? w >> 3 ?
> 
> Doesn't the compiler optimize this trivial stuff anyway?  I used the
> current code because it seemed more readable.

Division of signed integers cannot be automatically optimized to a
single shift unless the compiler can show the value is not negative
(-1 / 2 = 0, -1 >> 1 = -1). It may be optimized to code faster than a
division opcode though.




More information about the MPlayer-dev-eng mailing list