Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComLoopFilter.h


Ignore:
Timestamp:
13 Aug 2015, 17:38:13 (10 years ago)
Author:
tech
Message:

Merged 14.1-update-dev1@1312.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/TComLoopFilter.h

    r1179 r1313  
    22 * License, included below. This software may be subject to other third party
    33 * and contributor rights, including patent rights, and no such rights are
    4  * granted under this license. 
     4 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2015, ITU/ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    5555{
    5656private:
     57
    5758  UInt      m_uiNumPartitions;
    58   UChar*    m_aapucBS[2];              ///< Bs for [Ver/Hor][Y/U/V][Blk_Idx]
    59   Bool*     m_aapbEdgeFilter[2];
    60   LFCUParam m_stLFCUParam;                  ///< status structure
    61  
     59  UChar*    m_aapucBS[NUM_EDGE_DIR];         ///< Bs for [Ver/Hor][Y/U/V][Blk_Idx]
     60  Bool*     m_aapbEdgeFilter[NUM_EDGE_DIR];
     61  LFCUParam m_stLFCUParam;                   ///< status structure
     62
    6263  Bool      m_bLFCrossTileBoundary;
    6364
    6465protected:
    6566  /// CU-level deblocking function
    66   Void xDeblockCU                 ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, Int Edge );
     67  Void xDeblockCU                 ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir );
    6768
    6869  // set / get functions
    6970  Void xSetLoopfilterParam        ( TComDataCU* pcCU, UInt uiAbsZorderIdx );
    7071  // filtering functions
    71   Void xSetEdgefilterTU           ( TComDataCU* pcCU, UInt absTUPartIdx, UInt uiAbsZorderIdx, UInt uiDepth );
     72  Void xSetEdgefilterTU           ( TComTU &rTu );
    7273  Void xSetEdgefilterPU           ( TComDataCU* pcCU, UInt uiAbsZorderIdx );
    73   Void xGetBoundaryStrengthSingle ( TComDataCU* pcCU, Int iDir, UInt uiPartIdx );
    74   UInt xCalcBsIdx                 ( TComDataCU* pcCU, UInt uiAbsZorderIdx, Int iDir, Int iEdgeIdx, Int iBaseUnitIdx )
     74  Void xGetBoundaryStrengthSingle ( TComDataCU* pCtu, DeblockEdgeDir edgeDir, UInt uiPartIdx );
     75  UInt xCalcBsIdx                 ( TComDataCU* pcCU, UInt absZIdxInCtu, DeblockEdgeDir edgeDir, Int iEdgeIdx, Int iBaseUnitIdx, const struct TComRectangle *rect=NULL )
    7576  {
    7677    TComPic* const pcPic = pcCU->getPic();
    77     const UInt uiLCUWidthInBaseUnits = pcPic->getNumPartInWidth();
    78     if( iDir == 0 )
     78    const UInt ctuWidthInBaseUnits = pcPic->getNumPartInCtuWidth();
     79    Int rasterOffsetTU=0;
     80    if (rect != NULL)
    7981    {
    80       return g_auiRasterToZscan[g_auiZscanToRaster[uiAbsZorderIdx] + iBaseUnitIdx * uiLCUWidthInBaseUnits + iEdgeIdx ];
     82      const UInt minCuWidth =pcPic->getMinCUWidth();
     83      const UInt minCuHeight=pcPic->getMinCUHeight();
     84      rasterOffsetTU = rect->x0/minCuWidth + (rect->y0/minCuHeight)*ctuWidthInBaseUnits;
     85    }
     86    if( edgeDir == EDGE_VER )
     87    {
     88      return g_auiRasterToZscan[g_auiZscanToRaster[absZIdxInCtu] + iBaseUnitIdx * ctuWidthInBaseUnits + iEdgeIdx + rasterOffsetTU ];
    8189    }
    8290    else
    8391    {
    84       return g_auiRasterToZscan[g_auiZscanToRaster[uiAbsZorderIdx] + iEdgeIdx * uiLCUWidthInBaseUnits + iBaseUnitIdx ];
     92      return g_auiRasterToZscan[g_auiZscanToRaster[absZIdxInCtu] + iEdgeIdx * ctuWidthInBaseUnits + iBaseUnitIdx + rasterOffsetTU ];
    8593    }
    86   }
    87  
    88   Void xSetEdgefilterMultiple( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, Int iDir, Int iEdgeIdx, Bool bValue ,UInt uiWidthInBaseUnits = 0, UInt uiHeightInBaseUnits = 0 );
    89  
    90   Void xEdgeFilterLuma            ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, Int iDir, Int iEdge );
    91   Void xEdgeFilterChroma          ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, Int iDir, Int iEdge );
    92  
    93   __inline Void xPelFilterLuma( Pel* piSrc, Int iOffset, Int tc, Bool sw, Bool bPartPNoFilter, Bool bPartQNoFilter, Int iThrCut, Bool bFilterSecondP, Bool bFilterSecondQ);
    94   __inline Void xPelFilterChroma( Pel* piSrc, Int iOffset, Int tc, Bool bPartPNoFilter, Bool bPartQNoFilter);
    95  
     94  }
     95
     96  Void xSetEdgefilterMultiple( TComDataCU* pcCU,
     97                               UInt uiAbsZorderIdx,
     98                               UInt uiDepth,
     99                               DeblockEdgeDir edgeDir,
     100                               Int iEdgeIdx,
     101                               Bool bValue,
     102                               UInt uiWidthInBaseUnits = 0,
     103                               UInt uiHeightInBaseUnits = 0,
     104                               const TComRectangle *rect = 0
     105                               );
     106
     107  Void xEdgeFilterLuma            ( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge );
     108  Void xEdgeFilterChroma          ( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge );
     109
     110  __inline Void xPelFilterLuma( Pel* piSrc, Int iOffset, Int tc, Bool sw, Bool bPartPNoFilter, Bool bPartQNoFilter, Int iThrCut, Bool bFilterSecondP, Bool bFilterSecondQ, const Int bitDepthLuma);
     111  __inline Void xPelFilterChroma( Pel* piSrc, Int iOffset, Int tc, Bool bPartPNoFilter, Bool bPartQNoFilter, const Int bitDepthChroma);
     112
    96113
    97114  __inline Bool xUseStrongFiltering( Int offset, Int d, Int beta, Int tc, Pel* piSrc);
    98115  __inline Int xCalcDP( Pel* piSrc, Int iOffset);
    99116  __inline Int xCalcDQ( Pel* piSrc, Int iOffset);
    100  
     117
    101118  static const UChar sm_tcTable[54];
    102119  static const UChar sm_betaTable[52];
     
    105122  TComLoopFilter();
    106123  virtual ~TComLoopFilter();
    107  
     124
    108125  Void  create                    ( UInt uiMaxCUDepth );
    109126  Void  destroy                   ();
    110  
     127
    111128  /// set configuration
    112129  Void setCfg( Bool bLFCrossTileBoundary );
    113  
     130
    114131  /// picture-level deblocking filter
    115132  Void loopFilterPic( TComPic* pcPic );
Note: See TracChangeset for help on using the changeset viewer.