]> granicus.if.org Git - libvpx/commitdiff
Accumulate EXT_TX counts for multithread
authorPeter de Rivaz <peter.derivaz@argondesign.com>
Tue, 27 Oct 2015 10:50:00 +0000 (10:50 +0000)
committerDebargha Mukherjee <debargha@google.com>
Tue, 27 Oct 2015 16:41:07 +0000 (09:41 -0700)
EXT_TX introduces some new symbols to be decoded.
The encoder counts how many times these are used.
In multithreaded mode, the counts from the worker threads
need to be accumulated into the main thread.

This change means that VP10/VPxEncoderThreadTest now works
with more choices of cpu-used and number of passes.

Change-Id: Ibe7e6a3c58145265f4ead155ff98fb4cb37c3513

test/vp9_ethread_test.cc
vp10/common/thread_common.c

index 767c5c1418e6218c98ff91b4645c108a0d6a3b59..e621d847b6beb44144440bd2ae80b130d7af5497 100644 (file)
@@ -137,6 +137,6 @@ VP9_INSTANTIATE_TEST_CASE(
 
 VP10_INSTANTIATE_TEST_CASE(
     VPxEncoderThreadTest,
-    ::testing::Values(::libvpx_test::kTwoPassGood),
-    ::testing::Range(0, 1));
+    ::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
+    ::testing::Range(0, 9));
 }  // namespace
index e83cb8e67a03d0bf793ada9fe347a4f4bf97ac46..5523abbbd982146992f3249f7a99267cc6c1c809 100644 (file)
@@ -435,6 +435,17 @@ void vp10_accumulate_frame_counts(VP10_COMMON *cm, FRAME_COUNTS *counts,
       comps->fp[i] += comps_t->fp[i];
   }
 
+#if CONFIG_EXT_TX
+  for (i = 0; i < EXT_TX_SIZES; i++)
+    for (j = 0; j < TX_TYPES; j++)
+      cm->counts.inter_tx_type[i][j] += counts->inter_tx_type[i][j];
+
+  for (i = 0; i < EXT_TX_SIZES; i++)
+    for (j = 0; j < INTRA_MODES; j++)
+      for (k = 0; k < TX_TYPES; k++)
+        cm->counts.intra_tx_type[i][j][k] += counts->intra_tx_type[i][j][k];
+#endif
+
 #if CONFIG_MISC_FIXES
   for (i = 0; i < PREDICTION_PROBS; i++)
     for (j = 0; j < 2; j++)