[x265] [PATCH 2/6] intrapred: Split loop into Loop_Prediction and Loop_Decide
Min Chen
chenm003 at 163.com
Tue Jun 18 18:43:34 CEST 2013
---
source/Lib/TLibEncoder/TEncSearch.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/source/Lib/TLibEncoder/TEncSearch.cpp b/source/Lib/TLibEncoder/TEncSearch.cpp
index b542534..47bdcc3 100644
--- a/source/Lib/TLibEncoder/TEncSearch.cpp
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp
@@ -2274,17 +2274,21 @@ Void TEncSearch::estIntraPredQT(TComDataCU* pcCU,
}
CandNum = 0;
+ UInt uiSads[35];
- for (Int modeIdx = 0; modeIdx < numModesAvailable; modeIdx++)
+ for (UInt uiMode = 0; uiMode < numModesAvailable; uiMode++)
{
- UInt uiMode = modeIdx;
-
predIntraLumaAng(pcCU->getPattern(), uiMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail);
// use hadamard transform here
UInt uiSad = sa8d((pixel*)piOrg, uiStride, (pixel*)piPred, uiStride);
- x265_emms();
+ uiSads[uiMode] = uiSad;
+ }
+ x265_emms();
+ for (UInt uiMode = 0; uiMode < numModesAvailable; uiMode++)
+ {
+ UInt uiSad = uiSads[uiMode];
UInt iModeBits = xModeBitsIntra(pcCU, uiMode, uiPU, uiPartOffset, uiDepth, uiInitTrDepth);
UInt64 sqrtLambda = m_pcRdCost->getSqrtLambda()*256;
UInt64 cost = uiSad + ((iModeBits * sqrtLambda +128 )>>8);
--
1.8.3.msysgit.0
More information about the x265-devel
mailing list