[XviD-devel] Decoder performance
Christoph Lampert
chl at math.uni-bonn.de
Sun Aug 10 15:45:27 CEST 2003
Hi Ed,
please be careful when replacing
if (quarterpel)
by any arithmetic construction. From what I saw, quarterpel is not always
0 or 1, but 0 or "something", because e.g. MBMotionCompensation is called
with the value
(current->vol_flags & XVID_VOL_QUARTERPEL)
For 'if's this is of course okay, for calculations like
+(quarterpel&1) etc. it's not! We would have to use some kind of
(current->vol_flags & XVID_VOL_QUARTERPEL)?1:0
or so... which is another 'if' in disguise, even thoughi it's evaluated
less often and also it might be assembled by a cmov or so.
Christoph
On Sat, 9 Aug 2003, Edouard Gomez wrote:
> Edouard Gomez (ed.gomez at free.fr) wrote:
> > #define div_2(a, b) (((a)-(((a)>>31)&(-b)))>>(b))
>
> Don't know what happens to me, perhaps the heat... but the original code
> from gruel was right too :\ so forget these 2 last emails
>
> --
> Edouard Gomez
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>
More information about the XviD-devel
mailing list