From f0cf9719d0c3eee99431ef313a5aaf817f22b5af Mon Sep 17 00:00:00 2001 From: Yunqing Wang Date: Tue, 10 Mar 2015 09:53:45 -0700 Subject: [PATCH] Accumulate tx_totals counters in multi-threaded encoder Tx_totals counters weren't handled correctly in multi-thread case, which caused the mismatch while encoding using threads > 1. This patch fixed that. Change-Id: Ice9b0386f57175fb92a0bdcd5042686a3106246a --- vp9/common/vp9_thread_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vp9/common/vp9_thread_common.c b/vp9/common/vp9_thread_common.c index 27a3212ca..7a3871c41 100644 --- a/vp9/common/vp9_thread_common.c +++ b/vp9/common/vp9_thread_common.c @@ -382,6 +382,9 @@ void vp9_accumulate_frame_counts(VP9_COMMON *cm, FRAME_COUNTS *counts, cm->counts.tx.p8x8[i][j] += counts->tx.p8x8[i][j]; } + for (i = 0; i < TX_SIZES; i++) + cm->counts.tx.tx_totals[i] += counts->tx.tx_totals[i]; + for (i = 0; i < SKIP_CONTEXTS; i++) for (j = 0; j < 2; j++) cm->counts.skip[i][j] += counts->skip[i][j]; -- 2.50.1