Commit 6f2068e6 authored by Changjiang Wei's avatar Changjiang Wei Committed by Michael Niedermayer

avcodec/hevc.c: for big negative mvy value, should wait line 0 of ref frame due to edge extending

Reviewed-by: 's avatarMickaël Raulet <mraulet@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cfaa2339
...@@ -1571,7 +1571,7 @@ static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, ptrdiff_t dststride, AVF ...@@ -1571,7 +1571,7 @@ static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, ptrdiff_t dststride, AVF
static void hevc_await_progress(HEVCContext *s, HEVCFrame *ref, static void hevc_await_progress(HEVCContext *s, HEVCFrame *ref,
const Mv *mv, int y0, int height) const Mv *mv, int y0, int height)
{ {
int y = (mv->y >> 2) + y0 + height + 9; int y = FFMAX(0, (mv->y >> 2) + y0 + height + 9);
if (s->threads_type == FF_THREAD_FRAME ) if (s->threads_type == FF_THREAD_FRAME )
ff_thread_await_progress(&ref->tf, y, 0); ff_thread_await_progress(&ref->tf, y, 0);
......
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