[x265] [PATCH] SEA motion search: Set m_reconRowFlag only after completing integral calculation

vignesh at multicorewareinc.com vignesh at multicorewareinc.com
Wed Jan 4 08:23:39 CET 2017


# HG changeset patch
# User Vignesh Vijayakumar <vignesh at multicorewareinc.com>
# Date 1483446055 -19800
#      Tue Jan 03 17:50:55 2017 +0530
# Node ID 00925b5053be71a8714701a857ef048d2cc0032f
# Parent  a2fe29ca5c6c67921bbe3e35330854d4d4fe6dc3
SEA motion search: Set m_reconRowFlag only after completing integral calculation

diff -r a2fe29ca5c6c -r 00925b5053be source/encoder/framefilter.cpp
--- a/source/encoder/framefilter.cpp	Fri Dec 30 09:20:28 2016 +0530
+++ b/source/encoder/framefilter.cpp	Tue Jan 03 17:50:55 2017 +0530
@@ -642,6 +642,9 @@
     const uint32_t numCols = m_frame->m_encData->m_slice->m_sps->numCuInWidth;
     const uint32_t lineStartCUAddr = row * numCols;
 
+    /* Generate integral planes for SEA motion search */
+    if(m_param->searchMethod == X265_SEA)
+        computeMEIntegral(row);
     // Notify other FrameEncoders that this row of reconstructed pixels is available
     m_frame->m_reconRowFlag[row].set(1);
 
@@ -768,10 +771,16 @@
         }
     } // end of (m_param->maxSlices == 1)
 
+    if (ATOMIC_INC(&m_frameEncoder->m_completionCount) == 2 * (int)m_frameEncoder->m_numRows)
+    {
+        m_frameEncoder->m_completionEvent.trigger();
+    }
+}
+
+void FrameFilter::computeMEIntegral(int row)
+{
     int lastRow = row == (int)m_frame->m_encData->m_slice->m_sps->numCuInHeight - 1;
-
-    /* generate integral planes for SEA motion search */
-    if (m_param->searchMethod == X265_SEA && m_frame->m_encData->m_meIntegral && m_frame->m_lowres.sliceType != X265_TYPE_B)
+    if (m_frame->m_encData->m_meIntegral && m_frame->m_lowres.sliceType != X265_TYPE_B)
     {
         /* If WPP, other than first row, integral calculation for current row needs to wait till the
         * integral for the previous row is computed */
@@ -868,11 +877,6 @@
         }
         m_parallelFilter[row].m_frameFilter->integralCompleted.set(1);
     }
-
-    if (ATOMIC_INC(&m_frameEncoder->m_completionCount) == 2 * (int)m_frameEncoder->m_numRows)
-    {
-        m_frameEncoder->m_completionEvent.trigger();
-    }
 }
 
 static uint64_t computeSSD(pixel *fenc, pixel *rec, intptr_t stride, uint32_t width, uint32_t height)
diff -r a2fe29ca5c6c -r 00925b5053be source/encoder/framefilter.h
--- a/source/encoder/framefilter.h	Fri Dec 30 09:20:28 2016 +0530
+++ b/source/encoder/framefilter.h	Tue Jan 03 17:50:55 2017 +0530
@@ -133,6 +133,7 @@
 
     void processRow(int row);
     void processPostRow(int row);
+    void computeMEIntegral(int row);
 };
 }
 
diff -r a2fe29ca5c6c -r 00925b5053be source/test/regression-tests.txt
--- a/source/test/regression-tests.txt	Fri Dec 30 09:20:28 2016 +0530
+++ b/source/test/regression-tests.txt	Tue Jan 03 17:50:55 2017 +0530
@@ -157,6 +157,6 @@
 CrowdRun_1920x1080_50_10bit_422.yuv,--preset fast --interlace bff
 
 #SEA Implementation Test
-silent_cif_420.y4m,--preset veryslow --me 4
-big_buck_bunny_360p24.y4m,--preset superfast --me 4
+silent_cif_420.y4m,--preset veryslow --me sea
+big_buck_bunny_360p24.y4m,--preset superfast --me sea
 # vim: tw=200
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 3027 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170104/40ff644b/attachment.bin>


More information about the x265-devel mailing list