[x265] [PATCH 1 of 2 demo only] class Deblock don't need access any private member data struct
Min Chen
chenm003 at 163.com
Fri Nov 13 02:35:01 CET 2015
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1447263308 21600
# Node ID 3702727fbe1817c6d55f40a9b215d8711d8c9c44
# Parent df66a0f940c87df49318203de0231dca6ad8b4e4
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 df66a0f940c8 -r 3702727fbe18 source/common/deblock.cpp
--- a/source/common/deblock.cpp Wed Nov 11 10:20:32 2015 -0600
+++ b/source/common/deblock.cpp Wed Nov 11 11:35:08 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 df66a0f940c8 -r 3702727fbe18 source/common/deblock.h
--- a/source/common/deblock.h Wed Nov 11 10:20:32 2015 -0600
+++ b/source/common/deblock.h Wed Nov 11 11:35:08 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