[x265] [PATCH 1 of 3] move lfcuParam to local
Min Chen
chenm003 at 163.com
Mon Jun 16 11:01:27 CEST 2014
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1402909233 -28800
# Node ID 5d14f0f52ea55fad472f11fe56ef50a81de1cfad
# Parent e69a427e461f8c8944b68323a3d77295b65ec779
move lfcuParam to local
diff -r e69a427e461f -r 5d14f0f52ea5 source/Lib/TLibCommon/TComLoopFilter.cpp
--- a/source/Lib/TLibCommon/TComLoopFilter.cpp Thu Jun 12 22:53:47 2014 -0500
+++ b/source/Lib/TLibCommon/TComLoopFilter.cpp Mon Jun 16 17:00:33 2014 +0800
@@ -196,10 +196,12 @@
return;
}
- xSetLoopfilterParam(cu, absZOrderIdx);
+ ///< status structure
+ LFCUParam lfcuParam;
+ xSetLoopfilterParam(cu, absZOrderIdx, &lfcuParam);
xSetEdgefilterTU(cu, absZOrderIdx, absZOrderIdx, depth);
- xSetEdgefilterPU(cu, absZOrderIdx);
+ xSetEdgefilterPU(cu, absZOrderIdx, &lfcuParam);
int dir = edge;
for (uint32_t partIdx = absZOrderIdx; partIdx < absZOrderIdx + curNumParts; partIdx++)
@@ -286,7 +288,7 @@
xSetEdgefilterMultiple(cu, absTUPartIdx, depth, EDGE_HOR, 0, true, widthInBaseUnits, heightInBaseUnits);
}
-void TComLoopFilter::xSetEdgefilterPU(TComDataCU* cu, uint32_t absZOrderIdx)
+void TComLoopFilter::xSetEdgefilterPU(TComDataCU* cu, uint32_t absZOrderIdx, LFCUParam *lfcuParam)
{
const uint32_t depth = cu->getDepth(absZOrderIdx);
const uint32_t widthInBaseUnits = cu->getPic()->getNumPartInCUSize() >> depth;
@@ -296,8 +298,8 @@
const uint32_t qWidthInBaseUnits = widthInBaseUnits >> 2;
const uint32_t qHeightInBaseUnits = heightInBaseUnits >> 2;
- xSetEdgefilterMultiple(cu, absZOrderIdx, depth, EDGE_VER, 0, m_lfcuParam.bLeftEdge);
- xSetEdgefilterMultiple(cu, absZOrderIdx, depth, EDGE_HOR, 0, m_lfcuParam.bTopEdge);
+ xSetEdgefilterMultiple(cu, absZOrderIdx, depth, EDGE_VER, 0, lfcuParam->bLeftEdge);
+ xSetEdgefilterMultiple(cu, absZOrderIdx, depth, EDGE_HOR, 0, lfcuParam->bTopEdge);
switch (cu->getPartitionSize(absZOrderIdx))
{
@@ -348,7 +350,7 @@
}
}
-void TComLoopFilter::xSetLoopfilterParam(TComDataCU* cu, uint32_t absZOrderIdx)
+void TComLoopFilter::xSetLoopfilterParam(TComDataCU* cu, uint32_t absZOrderIdx, LFCUParam *lfcuParam)
{
uint32_t x = cu->getCUPelX() + g_rasterToPelX[g_zscanToRaster[absZOrderIdx]];
uint32_t y = cu->getCUPelY() + g_rasterToPelY[g_zscanToRaster[absZOrderIdx]];
@@ -361,35 +363,35 @@
if (x == 0)
{
- m_lfcuParam.bLeftEdge = false;
+ lfcuParam->bLeftEdge = false;
}
else
{
tempCU = cu->getPULeft(tempPartIdx, absZOrderIdx, !true, !m_bLFCrossTileBoundary);
if (tempCU)
{
- m_lfcuParam.bLeftEdge = true;
+ lfcuParam->bLeftEdge = true;
}
else
{
- m_lfcuParam.bLeftEdge = false;
+ lfcuParam->bLeftEdge = false;
}
}
if (y == 0)
{
- m_lfcuParam.bTopEdge = false;
+ lfcuParam->bTopEdge = false;
}
else
{
tempCU = cu->getPUAbove(tempPartIdx, absZOrderIdx, !true, false, !m_bLFCrossTileBoundary);
if (tempCU)
{
- m_lfcuParam.bTopEdge = true;
+ lfcuParam->bTopEdge = true;
}
else
{
- m_lfcuParam.bTopEdge = false;
+ lfcuParam->bTopEdge = false;
}
}
}
diff -r e69a427e461f -r 5d14f0f52ea5 source/Lib/TLibCommon/TComLoopFilter.h
--- a/source/Lib/TLibCommon/TComLoopFilter.h Thu Jun 12 22:53:47 2014 -0500
+++ b/source/Lib/TLibCommon/TComLoopFilter.h Mon Jun 16 17:00:33 2014 +0800
@@ -70,7 +70,6 @@
uint32_t m_numPartitions;
uint8_t* m_blockingStrength[2]; ///< Bs for [Ver/Hor][Y/U/V][Blk_Idx]
bool* m_bEdgeFilter[2];
- LFCUParam m_lfcuParam; ///< status structure
bool m_bLFCrossTileBoundary;
@@ -80,10 +79,10 @@
void xDeblockCU(TComDataCU* cu, uint32_t absZOrderIdx, uint32_t depth, int Edge);
// set / get functions
- void xSetLoopfilterParam(TComDataCU* cu, uint32_t absZOrderIdx);
+ void xSetLoopfilterParam(TComDataCU* cu, uint32_t absZOrderIdx, LFCUParam *lfcuParam);
// filtering functions
void xSetEdgefilterTU(TComDataCU* cu, uint32_t absTUPartIdx, uint32_t absZOrderIdx, uint32_t depth);
- void xSetEdgefilterPU(TComDataCU* cu, uint32_t absZOrderIdx);
+ void xSetEdgefilterPU(TComDataCU* cu, uint32_t absZOrderIdx, LFCUParam *lfcuParam);
void xGetBoundaryStrengthSingle(TComDataCU* cu, int dir, uint32_t partIdx);
uint32_t xCalcBsIdx(TComDataCU* cu, uint32_t absZOrderIdx, int dir, int edgeIdx, int baseUnitIdx)
{
More information about the x265-devel
mailing list