[x265] [PATCH] psyrd: use psyrdcost for intra for rdLevels > 5
sumalatha at multicorewareinc.com
sumalatha at multicorewareinc.com
Thu May 22 12:01:12 CEST 2014
# HG changeset patch
# User Sumalatha Polureddy<sumalatha at multicorewareinc.com>
# Date 1400752845 -19800
# Node ID fc400f71de9dcbaeda5c0669edabd27e288cdf2c
# Parent f39484bb3eecc8cfca0448c63f16fe8dacc54d7f
psyrd: use psyrdcost for intra for rdLevels > 5
diff -r f39484bb3eec -r fc400f71de9d source/encoder/compress.cpp
--- a/source/encoder/compress.cpp Tue May 20 22:02:00 2014 -0500
+++ b/source/encoder/compress.cpp Thu May 22 15:30:45 2014 +0530
@@ -70,7 +70,18 @@
m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);
cu->m_totalBits = m_entropyCoder->getNumberOfWrittenBits();
- cu->m_totalCost = m_rdCost->calcRdCost(cu->m_totalDistortion, cu->m_totalBits);
+ if (m_rdCost->psyRdEnabled())
+ {
+ int part = g_convertToBit[cu->getCUSize(0)];
+ uint32_t psyRdCost = m_rdCost->psyCost(part, m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
+ m_tmpRecoYuv[depth]->getLumaAddr(), m_tmpRecoYuv[depth]->getStride());
+ cu->m_totalCost = m_rdCost->calcPsyRdCost(cu->m_totalDistortion, cu->m_totalBits, psyRdCost);
+
+ }
+ else
+ {
+ cu->m_totalCost = m_rdCost->calcRdCost(cu->m_totalDistortion, cu->m_totalBits);
+ }
}
void TEncCu::xComputeCostIntraInInter(TComDataCU* cu, PartSize partSize)
More information about the x265-devel
mailing list