[x265] [PATCH] compress: Bug fix in rd2
sumalatha at multicorewareinc.com
sumalatha at multicorewareinc.com
Fri Feb 14 08:40:38 CET 2014
# HG changeset patch
# User Sumalatha Polureddy
# Date 1392363630 -19800
# Node ID d90a4adcb492237dcfa74eaa820d94f0185b7379
# Parent 11ffc3cfe0d810f2e229eec0bb49053139ec123d
compress: Bug fix in rd2
the sa8d cost in rd2 for inter and intra are different
for inter, totalbits = 0,
for intra, totalbits = cabac bits
for now, making the totalbits = 0 for both inter and intra
diff -r 11ffc3cfe0d8 -r d90a4adcb492 source/encoder/compress.cpp
--- a/source/encoder/compress.cpp Fri Feb 14 12:39:59 2014 +0530
+++ b/source/encoder/compress.cpp Fri Feb 14 13:10:30 2014 +0530
@@ -184,6 +184,9 @@
cu->m_totalDistortion = bsad;
cu->m_totalCost = bcost;
+ cu->m_totalBits = 0;
+ cu->m_totalCost = m_rdCost->calcRdSADCost(cu->m_totalDistortion, cu->m_totalBits);
+
// generate predYuv for the best mode
cu->setLumaIntraDirSubParts(bmode, partOffset, depth + initTrDepth);
}
@@ -286,6 +289,7 @@
outTempCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField(mvFieldNeighbours[1 + 2 * bestMergeCand], SIZE_2Nx2N, 0, 0);
outTempCU->m_totalBits = outBestCU->m_totalBits;
outTempCU->m_totalDistortion = outBestCU->m_totalDistortion;
+ outTempCU->m_totalBits = 0;
outTempCU->m_totalCost = m_rdCost->calcRdSADCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
outTempCU->m_sa8dCost = outTempCU->m_totalCost;
outBestCU->m_sa8dCost = outTempCU->m_sa8dCost;
More information about the x265-devel
mailing list