[x265] [PATCH] framepp: merge V/H filter into one loop
Min Chen
chenm003 at 163.com
Tue Aug 6 06:07:45 CEST 2013
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1375760837 -28800
# Node ID d12efbdfde957a98be56017b6df1936bdfbc0401
# Parent 40ccd100e265d93fcaeae1e9269302723c9b4933
framepp: merge V/H filter into one loop
diff -r 40ccd100e265 -r d12efbdfde95 source/Lib/TLibCommon/TComLoopFilter.cpp
--- a/source/Lib/TLibCommon/TComLoopFilter.cpp Tue Aug 06 11:46:58 2013 +0800
+++ b/source/Lib/TLibCommon/TComLoopFilter.cpp Tue Aug 06 11:47:17 2013 +0800
@@ -129,6 +129,7 @@
*/
Void TComLoopFilter::loopFilterPic(TComPic* pic)
{
+ // TODO: Min, thread parallelism later
// Horizontal filtering
for (UInt cuAddr = 0; cuAddr < pic->getNumCUsInFrame(); cuAddr++)
{
@@ -139,17 +140,25 @@
// CU-based deblocking
xDeblockCU(cu, 0, 0, EDGE_VER);
+
+ // Vertical filtering
+ // NOTE: delay one CU to avoid conflict between V and H
+ if (cuAddr > 0)
+ {
+ cu = pic->getCU(cuAddr-1);
+ ::memset(m_aapucBS[EDGE_HOR], 0, sizeof(UChar) * m_uiNumPartitions);
+ ::memset(m_aapbEdgeFilter[EDGE_HOR], 0, sizeof(Bool) * m_uiNumPartitions);
+
+ xDeblockCU(cu, 0, 0, EDGE_HOR);
+ }
}
- // Vertical filtering
- for (UInt cuAddr = 0; cuAddr < pic->getNumCUsInFrame(); cuAddr++)
+ // Last H-Filter
{
- TComDataCU* cu = pic->getCU(cuAddr);
-
+ TComDataCU* cu = pic->getCU(pic->getNumCUsInFrame()-1);
::memset(m_aapucBS[EDGE_HOR], 0, sizeof(UChar) * m_uiNumPartitions);
::memset(m_aapbEdgeFilter[EDGE_HOR], 0, sizeof(Bool) * m_uiNumPartitions);
- // CU-based deblocking
xDeblockCU(cu, 0, 0, EDGE_HOR);
}
}
More information about the x265-devel
mailing list