[x265] [PATCH 1 of 6] class Deblock don't need access any private member data struct
Min Chen
chenm003 at 163.com
Wed Nov 18 18:14:04 CET 2015
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1447865923 21600
# Node ID e160de7083971f21802517691f9a3a0934765952
# Parent e8f9a60d4cd9e73c9f2baf05c2ccda5af1892b46
class Deblock don't need access any private member data struct
---
source/common/deblock.cpp | 16 ++++++++--------
source/common/deblock.h | 16 ++++++++--------
2 files changed, 16 insertions(+), 16 deletions(-)
diff -r e8f9a60d4cd9 -r e160de708397 source/common/deblock.cpp
--- a/source/common/deblock.cpp Mon Nov 16 16:44:33 2015 +0530
+++ b/source/common/deblock.cpp Wed Nov 18 10:58:43 2015 -0600
@@ -34,7 +34,7 @@
#define DEBLOCK_SMALLEST_BLOCK 8
#define DEFAULT_INTRA_TC_OFFSET 2
-void Deblock::deblockCTU(const CUData* ctu, const CUGeom& cuGeom, int32_t dir)
+void Deblock::deblockCTU(const CUData* ctu, const CUGeom& cuGeom, int32_t dir) const
{
uint8_t blockStrength[MAX_NUM_PARTITIONS];
@@ -69,7 +69,7 @@
/* Deblocking filter process in CU-based (the same function as conventional's)
* param Edge the direction of the edge in block boundary (horizonta/vertical), which is added newly */
-void Deblock::deblockCU(const CUData* cu, const CUGeom& cuGeom, const int32_t dir, uint8_t blockStrength[])
+void Deblock::deblockCU(const CUData* cu, const CUGeom& cuGeom, const int32_t dir, uint8_t blockStrength[]) const
{
uint32_t absPartIdx = cuGeom.absPartIdx;
uint32_t depth = cuGeom.depth;
@@ -124,7 +124,7 @@
return g_rasterToZscan[g_zscanToRaster[absPartIdx] + baseUnitIdx * numUnits + edgeIdx];
}
-void Deblock::setEdgefilterMultiple(const CUData* cu, uint32_t scanIdx, int32_t dir, int32_t edgeIdx, uint8_t value, uint8_t blockStrength[], uint32_t numUnits)
+void Deblock::setEdgefilterMultiple(const CUData* cu, uint32_t scanIdx, int32_t dir, int32_t edgeIdx, uint8_t value, uint8_t blockStrength[], uint32_t numUnits) const
{
X265_CHECK(numUnits > 0, "numUnits edge filter check\n");
for (uint32_t i = 0; i < numUnits; i++)
@@ -134,7 +134,7 @@
}
}
-void Deblock::setEdgefilterTU(const CUData* cu, uint32_t absPartIdx, uint32_t tuDepth, int32_t dir, uint8_t blockStrength[])
+void Deblock::setEdgefilterTU(const CUData* cu, uint32_t absPartIdx, uint32_t tuDepth, int32_t dir, uint8_t blockStrength[]) const
{
uint32_t log2TrSize = cu->m_log2CUSize[absPartIdx] - tuDepth;
if (cu->m_tuDepth[absPartIdx] > tuDepth)
@@ -149,7 +149,7 @@
setEdgefilterMultiple(cu, absPartIdx, dir, 0, 2, blockStrength, numUnits);
}
-void Deblock::setEdgefilterPU(const CUData* cu, uint32_t absPartIdx, int32_t dir, uint8_t blockStrength[], uint32_t numUnits)
+void Deblock::setEdgefilterPU(const CUData* cu, uint32_t absPartIdx, int32_t dir, uint8_t blockStrength[], uint32_t numUnits) const
{
const uint32_t hNumUnits = numUnits >> 1;
const uint32_t qNumUnits = numUnits >> 2;
@@ -190,7 +190,7 @@
}
}
-uint8_t Deblock::getBoundaryStrength(const CUData* cuQ, int32_t dir, uint32_t partQ, const uint8_t blockStrength[])
+uint8_t Deblock::getBoundaryStrength(const CUData* cuQ, int32_t dir, uint32_t partQ, const uint8_t blockStrength[]) const
{
// Calculate block index
uint32_t partP;
@@ -340,7 +340,7 @@
}
}
-void Deblock::edgeFilterLuma(const CUData* cuQ, uint32_t absPartIdx, uint32_t depth, int32_t dir, int32_t edge, const uint8_t blockStrength[])
+void Deblock::edgeFilterLuma(const CUData* cuQ, uint32_t absPartIdx, uint32_t depth, int32_t dir, int32_t edge, const uint8_t blockStrength[]) const
{
PicYuv* reconPic = cuQ->m_encData->m_reconPic;
pixel* src = reconPic->getLumaAddr(cuQ->m_cuAddr, absPartIdx);
@@ -440,7 +440,7 @@
}
}
-void Deblock::edgeFilterChroma(const CUData* cuQ, uint32_t absPartIdx, uint32_t depth, int32_t dir, int32_t edge, const uint8_t blockStrength[])
+void Deblock::edgeFilterChroma(const CUData* cuQ, uint32_t absPartIdx, uint32_t depth, int32_t dir, int32_t edge, const uint8_t blockStrength[]) const
{
int32_t chFmt = cuQ->m_chromaFormat, chromaShift;
intptr_t offset, srcStep;
diff -r e8f9a60d4cd9 -r e160de708397 source/common/deblock.h
--- a/source/common/deblock.h Mon Nov 16 16:44:33 2015 +0530
+++ b/source/common/deblock.h Wed Nov 18 10:58:43 2015 -0600
@@ -38,24 +38,24 @@
public:
enum { EDGE_VER, EDGE_HOR };
- void deblockCTU(const CUData* ctu, const CUGeom& cuGeom, int32_t dir);
+ void deblockCTU(const CUData* ctu, const CUGeom& cuGeom, int32_t dir) const;
protected:
// CU-level deblocking function
- void deblockCU(const CUData* cu, const CUGeom& cuGeom, const int32_t dir, uint8_t blockStrength[]);
+ void deblockCU(const CUData* cu, const CUGeom& cuGeom, const int32_t dir, uint8_t blockStrength[]) const;
// set filtering functions
- void setEdgefilterTU(const CUData* cu, uint32_t absPartIdx, uint32_t tuDepth, int32_t dir, uint8_t blockStrength[]);
- void setEdgefilterPU(const CUData* cu, uint32_t absPartIdx, int32_t dir, uint8_t blockStrength[], uint32_t numUnits);
- void setEdgefilterMultiple(const CUData* cu, uint32_t absPartIdx, int32_t dir, int32_t edgeIdx, uint8_t value, uint8_t blockStrength[], uint32_t numUnits);
+ void setEdgefilterTU(const CUData* cu, uint32_t absPartIdx, uint32_t tuDepth, int32_t dir, uint8_t blockStrength[]) const;
+ void setEdgefilterPU(const CUData* cu, uint32_t absPartIdx, int32_t dir, uint8_t blockStrength[], uint32_t numUnits) const;
+ void setEdgefilterMultiple(const CUData* cu, uint32_t absPartIdx, int32_t dir, int32_t edgeIdx, uint8_t value, uint8_t blockStrength[], uint32_t numUnits) const;
// get filtering functions
- uint8_t getBoundaryStrength(const CUData* cuQ, int32_t dir, uint32_t partQ, const uint8_t blockStrength[]);
+ uint8_t getBoundaryStrength(const CUData* cuQ, int32_t dir, uint32_t partQ, const uint8_t blockStrength[]) const;
// filter luma/chroma functions
- void edgeFilterLuma(const CUData* cuQ, uint32_t absPartIdx, uint32_t depth, int32_t dir, int32_t edge, const uint8_t blockStrength[]);
- void edgeFilterChroma(const CUData* cuQ, uint32_t absPartIdx, uint32_t depth, int32_t dir, int32_t edge, const uint8_t blockStrength[]);
+ void edgeFilterLuma(const CUData* cuQ, uint32_t absPartIdx, uint32_t depth, int32_t dir, int32_t edge, const uint8_t blockStrength[]) const;
+ void edgeFilterChroma(const CUData* cuQ, uint32_t absPartIdx, uint32_t depth, int32_t dir, int32_t edge, const uint8_t blockStrength[]) const;
static const uint8_t s_tcTable[54];
static const uint8_t s_betaTable[52];
More information about the x265-devel
mailing list