[x265] [PATCH] search: nit
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Wed Oct 29 08:45:50 CET 2014
# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1414568719 -19800
# Wed Oct 29 13:15:19 2014 +0530
# Node ID 63cdef26136d1cdcf66c72b5ad8edeb0802409c4
# Parent 7cfc1edb083fb28c57ffbf8891a4435f82e20e5e
search: nit
diff -r 7cfc1edb083f -r 63cdef26136d source/encoder/search.cpp
--- a/source/encoder/search.cpp Tue Oct 28 16:31:31 2014 -0500
+++ b/source/encoder/search.cpp Wed Oct 29 13:15:19 2014 +0530
@@ -2666,48 +2666,48 @@
coeff_t* coeffCurC = m_rqt[qtLayer].coeffRQT[chromaId] + coeffOffsetC;
TURecurse tuIterator(splitIntoSubTUs ? VERTICAL_SPLIT : DONT_SPLIT, absPartIdxStep, absPartIdx);
- do
- {
- uint32_t absPartIdxC = tuIterator.absPartIdxTURelCU;
- uint32_t subTUOffset = tuIterator.section << (log2TrSizeC * 2);
-
- int16_t *curResiC = m_rqt[qtLayer].resiQtYuv.getChromaAddr(chromaId, absPartIdxC);
-
- distC = m_rdCost.scaleChromaDistCb(primitives.ssd_s[log2TrSizeC - 2](resiYuv.getChromaAddr(chromaId, absPartIdxC), resiYuv.m_csize));
-
- if (cbfFlag[chromaId][tuIterator.section])
+ do
{
- m_quant.invtransformNxN(cu.m_tqBypass[absPartIdxC], curResiC, strideResiC, coeffCurC + subTUOffset,
- log2TrSizeC, (TextType)chromaId, false, false, numSig[chromaId][tuIterator.section]);
- uint32_t dist = primitives.sse_ss[partSizeC](resiYuv.getChromaAddr(chromaId, absPartIdxC), resiYuv.m_csize, curResiC, strideResiC);
- const uint32_t nonZeroDistC = m_rdCost.scaleChromaDistCb(dist);
- uint32_t nonZeroPsyEnergyC = 0;
- if (m_rdCost.m_psyRd)
- nonZeroPsyEnergyC = m_rdCost.psyCost(partSizeC, resiYuv.getChromaAddr(chromaId, absPartIdxC), resiYuv.m_csize, curResiC, strideResiC);
-
- if (cu.m_tqBypass[0])
+ uint32_t absPartIdxC = tuIterator.absPartIdxTURelCU;
+ uint32_t subTUOffset = tuIterator.section << (log2TrSizeC * 2);
+
+ int16_t *curResiC = m_rqt[qtLayer].resiQtYuv.getChromaAddr(chromaId, absPartIdxC);
+
+ distC = m_rdCost.scaleChromaDistCb(primitives.ssd_s[log2TrSizeC - 2](resiYuv.getChromaAddr(chromaId, absPartIdxC), resiYuv.m_csize));
+
+ if (cbfFlag[chromaId][tuIterator.section])
{
- distC = nonZeroDistC;
- psyEnergyC = nonZeroPsyEnergyC;
- }
- else
- {
- uint64_t singleCostC = 0;
+ m_quant.invtransformNxN(cu.m_tqBypass[absPartIdxC], curResiC, strideResiC, coeffCurC + subTUOffset,
+ log2TrSizeC, (TextType)chromaId, false, false, numSig[chromaId][tuIterator.section]);
+ uint32_t dist = primitives.sse_ss[partSizeC](resiYuv.getChromaAddr(chromaId, absPartIdxC), resiYuv.m_csize, curResiC, strideResiC);
+ const uint32_t nonZeroDistC = m_rdCost.scaleChromaDistCb(dist);
+ uint32_t nonZeroPsyEnergyC = 0;
if (m_rdCost.m_psyRd)
- singleCostC = m_rdCost.calcPsyRdCost(nonZeroDistC, singleBitsComp[chromaId][tuIterator.section], nonZeroPsyEnergyC);
+ nonZeroPsyEnergyC = m_rdCost.psyCost(partSizeC, resiYuv.getChromaAddr(chromaId, absPartIdxC), resiYuv.m_csize, curResiC, strideResiC);
+
+ if (cu.m_tqBypass[0])
+ {
+ distC = nonZeroDistC;
+ psyEnergyC = nonZeroPsyEnergyC;
+ }
else
- singleCostC = m_rdCost.calcRdCost(nonZeroDistC, singleBitsComp[chromaId][tuIterator.section]);
- m_entropyCoder.resetBits();
- m_entropyCoder.codeQtCbfZero((TextType)chromaId, tuDepth);
- const uint32_t nullBitsC = m_entropyCoder.getNumberOfWrittenBits();
- uint64_t nullCostC = 0;
- if (m_rdCost.m_psyRd)
- nullCostC = m_rdCost.calcPsyRdCost(distC, nullBitsC, psyEnergyC);
- else
- nullCostC = m_rdCost.calcRdCost(distC, nullBitsC);
- if (nullCostC < singleCostC)
{
- cbfFlag[chromaId][tuIterator.section] = 0;
+ uint64_t singleCostC = 0;
+ if (m_rdCost.m_psyRd)
+ singleCostC = m_rdCost.calcPsyRdCost(nonZeroDistC, singleBitsComp[chromaId][tuIterator.section], nonZeroPsyEnergyC);
+ else
+ singleCostC = m_rdCost.calcRdCost(nonZeroDistC, singleBitsComp[chromaId][tuIterator.section]);
+ m_entropyCoder.resetBits();
+ m_entropyCoder.codeQtCbfZero((TextType)chromaId, tuDepth);
+ const uint32_t nullBitsC = m_entropyCoder.getNumberOfWrittenBits();
+ uint64_t nullCostC = 0;
+ if (m_rdCost.m_psyRd)
+ nullCostC = m_rdCost.calcPsyRdCost(distC, nullBitsC, psyEnergyC);
+ else
+ nullCostC = m_rdCost.calcRdCost(distC, nullBitsC);
+ if (nullCostC < singleCostC)
+ {
+ cbfFlag[chromaId][tuIterator.section] = 0;
#if CHECKED_BUILD || _DEBUG
memset(coeffCurC + subTUOffset, 0, sizeof(coeff_t) * numCoeffC);
#endif
More information about the x265-devel
mailing list