[XviD-devel] FYI: Qpel in Reference

Christoph Lampert xvid-devel@xvid.org
Fri, 10 Jan 2003 22:36:58 +0100 (CET)


Hi,

maybe it's already corrected, but if it's not: Reference-Software has a
Qpel bug, too: From 
http://mpeg.telecomitalialab.com/working_documents/mpeg-04/visual/visual_implementers_guide.zip

There are some more issues (chromaMV in QPel B-frames...) please check the
document yourself.

gruel

-------------------------------------------------------------

A truncation error of the chrominance field MV with quarter_pel_mode
P/S-VOP (Momusys version)Problem : 

  ISO/IEC 14496-2 Section 7.6.5 says,
 "Motion vector MVDCHR for both chrominance blocks is derived by
calculating the sum of the K luminance vectors, that corresponds to K 8x8
blocks that do not lie outside the VOP shape and dividing this sum by
2*K; in quarter sample mode the vectors are divided by 2 before
summation."

The ?division by 2? is usually implemented as ?/ 2? in the reference
software. However, the reference software shows a funny result only for
the vertical part of the chrominance field MV with quarter_pel_mode. For
adjustThe ?division by 2? is usually implemented as ?/ 2? in the reference
software. However, the reference software shows a funny result only for
the vertical part of the chrominance field MV with quarter_pel_mode. For
adjusting to the frame based scale, the vertical part has been multiplied
by 2 before the chrominance MV calculation. The current implementation may
forget returning back the adjustment.  

Solution : 
 Line 4354 in mot_comp.c L4354?line 3768 of OptSimple version?
replace 
     dy = (Int)(2*yvec[0]);
with 
     dy = (Int)(2*yvec[0])/2*2;

Line 4534 in mot_comp.c?line 3948 of OptSimple version?
replace
     dy = (Int)(2*yvec[1]);
with 
     dy = (Int)(2*yvec[1])/2*2;