Re[6]: [XviD-devel] Quality optimization
Christoph Lampert
xvid-devel@xvid.org
Fri, 24 Jan 2003 15:40:31 +0100 (CET)
On Sat, 25 Jan 2003, Radek Czyz wrote:
> >> if (x) { // 50% incorrect prediction
> >> x = ABS(x) // ~40% incorrect prediction
> >> ...
> >> ... and the same for y.
>
> > Where the heck in the code is this line???
>
> Well, it looks like this:
>
> if (x) {
> x = ABS(x);
> x += (1 << (iFcode - 1)) - 1;
> x >>= (iFcode - 1);
> if (x > 32) x = 32;
> xb = mvtab[x] + iFcode;
> } else xb = 1;
Oh, okay, so it's more than just the "x=ABS(x)" within the if-block.
Then of course, it can't simply be dropped (although one still might find
a more clever solution).
e.g. result would still be the same if mvtab[0]=1.
Can you check how often (x) really _is_ zero? If this is small, below 10%
or so, it might be better to do all the stuff regardless what x is.
gruel