aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-10-27 16:50:20 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-10-27 23:49:50 +0100
commit2f77894cccec8dcba47b5217da9b51273c24fbbb (patch)
treef9c524499dfbbe772bd52b0a57ad5b68e1f2b852 /libavcodec/hevc.c
parentc1882e801d6492565951c19ba520c8a2bd8735e8 (diff)
downloadandroid_external_ffmpeg-2f77894cccec8dcba47b5217da9b51273c24fbbb.tar.gz
android_external_ffmpeg-2f77894cccec8dcba47b5217da9b51273c24fbbb.tar.bz2
android_external_ffmpeg-2f77894cccec8dcba47b5217da9b51273c24fbbb.zip
hevc: better mt implementation
Signed-off-by: Mickaƫl Raulet <mraulet@insa-rennes.fr> (cherry picked from commit 93afb8c519deca85b3c97804927de5b016dd32d1) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r--libavcodec/hevc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 1fb350fcbb..011b1ee216 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -1066,13 +1066,12 @@ static void chroma_mc(HEVCContext *s, int16_t *dst1, int16_t *dst2, ptrdiff_t ds
}
static void hevc_await_progress(HEVCContext *s, HEVCFrame *ref,
- const Mv *mv, int y0)
+ const Mv *mv, int y0, int height)
{
- int y = (mv->y >> 2) + y0;
+ int y = (mv->y >> 2) + y0 + height + 9;
- //ff_thread_await_progress(&ref->tf, FFMIN(s->height, y), 0);
if (s->threads_type == FF_THREAD_FRAME )
- ff_thread_await_progress(&ref->tf, INT_MAX, 0);
+ ff_thread_await_progress(&ref->tf, y, 0);
}
static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
@@ -1190,13 +1189,13 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
if (!ref0)
return;
- hevc_await_progress(s, ref0, &current_mv.mv[0], y0);
+ hevc_await_progress(s, ref0, &current_mv.mv[0], y0, nPbH);
}
if (current_mv.pred_flag[1]) {
ref1 = refPicList[1].ref[current_mv.ref_idx[1]];
if (!ref1)
return;
- hevc_await_progress(s, ref1, &current_mv.mv[1], y0);
+ hevc_await_progress(s, ref1, &current_mv.mv[1], y0, nPbH);
}
if (current_mv.pred_flag[0] && !current_mv.pred_flag[1]) {