[FFmpeg-devel] [PATCH] vp9: fix mvref finding to adhere to bug in libvpx.
Clément Bœsch
u at pkh.me
Sat Nov 9 21:35:58 CET 2013
On Sat, Nov 09, 2013 at 10:52:49AM -0500, Ronald S. Bultje wrote:
> Fixes a particular youtube video that I unfortunately can't share.
> ---
> libavcodec/vp9.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> index 62c7429..f334b95 100644
> --- a/libavcodec/vp9.c
> +++ b/libavcodec/vp9.c
> @@ -984,7 +984,10 @@ static void find_ref_mvs(VP9Context *s,
> if (mv->ref[0] != ref && mv->ref[0] >= 0) {
> RETURN_SCALE_MV(mv->mv[0], s->signbias[mv->ref[0]] != s->signbias[ref]);
> }
> - if (mv->ref[1] != ref && mv->ref[1] >= 0) {
> + if (mv->ref[1] != ref && mv->ref[1] >= 0 &&
> + // BUG - libvpx has this condition regardless of whether
> + // we used the first ref MV and pre-scaling
> + AV_RN32A(&mv->mv[0]) != AV_RN32A(&mv->mv[1])) {
> RETURN_SCALE_MV(mv->mv[1], s->signbias[mv->ref[1]] != s->signbias[ref]);
> }
> }
> @@ -997,7 +1000,10 @@ static void find_ref_mvs(VP9Context *s,
> if (mv->ref[0] != ref && mv->ref[0] >= 0) {
> RETURN_SCALE_MV(mv->mv[0], s->signbias[mv->ref[0]] != s->signbias[ref]);
> }
> - if (mv->ref[1] != ref && mv->ref[1] >= 0) {
> + if (mv->ref[1] != ref && mv->ref[1] >= 0 &&
> + // BUG - libvpx has this condition regardless of whether
> + // we used the first ref MV and pre-scaling
> + AV_RN32A(&mv->mv[0]) != AV_RN32A(&mv->mv[1])) {
> RETURN_SCALE_MV(mv->mv[1], s->signbias[mv->ref[1]] != s->signbias[ref]);
> }
> }
Applied.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131109/98bb8338/attachment.asc>
More information about the ffmpeg-devel
mailing list