[x265] [PATCH 4/6] intrapred: Split DC and Planar from Loop

Min Chen chenm003 at 163.com
Tue Jun 18 18:43:36 CEST 2013


---
 source/Lib/TLibEncoder/TEncSearch.cpp | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/source/Lib/TLibEncoder/TEncSearch.cpp b/source/Lib/TLibEncoder/TEncSearch.cpp
index 34e8850..63e2d66 100644
--- a/source/Lib/TLibEncoder/TEncSearch.cpp
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp
@@ -2264,8 +2264,23 @@ Void TEncSearch::estIntraPredQT(TComDataCU* pcCU,
 
             CandNum = 0;
             UInt uiSads[35];
+            Bool bFilter = (uiWidth <= 16);
+            Pel *ptrSrc = m_piPredBuf;
 
-            for (UInt uiMode = 0; uiMode < numModesAvailable; uiMode++)
+            // 1
+            primitives.getIPredDC((pixel*)ptrSrc + ADI_BUF_STRIDE + 1, ADI_BUF_STRIDE, (pixel*)piPred, uiStride, uiWidth, bFilter);
+            uiSads[DC_IDX] = sa8d((pixel*)piOrg, uiStride, (pixel*)piPred, uiStride);
+
+            // 0
+            if (uiWidth >=8 && uiWidth <=32)
+            {
+                ptrSrc += ADI_BUF_STRIDE * (2 * uiWidth + 1);
+            }
+            primitives.getIPredPlanar((pixel*)ptrSrc + ADI_BUF_STRIDE + 1, ADI_BUF_STRIDE, (pixel*)piPred, uiStride, uiWidth);
+            uiSads[PLANAR_IDX] = sa8d((pixel*)piOrg, uiStride, (pixel*)piPred, uiStride);
+
+            // 33 Angle modes
+            for (UInt uiMode = 2; uiMode < numModesAvailable; uiMode++)
             {
                 predIntraLumaAng(pcCU->getPattern(), uiMode, piPred, uiStride, uiWidth);
 
-- 
1.8.3.msysgit.0




More information about the x265-devel mailing list