[M4IF Technotes] Rounding of motion vectors for chroma?
Mithun N
mithun.nayak patni.com
Thu Nov 7 09:18:21 EST 2002
hi..
the motion vectors cant go to an accuracy of 1/32,
the reason being that there can be max of 4 non
transparent
blocks in a macroblock, each having an accuracy of
1/4...which
comes out to 1/16 and not 1/32.
and as far as using the table is concerned the
rounding is very
clearly mentioned _how_ to be done.
for eg..
if a macroblock has 4 non transparent blocks,and
you are calculating
the chroma vector for the same then add the 4
motion vectors(each with an accuracy of 1/4)
Divide the sum by 4....the so obtained accuracy
will be 1/16...
Now check the table 7.6 which shows the rounding
for 1/16 accuracy.
If the fractional part of the motion vector is
between 0/16 to 2/16 then the resulting fractional
part becomes 0/2=0.0
If the fractional part of the motion vector is
between 3/16 to 13/16 then the resulting
fractional part becomes 1/2=0.5
If the fractional part of the motion vector is
between 14/16 to 15/16 then the resulting
fractional part becomes 2/2=1.0
similarly if u have 3 nontransparent blocks ...you
will have amax accuracy of 1/4*1/3 =1/12..then
check table 7.7 and perform similar steps as in
table 7.6
Do ask if still this doesnt solve your query
regards
Mithun Nayak
-----Original Message-----
From: technotes-admin lists.m4if.org
[mailto:technotes-admin lists.m4if.org]On Behalf
Of Christoph Lampert
Sent: Friday, November 01, 2023 6:26 PM
To: technotes lists.m4if.org
Subject: RE: [M4IF Technotes] Rounding of motion
vectors for chroma?
Sorry, not really.
Of course I know that vectors have to be rounded
and that table 7.6 to
7.9 should be used for that. But the exact method
_how_ this is supposed
to be done is very unclear.
If K=4 and the lumi motion vectors in quarterpel
resolution,
chroma (mv[0]+mv[1]+mv[2]+mv[3])/(2*K) would be
32th-pel(!)
This is not allowed (and there's no table for
that), so the standard
talks about dividing quarterpel values by 2 before
doing the prodecure.
(If I am not mistaken, this section has been
changed between different
versions of drafts etc.)
So is rounding supposed to be a two-step process
in quarterpel-inter4v
mode? First devide by 2. Then use table 7-6? What
rounding is used for the
first division by 2?
Next, what about K=1? Then the result if mv[0]/2
is 8th-pel.
Should the 8th-pel table 7-8 be used for rounding
as the reference
software does (if I remember correctly)? Why isn't
it two-step again?
And why is the whole process so complicated, why
isn't there simply
another table for 32th-pel to halfpel?
Christoph
>
> -----Original Message-----
> From: technotes-admin lists.m4if.org
> [mailto:technotes-admin lists.m4if.org]On Behalf
> Of Christoph Lampert
> Sent: Wednesday, October 30, 2023 8:21 PM
> To: technotes lists.m4if.org
> Subject: [M4IF Technotes] Rounding of motion
> vectors for chroma?
>
>
> Hi,
>
> I have a question about rounding motion vectors,
> especially for
> chroma if quarterpel is active. I'll use a
simple
> example.
> Consider a macro block in inter4v mode with
> luminance motion vectors
> mv[0] to mv[3] in halfpel or quarterpel
> resolution.
>
> How do I calculate the motion vector for chroma
> from them?
> I know of course that it's
> mv[0]+mv[1]+mv[2]+mv[3] / (2*4)
> but how exactly is rounding supposed to be done?
> What I read from the
> standard about this is as unclear as possible.
>
> Thank you in advance,
>
> Christoph
>
> --
> Christoph H. Lampert chl math,uni-bonn,de |
Diese
> Signature wurde maschi-
> Beringstr. 6, Zi. 15, 53115 Bonn, Germany | nell
> erstellt und bedarf
> Tel. (0228) 73-4708 Fax. +49 228 73-7916 |
keiner
> Unterschrift. AZ 27B-6
>
> _______________________________________________
> Technotes mailing list
> Technotes lists.m4if.org
> http://lists.m4if.org/mailman/listinfo/technotes
>
> _______________________________________________
> Technotes mailing list
> Technotes lists.m4if.org
> http://lists.m4if.org/mailman/listinfo/technotes
>
_______________________________________________
Technotes mailing list
Technotes lists.m4if.org
http://lists.m4if.org/mailman/listinfo/technotes
More information about the Mp4-tech
mailing list