[x264-devel] out-of-range motion vectors

Loren Merritt lorenm at u.washington.edu
Tue Jul 31 19:21:11 CEST 2007


On Tue, 31 Jul 2007, CAdevel wrote:

> Look at those maximum motion vectors I found:
> --me hex with:
>    --merange 24   -> 168
>    --mvrange 24   ->  39
> --me esa with:
>    --merange 16    -> 272
>    --mvrange 16     -> 37
>
> So using the --mvrange option the motion vectors make sense, but using the
> --merange option they do not. Or am I wrong?

What part makes sense?

If you're wondering why 37 > mvrange, that might be because mvrange isn't 
strictly enforced. I do strictly enforce the limits of the standard 
(2048 horizontal, 512 vertical), but any smaller mvrange is regarded only 
as a suggestion, and various mv refinement procedures may extend several 
pixels beyond the nominal range.

>> In all cases the search starts at some predicted location, not at (0,0).
>
> Is this inside the macroblock or anywhere in the picture? How is this
> predicted start location calculated?

There are several predictions:
Neighboring blocks (in all directions: bottom and right neighbors are 
taken from the previous frame because they aren't yet coded in the current 
frame. Previous and next frame neighbors may or may not be available 
depending on the types of frames.)
Other partition sizes of the current macroblock (unless of course this is 
the first partition tried)
And (0,0)

Those can be anywhere in the picture, or might even be past the edge of 
the picture (since a mv that was within the picture when evaluated 
relative to one block will point somewhere else when evaluated relative to 
a different block).

So if you use the default --merange 16 --mvrange 512 on a video with 
some large mvs: Maybe the first mb starts its search at (0,0) and 
finishes at (0,16). The next mb decides (0,16) is the best of its 
predictors and starts there, and ends its search at (0,32). Etc until it 
reaches the full mv length.

--Loren Merritt
_______________________________________________
x264-devel mailing list
x264-devel at videolan.org
http://mailman.videolan.org/listinfo/x264-devel


More information about the x264-devel mailing list