Re[4]: [XviD-devel] I haven't been here for 4 days and what I see? :)

Radek 'sysKin' Czyz xvid-devel@xvid.org
Mon, 4 Nov 2002 22:33:08 +1030


> We should definitely not use the whole picture for this, but
> only the block from which the global vector was calculated.
> And from the beginning we should only consider block with enough
> structure.
> Smolic uses a threshhold for absolute value of horizontal gradient and
> vertical gradient. Everything below a value (which I forgot) is marked to
> be ignored. Maybe if we can re-use interpolated image for
> this?
> If horizontal interpol is  Hor[x][y] =  (I[x][y]+I[x+1][y])/2 then

> SAD between I[x][y] and Hor[x,y] is (I[x][y]-I[x+1][y])/2
> so it's just horizontal gradient. Same for vertical, of course.

> He also shows that it's good to lowpass filter the image before using
> gradient decent. Maybe we could use precalculated hv-interpolated image
> for this?

> gruel

This sounds great - and yes, it should make everything way faster.
I was thinking about something like this (as my next experiment, of
course):
- run a check of all macroblocks - if current GMC vector is good
(below a threshold), we set pMB->mcsel = 1; else = 0;
Also, if SAD is below the threshold sum += SAD;

This is to check if there is a chance if given macroblock will be
GMC-ed. If not, we ignore it because it doesn't have to affect the
search (it will be compensated localy, or even made intra).

This is a good point to exclude flat macroblocks, as you said.

Now, we do a gradient descent using _only_ blocks for which mcsel is
1 - so we ignore all macroblocks which don't look like GMC-able, and
try to minimize sum (computed the same way as before).

If there is an obvious flaw in the procedure, tell me now so that I
miss some fun tommorow ;)

Radek