Accumulate tx_totals counters in multi-threaded encoder
authorYunqing Wang <yunqingwang@google.com>
Tue, 10 Mar 2015 16:53:45 +0000 (09:53 -0700)
committerYunqing Wang <yunqingwang@google.com>
Tue, 10 Mar 2015 17:02:49 +0000 (10:02 -0700)
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

index 27a3212..7a3871c 100644 (file)
@@ -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];