[x265] [PATCH] rc : removed warning , moved strength to acEnergyCu
aarthi at multicorewareinc.com
aarthi at multicorewareinc.com
Fri Oct 18 14:24:26 CEST 2013
# HG changeset patch
# User Aarthi Thirumalai<aarthi at multicorewareinc.com>
# Date 1382098640 -19800
# Fri Oct 18 17:47:20 2013 +0530
# Node ID 3f2be127381f02384905d56e64ae468dcc5a90a3
# Parent f3523973eafba8b2157d87bdc06932bf8bac47bf
rc : removed warning , moved strength to acEnergyCu
diff -r f3523973eafb -r 3f2be127381f source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Fri Oct 18 14:18:05 2013 +0530
+++ b/source/encoder/ratecontrol.cpp Fri Oct 18 17:47:20 2013 +0530
@@ -78,7 +78,7 @@
double RateControl::acEnergyCu(TComPic* pic, uint32_t cuAddr)
{
uint32_t var = 0;
- double avgQp = 0;
+ double avgQp = 0, strength = cfg->param.rc.aqStrength * 1.0397f;
pixel* srcLuma = pic->getPicYuvOrg()->getLumaAddr(cuAddr);
pixel* srcCb = pic->getPicYuvOrg()->getCbAddr(cuAddr);
pixel* srcCr = pic->getPicYuvOrg()->getCrAddr(cuAddr);
@@ -97,7 +97,7 @@
var = acEnergyPlane(srcLuma + blockOffsetLuma, frameStride, 0);
var += acEnergyPlane(srcCb + blockOffsetChroma, cStride, 1);
var += acEnergyPlane(srcCr + blockOffsetChroma, cStride, 1);
- avgQp += cfg->param.rc.aqStrength * (X265_LOG2(X265_MAX(var, 1)) - (14.427f));
+ avgQp += strength * (X265_LOG2(X265_MAX(var, 1)) - (14.427f));
}
}
@@ -108,12 +108,9 @@
void RateControl::calcAdaptiveQuantFrame(TComPic *pic)
{
- double strength;
-
/* Actual adaptive quantization */
if (cfg->param.rc.aqMode)
{
- strength = cfg->param.rc.aqStrength * 1.0397f;
int maxRows = pic->getPicSym()->getFrameHeightInCU();
int maxCols = pic->getPicSym()->getFrameWidthInCU();
for (int cu_y = 0; cu_y < maxRows; cu_y++)
More information about the x265-devel
mailing list