[XviD-devel] A little more rounding
Christoph Lampert
xvid-devel@xvid.org
Fri, 1 Nov 2002 13:40:34 +0100 (CET)
Hi,
I had a look at MPEG-4 working documents, "List of Problems"
http://mpeg.telecomitalialab.com/working_documents/mpeg-04/visual/visual_implementers_guide.zip
Id 4.8 is rather clearly connected to "our" problem:
Problem:
-------------------------
A truncation error of the chrominance field MV with quarter_pel_mode
P/S-VOP: 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."
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;
other topic may, too...
gruel