The old code might have been detrimental as it was potentially checking a CTB line below what's needed.
-- Christophe
From 575c7afd134ed3acfc826b247fefdd3fe3ba1b40 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet <christophe.gisq...@gmail.com> Date: Sun, 20 Jul 2014 09:34:58 +0200 Subject: [PATCH 1/2] hevc: wait proper position for tmvp The position is either rounded or not checked, so delay the wait to check the proper value. --- libavcodec/hevc_mvs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c index b1a1ffc..acc0b71 100644 --- a/libavcodec/hevc_mvs.c +++ b/libavcodec/hevc_mvs.c @@ -270,14 +270,14 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0, x = x0 + nPbW; y = y0 + nPbH; - if (s->threads_type == FF_THREAD_FRAME ) - ff_thread_await_progress(&ref->tf, y, 0); if (tab_mvf && (y0 >> s->sps->log2_ctb_size) == (y >> s->sps->log2_ctb_size) && y < s->sps->height && x < s->sps->width) { x &= -16; y &= -16; + if (s->threads_type == FF_THREAD_FRAME) + ff_thread_await_progress(&ref->tf, y, 0); x_pu = x >> s->sps->log2_min_pu_size; y_pu = y >> s->sps->log2_min_pu_size; temp_col = TAB_MVF(x_pu, y_pu); @@ -290,6 +290,8 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0, y = y0 + (nPbH >> 1); x &= -16; y &= -16; + if (s->threads_type == FF_THREAD_FRAME) + ff_thread_await_progress(&ref->tf, y, 0); x_pu = x >> s->sps->log2_min_pu_size; y_pu = y >> s->sps->log2_min_pu_size; temp_col = TAB_MVF(x_pu, y_pu); -- 1.9.2.msysgit.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel