From: Yunqing Wang Date: Tue, 10 Mar 2015 16:53:45 +0000 (-0700) Subject: Accumulate tx_totals counters in multi-threaded encoder X-Git-Tag: v1.4.0~63^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0cf9719d0c3eee99431ef313a5aaf817f22b5af;p=libvpx 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 --- 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];