diff options
Diffstat (limited to 'libavcodec/vp9block.c')
-rw-r--r-- | libavcodec/vp9block.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/vp9block.c b/libavcodec/vp9block.c index 5a3b35649f..54f76d6e1c 100644 --- a/libavcodec/vp9block.c +++ b/libavcodec/vp9block.c @@ -1176,8 +1176,11 @@ static av_always_inline void mc_luma_dir(VP9Context *s, vp9_mc_func(*mc)[2], ff_thread_await_progress(ref_frame, FFMAX(th, 0), 0); // FIXME bilinear filter only needs 0/1 pixels, not 3/4 + // The arm _hv filters read one more row than what actually is + // needed, so switch to emulated edge one pixel sooner vertically + // (!!my * 5) than horizontally (!!mx * 4). if (x < !!mx * 3 || y < !!my * 3 || - x + !!mx * 4 > w - bw || y + !!my * 4 > h - bh) { + x + !!mx * 4 > w - bw || y + !!my * 5 > h - bh) { s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ref - !!my * 3 * ref_stride - !!mx * 3, 80, @@ -1218,8 +1221,11 @@ static av_always_inline void mc_chroma_dir(VP9Context *s, vp9_mc_func(*mc)[2], ff_thread_await_progress(ref_frame, FFMAX(th, 0), 0); // FIXME bilinear filter only needs 0/1 pixels, not 3/4 + // The arm _hv filters read one more row than what actually is + // needed, so switch to emulated edge one pixel sooner vertically + // (!!my * 5) than horizontally (!!mx * 4). if (x < !!mx * 3 || y < !!my * 3 || - x + !!mx * 4 > w - bw || y + !!my * 4 > h - bh) { + x + !!mx * 4 > w - bw || y + !!my * 5 > h - bh) { s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ref_u - !!my * 3 * src_stride_u - !!mx * 3, 80, |