[x265] [PATCH 6 of 6] improve Parallel Deblock last row process
Min Chen
chenm003 at 163.com
Wed Nov 18 18:14:09 CET 2015
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1447865937 21600
# Node ID 92af0277752a72ccfd34669ef63c657b98b1a982
# Parent 9ff06f65a7559f405bf12594f027210b73dd8861
improve Parallel Deblock last row process
---
source/encoder/frameencoder.cpp | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff -r 9ff06f65a755 -r 92af0277752a source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Wed Nov 18 10:58:53 2015 -0600
+++ b/source/encoder/frameencoder.cpp Wed Nov 18 10:58:57 2015 -0600
@@ -1110,6 +1110,18 @@
m_frameFilter.m_pdeblock[row - 1].m_allowedCol.set(allowCol);
m_frameFilter.m_pdeblock[row - 1].tryBondPeers(*this, 1);
}
+
+ // Last Row may start early
+ if (row == m_numRows - 1)
+ {
+ // Waitting last threading finish
+ m_frameFilter.m_pdeblock[row].waitForExit();
+
+ // Processing last row
+ const int allowCol = ((row >= 2) ? X265_MIN(m_frameFilter.m_pdeblock[row - 1].m_lastCol.get(), (int)col) : col);
+ m_frameFilter.m_pdeblock[row].m_allowedCol.set(allowCol);
+ m_frameFilter.m_pdeblock[row].tryBondPeers(*this, 1);
+ }
}
if (m_param->bEnableWavefront && curRow.completed >= 2 && row < m_numRows - 1 &&
@@ -1208,6 +1220,7 @@
X265_CHECK(m_frameFilter.m_pdeblock[row - 1].m_allowedCol.get() == (int)numCols, "Deblock m_EncodedCol check failed");
/* NOTE: Last Row not execute before, so didn't need wait */
+ m_frameFilter.m_pdeblock[row].waitForExit();
m_frameFilter.m_pdeblock[row].m_allowedCol.set(numCols);
m_frameFilter.m_pdeblock[row].processTasks(-1);
}
More information about the x265-devel
mailing list