[x265] [PATCH] Dropping the 'm_' prefix from names used for members of struct type Lowres
shazeb at multicorewareinc.com
shazeb at multicorewareinc.com
Mon Nov 4 07:39:19 CET 2013
# HG changeset patch
# User Shazeb Nawaz Khan <shazeb at multicorewareinc.com>
# Date 1383547146 -19800
# Mon Nov 04 12:09:06 2013 +0530
# Node ID 3ae2ba820005bae1b2a9cc1e8de5c186fdf0c8df
# Parent 2ab39c2dd50f691c2c7abf2d6df48f1f9843dc7e
Dropping the 'm_' prefix from names used for members of struct type Lowres
diff -r 2ab39c2dd50f -r 3ae2ba820005 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp Mon Nov 04 11:40:49 2013 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.cpp Mon Nov 04 12:09:06 2013 +0530
@@ -246,7 +246,7 @@
m_totalDistortion = 0;
m_totalBits = 0;
m_numPartitions = pic->getNumPartInCU();
- int qp = pic->m_lowres.m_invQscaleFactor ? pic->getCU(getAddr())->getQP(0) : m_slice->getSliceQp();
+ int qp = pic->m_lowres.invQscaleFactor ? pic->getCU(getAddr())->getQP(0) : m_slice->getSliceQp();
for (int i = 0; i < 4; i++)
{
m_avgCost[i] = 0;
diff -r 2ab39c2dd50f -r 3ae2ba820005 source/common/lowres.cpp
--- a/source/common/lowres.cpp Mon Nov 04 11:40:49 2013 +0530
+++ b/source/common/lowres.cpp Mon Nov 04 12:09:06 2013 +0530
@@ -47,9 +47,9 @@
if (*aqMode)
{
- m_qpAqOffset = (double*)x265_malloc(sizeof(double) * cuCount);
- m_invQscaleFactor = (int*)x265_malloc(sizeof(int) * cuCount);
- if (!m_qpAqOffset || !m_invQscaleFactor)
+ qpAqOffset = (double*)x265_malloc(sizeof(double) * cuCount);
+ invQscaleFactor = (int*)x265_malloc(sizeof(int) * cuCount);
+ if (!qpAqOffset || !invQscaleFactor)
*aqMode = 0;
}
@@ -110,8 +110,8 @@
X265_FREE(lowresMvCosts[0][i]);
X265_FREE(lowresMvCosts[1][i]);
}
- X265_FREE(m_qpAqOffset);
- X265_FREE(m_invQscaleFactor);
+ X265_FREE(qpAqOffset);
+ X265_FREE(invQscaleFactor);
}
// (re) initialize lowres state
@@ -127,7 +127,7 @@
satdCost = -1;
memset(costEst, -1, sizeof(costEst));
- if (m_qpAqOffset && m_invQscaleFactor)
+ if (qpAqOffset && invQscaleFactor)
memset(costEstAq, -1, sizeof(costEstAq));
for (int y = 0; y < bframes + 2; y++)
diff -r 2ab39c2dd50f -r 3ae2ba820005 source/common/lowres.h
--- a/source/common/lowres.h Mon Nov 04 11:40:49 2013 +0530
+++ b/source/common/lowres.h Mon Nov 04 12:09:06 2013 +0530
@@ -35,15 +35,15 @@
{
/* lowres buffers, sizes and strides */
pixel *buffer[4];
- double *m_qpAqOffset; // qp Aq offset values for each Cu
- int* m_invQscaleFactor; // qScale values for qp Aq Offsets
+ double *qpAqOffset; // qp Aq offset values for each Cu
+ int *invQscaleFactor; // qScale values for qp Aq Offsets
int width; // width of lowres frame in pixels
int lines; // height of lowres frame in pixel lines
int frameNum; // Presentation frame number
int sliceType; // Slice type decided by lookahead
int leadingBframes; // number of leading B frames for P or I
- uint64_t m_wp_ssd[3]; // This is different than m_SSDY, this is sum(pixel^2) - sum(pixel)^2 for entire frame
- uint64_t m_wp_sum[3];
+ uint64_t wp_ssd[3]; // This is different than m_SSDY, this is sum(pixel^2) - sum(pixel)^2 for entire frame
+ uint64_t wp_sum[3];
bool bIntraCalculated;
bool bScenecut; // Set to false if the frame cannot possibly be part of a real scenecut.
diff -r 2ab39c2dd50f -r 3ae2ba820005 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Mon Nov 04 11:40:49 2013 +0530
+++ b/source/encoder/frameencoder.cpp Mon Nov 04 12:09:06 2013 +0530
@@ -1153,7 +1153,7 @@
{
for (int w = 0; w < 4 && (block_x + w) < maxBlockCols; w++)
{
- qp_offset += pic->m_lowres.m_qpAqOffset[block_x + w + (block_y * maxBlockCols)];
+ qp_offset += pic->m_lowres.qpAqOffset[block_x + w + (block_y * maxBlockCols)];
cnt++;
}
}
diff -r 2ab39c2dd50f -r 3ae2ba820005 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Mon Nov 04 11:40:49 2013 +0530
+++ b/source/encoder/ratecontrol.cpp Mon Nov 04 12:09:06 2013 +0530
@@ -55,8 +55,8 @@
{
uint32_t sum = (uint32_t)sum_ssd;
uint32_t ssd = (uint32_t)(sum_ssd >> 32);
- pic->m_lowres.m_wp_sum[i] += sum;
- pic->m_lowres.m_wp_ssd[i] += ssd;
+ pic->m_lowres.wp_sum[i] += sum;
+ pic->m_lowres.wp_ssd[i] += ssd;
return ssd - ((uint64_t)sum * sum >> shift);
}
@@ -106,8 +106,8 @@
double qp_adj = acEnergyCu(pic, block_x, block_y);
if (cfg->param.rc.aqMode)
{
- pic->m_lowres.m_qpAqOffset[block_xy] = qp_adj;
- pic->m_lowres.m_invQscaleFactor[block_xy] = x265_exp2fix8(qp_adj);
+ pic->m_lowres.qpAqOffset[block_xy] = qp_adj;
+ pic->m_lowres.invQscaleFactor[block_xy] = x265_exp2fix8(qp_adj);
block_xy++;
}
}
@@ -117,9 +117,9 @@
for(int i=0; i < 3; i++)
{
UInt64 sum, ssd;
- sum = pic->m_lowres.m_wp_sum[i];
- ssd = pic->m_lowres.m_wp_ssd[i];
- pic->m_lowres.m_wp_ssd[i] = ssd - (sum*sum + (block_x * block_y) / 2 ) / (block_x * block_y);
+ sum = pic->m_lowres.wp_sum[i];
+ ssd = pic->m_lowres.wp_ssd[i];
+ pic->m_lowres.wp_ssd[i] = ssd - (sum*sum + (block_x * block_y) / 2 ) / (block_x * block_y);
}
}
}
diff -r 2ab39c2dd50f -r 3ae2ba820005 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp Mon Nov 04 11:40:49 2013 +0530
+++ b/source/encoder/slicetype.cpp Mon Nov 04 12:09:06 2013 +0530
@@ -483,8 +483,8 @@
if (bFrameScoreCU)
{
costIntra += icost;
- if (fenc->m_invQscaleFactor)
- costIntraAq += (icost * fenc->m_invQscaleFactor[cuXY] + 128) >> 8;
+ if (fenc->invQscaleFactor)
+ costIntraAq += (icost * fenc->invQscaleFactor[cuXY] + 128) >> 8;
}
}
if (!bBidir)
@@ -504,8 +504,8 @@
if (bFrameScoreCU)
{
costEst += bcost;
- if (fenc->m_invQscaleFactor)
- costEstAq += (bcost * fenc->m_invQscaleFactor[cuXY] + 128) >> 8;
+ if (fenc->invQscaleFactor)
+ costEstAq += (bcost * fenc->invQscaleFactor[cuXY] + 128) >> 8;
}
}
fenc->lowresCosts[b - p0][p1 - b][cuXY] = (uint16_t)(X265_MIN(bcost, LOWRES_COST_MASK) | (listused << LOWRES_COST_SHIFT));
More information about the x265-devel
mailing list