[XviD-devel] direct mode predictor error

Radoslaw Czyz xvid-devel@xvid.org
Mon, 9 Sep 2002 22:23:01 +0930


Hello,

> the direct-mode motion search performs a +/-16 pixel search arround
> the reference block location. this is incorrect, and causes purple
> (offscreen) artifacts arround the edge of the image when the motion
> search is FORCED to alway use direct-mode.

Christoph and I recently found that direct vector of 0,0 might be out
of range. As the search is done with 0,0 as a starting point, this is
what happens: we set it to 0,0 and do a SAD out of picture's range.
Then we start a diamond which won't do anything, because all four (or
8 if it's a square?) checks will not be performed, as being out of
range.
As a result, you only have an out-of-range 0,0 vector.

This is fixed in my ME - if direct vector of 0,0 is out of range it
just uses different mode.

> i think the +/-16 search should be made arround the direct-mode
> motion-vector-predictor.

I'm not sure if I understand. Predictor is always 0,0 in direct mode.

> also whilst browsing the REALmagic source codes, i noticed this:

> // The hardware decoder is compliant to MPEG-4 definition,
> // which only allows direct mode when co-located MB is not coded as INTRA

> it sounds like another silly mpeg-4 limitations, like the every
> 132 frame i-frame rule & edged blocks must not be field-dct coded.

Something new? I'm pretty sure I've read that direct mode is still
possible in such a case, but co-located MB's vector is assumed as 0,0.

I might have read something old ;)

Radek