Yes, the behavior you describe is intentional. Note that it's the
best_mv that is clamped, not the sum.
John
All above work fine for all video with resolution lower than Quad-HD,
but we realize that there is a problem when input video resolution
goes beyond 4096x4096, i.e. a 16 bit "short" integer is not long
enough to store a motion vector component with value higher than 4096
full pixels.
At this point, it is necessary to amend the VP8 specification to
clarify the motion vector value behavior for image size larger than
4096x4096, there are a couple of options here:
a. specify the maximum motion vector size range to [-4096, 4095] full
pixels regardless the image size (VP8 define 14 raw bits for width and
height, 16383x16383 is the maximum possible image size), this requires
additional enforcement of the size limit in encoder/decoders for
bit-stream compliant.
b. do not specify a maximum motion vector size, but change the
decoder/encoder source code to replace the 16 bit short integer data
type with a 32 bit integer data type to accommodate even larger motion
vector size.
We would like to hear from the community on this issue, comments are welcome.
Thanks,
Yaowu
> --
> You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
> For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>
>
The MV is allowed to point outside the frame. VP8 calls this
"unrestricted motion vectors" or UMVs in the bitstream guide. The data
outside the frame is synthesized by extending the last visible pixel
outward "infinitely". How you handle this is implementation specific.
What the libvpx decoder does at the moment is keep a small border
(~20px) of these synthesized pixels, then clamp any MVs that point
farther into the border than are actually available. The important
thing is that this secondary clamping not affect the MVs used in the
MV decoding process. So let's say:
MVe = clamp1(best_mv) + new_mv
MVp = clamp2(MVe)
It's important that the MVe value be preserved as it's part of the
motion vector decoding context model. ie, This MVe could be a future
MV's best_mv, but MVp can not be. MVe is defined by the bitstream. but
MVp is completely implementation independent.
John