[x265] [PATCH] Update testbench for threadpool

Min Chen chenm003 at 163.com
Tue Oct 8 11:35:01 CEST 2013


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1381224891 -28800
# Node ID 8109b19861bb525263f9ef82d0469d00e0f5467f
# Parent  41e5e72e2a4688642f7a46041c50fcc30972c4ab
Update testbench for threadpool

diff -r 41e5e72e2a46 -r 8109b19861bb source/test/testpool.cpp
--- a/source/test/testpool.cpp	Mon Oct 07 16:51:18 2013 -0500
+++ b/source/test/testpool.cpp	Tue Oct 08 17:34:51 2013 +0800
@@ -111,6 +111,10 @@
 
     this->WaveFront::enqueueRow(0);
 
+    // NOTE: When EnableRow after enqueueRow at first row, we'd better call pokeIdleThread, it will release a thread to do job
+    this->WaveFront::enableRow(0);
+    this->m_pool->pokeIdleThread();
+
     this->complete.wait();
 
     this->JobProvider::dequeue();
@@ -175,6 +179,7 @@
                 // row stays marked active until blocked or done
                 this->row[rownum + 1].active = true;
                 this->WaveFront::enqueueRow(rownum + 1);
+                this->WaveFront::enableRow(rownum + 1);
             }
         }
 
@@ -230,4 +235,6 @@
         frame.encode();
     }
     pool->release();
+
+    printf("All test passed!\n");
 }



More information about the x265-devel mailing list