[x265] [PATCH] RD merge: remove earlyDetectionSkip, output is unchanged
deepthi at multicorewareinc.com
deepthi at multicorewareinc.com
Thu Nov 28 09:22:35 CET 2013
# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1385626939 -19800
# Node ID ca8c57f0c53248a36db6d04639c39ac0e2829fcd
# Parent 54379de63b85187b094e7cd763b0a03fce0ddea0
RD merge: remove earlyDetectionSkip, output is unchanged.
diff -r 54379de63b85 -r ca8c57f0c532 source/Lib/TLibEncoder/TEncCu.h
--- a/source/Lib/TLibEncoder/TEncCu.h Thu Nov 28 13:36:10 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncCu.h Thu Nov 28 13:52:19 2013 +0530
@@ -171,7 +171,7 @@
void xComputeCostIntraInInter(TComDataCU* cu, PartSize partSize);
void xCheckRDCostInter(TComDataCU*& outBestCU, TComDataCU*& outTempCU, PartSize partSize, bool bUseMRG = false);
void xComputeCostInter(TComDataCU* outTempCU, TComYuv* outPredYUV, PartSize partSize, bool bUseMRG = false);
- void xComputeCostMerge2Nx2N(TComDataCU*& outBestCU, TComDataCU*& outTempCU, bool* earlyDetectionSkip, TComYuv*& bestPredYuv, TComYuv*& tmpPredYuv);
+ void xComputeCostMerge2Nx2N(TComDataCU*& outBestCU, TComDataCU*& outTempCU, TComYuv*& bestPredYuv, TComYuv*& tmpPredYuv);
void xEncodeIntraInInter(TComDataCU* cu, TComYuv* fencYuv, TComYuv* predYuv, TShortYUV* outResiYuv, TComYuv* outReconYuv);
void xCheckRDCostIntra(TComDataCU*& outBestCU, TComDataCU*& outTempCU, PartSize partSize);
void xCheckRDCostIntraInInter(TComDataCU*& outBestCU, TComDataCU*& outTempCU, PartSize partSize);
diff -r 54379de63b85 -r ca8c57f0c532 source/encoder/compress.cpp
--- a/source/encoder/compress.cpp Thu Nov 28 13:36:10 2013 +0530
+++ b/source/encoder/compress.cpp Thu Nov 28 13:52:19 2013 +0530
@@ -216,7 +216,7 @@
outTempCU->m_totalCost = m_rdCost->calcRdSADCost(distortion, outTempCU->m_totalBits);
}
-void TEncCu::xComputeCostMerge2Nx2N(TComDataCU*& outBestCU, TComDataCU*& outTempCU, bool* earlyDetectionSkip, TComYuv*& bestPredYuv, TComYuv*& yuvReconBest)
+void TEncCu::xComputeCostMerge2Nx2N(TComDataCU*& outBestCU, TComDataCU*& outTempCU, TComYuv*& bestPredYuv, TComYuv*& yuvReconBest)
{
assert(outTempCU->getSlice()->getSliceType() != I_SLICE);
TComMvField mvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
@@ -311,34 +311,6 @@
yuvReconBest = m_tmpRecoYuv[depth];
m_tmpRecoYuv[depth] = yuv;
}
-
- if (m_cfg->param.bEnableEarlySkip)
- {
- if (outBestCU->getQtRootCbf(0) == 0)
- {
- if (outBestCU->getMergeFlag(0))
- {
- *earlyDetectionSkip = true;
- }
- else
- {
- bool allZero = true;
- for (uint32_t list = 0; list < 2; list++)
- {
- if (outBestCU->getSlice()->getNumRefIdx(list) > 0)
- {
- allZero &= !outBestCU->getCUMvField(list)->getMvd(0).word;
- }
- }
-
- if (allZero)
- {
- *earlyDetectionSkip = true;
- }
- }
- }
- }
-
m_tmpResiYuv[depth]->clear();
x265_emms();
}
@@ -446,10 +418,9 @@
}
/* Compute Merge Cost */
- bool earlyDetectionSkip = false;
- xComputeCostMerge2Nx2N(m_bestMergeCU[depth], m_mergeCU[depth], &earlyDetectionSkip, m_modePredYuv[3][depth], m_bestMergeRecoYuv[depth]);
+ xComputeCostMerge2Nx2N(m_bestMergeCU[depth], m_mergeCU[depth], m_modePredYuv[3][depth], m_bestMergeRecoYuv[depth]);
- if (!earlyDetectionSkip)
+ if (!m_bestMergeCU[depth]->isSkipped(0))
{
/*Compute 2Nx2N mode costs*/
{
More information about the x265-devel
mailing list