mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
vp9: fix mvref finding to adhere to bug in libvpx.
Fixes a particular youtube video that I unfortunately can't share. Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
2aec9e228c
commit
bd01412313
@ -191,11 +191,15 @@ 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MV at this position in previous frame, using different reference frame
|
||||
if (s->use_last_frame_mvs) {
|
||||
@ -204,10 +208,14 @@ 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);
|
||||
#undef INVALID_MV
|
||||
|
Loading…
x
Reference in New Issue
Block a user