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


Ignore:
Timestamp:
2 Aug 2013, 22:52:20 (11 years ago)
Author:
seregin
Message:

remove INTRA_BL

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/ContextTables.h

    r313 r321  
    9292#define NUM_SAO_MERGE_FLAG_CTX        1       ///< number of context models for SAO merge flags
    9393#define NUM_SAO_TYPE_IDX_CTX          1       ///< number of context models for SAO type index
    94 #if INTRA_BL
    95 #define NUM_INTRA_BL_PRED_CTX         3
    96 #endif
    9794
    9895#define NUM_TRANSFORMSKIP_FLAG_CTX    1       ///< number of context models for transform skipping
     
    330327};
    331328
    332 #if INTRA_BL
    333 static const UChar
    334 INIT_INTRA_BL_PRED_FLAG[3][NUM_INTRA_BL_PRED_CTX] =
    335 {
    336   { 185,  185,  201, },
    337   { 197,  197,  185, },
    338   { 197,  197,  185, },
    339 };
    340 #endif
    341329static const UChar
    342330INIT_TRANSFORMSKIP_FLAG[3][2*NUM_TRANSFORMSKIP_FLAG_CTX] =
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r319 r321  
    16431643  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    16441644 
    1645 #if INTRA_BL
    1646   iLeftIntraDir  = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) && ( !pcTempCU->isIntraBL( uiTempPartIdx ) ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
    1647 #else
    16481645  iLeftIntraDir  = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
    1649 #endif
    16501646 
    16511647  // Get intra direction of above PU
    16521648  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, true );
    16531649 
    1654 #if INTRA_BL
    1655   iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) && ( !pcTempCU->isIntraBL( uiTempPartIdx ) ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
    1656 #else
    16571650  iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
    1658 #endif
    16591651 
    16601652  uiPredNum = 3;
     
    17981790  UInt log2CbSize = g_aucConvertToBit[getWidth( absPartIdx )] + 2;
    17991791  PartSize  partSize  = getPartitionSize( absPartIdx );
    1800 #if INTRA_BL
    1801   UInt quadtreeTUMaxDepth = isIntra( absPartIdx ) ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter();
    1802 #else
    18031792  UInt quadtreeTUMaxDepth = getPredictionMode( absPartIdx ) == MODE_INTRA ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter();
    1804 #endif
    18051793  Int intraSplitFlag = ( getPredictionMode( absPartIdx ) == MODE_INTRA && partSize == SIZE_NxN ) ? 1 : 0;
    18061794  Int interSplitFlag = ((quadtreeTUMaxDepth == 1) && (getPredictionMode( absPartIdx ) == MODE_INTER) && (partSize != SIZE_2Nx2N) );
     
    18241812  return log2MinTUSizeInCU;
    18251813}
    1826 
    1827 #if INTRA_BL
    1828 UInt TComDataCU::getCtxIntraBLFlag( UInt uiAbsPartIdx )
    1829 {
    1830   TComDataCU* pcTempCU;
    1831   UInt        uiTempPartIdx;
    1832   UInt        uiCtx = 0;
    1833  
    1834   // Get BCBP of left PU
    1835 #if DEPENDENT_SLICES
    1836   Bool bDepSliceRestriction = ( !m_pcSlice->getPPS()->getDependentSliceEnabledFlag());
    1837   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );
    1838 #else
    1839   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    1840 #endif 
    1841   uiCtx    = ( pcTempCU ) ? pcTempCU->isIntraBL( uiTempPartIdx ) : 0;
    1842  
    1843   // Get BCBP of above PU
    1844 #if DEPENDENT_SLICES
    1845   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );
    1846 #else
    1847   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    1848 #endif 
    1849   uiCtx   += ( pcTempCU ) ? pcTempCU->isIntraBL( uiTempPartIdx ) : 0;
    1850  
    1851   return uiCtx;
    1852 }
    1853 #endif
    18541814
    18551815#if REF_IDX_ME_ZEROMV
     
    25542514  TComDataCU* pcCULeft = 0;
    25552515  pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB );
    2556 #if INTRA_BL
    2557   if( pcCULeft && pcCULeft->isIntraBL( uiLeftPartIdx ) )
    2558   {
    2559     pcCULeft = NULL;
    2560   }
    2561 #endif
     2516
    25622517  Bool isAvailableA1 = pcCULeft &&
    25632518  pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) &&
     
    25912546  TComDataCU* pcCUAbove = 0;
    25922547  pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );
    2593 #if INTRA_BL
    2594   if( pcCUAbove && pcCUAbove->isIntraBL( uiAbovePartIdx ) )
    2595   {
    2596     pcCUAbove = NULL;
    2597   }
    2598 #endif
     2548
    25992549  Bool isAvailableB1 = pcCUAbove &&
    26002550  pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) &&
     
    26282578  TComDataCU* pcCUAboveRight = 0;
    26292579  pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );
    2630 #if INTRA_BL
    2631   if( pcCUAboveRight && pcCUAboveRight->isIntraBL( uiAboveRightPartIdx ) )
    2632   {
    2633     pcCUAboveRight = NULL;
    2634   }
    2635 #endif
     2580
    26362581  Bool isAvailableB0 = pcCUAboveRight &&
    26372582  pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) &&
     
    26642609  TComDataCU* pcCULeftBottom = 0;
    26652610  pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );
    2666 #if INTRA_BL
    2667   if( pcCULeftBottom && pcCULeftBottom->isIntraBL( uiLeftBottomPartIdx ) )
    2668   {
    2669     pcCULeftBottom = NULL;
    2670   }
    2671 #endif
     2611
    26722612  Bool isAvailableA0 = pcCULeftBottom &&
    26732613  pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) &&
     
    27022642    TComDataCU* pcCUAboveLeft = 0;
    27032643    pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );
    2704 #if INTRA_BL
    2705     if( pcCUAboveLeft && pcCUAboveLeft->isIntraBL( uiAboveLeftPartIdx ) )
    2706     {
    2707       pcCUAboveLeft = NULL;
    2708     }
    2709 #endif
     2644
    27102645    Bool isAvailableB2 = pcCUAboveLeft &&
    27112646    pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) &&
     
    30102945  UInt idx;
    30112946  tmpCU = getPUBelowLeft(idx, uiPartIdxLB);
    3012 #if INTRA_BL
    3013   bAddedSmvp = (tmpCU != NULL) && (!tmpCU->isIntra(idx));
    3014 #else
    30152947  bAddedSmvp = (tmpCU != NULL) && (tmpCU->getPredictionMode(idx) != MODE_INTRA);
    3016 #endif
    30172948
    30182949  if (!bAddedSmvp)
    30192950  {
    30202951    tmpCU = getPULeft(idx, uiPartIdxLB);
    3021 #if INTRA_BL
    3022     bAddedSmvp = (tmpCU != NULL) && (!tmpCU->isIntra(idx));
    3023 #else
    30242952    bAddedSmvp = (tmpCU != NULL) && (tmpCU->getPredictionMode(idx) != MODE_INTRA);
    3025 #endif
    30262953  }
    30272954
     
    40193946}
    40203947
    4021 #if INTRA_BL
    4022 Void TComDataCU::getBaseLumaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride )
    4023 {
    4024   TComPicYuv* pcBaseRec = getSlice()->getFullPelBaseRec();
    4025   UInt uiStrideBase = pcBaseRec->getStride();
    4026   Pel* piBase = pcBaseRec->getLumaAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );
    4027  
    4028   for ( UInt y = 0; y < uiHeight; y ++ )
    4029   {
    4030     memcpy( piPred + y * uiStride, piBase + y * uiStrideBase, uiWidth * sizeof( Pel ) );
    4031   }
    4032 }
    4033 
    4034 Void TComDataCU::getBaseChromaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, UInt uiChromaId )
    4035 {
    4036   TComPicYuv* pcBaseRec = getSlice()->getFullPelBaseRec();
    4037 
    4038   UInt uiStrideBase = pcBaseRec->getCStride();
    4039   Pel* piBase;
    4040  
    4041   if( uiChromaId == 0 )
    4042   {
    4043     piBase = pcBaseRec->getCbAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );
    4044   }
    4045   else
    4046   {
    4047     piBase = pcBaseRec->getCrAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );
    4048   }
    4049  
    4050   for ( UInt y = 0; y < uiHeight; y ++ )
    4051   {
    4052     memcpy( piPred + y * uiStride, piBase + y * uiStrideBase, uiWidth * sizeof( Pel ) );
    4053   }
    4054 }
    4055 
    4056 #endif
    4057 
    40583948#if SVC_COL_BLK
    40593949TComDataCU*  TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase )
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.h

    r319 r321  
    489489  // -------------------------------------------------------------------------------------------------------------------
    490490 
    491 #if INTRA_BL
    492   Void          getBaseLumaBlk   ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride );
    493   Void          getBaseChromaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, UInt uiChromaId );
    494 #endif
    495 #if INTRA_BL
    496   Bool          isIntraBL ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA_BL; }
    497   Bool          isIntra   ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA || m_pePredMode[ uiPartIdx ] == MODE_INTRA_BL; }
    498 #else
    499491  Bool          isIntra   ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; }
    500 #endif
    501492  Bool          isSkipped ( UInt uiPartIdx );                                                     ///< SKIP (no residual)
    502493  Bool          isBipredRestriction( UInt puIdx );
     
    525516  UInt&         getTotalBins            ()                            { return m_uiTotalBins;                                                                                                  }
    526517
    527 #if INTRA_BL
    528   UInt          getCtxIntraBLFlag               ( UInt   uiAbsPartIdx                                 );
    529 #endif 
    530 
     518#if REF_IDX_FRAMEWORK
    531519#if FAST_INTRA_SHVC
    532520  Int           reduceSetOfIntraModes              (  UInt   uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes );
     
    536524  Bool xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1);
    537525  Bool xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx);
     526#endif
    538527#endif
    539528
     
    549538  UInt          getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra);
    550539
     540#if REF_IDX_FRAMEWORK
    551541#if SVC_COL_BLK
    552542  TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase );
    553543  TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase );
    554544  Void          scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase );
     545#endif
    555546#endif
    556547};
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r319 r321  
    408408}
    409409
    410 #if INTRA_BL
    411 Void TComPrediction::getBaseBlk( TComDataCU* pcCU, TComYuv* pcYuvPred, Int iPartAddr, Int iWidth, Int iHeight )
    412 {
    413   pcCU->getBaseLumaBlk( iWidth, iHeight, iPartAddr, pcYuvPred->getLumaAddr( iPartAddr ), pcYuvPred->getStride() );
    414   pcCU->getBaseChromaBlk( iWidth >> 1, iHeight >> 1, iPartAddr, pcYuvPred->getCbAddr( iPartAddr ), pcYuvPred->getCStride(), 0 );
    415   pcCU->getBaseChromaBlk( iWidth >> 1, iHeight >> 1, iPartAddr, pcYuvPred->getCrAddr( iPartAddr ), pcYuvPred->getCStride(), 1 );
    416 }
    417 #endif
    418 
    419410Void TComPrediction::motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList, Int iPartIdx )
    420411{
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.h

    r313 r321  
    101101 
    102102  Void    initTempBuff();
    103  
    104 #if INTRA_BL
    105   Void getBaseBlk ( TComDataCU* pcCU, TComYuv* pcYuvPred, Int iPartAddr, Int iWidth, Int iHeight );
    106 #endif
     103
    107104  // inter
    108105  Void motionCompensation         ( TComDataCU*  pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 );
     
    121118  Int  getPredicBufHeight()       { return m_iYuvExtHeight; }
    122119
     120#if REF_IDX_FRAMEWORK
    123121#if SVC_UPSAMPLING
    124122#if SCALED_REF_LAYER_OFFSETS
     
    128126#endif
    129127#endif
     128#endif
    130129};
    131130
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h

    r320 r321  
    113113#define M0457_IL_SAMPLE_PRED_ONLY_FLAG   0
    114114#endif
    115 
    116 #else
    117 #define INTRA_BL                         1      ///< inter-layer texture prediction
    118115#endif
    119116
     
    458455  MODE_INTER,           ///< inter-prediction mode
    459456  MODE_INTRA,           ///< intra-prediction mode
    460 #if INTRA_BL
    461   MODE_INTRA_BL,        ///< inter-layer intra-prediction mode
    462 #endif
    463457  MODE_NONE = 15
    464458};
Note: See TracChangeset for help on using the changeset viewer.