If we find a second non-sub8x8 motion vector for a non-first sub8x8
block, and the clamped value is identical to the first non-sub8x8
motion vector, then the resulting nearmv motion vector is forced to
zero.
libvpx (probably accidentally) clears the bits if error_res is set,
along with keyframe/intraonly. This probably wasn't the intention
(since it's local data), but it's behaviour we have to copy...
Makes no real difference, but maybe scares coverity less (CID1297578)
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The practical effect of this is that the scaling will wrongly not be
applied to the interpolation edge (the 3/4 constants in this patch).
In other words, we clip to the pre-scaling interpolation, even though
these should be clipped post-scaling. The resulting out-of-frame MVs
are thus automatically clipped within the visible portion of the frame,
which is probably not the intention, but is unfortunately what libvpx
does, so we need to copy that behaviour.
This reproduces libvpx behaviour. It seems like it originally only
targeted loopfilter behaviour, but this unfortunately effects following
block contexting and thus directs bitstream sync.
This also fixes intra-only MT failures (it was the same bug), see trac
4526 and 4527.
Tested-by: James Almer <jamrial@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The unaligned size is not handled in setctx_2d(), causing edges of images
to have improper segmentation prediction, which causes visual artifacts
at image edges a few frames later.
This is required if it's subsequently re-enabled with no value updates
(which means, use values that were previously set).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
In vp9_decode_frame function, ff_thread_finish_setup is not called
when refreshctx is equal to 0, and the next decoding thread can not
start work until the cunrrent frame has been decoded completely. So
ff_thread_finish_setup needs to be called to enable Multi-thread
decoding in this condition.
Signed-off-by: Di Wu <di1028.wu@samsung.com>
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>