[XviD-devel] qpel chroma rounding

Michael Militzer xvid-devel@xvid.org
Thu, 31 Oct 2002 00:31:58 +0100


Hi,

----- Original Message -----
From: "Michael Niedermayer" <michaelni@gmx.at>
To: <xvid-devel@xvid.org>
Sent: Wednesday, October 30, 2002 8:52 PM
Subject: Re: [XviD-devel] qpel chroma rounding


> Hi
>
> On Wednesday 30 October 2002 19:38, Michael Militzer wrote:
> > Hi all,
> >
> > I just commited the fixed qpel chroma rounding code. I believe that
XVID's
> > qpel motion compensation code is now (finally) correct (at least fdam
seems
> > to like it). However I'm afraid that maybe no other decoder might be
able
> > to decode XVID qpel content correctly at the moment. DivX 5.0.2 decodes
the
> > chroma blocks incorrectly (but also luma is wrong if 4MV is used, so
DivX5
> > is no good choice anyway). I haven't checked ffmpeg, but I think I
remember
> > that the rounding is done in a different way here too, so a patch might
be
> > needed...
> iam not sure if
> mx = (motion_x >> 2) + roundtab_78[motion_x & 0x7];
> is correct
>
> at least a1ge2_ace_L3.bits looks wrong if i use it for the x part of the
MV
> but that one is interlaced, i dont see any difference in the few
> non-interlaced qpel test-streams i found :(
>
> could u point me to the part of the M$ reference which uses the
roundtab_78

ok, I think you are right: we have to half the vector in a first step and
then round using table 7-9 afterwards (the whole rounding process becomes
much more logical this way...). I've updated the dev-api-3 tree again, you
may have a look and tell whether you can agree now or not...

bye,
Michael