[XviD-devel] Smoothening of the vector field

Marco Al xvid-devel@xvid.org
Sat, 14 Dec 2002 18:11:28 +0100


Christoph Lampert wrote:

> I just tested some GMC stuff and had to look at motion vectors for a
> faster moving scene with only few textured blocks (beginning of DVD "Fifth
> Element") The result looked horrible! Not only very long vectors (which is
> okay for fast motion), but also very long "prediction corrections" (which
> means the motion field is very irregular), and it's the corrections that
> are saved to the bitstream and cost bits. :(

The trappings of local R-D optimization (almost the same issue as is present in
adaptive quantization at the moment).

> I would therefore like to see an option for smoothening the vector field
> after ME: In a second pass one tests for each MV if the current vector
> really is that much better than the one of it's left and right neighbours.
> Somehow this is done in normal ME already, because search starts with
> prediction of left, top and topright vectors. But that does not consider
> blocks to the right and botto, of course.

You could in a second pass perform a new search which also used tables to add
the coding costs for MVs which used the present MV as a predictor to the SAD,
instead of just its own coding costs like it is now ... how much slower would
that make ME?

A simpler method would be to simply run a median filter over the motion vectors,
theres a couple of papers on that topic.

http://lci.det.unifi.it/~barto/BartoResearch.html
http://www.diee.unica.it/pv2000/proceedings/papers/50.pdf

> Also, there is also code that favours (0,0) in order to increase the
> number of not_coded (SKIP) blocks. It seems that when there are large flat
> areas, this causes the vector field to always skip between (0,0) and the
> large vector of "real" motion.

You dont say.

> So again, either we have to _not_ favour SKIP during normal ME, and check
> for more skip possibilities later (including the length of vectors that
> _have_ to be coded, if the current block is skipped), or we leave ME as it
> is and then remove SKIPs later when we know what the next vectors are
> going to.

So it seems easier to only do skip in ME if the MV is really (0,0) ... that way
you can do all of the rest of the skip decisions at once, together with the
blocks whos cbp was 0.

Marco