[x265] [PATCH] Clenup xGetICRateCost function
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Wed Jul 10 13:07:17 CEST 2013
# HG changeset patch
# User praveentiwari
# Date 1373454426 -19800
# Node ID 488aa6a107326831c0939e070d830900b85a1854
# Parent b768170204aaddc741dc13812821c9ec01ae7665
Clenup xGetICRateCost function
diff -r b768170204aa -r 488aa6a10732 source/Lib/TLibCommon/TComTrQuant.cpp
--- a/source/Lib/TLibCommon/TComTrQuant.cpp Wed Jul 10 16:29:52 2013 +0530
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp Wed Jul 10 16:37:06 2013 +0530
@@ -1395,7 +1395,7 @@
UInt c1Idx,
UInt c2Idx) const
{
- Double iRate = xGetIEPRate();
+ Double rate = xGetIEPRate();
UInt baseLevel = (c1Idx < C1FLAG_NUMBER) ? (2 + (c2Idx < C2FLAG_NUMBER)) : 1;
if (absLevel >= baseLevel)
@@ -1405,7 +1405,7 @@
if (symbol < (COEF_REMAIN_BIN_REDUCTION << absGoRice))
{
length = symbol >> absGoRice;
- iRate += (length + 1 + absGoRice) << 15;
+ rate += (length + 1 + absGoRice) << 15;
}
else
{
@@ -1416,32 +1416,32 @@
symbol -= (1 << (length++));
}
- iRate += (COEF_REMAIN_BIN_REDUCTION + length + 1 - absGoRice + length) << 15;
+ rate += (COEF_REMAIN_BIN_REDUCTION + length + 1 - absGoRice + length) << 15;
}
if (c1Idx < C1FLAG_NUMBER)
{
- iRate += m_estBitsSbac->greaterOneBits[ctxNumOne][1];
+ rate += m_estBitsSbac->greaterOneBits[ctxNumOne][1];
if (c2Idx < C2FLAG_NUMBER)
{
- iRate += m_estBitsSbac->levelAbsBits[ctxNumAbs][1];
+ rate += m_estBitsSbac->levelAbsBits[ctxNumAbs][1];
}
}
}
else if (absLevel == 1)
{
- iRate += m_estBitsSbac->greaterOneBits[ctxNumOne][0];
+ rate += m_estBitsSbac->greaterOneBits[ctxNumOne][0];
}
else if (absLevel == 2)
{
- iRate += m_estBitsSbac->greaterOneBits[ctxNumOne][1];
- iRate += m_estBitsSbac->levelAbsBits[ctxNumAbs][0];
+ rate += m_estBitsSbac->greaterOneBits[ctxNumOne][1];
+ rate += m_estBitsSbac->levelAbsBits[ctxNumAbs][0];
}
else
{
assert(0);
}
- return xGetICost(iRate);
+ return xGetICost(rate);
}
__inline Int TComTrQuant::xGetICRate(UInt absLevel,
More information about the x265-devel
mailing list