[x265] [PATCH 1 of 3] move lfcuParam to local

Min Chen chenm003 at 163.com
Tue Jun 17 04:20:18 CEST 2014


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1402971493 -28800
# Node ID 1ec1c31067281ccadf5048fe3e48f5120c19a27c
# Parent  f25ed861850950d2bd31c51dbc9267333515af88
move lfcuParam to local

diff -r f25ed8618509 -r 1ec1c3106728 source/Lib/TLibCommon/TComLoopFilter.cpp
--- a/source/Lib/TLibCommon/TComLoopFilter.cpp	Mon Jun 16 20:32:13 2014 -0500
+++ b/source/Lib/TLibCommon/TComLoopFilter.cpp	Tue Jun 17 10:18:13 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 f25ed8618509 -r 1ec1c3106728 source/Lib/TLibCommon/TComLoopFilter.h
--- a/source/Lib/TLibCommon/TComLoopFilter.h	Mon Jun 16 20:32:13 2014 -0500
+++ b/source/Lib/TLibCommon/TComLoopFilter.h	Tue Jun 17 10:18:13 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