[XviD-devel] Re: qpel smearing/noise problem

Michael Militzer xvid-devel@xvid.org
Thu, 9 Jan 2003 17:36:35 +0100


Hi,

----- Original Message -----
From: "Radek Czyz" <radoslaw@syskin.cjb.net>
To: <xvid-devel@xvid.org>
Sent: Thursday, January 09, 2003 1:19 PM
Subject: Re: [XviD-devel] Re: qpel smearing/noise problem


> This problem is - obviously - not only related to idct.
>
> However, the results are very strange:
>
> When XviD idct was used, xvid could decode everything correctly, but
> ffdshow with xvid idct - couldn't.
>
> When 'simple' idct was used in xvid, ffdshow (with 'simple' or
> 'reference' idct) is able to decode H and V interpolation correctly -
> but not HV. No other changes has been made to anything.
> Does anyone has any explanation? There must be an explanation for
> this...

yes, there is an explanation. My qpel interpolation code follows the
reference implementation (and the ISO spec corrigendum). The corrigendum
changes the way how HV interpolation has to be done. So if ffmpeg does not
follow the reference software (and it looks like it does not), then it's
quite logical that HV interpolated blocks are not correctly decoded.

> HV interpolation wasn't decoded correctly in any case - using
> reference idct, both in encoder and decoder, didn't help either.
>
> Does anyone remember where can I find in the specs, what size of block
> is used for halfpel interpolation in qpel mode? I've been doing all my
> experiments both on 8x8 blocks and 16x16 blocks, simply because I don't
> know which is correct. I'v been looking for it, but I havn't found the
> answer.

The current implementation in XVID should be correct. Regardless whether
we're in halfpel or in qpel mode, there should be always performed a 16x16
interpolation for normal INTER blocks, 16x8 with interlacing and 8x8 for 4MV
mode. Yes, we always do 8x8 interpolation in halfpel mode regardless of the
current block mode we have, but that's correct because 4 * 8x8 bilinear
interpolation is the same as one 16x16 bilinear interpolation, so in halfpel
mode there is no need for special code which allows different block sizes.
Due to boundary mirroring in qpel mode however, 4 * 8x8 filtering is not
identical to 1 * 16x16...


bye,
Michael