[M4IF Technotes] information regarding halfpel interpolation in the quartersample mode

Gary Sullivan garysull microsoft.com
Fri Oct 26 12:08:43 EDT 2001


Vinod,
I think some concrete examples are in order.
Here are four.  Consider macroblock (i,j) having
its upper left corner at (x,y) position
(i*16, j*16) in the current picture.
Example 1:  (MVx, MVy) = (5.25, 0.25)
The integer part of the MV is (5, 0)
The components of the MV are positive, so
the area needed is biased to the right
and below the area needed for the integer MV.
Thus the area needed in the reference picture
is the 16x16 area having its upper left
corner at position (i*16+5, j*16), plus one extra
column to the right and one extra row below
that area.  Thus the area needed in the
reference picture is the 17x17 area having
its upper left corner at position (i*16+5, j*16).
Example 2: (MVx, MVy) = (-5.25, -0.25)
The integer part of the MV is (-5, 0)
The components of the MV are negative, so
the area needed is biased to the left
and above the area needed for the integer MV.
Thus the area needed in the reference picture
is the 16x16 area having its upper left
corner at position (i+16-5, j*16), plus one extra
column to the left and one extra row above
that area.  Thus the area needed in the
reference picture is the 17x17 area having
its upper left corner at position (i*16-6, j*16-1).
Example 3: (MVx, MVy) = (5.25, -0.25)
The area needed in the reference picture is
the 17x17 area having its upper left corner
at position (i*16+5, j*16-1).
Example 4: (MVx, MVy) = (-5.25, 0.25)
The area needed in the reference picture is
the 17x17 area having its upper left corner
at position (i*16-6, j*16).
The same is true whether quarter pel or half pel
motion is in use.
Perhaps this could have been explained better
by saying to get an integer motion vector by
rounding the position toward negative infinity
and then grabbing a 17x17 area starting from there.
-Gary S.
+> -----Original Message-----
+> From: Vinod Kumar [mailto:kmr   iis.fhg.de] 
+> Sent: Friday, October 26, 2023 4:07 AM
+> To: Gary Sullivan; technotes   lists.m4if.org
+> Subject: Re: [M4IF Technotes] information regarding halfpel 
+> interpolation in the quartersample mode
+> 
+> 
+> Hello Gary
+> 	Thankyou for clearing some doubts of mine. There is one more
+> clarification regarding 1. that you have replied. Since 
+> according to the
+> standard(as I can understand) for every interger pel the 
+> calculation of
+> half pel is done by filtering horizontally and vertically and the
+> resultant halfpel values that i get is positioned like the way shown
+> below
+> 
+> 	I  H
+>         H  H
+> 
+> 	where H is the halfpel value and I is the integer pel in focus
+> 
+> isnt it almost every time enough if I grab 1 more column to 
+> the left and
+> one more row above without bothering about whether the Integerpel
+> motionvector is + or - 
+> 
+> Am I missing something over here? please enlighten me.
+> regards
+> vinod
+> Gary Sullivan wrote:
+> > 
+> > Vinod,
+> > 
+> > 1) The remark about biasing means that if the
+> >    fractional part of the motion vector is positive,
+> >    you need to grab one more column of samples to
+> >    the right or one more row below the samples of
+> >    the block at the location pointed to by the motion vector.
+> >    If that fractional part is negative, you need
+> >    a column to the left or a row above.
+> >    If you need to interpolate to predict a 16x16
+> >    area, you will need 17x17 samples in the reference
+> >    picture.  The same is true for half-pel motion.
+> > 
+> > 2) As reported a few days ago on this reflector, there
+> >    is a problem with the specification of MPEG-4's
+> >    quarter pel motion.  It's too early to predict
+> >    how that will be resolved, but most people seem
+> >    in favor of the method in the reference software.
+> > 
+> > 3) Your remark about trying to calculate eight
+> >    quarter pel positions around an integer pel vector
+> >    gives me the impression that you're talking about
+> >    how do a search in the encoder.  The spec only
+> >    covers how the decoder operates, and the decoder
+> >    doesn't need to do anything that fits that description.
+> >    Again I would point to the reference software if
+> >    you want an illustration of how to design an encoder.
+> > 
+> > Best Regards,
+> > 
+> 
+> > Gary Sullivan
+> > 
+> > +> -----Original Message-----
+> > +> From: Vinod Kumar [mailto:kmr   iis.fhg.de]
+> > +> Sent: Thursday, October 25, 2023 4:52 AM
+> > +> To: technotes   lists.m4if.org
+> > +> Subject: [M4IF Technotes] information regarding halfpel
+> > +> interpolation in the quartersample mode
+> > +>
+> > +>
+> > +> Hello
+> > +>      i have a confusion regarding halfpel interpolation in
+> > +> the quartersample
+> > +> mode. The standard says "a reference block of size
+> > +> (M+1)x(N+1) biased in
+> > +> the direction of the half or quarter sample position is 
+> read from the
+> > +> reconstructed and padded reference VOP." what does biased
+> > +> hear mean? Do
+> > +> I have to calculate the half pel values 8 times for the
+> > +> eight adjacent
+> > +> positions around the Integerpel mv? If anybody have any 
+> web reference
+> > +> regarding the principle of quarterpel interpolation 
+> please do let me
+> > +> know.
+> > +> --
+> > +> Vinod
+> > +> _______________________________________________
+> > +> Technotes mailing list
+> > +> Technotes   lists.m4if.org
+> > +> http://lists.m4if.org/mailman/listinfo/technotes
+> > +>
+> 


More information about the Mp4-tech mailing list