[XviD-devel] New QPel code?
Christoph Lampert
xvid-devel@xvid.org
Sun, 13 Oct 2002 18:52:23 +0200 (CEST)
Hi,
latest CVS with QPel crashes with max_b=-1 for me, and
Qpel doesn't seem to work with max_b>=0.
Something else:
In motion_comp for INTER4V there is
sum = mvs[0].x + mvs[1].x + mvs[2].x + mvs[3].x;
if(quarterpel)
sum /= 2;
dx = (sum ? SIGN(sum) *
(roundtab[ABS(sum) % 16] + (ABS(sum) / 16)*2) : 0);
Are you sure quarterpel _or_ halfpel are rounded correctly here?
no QPel: mvs[0-3].x are in halfpel resolution, then
sum/4 would be eigthpel and should be rounded using
Table 7-8
"Modification of eigth sample resolution chrominance vector components"
Why do we use 16th-pel table for everything?
Whereas for Quarterpel, (mvs[0].x + mvs[1].x+mvs[2].x+mvs[3].x ) /4
would be sixteenthpel res and the 16-table should be used?
Simply dividing sum/2 and _then_ rounding again is surely wrong, too,
isn't it?
gruel