Commit bd014123 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Anton Khirnov

vp9: fix mvref finding to adhere to bug in libvpx.

Fixes a particular youtube video that I unfortunately can't share.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 2aec9e22
......@@ -191,9 +191,13 @@ 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]);
}
}
}
......@@ -204,9 +208,13 @@ 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]);
}
}
AV_ZERO32(pmv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment