From ae8da3e5c85562d1018b9f85c601884022f070a3 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Wed, 20 Aug 2008 19:00:52 -0600 Subject: [PATCH] r940 broke threads --- common/common.h | 6 ++++++ encoder/encoder.c | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common/common.h b/common/common.h index dde1b109..61582954 100644 --- a/common/common.h +++ b/common/common.h @@ -262,6 +262,8 @@ struct x264_t int i_frame_size; } out; + /**** thread synchronization starts here ****/ + /* frame number/poc */ int i_frame; @@ -404,6 +406,10 @@ struct x264_t int i_mb_prev_xy; int i_mb_top_xy; + /**** thread synchronization ends here ****/ + /* subsequence variables are either thread-local or constant, + * and won't be copied from one thread to another */ + /* mb table */ int8_t *type; /* mb type */ int8_t *qp; /* mb qp */ diff --git a/encoder/encoder.c b/encoder/encoder.c index 89309ee7..ab45238b 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -1258,7 +1258,6 @@ static void x264_thread_sync_context( x264_t *dst, x264_t *src ) // copy everything except the per-thread pointers and the constants. memcpy( &dst->i_frame, &src->i_frame, offsetof(x264_t, mb.type) - offsetof(x264_t, i_frame) ); - memcpy( &dst->mb.i_type, &src->mb.i_type, offsetof(x264_t, rc) - offsetof(x264_t, mb.i_type) ); dst->stat = src->stat; } -- 2.47.3