[x265] [PATCH] framefilter: Make code clearer

Min Chen chenm003 at 163.com
Wed Sep 11 16:52:11 CEST 2013


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1378911096 -28800
# Node ID 8075ccfcde5697f8bbb3d5333d79406bcfd57960
# Parent  91523e37c65e912368fc7c9c67ea9e482251a20a
framefilter: Make code clearer
We do not need the row delay when the loopfilter is disabled.

diff -r 91523e37c65e -r 8075ccfcde56 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Wed Sep 11 22:50:25 2013 +0800
+++ b/source/encoder/frameencoder.cpp	Wed Sep 11 22:51:36 2013 +0800
@@ -947,10 +947,8 @@
     // this row of CTUs has been encoded
     if (row == m_numRows - 1)
     {
-        int lag = m_filterRowDelay;
-        while (--lag)
-            m_frameFilter.processRow(row - lag);
-        m_frameFilter.processRow(row);
+        for(int i = m_numRows - m_filterRowDelay; i < m_numRows; i++)
+            m_frameFilter.processRow(i);
         m_completionEvent.trigger();
     }
 }
diff -r 91523e37c65e -r 8075ccfcde56 source/encoder/framefilter.cpp
--- a/source/encoder/framefilter.cpp	Wed Sep 11 22:50:25 2013 +0800
+++ b/source/encoder/framefilter.cpp	Wed Sep 11 22:51:36 2013 +0800
@@ -104,10 +104,7 @@
 
     if (!m_cfg->param.bEnableLoopFilter)
     {
-        if (row > 0)
-            processRowPost(row - 1);
-        if (row == m_numRows - 1)
-            processRowPost(row);
+        processRowPost(row);
         return;
     }
 



More information about the x265-devel mailing list