[M4IF Technotes] Question about chrominance MVs in a 4MV Macroblock

Dan Searles dsearles mmc.atmel.com
Tue Mar 18 18:18:00 EST 2003


Change:
temp_int = temp >> 8; //  temp_int = 6
to:
temp_int = temp / 16; //  temp_int = 3
('>> 8' is probably a typo of '/8')
and
MVx = 2*temp_int + roundtab16[temp_rem] = 2*6 + 1; = 13
to:
MVx = 2*temp_int + roundtab16[temp_rem] = 2*3 + 1; = 7
and you are done. MVx is the Chrom X vector. The way I look
at it is the integer parts are handled separately from the
fraction parts. Be careful to treat a negative sum as positive
during the middle of the calc and restore to negative after.
Luc Martel wrote:
>Hi all,
>
>here is my understanding of what's in the standard but obviously I
>understand it wrong because I'm getting very strange results.
>
>Let's suppose I have these MVs for a macroblock (in half sample accuracy),
>coordinates are (X,Y)
>
>There is no transparent macroblock so I'm using table 7-6 for 16th pixel
>position.
>
>(15, 20) (12, -11)
>(13, 15) (11, -9)
>
>
>Then I calculate the MV for both chrominance blocks
>X :
>roundtab16[16] = {0,0,0,1,1,1,1,1,1,1,1,1,1,1,2,2};
>temp = (15+12+13+11) // sum of x component in hp accuracy
>temp_int = temp >> 8; //  temp_int = 6
>temp_rem = temp % 16; // temp_rem = 3
>MVx = 2*temp_int + roundtab16[temp_rem] = 2*6 + 1; = 13
>
>this result would be in half sample accuracy in the luminance image.
>MVx = 13//2 -> 7
>
>same thing for Y.
>
>What I'm I doing wrong and is there any explanation on this clearer that
>what is written in the standard?
>
>Tkx in advance
>
>Luc
>
>
>_______________________________________________
>Technotes mailing list
>Technotes   lists.m4if.org
>http://lists.m4if.org/mailman/listinfo/technotes
>
>
>  
>

-- 
Dan Searles
Atmel Multimedia & Communications
3800 Gateway Centre, Suite 311
Morrisville, NC 27560
phone: (919)462-6553 fax: (919)462-0300


More information about the Mp4-tech mailing list