[XviD-devel] Decoder performance

Edouard Gomez ed.gomez at free.fr
Sat Aug 9 22:56:34 CEST 2003


Hmmm, the code gruel has given was wrong.

Here is the right one for obtaining a division by 2 when b is 1 and a
division by 1 when b is 0:

#define div_2(a, b) (((a)-(((a)>>31)&(-b)))>>(b))

This code  is still 20s  faster for the  matrix trailer with  my mplayer
module,  so if  it's  mathematicly  correct... i  think  we should  just
commit.

-- 
Edouard Gomez


More information about the XviD-devel mailing list