Changeset 1307 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
21 Jul 2015, 01:21:46 (10 years ago)
Author:
seregin
Message:

port rev 4363

Location:
branches/SHM-dev/source/Lib/TLibCommon
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1296 r1307  
    740740// --------------------------------------------------------------------------------------------------------------------
    741741
    742 Void TComDataCU::copySubCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     742Void TComDataCU::copySubCU( TComDataCU* pcCU, UInt uiAbsPartIdx )
    743743{
    744744  UInt uiPart = uiAbsPartIdx;
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r1296 r1307  
    194194  Void          setOutsideCUPart      ( UInt uiAbsPartIdx, UInt uiDepth );
    195195
    196   Void          copySubCU             ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth );
     196  Void          copySubCU             ( TComDataCU* pcCU, UInt uiPartUnitIdx );
    197197  Void          copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList );
    198198  Void          copyPartFrom          ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth );
  • branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp

    r1305 r1307  
    4949
    5050/// padding of unavailable reference samples for intra prediction
    51 #if O0043_BEST_EFFORT_DECODING
    52 Void fillReferenceSamples( const Int bitDepth, const Int bitDepthDelta, TComDataCU* pcCU, const Pel* piRoiOrigin, Pel* piAdiTemp, const Bool* bNeighborFlags,
    53 #else
    54 Void fillReferenceSamples( const Int bitDepth, TComDataCU* pcCU, const Pel* piRoiOrigin, Pel* piAdiTemp, const Bool* bNeighborFlags,
    55 #endif
    56                            const Int iNumIntraNeighbor, const Int unitWidth, const Int unitHeight, const Int iAboveUnits, const Int iLeftUnits,
    57                            const UInt uiCuWidth, const UInt uiCuHeight, const UInt uiWidth, const UInt uiHeight, const Int iPicStride,
    58                            const ChannelType chType, const ChromaFormat chFmt );
     51Void fillReferenceSamples( const Int bitDepth,
     52#if O0043_BEST_EFFORT_DECODING
     53                           const Int bitDepthDelta,
     54#endif
     55                           const Pel* piRoiOrigin,
     56                                 Pel* piAdiTemp,
     57                           const Bool* bNeighborFlags,
     58                           const Int iNumIntraNeighbor,
     59                           const Int unitWidth,
     60                           const Int unitHeight,
     61                           const Int iAboveUnits,
     62                           const Int iLeftUnits,
     63                           const UInt uiWidth,
     64                           const UInt uiHeight,
     65                           const Int iPicStride );
    5966
    6067/// constrained intra prediction
     
    152159  bLeft  = true;
    153160
    154   const ChromaFormat chFmt       = rTu.GetChromaFormat();
    155161  const UInt         uiROIWidth  = uiTuWidth2+1;
    156162  const UInt         uiROIHeight = uiTuHeight2+1;
     
    167173#if O0043_BEST_EFFORT_DECODING
    168174    const Int  bitDepthForChannelInStream = sps.getStreamBitDepth(chType);
    169     fillReferenceSamples (bitDepthForChannelInStream, bitDepthForChannelInStream - bitDepthForChannel, pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor,  iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits,
     175    fillReferenceSamples (bitDepthForChannelInStream, bitDepthForChannelInStream - bitDepthForChannel,
    170176#else
    171     fillReferenceSamples (bitDepthForChannel, pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor,  iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits,
    172 #endif
    173                           uiTuWidth, uiTuHeight, uiROIWidth, uiROIHeight, iPicStride, toChannelType(compID), chFmt);
     177    fillReferenceSamples (bitDepthForChannel,
     178#endif
     179                          piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor,  iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits,
     180                          uiROIWidth, uiROIHeight, iPicStride);
    174181
    175182
     
    320327}
    321328
    322 #if O0043_BEST_EFFORT_DECODING
    323 Void fillReferenceSamples( const Int bitDepth, const Int bitDepthDelta, TComDataCU* pcCU, const Pel* piRoiOrigin, Pel* piAdiTemp, const Bool* bNeighborFlags,
    324 #else
    325 Void fillReferenceSamples( const Int bitDepth, TComDataCU* pcCU, const Pel* piRoiOrigin, Pel* piAdiTemp, const Bool* bNeighborFlags,
    326 #endif
    327                            const Int iNumIntraNeighbor, const Int unitWidth, const Int unitHeight, const Int iAboveUnits, const Int iLeftUnits,
    328                            const UInt uiCuWidth, const UInt uiCuHeight, const UInt uiWidth, const UInt uiHeight, const Int iPicStride,
    329                            const ChannelType chType, const ChromaFormat chFmt )
     329Void fillReferenceSamples( const Int bitDepth,
     330#if O0043_BEST_EFFORT_DECODING
     331                           const Int bitDepthDelta,
     332#endif
     333                           const Pel* piRoiOrigin,
     334                                 Pel* piAdiTemp,
     335                           const Bool* bNeighborFlags,
     336                           const Int iNumIntraNeighbor,
     337                           const Int unitWidth,
     338                           const Int unitHeight,
     339                           const Int iAboveUnits,
     340                           const Int iLeftUnits,
     341                           const UInt uiWidth,
     342                           const UInt uiHeight,
     343                           const Int iPicStride )
    330344{
    331345  const Pel* piRoiTemp;
  • branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r1305 r1307  
    181181// Function for calculating DC value of the reference samples used in Intra prediction
    182182//NOTE: Bit-Limit - 25-bit source
    183 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, ChannelType channelType, ChromaFormat format, Bool bAbove, Bool bLeft )
     183Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft )
    184184{
    185185  assert(iWidth > 0 && iHeight > 0);
     
    251251                                    const Pel* pSrc,     Int srcStride,
    252252                                          Pel* pTrueDst, Int dstStrideTrue,
    253                                           UInt uiWidth, UInt uiHeight, ChannelType channelType, ChromaFormat format,
     253                                          UInt uiWidth, UInt uiHeight, ChannelType channelType,
    254254                                          UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable
    255255                                  , const Bool bEnableEdgeFilters
     
    266266  if (modeDC)
    267267  {
    268     const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height, channelType, format, blkAboveAvailable, blkLeftAvailable);
     268    const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height, blkAboveAvailable, blkLeftAvailable);
    269269
    270270    for (Int y=height;y>0;y--, pTrueDst+=dstStrideTrue)
     
    412412Void TComPrediction::predIntraAng( const ComponentID compID, UInt uiDirMode, Pel* piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, Bool bAbove, Bool bLeft, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM )
    413413{
    414   const ChromaFormat   format      = rTu.GetChromaFormat();
    415414  const ChannelType    channelType = toChannelType(compID);
    416415  const TComRectangle &rect        = rTu.getRect(isLuma(compID) ? COMPONENT_Y : COMPONENT_Cb);
     
    472471    if ( uiDirMode == PLANAR_IDX )
    473472    {
    474       xPredIntraPlanar( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, format );
     473      xPredIntraPlanar( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight );
    475474    }
    476475    else
     
    489488#endif
    490489#endif
    491       xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, format, uiDirMode, bAbove, bLeft, enableEdgeFilters );
     490      xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, bAbove, bLeft, enableEdgeFilters );
    492491
    493492      if(( uiDirMode == DC_IDX ) && bAbove && bLeft )
     
    787786 */
    788787//NOTE: Bit-Limit - 24-bit source
    789 Void TComPrediction::xPredIntraPlanar( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height, ChannelType channelType, ChromaFormat format )
     788Void TComPrediction::xPredIntraPlanar( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height )
    790789{
    791790  assert(width <= height);
  • branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.h

    r1287 r1307  
    8888  Int    m_iLumaRecStride;       ///< stride of #m_pLumaRecBuffer array
    8989
    90   Void xPredIntraAng            ( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pDst, Int dstStride, UInt width, UInt height, ChannelType channelType, ChromaFormat format, UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable, const Bool bEnableEdgeFilters );
    91   Void xPredIntraPlanar         ( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height, ChannelType channelType, ChromaFormat format );
     90  Void xPredIntraAng            ( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pDst, Int dstStride, UInt width, UInt height, ChannelType channelType, UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable, const Bool bEnableEdgeFilters );
     91  Void xPredIntraPlanar         ( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height );
    9292
    9393  // motion compensation functions
     
    124124  Void predIntraAng               ( const ComponentID compID, UInt uiDirMode, Pel *piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, Bool bAbove, Bool bLeft, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM = false );
    125125
    126   Pel  predIntraGetPredValDC      ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, ChannelType channelType, ChromaFormat format, Bool bAbove, Bool bLeft );
     126  Pel  predIntraGetPredValDC      ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft );
    127127
    128128  Pel*  getPredictorPtr           ( const ComponentID compID, const Bool bUseFilteredPredictions )
  • branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp

    r1305 r1307  
    993993
    994994// To minimize the distortion only. No rate is considered.
    995 Void TComTrQuant::signBitHidingHDQ( const ComponentID compID, TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange )
     995Void TComTrQuant::signBitHidingHDQ( TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange )
    996996{
    997997  const UInt width     = codingParameters.widthInGroups  << MLS_CG_LOG2_WIDTH;
     
    12551255      if(uiAbsSum >= 2) //this prevents TUs with only one coefficient of value 1 from being tested
    12561256      {
    1257         signBitHidingHDQ( compID, piQCoef, piCoef, deltaU, codingParameters, maxLog2TrDynamicRange ) ;
     1257        signBitHidingHDQ( piQCoef, piCoef, deltaU, codingParameters, maxLog2TrDynamicRange ) ;
    12581258      }
    12591259    }
     
    30913091 * \param bitDepths              reference to bit depth array for all channels
    30923092 */
    3093 Void TComTrQuant::setScalingList(TComScalingList *scalingList, const ChromaFormat format, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
     3093Void TComTrQuant::setScalingList(TComScalingList *scalingList, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
    30943094{
    30953095  const Int minimumQp = 0;
     
    31023102      for(Int qp = minimumQp; qp < maximumQp; qp++)
    31033103      {
    3104         xSetScalingListEnc(scalingList,list,size,qp,format);
    3105         xSetScalingListDec(*scalingList,list,size,qp,format);
     3104        xSetScalingListEnc(scalingList,list,size,qp);
     3105        xSetScalingListDec(*scalingList,list,size,qp);
    31063106        setErrScaleCoeff(list,size,qp,maxLog2TrDynamicRange, bitDepths);
    31073107      }
     
    31133113 * \param format      chroma format
    31143114 */
    3115 Void TComTrQuant::setScalingListDec(const TComScalingList &scalingList, const ChromaFormat format)
     3115Void TComTrQuant::setScalingListDec(const TComScalingList &scalingList)
    31163116{
    31173117  const Int minimumQp = 0;
     
    31243124      for(Int qp = minimumQp; qp < maximumQp; qp++)
    31253125      {
    3126         xSetScalingListDec(scalingList,list,size,qp,format);
     3126        xSetScalingListDec(scalingList,list,size,qp);
    31273127      }
    31283128    }
     
    31683168 * \param format chroma format
    31693169 */
    3170 Void TComTrQuant::xSetScalingListEnc(TComScalingList *scalingList, UInt listId, UInt sizeId, Int qp, const ChromaFormat format)
     3170Void TComTrQuant::xSetScalingListEnc(TComScalingList *scalingList, UInt listId, UInt sizeId, Int qp)
    31713171{
    31723172  UInt width  = g_scalingListSizeX[sizeId];
     
    31943194 * \param format chroma format
    31953195 */
    3196 Void TComTrQuant::xSetScalingListDec(const TComScalingList &scalingList, UInt listId, UInt sizeId, Int qp, const ChromaFormat format)
     3196Void TComTrQuant::xSetScalingListDec(const TComScalingList &scalingList, UInt listId, UInt sizeId, Int qp)
    31973197{
    31983198  UInt width  = g_scalingListSizeX[sizeId];
     
    32163216/** set flat matrix value to quantized coefficient
    32173217 */
    3218 Void TComTrQuant::setFlatScalingList(const ChromaFormat format, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
     3218Void TComTrQuant::setFlatScalingList(const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
    32193219{
    32203220  const Int minimumQp = 0;
     
    32273227      for(Int qp = minimumQp; qp < maximumQp; qp++)
    32283228      {
    3229         xsetFlatScalingList(list,size,qp,format);
     3229        xsetFlatScalingList(list,size,qp);
    32303230        setErrScaleCoeff(list,size,qp,maxLog2TrDynamicRange, bitDepths);
    32313231      }
     
    32403240 * \param format chroma format
    32413241 */
    3242 Void TComTrQuant::xsetFlatScalingList(UInt list, UInt size, Int qp, const ChromaFormat format)
     3242Void TComTrQuant::xsetFlatScalingList(UInt list, UInt size, Int qp)
    32433243{
    32443244  UInt i,num = g_scalingListSize[size];
  • branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.h

    r1303 r1307  
    182182  Void setUseScalingList   ( Bool bUseScalingList){ m_scalingListEnabledFlag = bUseScalingList; };
    183183  Bool getUseScalingList   (const UInt width, const UInt height, const Bool isTransformSkip){ return m_scalingListEnabledFlag && (!isTransformSkip || ((width == 4) && (height == 4))); };
    184   Void setFlatScalingList  (const ChromaFormat format, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);
    185   Void xsetFlatScalingList ( UInt list, UInt size, Int qp, const ChromaFormat format);
    186   Void xSetScalingListEnc  ( TComScalingList *scalingList, UInt list, UInt size, Int qp, const ChromaFormat format);
    187   Void xSetScalingListDec  ( const TComScalingList &scalingList, UInt list, UInt size, Int qp, const ChromaFormat format);
    188   Void setScalingList      ( TComScalingList *scalingList, const ChromaFormat format, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);
    189   Void setScalingListDec   ( const TComScalingList &scalingList, const ChromaFormat format);
     184  Void setFlatScalingList  (const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);
     185  Void xsetFlatScalingList ( UInt list, UInt size, Int qp);
     186  Void xSetScalingListEnc  ( TComScalingList *scalingList, UInt list, UInt size, Int qp);
     187  Void xSetScalingListDec  ( const TComScalingList &scalingList, UInt list, UInt size, Int qp);
     188  Void setScalingList      ( TComScalingList *scalingList, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);
     189  Void setScalingListDec   ( const TComScalingList &scalingList);
    190190  Void processScalingListEnc( Int *coeff, Int *quantcoeff, Int quantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc);
    191191  Void processScalingListDec( const Int *coeff, Int *dequantcoeff, Int invQuantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc);
     
    241241  Void xTransformSkip ( Pel* piBlkResi, UInt uiStride, TCoeff* psCoeff, TComTU &rTu, const ComponentID component );
    242242
    243   Void signBitHidingHDQ( const ComponentID compID, TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange );
     243  Void signBitHidingHDQ( TCoeff* pQCoef, TCoeff* pCoef, TCoeff* deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange );
    244244
    245245  // quantization
Note: See TracChangeset for help on using the changeset viewer.