[x264-devel] motion estimation

Loren Merritt lorenm at u.washington.edu
Wed Oct 1 00:14:16 CEST 2008


On Mon, 29 Sep 2008, Oleg Terner wrote:

> We just want to get the mv of each mb as compared to the previous frame.
>
> To make this simple, we took just 2 frames.
> We see that the first frame is encoded as an I-frame, the second as a
> P-frame.
> However, the mv we got are sometimes very strange.
>
> The question is therefore as follows:
>
> How can we force the me routine to check mv only against the previous
> frame.

That's the default.

> and if so, where do we get these values from.

h->mb.mv for the whole frame, if you access it after slice_write.
h->mb.cache.mv for the current mb, if you access it after 
macroblock_analyse.
Both of the above are invalid for intra macroblocks.
h->mb.mvr has mvs for every block for which motion search was run (which 
is every block if you use --no-fast-pskip). These values are still 
sometimes bogus; perhaps some intra blocks do have a reasonable mv 
and intra was just better, but others are intra because motion 
search couldn't find anything and just had to pick a random mv.

Check your results against `mplayer -lavdopts vismv=1`.

--Loren Merritt


More information about the x264-devel mailing list