Changeset 325 in 3DVCSoftware for branches/HTM-6.1-Cleanup/source


Ignore:
Timestamp:
16 Apr 2013, 14:11:23 (11 years ago)
Author:
tech
Message:

Removed various macros.

Location:
branches/HTM-6.1-Cleanup/source
Files:
42 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.1-Cleanup/source/App/TAppEncoder/TAppEncCfg.cpp

    r296 r325  
    368368#endif
    369369
    370 #if OL_QTLIMIT_PREDCODING_B0068
     370#if H3D_QTL
    371371  ("QTLPC",                           m_bUseQTLPC               , true         , "Use depth Quadtree Limitation + Predictive Coding" )
    372372#endif
     
    16951695  printf("WVSO:%d ", m_bUseWVSO );
    16961696#endif
    1697 #if OL_QTLIMIT_PREDCODING_B0068
     1697#if H3D_QTL
    16981698  printf("QTLPC:%d ", m_bUseQTLPC);
    16991699#endif
  • branches/HTM-6.1-Cleanup/source/App/TAppEncoder/TAppEncCfg.h

    r296 r325  
    313313#endif
    314314
    315 #if OL_QTLIMIT_PREDCODING_B0068
     315#if H3D_QTL
    316316  Bool      m_bUseQTLPC;                                      ///< flag for using depth QuadTree Limitation + Predictive Coding
    317317#endif
  • branches/HTM-6.1-Cleanup/source/App/TAppEncoder/TAppEncTop.cpp

    r313 r325  
    357357    m_acTEncTopList[iViewIdx]->setUseDMM                     ( false );
    358358#endif
    359 #if OL_QTLIMIT_PREDCODING_B0068
     359#if H3D_QTL
    360360    m_acTEncTopList[iViewIdx]->setUseQTLPC                   ( false );
    361361#endif
     
    659659#endif
    660660
    661 #if OL_QTLIMIT_PREDCODING_B0068
     661#if H3D_QTL
    662662    m_acTEncDepthTopList[iViewIdx]->setUseQTLPC                   (m_bUseQTLPC);
    663663#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/ContextTables.h

    r296 r325  
    434434
    435435#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    436 #if FIX_DMM_CTX_INIT_C0034
    437436static const UChar
    438 #else
    439 static const Short
    440 #endif
    441437INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] =
    442438{
     
    452448};
    453449
    454 #if FIX_DMM_CTX_INIT_C0034
    455450static const UChar
    456 #else
    457 static const Short
    458 #endif
    459451INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] =
    460452{
     
    470462};
    471463
    472 #if FIX_DMM_CTX_INIT_C0034
    473464static const UChar
    474 #else
    475 static const Short
    476 #endif
    477465INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] =
    478466{
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComDataCU.cpp

    r322 r325  
    31653165}
    31663166
    3167 #if LG_RESTRICTEDRESPRED_M24766
     3167#if H3D_IVRP
    31683168Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU)
    31693169{
     
    32503250#endif
    32513251
    3252 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3253 Int TComDataCU::getResiPredMode(UInt uiPartAddr)
    3254 {
    3255   Int iAddResiShift = -1;
    3256 
    3257   for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++)
    3258   {
    3259     RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
    3260     Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr);
    3261     if(iBestRefIdx >= 0 && getSlice()->getViewId() == getSlice()->getRefViewId(eRefList, iBestRefIdx))
    3262       iAddResiShift++;
    3263   }
    3264 
    3265   return iAddResiShift;
    3266 }
    3267 
    3268 Void TComDataCU::getPUResiPredShift(Int *iPUResiPredShift, UInt uiAbsPartIndex)
    3269 {
    3270   UInt uiPartSize = getPartitionSize(uiAbsPartIndex);
    3271   UInt uiPartAddr;
    3272   Int iWidth, iHeight;
    3273   Int iAddResiShift;
    3274 
    3275   if(uiPartSize == SIZE_2Nx2N)
    3276   {
    3277     iAddResiShift = getResiPredMode(uiAbsPartIndex);
    3278     for(UInt i = 0; i < 4; i++)
    3279       iPUResiPredShift[i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiAbsPartIndex) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
    3280     return;
    3281   }
    3282 
    3283   if(uiPartSize == SIZE_2NxN || uiPartSize == SIZE_2NxnU || uiPartSize == SIZE_2NxnD)
    3284   {
    3285     for(UInt i = 0; i < 2; i++)
    3286     {
    3287       getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);
    3288       uiPartAddr += uiAbsPartIndex;
    3289       iAddResiShift = getResiPredMode(uiPartAddr);
    3290       iPUResiPredShift[2*i] = iPUResiPredShift[2*i+1] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
    3291     }
    3292     return;
    3293   }
    3294 
    3295   if(uiPartSize == SIZE_Nx2N || uiPartSize == SIZE_nLx2N || uiPartSize == SIZE_nRx2N)
    3296   {
    3297     for(UInt i = 0; i < 2; i++)
    3298     {
    3299       getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);
    3300       uiPartAddr += uiAbsPartIndex;
    3301       iAddResiShift = getResiPredMode(uiPartAddr);
    3302       iPUResiPredShift[i] = iPUResiPredShift[2+i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
    3303     }
    3304     return;
    3305   }
    3306 
    3307   if(uiPartSize == SIZE_NxN)
    3308   {
    3309     for(UInt i = 0; i < 4; i++)
    3310     {
    3311       getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);
    3312       uiPartAddr += uiAbsPartIndex;
    3313       iAddResiShift = getResiPredMode(uiPartAddr);
    3314       iPUResiPredShift[i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
    3315     }
    3316   }
    3317 
    3318 }
    3319 #endif
    3320 
    33213252Void TComDataCU::getMvField ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField )
    33223253{
     
    36533584#endif //H3D_NBDV
    36543585
    3655 #if MTK_MDIVRP_C0138
     3586#if H3D_IVRP
    36563587  Bool bDVAvail = true;
    36573588#endif
     
    36933624    cDisInfo.m_acMvCand[0].setVer(0);
    36943625    cDisInfo.m_aVIdxCan[0] = 0;
    3695 #if MTK_MDIVRP_C0138
     3626#if H3D_IVRP
    36963627    bDVAvail = false;
    36973628#endif
     
    37483679
    37493680  Int iPdmDir[2] = {0, 0};
    3750 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
    37513681  getUnifiedMvPredCan(uiPUIdx, REF_PIC_LIST_0, 0, aiPdmRefIdx, acPdmMv, &cDisInfo, iPdmDir, true);
    37523682  Int iPdmInterDir;
    3753 #else
    3754   Int     iPdmInterDir      = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo, iPdmDir );
    3755 #endif
    37563683#else // H3D_NBDV
    37573684  Int iPdmDir[2] = {0, 0};
     
    37603687  iPdmDir[1] = iPdmInterDir;
    37613688#endif // H3D_NBDV
    3762 #if MTK_MDIVRP_C0138
     3689#if H3D_IVRP
    37633690  if (m_pcSlice->getSPS()->getMultiviewResPredMode()==1 && iPdmDir[0] && !bNoPdmMerge && cCurPS == SIZE_2Nx2N && bDVAvail)
    37643691  {
     
    56505577        cDisInfo.m_aVIdxCan[0] = 0;
    56515578      }
    5652 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
    56535579      Int paiPdmRefIdx[4] = {-1, -1, -1, -1};
    56545580      Int iPdmDir[4]      = {-1, -1, -1, -1};
    5655 #if QC_C0051_FIXED_BY_MTK
    56565581      TComMv cPdmMvPred[4];
    5657 #else
    5658       TComMv cPdmMvPred[2];
    5659 #endif
    56605582      cPdmMvPred[0].m_bDvMcp = cPdmMvPred[1].m_bDvMcp = false;
    56615583      if(getUnifiedMvPredCan(uiPartIdx, eRefPicList, iRefIdx, paiPdmRefIdx, cPdmMvPred, &cDisInfo, iPdmDir, false))
    5662 #else // QC_AMVP_MRG_UNIFY_IVCAN_C0051
    5663       TComMv  cPdmMvPred;
    5664       if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) )
    5665 #endif // QC_AMVP_MRG_UNIFY_IVCAN_C0051
    56665584#else // H3D_NBDV
    56675585      if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) )
    56685586#endif
    56695587
    5670 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
    56715588      {
    56725589        clipMv( cPdmMvPred[0] );
     
    56775594        pInfo->m_acMvCand[0].set(0,0);
    56785595      }
    5679 #else
    5680       {
    5681         clipMv( cPdmMvPred );
    5682         pInfo->m_acMvCand[0] = cPdmMvPred;
    5683       }
    5684       else
    5685       {
    5686         pInfo->m_acMvCand[0].set(0,0);
    5687       }
    5688 #endif
    56895596    }
    56905597  }
     
    74227329}
    74237330#else //H3D_NBDV
    7424 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
    74257331Bool
    74267332TComDataCU::getUnifiedMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge )
     
    74327338  return false;
    74337339}
    7434 #else
    7435 Int
    7436 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm )
    7437 {
    7438   TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator();
    7439   ROFRS( pcDepthMapGenerator, 0 );
    7440   return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo, iPdm );
    7441 }
    7442 Bool
    7443 TComDataCU::getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge )
    7444 {
    7445   TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator();
    7446   ROFRS( pcDepthMapGenerator, false );
    7447   if (pDInfo->iN > 0 && pcDepthMapGenerator->getDisCanPdmMvPred(this, uiPartIdx, eRefPicList, iRefIdx, rcMv, pDInfo, bMerge )) //bug fix li
    7448     return true;
    7449   return false;
    7450 }
    7451 #endif
    74527340#endif //H3D_NBDV
    74537341
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComDataCU.h

    r322 r325  
    535535  Bool          getPdmMvPred              ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false );
    536536#else //!H3D_NBDV
    537 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
    538537  Bool          getUnifiedMvPredCan       ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge );
    539 #else //QC_AMVP_MRG_UNIFY_IVCAN_C0051
    540   Bool          getPdmMvPredDisCan        ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false );
    541   Int           getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm );
    542 #endif //QC_AMVP_MRG_UNIFY_IVCAN_C0051
    543538  Void          getDisMvpCand        ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo );
    544539  Void          getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo , Bool bParMerg = false
     
    576571  // member functions for accessing partition information
    577572  // -------------------------------------------------------------------------------------------------------------------
    578 #if LG_RESTRICTEDRESPRED_M24766
     573#if H3D_IVRP
    579574  Void          getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false);
    580 #else
    581   Void          getPartIndexAndSize   ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight );
    582 #endif
    583 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    584   Int           getResiPredMode(UInt uiPartAddr);
    585   Void          getPUResiPredShift (Int *iPUPredResiShift, UInt uiAbsPartIndex);
    586575#endif
    587576  UChar         getNumPartInter       ();
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComDepthMapGenerator.cpp

    r322 r325  
    605605
    606606#if H3D_IVMP
    607 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
    608607Bool
    609608TComDepthMapGenerator::getPdmCandidate(TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge )
     
    636635  for( UInt uiBId = 0; uiBId < m_uiCurrViewId && iValid==0; uiBId++ )
    637636  {
    638 #if MTK_C0138_FIXED
     637
    639638    UInt        uiBaseId    = uiBId;
    640 #else
    641     UInt        uiBaseId    = m_auiBaseIdList[ uiBId ];
    642 #endif
    643639    TComPic*    pcBasePic   = m_pcAUPicAccess->getPic( uiBaseId );
    644640    for( Int iRefListId = 0; iRefListId < 2 && iValid==0; iRefListId++ )
     
    785781  return false;
    786782}
    787 #else // QC_AMVP_MRG_UNIFY_IVCAN_C0051
    788 #if H3D_NBDV
    789 Int
    790 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm )
    791 #else
    792 Int
    793 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv )
    794 #endif
    795 {
    796   AOF  ( m_bCreated && m_bInit );
    797 
    798 #if !H3D_NBDV
    799   ROFRS( m_bPDMAvailable, 0 );
    800 #endif
    801 
    802   TComSlice*    pcSlice     = pcCU->getSlice ();
    803   TComSPS*      pcSPS       = pcSlice->getSPS();
    804   AOF  ( pcSPS->getViewId() == m_uiCurrViewId );
    805   Bool          bPdmMerge   = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE );
    806   ROTRS( !bPdmMerge, 0 );
    807 
    808   Bool abPdmAvailable[4] = {false, false, false, false};
    809 
    810   Int iValid = 0;
    811   Int iViewId = 0;
    812   for( UInt uiBId = 0; uiBId < m_uiCurrViewId && iValid==0; uiBId++ )
    813   {
    814     UInt        uiBaseId    = m_auiBaseIdList[ uiBId ];
    815     TComPic*    pcBasePic   = m_pcAUPicAccess->getPic( uiBaseId );
    816     for( Int iRefListId = 0; iRefListId < 2 && iValid==0; iRefListId++ )
    817     {
    818       RefPicList  eRefPicListTest = RefPicList( iRefListId );
    819       Int         iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ;
    820       for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )
    821       {
    822         if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC()
    823           && pcBasePic->getViewId() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewId())
    824         {
    825           iValid=1;
    826           iViewId = uiBaseId;
    827           break;
    828         }
    829       }
    830     }
    831   }
    832   if (iValid == 0)
    833     return 0;
    834 
    835   //--- get base CU/PU and check prediction mode ---
    836   TComPic*    pcBasePic   = m_pcAUPicAccess->getPic( iViewId );
    837   TComPicYuv* pcBaseRec   = pcBasePic->getPicYuvRec   ();
    838 
    839 #if H3D_NBDV
    840   Int  iCurrPosX, iCurrPosY;
    841   UInt          uiPartAddr;
    842   Int           iWidth;
    843   Int           iHeight;
    844 
    845   pcCU->getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight );
    846   pcBaseRec->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
    847   iCurrPosX  += ( ( iWidth  - 1 ) >> 1 );
    848   iCurrPosY  += ( ( iHeight - 1 ) >> 1 );
    849 
    850   Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (pDInfo->m_acMvCand[0].getHor() + 2 ) >> 2 ) );
    851   Int         iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (pDInfo->m_acMvCand[0].getVer() + 2 ) >> 2 ));
    852   Int         iBaseCUAddr;
    853   Int         iBaseAbsPartIdx;
    854   pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
    855 #else
    856   Int  iPrdDepth, iCurrPosX, iCurrPosY;
    857   Bool bAvailable  = xGetPredDepth( pcCU, uiPartIdx, iPrdDepth, &iCurrPosX, &iCurrPosY );
    858   AOF( bAvailable );
    859   TComPicYuv* pcBasePdm   = pcBasePic->getPredDepthMap();
    860   Int         iDisparity  = xGetDisparityFromVirtDepth( iViewId, iPrdDepth );
    861   Int         iShiftX     = m_uiSubSampExpX + 2;
    862   Int         iAddX       = ( 1 << iShiftX ) >> 1;
    863   Int         iBasePosX   = Clip3( 0, pcBasePdm->getWidth () - 1, iCurrPosX + ( ( iDisparity + iAddX ) >> iShiftX ) );
    864   Int         iBasePosY   = Clip3( 0, pcBasePdm->getHeight() - 1, iCurrPosY                               );
    865   Int         iBaseCUAddr;
    866   Int         iBaseAbsPartIdx;
    867   pcBaseRec->getCUAddrAndPartIdx( iBasePosX<< m_uiSubSampExpX , iBasePosY<< m_uiSubSampExpY , iBaseCUAddr, iBaseAbsPartIdx );
    868 #endif
    869 
    870   TComDataCU* pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
    871 
    872   if( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTER || pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_SKIP )
    873   {
    874     for( UInt uiBaseRefListId = 0; uiBaseRefListId < 2; uiBaseRefListId++ )
    875     {
    876       RefPicList  eBaseRefPicList = RefPicList( uiBaseRefListId );
    877       TComMvField cBaseMvField;
    878       pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );
    879       Int         iBaseRefIdx     = cBaseMvField.getRefIdx();
    880 
    881       if (iBaseRefIdx >= 0)
    882       {
    883         Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx);
    884         if (iBaseRefPOC != pcSlice->getPOC())   
    885         {
    886           for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eBaseRefPicList ); iPdmRefIdx++)
    887           {
    888             if (iBaseRefPOC == pcSlice->getRefPOC(eBaseRefPicList, iPdmRefIdx))
    889             {
    890               abPdmAvailable[ uiBaseRefListId ] = true;
    891               paiPdmRefIdx  [ uiBaseRefListId ] = iPdmRefIdx;
    892               TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
    893 #if H3D_NBDV
    894               cMv.m_bDvMcp = true;
    895               cMv.m_iDvMcpDispX = pDInfo->m_acMvCand[0].getHor();
    896               cMv.m_iDvMcpDispY = pDInfo->m_acMvCand[0].getVer();
    897 #endif //H3D_NBDV
    898               pcCU->clipMv( cMv );
    899               pacPdmMv      [ uiBaseRefListId ] = cMv;
    900               break;
    901             }
    902           }
    903         }
    904       }
    905     }
    906   }
    907   Int iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 );
    908 
    909   iPdm[0] = iPdmInterDir;
    910     for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ )
    911     {
    912       RefPicList  eRefPicList       = RefPicList( iRefListId );
    913       Int         iNumRefPics       = pcSlice->getNumRefIdx( eRefPicList );
    914       for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ )
    915       {
    916         if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC())
    917         {
    918           abPdmAvailable[ iRefListId+2 ] = true;
    919           paiPdmRefIdx  [ iRefListId+2 ] = iPdmRefIdx;
    920 #if H3D_NBDV
    921           TComMv cMv = pDInfo->m_acMvCand[0];
    922           cMv.setVer(0);
    923 #else
    924           TComMv cMv(iDisparity, 0);
    925 #endif
    926           pcCU->clipMv( cMv );
    927           pacPdmMv      [ iRefListId + 2] = cMv;
    928           break;
    929         }
    930       }
    931     }
    932     iPdmInterDir = ( abPdmAvailable[2] ? 1 : 0 ) + ( abPdmAvailable[3] ? 2 : 0 ) ;
    933     iPdm[1] = iPdmInterDir;
    934 
    935   return iPdmInterDir;
    936 }
    937 
    938 #if H3D_NBDV
    939 Bool
    940 TComDepthMapGenerator::getDisCanPdmMvPred    ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge )
    941 {
    942   rcMv.m_bDvMcp = false;
    943   AOF  ( m_bCreated && m_bInit );
    944   AOF  ( iRefIdx >= 0 );
    945   AOF  ( pcCU );
    946   TComSlice*    pcSlice     = pcCU->getSlice ();
    947   TComSPS*      pcSPS       = pcSlice->getSPS();
    948   AOF  ( pcSPS->getViewId() == m_uiCurrViewId );
    949   TComPic*      pcRefPic    = pcSlice->getRefPic( eRefPicList, iRefIdx );
    950   UInt          uiRefViewId = pcRefPic->getSPS()->getViewId();
    951   Int           iRefPoc     = pcRefPic->getPOC();
    952   Bool          bInterview  = ( uiRefViewId < m_uiCurrViewId );
    953   AOT(  bInterview && iRefPoc != pcSlice->getPOC() );
    954   AOT( !bInterview && iRefPoc == pcSlice->getPOC() );
    955   Bool          bPdmIView   = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_IVIEW ) == PDM_USE_FOR_IVIEW );
    956   Bool          bPdmInter   = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_INTER ) == PDM_USE_FOR_INTER );
    957   Bool          bPdmMerge   = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE );
    958   ROTRS( ( bInterview && !bMerge ) && !bPdmIView, false );
    959   ROTRS( (!bInterview && !bMerge ) && !bPdmInter, false );
    960   ROTRS(                  bMerge   && !bPdmMerge, false );
    961   Int  iCurrPosX, iCurrPosY;
    962   TComMv cDisMv;
    963 
    964   if( bInterview )
    965   {
    966     rcMv = pDInfo->m_acMvCand[0];
    967     rcMv.setVer(0);
    968     return      true;
    969   }
    970   for( UInt uiBId = 0; uiBId < m_uiCurrViewId; uiBId++ )
    971   {
    972     UInt        uiBaseId    = uiBId;
    973 
    974     if (m_uiCurrViewId >1 && uiBaseId ==1 )
    975       continue;
    976 
    977     TComPic*    pcBasePic   = m_pcAUPicAccess->getPic( uiBaseId );
    978     TComPicYuv* pcBaseRec   = pcBasePic->getPicYuvRec   ();
    979     UInt          uiPartAddr;
    980     Int           iWidth;
    981     Int           iHeight;
    982 
    983     pcCU->getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight );
    984     pcBaseRec->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
    985     iCurrPosX  += ( ( iWidth  - 1 ) >> 1 );
    986     iCurrPosY  += ( ( iHeight - 1 ) >> 1 );
    987     Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (pDInfo->m_acMvCand[0].getHor() + 2 ) >> 2 ) );
    988     Int         iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (pDInfo->m_acMvCand[0].getVer() + 2 ) >> 2 )); 
    989     Int         iBaseCUAddr;
    990     Int         iBaseAbsPartIdx;
    991     pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
    992     TComDataCU* pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
    993     if( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_INTER && pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_SKIP )
    994     {
    995       continue;
    996     }
    997     for( UInt uiBaseRefListId = 0; uiBaseRefListId < 2; uiBaseRefListId++ )
    998     {
    999       RefPicList  eBaseRefPicList = RefPicList( uiBaseRefListId );
    1000       TComMvField cBaseMvField;
    1001       pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );
    1002       Int         iBaseRefIdx     = cBaseMvField.getRefIdx();
    1003       Int         iBaseRefPoc     = ( iBaseRefIdx >= 0 ? pcBaseCU->getSlice()->getRefPic( eBaseRefPicList, iBaseRefIdx )->getPOC() : -(1<<30) );
    1004       if( iBaseRefIdx >= 0 && iBaseRefPoc == iRefPoc )
    1005       {
    1006         rcMv.set( cBaseMvField.getHor(), cBaseMvField.getVer() );
    1007         // save disparity vector when a merge candidate for IVMP is set as DV-MCP
    1008         if( bMerge )
    1009         {
    1010           rcMv.m_bDvMcp = true;
    1011           rcMv.m_iDvMcpDispX = pDInfo->m_acMvCand[0].getHor();
    1012           rcMv.m_iDvMcpDispY = pDInfo->m_acMvCand[0].getVer();
    1013         }
    1014         else { // AMVP ?
    1015           rcMv.m_bDvMcp = false;
    1016         }
    1017         return true;
    1018       }
    1019     }
    1020   }
    1021   return false;
    1022 }
    1023 #else // H3D_NBDV
    1024 Bool 
    1025 TComDepthMapGenerator::getPdmMvPred( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge )
    1026 {
    1027   AOF  ( m_bCreated && m_bInit );
    1028   AOF  ( iRefIdx >= 0 );
    1029   AOF  ( pcCU );
    1030   ROFRS( m_bPDMAvailable, false );
    1031 
    1032   TComSlice*    pcSlice     = pcCU->getSlice ();
    1033   TComPic*      pcPic       = pcCU->getPic   ();
    1034   TComSPS*      pcSPS       = pcSlice->getSPS();
    1035   AOF  ( pcPic->getPredDepthMap() );
    1036   AOF  ( pcSPS->getViewId() == m_uiCurrViewId );
    1037  
    1038   TComPic*      pcRefPic    = pcSlice->getRefPic( eRefPicList, iRefIdx );
    1039   UInt          uiRefViewId = pcRefPic->getSPS()->getViewId();
    1040   Int           iRefPoc     = pcRefPic->getPOC();
    1041   Bool          bInterview  = ( uiRefViewId < m_uiCurrViewId );
    1042   AOT(  bInterview && iRefPoc != pcSlice->getPOC() );
    1043   AOT( !bInterview && iRefPoc == pcSlice->getPOC() );
    1044 
    1045   Bool          bPdmIView   = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_IVIEW ) == PDM_USE_FOR_IVIEW );
    1046   Bool          bPdmInter   = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_INTER ) == PDM_USE_FOR_INTER );
    1047   Bool          bPdmMerge   = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE );
    1048   ROTRS( ( bInterview && !bMerge ) && !bPdmIView, false );
    1049   ROTRS( (!bInterview && !bMerge ) && !bPdmInter, false );
    1050   ROTRS(                  bMerge   && !bPdmMerge, false );
    1051 
    1052   //===== get predicted depth for middle position of current PU ===== 
    1053   Int  iPrdDepth, iCurrPosX, iCurrPosY;
    1054   Bool bAvailable  = xGetPredDepth( pcCU, uiPartIdx, iPrdDepth, &iCurrPosX, &iCurrPosY );
    1055   AOF( bAvailable );
    1056  
    1057   //===== inter-view motion vector prediction =====
    1058   if( bInterview )
    1059   {
    1060     Int         iDisparity  = xGetDisparityFromVirtDepth( uiRefViewId, iPrdDepth );
    1061     rcMv.set  ( iDisparity, 0 );
    1062     return      true;
    1063   }
    1064  
    1065   //===== inter motion vector prediction =====
    1066   for( UInt uiBId = 0; uiBId < m_uiCurrViewId; uiBId++ )
    1067   {
    1068     //--- get base CU/PU and check prediction mode ---
    1069     UInt        uiBaseId    = m_auiBaseIdList[ uiBId ];
    1070 #if PDM_REMOVE_DEPENDENCE
    1071     if( uiBaseId != 0)
    1072       continue;
    1073 #endif
    1074     TComPic*    pcBasePic   = m_pcAUPicAccess->getPic( uiBaseId );
    1075     TComPicYuv* pcBasePdm   = pcBasePic->getPredDepthMap();
    1076     TComPicYuv* pcBaseRec   = pcBasePic->getPicYuvRec   ();
    1077     Int         iDisparity  = xGetDisparityFromVirtDepth( uiBaseId, iPrdDepth );
    1078     Int         iShiftX     = m_uiSubSampExpX + 2;
    1079     Int         iAddX       = ( 1 << iShiftX ) >> 1;
    1080     Int         iBasePosX   = Clip3( 0, pcBasePdm->getWidth () - 1, iCurrPosX + ( ( iDisparity + iAddX ) >> iShiftX ) );
    1081     Int         iBasePosY   = Clip3( 0, pcBasePdm->getHeight() - 1, iCurrPosY                               );
    1082     Int         iBaseCUAddr;
    1083     Int         iBaseAbsPartIdx;
    1084     pcBaseRec->getCUAddrAndPartIdx( iBasePosX << m_uiSubSampExpX, iBasePosY << m_uiSubSampExpY, iBaseCUAddr, iBaseAbsPartIdx );
    1085     TComDataCU* pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
    1086     if( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_INTER && pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_SKIP )
    1087     {
    1088       continue;
    1089     }
    1090 
    1091     for( UInt uiBaseRefListId = 0; uiBaseRefListId < 2; uiBaseRefListId++ )
    1092     {
    1093       RefPicList  eBaseRefPicList = RefPicList( uiBaseRefListId );
    1094       TComMvField cBaseMvField;
    1095       pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );
    1096       Int         iBaseRefIdx     = cBaseMvField.getRefIdx();
    1097       Int         iBaseRefPoc     = ( iBaseRefIdx >= 0 ? pcBaseCU->getSlice()->getRefPic( eBaseRefPicList, iBaseRefIdx )->getPOC() : -(1<<30) );
    1098       if( iBaseRefIdx >= 0 && iBaseRefPoc == iRefPoc )
    1099       {
    1100         rcMv.set( cBaseMvField.getHor(), cBaseMvField.getVer() );
    1101         return true;
    1102       }
    1103     }
    1104   }
    1105   return false;
    1106 }
    1107 #endif // H3D_NBDV
    1108 #endif // QC_AMVP_MRG_UNIFY_IVCAN_C0051
    1109783
    1110784
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComDepthMapGenerator.h

    r296 r325  
    152152#if H3D_IVMP
    153153#if H3D_NBDV
    154 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
    155154  Bool  getPdmCandidate       ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge );
    156 #else
    157   Int   getPdmMergeCandidate  ( TComDataCU*   pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm );
    158   Bool  getPdmMvPredDisCan    ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge );
    159   Bool  getDisCanPdmMvPred    ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge );
    160 #endif
    161155#else
    162156  Int   getPdmMergeCandidate  ( TComDataCU*   pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv );
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComPic.cpp

    r313 r325  
    8585  m_aaiCodedScale     = 0;
    8686  m_aaiCodedOffset    = 0;
    87 #if OL_QTLIMIT_PREDCODING_B0068
     87#if H3D_QTL
    8888  m_bReduceBitsQTL    = 0;
    8989#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComPic.h

    r313 r325  
    121121  Int**                 m_aaiCodedOffset;
    122122
    123 #if OL_QTLIMIT_PREDCODING_B0068
     123#if H3D_QTL
    124124  Bool                  m_bReduceBitsQTL;
    125125#endif
     
    203203#endif
    204204
    205 #if OL_QTLIMIT_PREDCODING_B0068
     205#if H3D_QTL
    206206  Bool          getReduceBitsFlag ()             { return m_bReduceBitsQTL;     }
    207207  Void          setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag;    }
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComPrediction.cpp

    r313 r325  
    636636#endif
    637637      {
    638 #if DEPTH_MAP_GENERATION
    639638#if MERL_VSP_C0152
    640639        xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true );
     
    642641        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true );
    643642#endif
    644 #else
    645 #if MERL_VSP_C0152
    646         xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, true );
    647 #else
    648         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, true );
    649 #endif
    650 #endif
    651643      }
    652644      else
    653645      {
    654 #if DEPTH_MAP_GENERATION
    655646#if MERL_VSP_C0152
    656647        xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
     
    658649        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
    659650#endif
    660 #else
    661 #if MERL_VSP_C0152
    662         xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false );
    663 #else
    664         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false );
    665 #endif
    666 #endif
    667651      }
    668652#if LGE_ILLUCOMP_B0045
     
    677661    else
    678662    {
    679 #if DEPTH_MAP_GENERATION
    680663      if( xCheckIdenticalMotion( pcCU, uiPartAddr ) && !bPrdDepthMap )
    681 #else
    682       if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    683 #endif
    684       {
    685 #if DEPTH_MAP_GENERATION
     664      {
    686665#if MERL_VSP_C0152
    687666        xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
     
    689668        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
    690669#endif
    691 #else
    692 #if MERL_VSP_C0152
    693         xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, false );
    694 #else
    695         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, false );
    696 #endif
    697 #endif
    698670      }
    699671      else
    700672      {
    701 #if DEPTH_MAP_GENERATION
    702673#if MERL_VSP_C0152
    703674        xPredInterBi  (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, pcYuvPred, iPartIdx, bPrdDepthMap );
     
    705676        xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, pcYuvPred, iPartIdx, bPrdDepthMap );
    706677#endif
    707 #else
    708 #if MERL_VSP_C0152
    709         xPredInterBi  (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, pcYuvPred, iPartIdx );
    710 #else
    711         xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred, iPartIdx );
    712 #endif
    713 #endif
    714678      }
    715679    }
     
    721685    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight );
    722686
    723 #if DEPTH_MAP_GENERATION
    724687    if( bPrdDepthMap )
    725688    {
     
    727690      iHeight >>= uiSubSampExpY;
    728691    }
    729 #endif
    730692
    731693    if ( eRefPicList != REF_PIC_LIST_X )
     
    737699#endif
    738700      {
    739 #if DEPTH_MAP_GENERATION
    740701#if MERL_VSP_C0152
    741702        xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true );
     
    743704        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true );
    744705#endif
    745 #else
    746 #if MERL_VSP_C0152
    747         xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, true );
    748 #else
    749         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, true );
    750 #endif
    751 #endif
    752706  }
    753707  else
    754708  {
    755 #if DEPTH_MAP_GENERATION
    756709#if MERL_VSP_C0152
    757710        xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
     
    759712        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
    760713#endif
    761 #else
    762 #if MERL_VSP_C0152
    763         xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false );
    764 #else
    765         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false );
    766 #endif
    767 #endif
    768       }
    769 #if DEPTH_MAP_GENERATION
     714      }
    770715#if MERL_VSP_C0152
    771716      xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
     
    773718      xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
    774719#endif
    775 #else
    776 #if MERL_VSP_C0152
    777       xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false );
    778 #else
    779       xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false );
    780 #endif
    781 #endif
     720
    782721#if LGE_ILLUCOMP_B0045
    783722      if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr))
     
    793732      if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    794733      {
    795 #if DEPTH_MAP_GENERATION
    796734#if MERL_VSP_C0152
    797735        xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
     
    799737        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
    800738#endif
    801 #else
    802 #if MERL_VSP_C0152
    803         xPredInterUni (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, false );
    804 #else
    805         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred, iPartIdx, false );
    806 #endif
    807 #endif   
    808739      }
    809740      else
    810741      {
    811 #if DEPTH_MAP_GENERATION
    812742#if MERL_VSP_C0152
    813743        xPredInterBi  (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, pcYuvPred, iPartIdx, bPrdDepthMap );
     
    815745        xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, pcYuvPred, iPartIdx, bPrdDepthMap );
    816746#endif   
    817 #else
    818 #if MERL_VSP_C0152
    819         xPredInterBi  (pcCU, uiPartAddr, uiAbsPartIdx+uiPartAddr, iWidth, iHeight, pcYuvPred, iPartIdx );
    820 #else
    821         xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred, iPartIdx );
    822 #endif
    823 #endif
    824747      }
    825748    }
     
    828751}
    829752
    830 #if MTK_MDIVRP_C0138
     753#if H3D_IVRP
    831754Void TComPrediction::residualPrediction(TComDataCU* pcCU, TComYuv* pcYuvPred, TComYuv* pcYuvResPred)
    832755{
     
    847770#endif
    848771
    849 #if DEPTH_MAP_GENERATION
    850772#if MERL_VSP_C0152
    851773Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX, UInt uiSubSampExpY, Bool bi )
    852774#else
    853775Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX, UInt uiSubSampExpY, Bool bi )
    854 #endif
    855 #else
    856 #if MERL_VSP_C0152
    857 Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi )
    858 #else
    859 Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi )
    860 #endif
    861776#endif
    862777{
     
    887802  {
    888803    UInt uiRShift = 0;
    889 #if PDM_REMOVE_DEPENDENCE
    890804    if( pcCU->getPic()->getStoredPDMforV2() == 1 )
    891805      xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPredDepthMapTemp(), uiPartAddr, &cMv, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, rpcYuvPred, uiRShift, 0 );
    892806    else
    893 #endif
    894807      xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPredDepthMap(), uiPartAddr, &cMv, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, rpcYuvPred, uiRShift, 0 );
    895808
     
    1001914
    1002915
    1003 #if DEPTH_MAP_GENERATION
    1004916#if MERL_VSP_C0152
    1005917Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap )
     
    1007919Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap )
    1008920#endif
    1009 #else
    1010 #if MERL_VSP_C0152
    1011 Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred, Int iPartIdx )
    1012 #else
    1013 Void TComPrediction::xPredInterBi ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred, Int iPartIdx )
    1014 #endif
    1015 #endif
    1016921{
    1017922  TComYuv* pcMbYuv;
     
    1050955    if( pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiPartAddr ) >= 0 && pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiPartAddr ) >= 0 )
    1051956    {
    1052 #if DEPTH_MAP_GENERATION
    1053957#if MERL_VSP_C0152
    1054958      xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true );
    1055959#else
    1056960      xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true );
    1057 #endif
    1058 #else
    1059 #if MERL_VSP_C0152
    1060       xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );
    1061 #else
    1062       xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );
    1063 #endif
    1064961#endif
    1065962    }
     
    1073970#endif
    1074971      {
    1075 #if DEPTH_MAP_GENERATION
    1076972#if MERL_VSP_C0152
    1077973        xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true );
     
    1079975        xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, true );
    1080976#endif
    1081 #else
    1082 #if MERL_VSP_C0152
    1083         xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );
    1084 #else
    1085         xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );
    1086 #endif
    1087 #endif
    1088977      }
    1089978      else
    1090979      {
    1091 #if DEPTH_MAP_GENERATION
    1092980#if MERL_VSP_C0152
    1093981        xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
    1094982#else
    1095983        xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, uiSubSampExpX, uiSubSampExpY, false );
    1096 #endif
    1097 #else
    1098 #if MERL_VSP_C0152
    1099         xPredInterUni ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, false );
    1100 #else
    1101         xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, false );
    1102 #endif
    1103984#endif
    1104985      }
     
    11321013  else
    11331014  {
    1134 #if DEPTH_MAP_GENERATION
    11351015    if ( bPrdDepthMap )
    11361016    {
     
    11461026      xWeightedAverage( pcCU, &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred );
    11471027    }
    1148 #else
    1149     xWeightedAverage( pcCU, &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred );
    1150 #endif
    11511028  }
    11521029}
     
    11551032
    11561033Void
    1157 #if DEPTH_MAP_GENERATION
    11581034TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset
    11591035#if LGE_ILLUCOMP_DEPTH_C0046
     
    11611037#endif
    11621038)
    1163 #else
    1164 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset )
    1165 #endif
    1166 {
    1167 #if DEPTH_MAP_GENERATION
     1039{
    11681040  Int     iShiftX     = 2 + uiSubSampExpX;
    11691041  Int     iShiftY     = 2 + uiSubSampExpY;
     
    11821054  Int     iDstStride  = rpcYuv->getStride();
    11831055  Int     iRefOffset  = iHor + iVer * iRefStride;
    1184 #else
    1185   Int     iFPelMask   = ~3;
    1186   Int     iRefStride  = pcPicYuvRef->getStride();
    1187   Int     iDstStride  = rpcYuv->getStride();
    1188   Int     iHor        = ( pcMv->getHor() + 2 ) & iFPelMask;
    1189   Int     iVer        = ( pcMv->getVer() + 2 ) & iFPelMask;
    1190 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    1191   if( pcCU->getSlice()->getSPS()->isDepth() )
    1192   {
    1193     iHor = pcMv->getHor() * 4;
    1194     iVer = pcMv->getVer() * 4;
    1195 }
    1196 #endif
    1197 #if !QC_MVHEVC_B0046
    1198   Int     ixFrac      = iHor & 0x3;
    1199   Int     iyFrac      = iVer & 0x3;
    1200 #endif
    1201   Int     iRefOffset  = ( iHor >> 2 ) + ( iVer >> 2 ) * iRefStride;
    1202 #endif
    12031056
    12041057  Pel*    piRefY      = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr ) + iRefOffset;
     
    14541307  Int dstStride = dstPic->getStride();
    14551308  Int depStride =  pPicBaseDepth->getStride();
    1456 #if MTK_DVPREFINE_BVSP_BUG_FIX
    14571309  Int depthPosX = Clip3(0,   widthLuma - size_x,  (posX/nTxtPerDepthX) + (mv->getHor()>>2));
    14581310  Int depthPosY = Clip3(0,   heightLuma- size_y,  (posY/nTxtPerDepthY) + (mv->getVer()>>2));
    1459 #else
    1460   Int depthPosX = Clip3(0,   widthLuma - size_x - 1,  (posX/nTxtPerDepthX) + (mv->getHor()>>2));
    1461   Int depthPosY = Clip3(0,   heightLuma- size_y - 1,  (posY/nTxtPerDepthY) + (mv->getVer()>>2));
    1462 #endif
    14631311  Pel *ref    = refPic->getLumaAddr() + posX + posY * refStride;
    14641312  Pel *dst    = dstPic->getLumaAddr(partAddr);
     
    16181466    depthPosX = posX * nDepthPerTxtX + (mv->getHor()>>2);        //mv denotes the disparity for VSP
    16191467  }
    1620 #if MTK_DVPREFINE_BVSP_BUG_FIX
    16211468  depthPosX = Clip3(0, widthDepth - (size_x<<1), depthPosX);
    1622 #else
    1623   depthPosX = Clip3(0, widthDepth - (size_x<<1) - 1, depthPosX);
    1624 #endif
    16251469  if ( heightChroma > heightDepth )
    16261470  {
     
    16351479    depthPosY = posY * nDepthPerTxtY + (mv->getVer()>>2);     //mv denotes the disparity for VSP
    16361480  }
    1637 #if MTK_DVPREFINE_BVSP_BUG_FIX
    16381481  depthPosY = Clip3(0, heightDepth - (size_y<<1), depthPosY);
    1639 #else
    1640   depthPosY = Clip3(0, heightDepth - (size_y<<1) - 1, depthPosY);
    1641 #endif
    16421482
    16431483  Pel *refCb  = refPic->getCbAddr() + posX + posY * refStride;
     
    23842224  iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
    23852225  iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
    2386 #if FIX_LGE_ILLUCOMP_B0045
    23872226  iRefX   = iCUPelX + (pMv->getHor() >> 2);
    23882227  iRefY   = iCUPelY + (pMv->getVer() >> 2);
    2389 #else
    2390   iRefX   = iCUPelX + (pMv->getHor() >> 3);
    2391   iRefY   = iCUPelY + (pMv->getVer() >> 3);
    2392 #endif
    23932228  uiWidth = pcCU->getWidth(0) >> 1;
    23942229  uiHeight = pcCU->getHeight(0) >> 1;
     
    30372872  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    30382873
    3039 #if HHI_DMM_DELTADC_Q1_C0034
    3040 #else
    3041   if( bDelta )
    3042   {
    3043     xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
    3044     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    3045   }
    3046 #endif
    3047 
    30482874  // assign wedge pred DCs to prediction
    30492875  if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
     
    30642890  piMask += iMaskStride+1;
    30652891  getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    3066 
    3067 #if HHI_DMM_DELTADC_Q1_C0034
    3068 #else
    3069   if( bDelta )
    3070   {
    3071     xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
    3072     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    3073   }
    3074 #endif
    30752892
    30762893  // assign wedge pred DCs to prediction
     
    32493066  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    32503067
    3251 #if HHI_DMM_DELTADC_Q1_C0034
    3252 #else
    3253   if( bDelta )
    3254   {
    3255     xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
    3256     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    3257   }
    3258 #endif
    3259 
    32603068  // assign wedge pred DCs to prediction
    32613069  if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
     
    32923100  piMask += iMaskStride+1;
    32933101  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    3294 
    3295 #if HHI_DMM_DELTADC_Q1_C0034
    3296 #else
    3297   if( bDelta )
    3298   {
    3299     xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
    3300     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    3301   }
    3302 #endif
    33033102
    33043103  // assign wedge pred DCs to prediction
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComPrediction.h

    r296 r325  
    8686 
    8787  // motion compensation functions
    88 #if DEPTH_MAP_GENERATION
    8988#if MERL_VSP_C0152
    9089  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,       UInt uiAbsPartIdx,        Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0, Bool bi=false );
     
    9291  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0, Bool bi=false );
    9392#endif
    94 #else
    95 #if MERL_VSP_C0152
    96   Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,       UInt uiAbsPartIdx,        Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi=false          );
    97 #else
    98   Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi=false          );
    99 #endif
    100 #endif
    101 
    102 #if DEPTH_MAP_GENERATION
     93
    10394#if MERL_VSP_C0152
    10495  Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,       UInt uiAbsPartIdx,   Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap );
     
    111102#endif
    112103      );
    113 #else
    114 #if MERL_VSP_C0152
    115   Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,     UInt uiAbsPartIdx,     Int iWidth, Int iHeight,                         TComYuv*& rpcYuvPred, Int iPartIdx          );
    116 #else
    117   Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight,                         TComYuv*& rpcYuvPred, Int iPartIdx          );
    118 #endif
    119   Void xPredInterPrdDepthMap    ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight,                         TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset );
    120 #endif
     104
    121105#if MERL_VSP_C0152
    122106  Void xPredInterUniBWVSP         ( TComDataCU* pcCU,                          UInt uiPartAddr, UInt uiAbsPartIdx,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, UInt uiSubSampExpX, UInt uiSubSampExpY, Bool bi=false );
     
    179163 
    180164  // inter
    181 #if DEPTH_MAP_GENERATION
    182165#if MERL_VSP_C0152
    183166  Void motionCompensation         ( TComDataCU*  pcCU, TComYuv* pcYuvPred, UInt uiAbsPartIdx, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1, Bool bPrdDepthMap = false, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0 );
     
    185168  Void motionCompensation         ( TComDataCU*  pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1, Bool bPrdDepthMap = false, UInt uiSubSampExpX = 0, UInt uiSubSampExpY = 0 );
    186169#endif
    187 #else
    188 #if MERL_VSP_C0152
    189   Void motionCompensation         ( TComDataCU*  pcCU, TComYuv* pcYuvPred, UInt uiAbsPartIdx,, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 );
    190 #else
    191   Void motionCompensation         ( TComDataCU*  pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 );
    192 #endif
    193 #endif
    194 
    195 #if MTK_MDIVRP_C0138
     170
     171#if H3D_IVRP
    196172  Void residualPrediction         (TComDataCU* pcCU, TComYuv* pcYuvPred, TComYuv* pcYuvResPred);
    197173#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComResidualGenerator.cpp

    r322 r325  
    184184  AOF  ( pcPic );
    185185
    186 #if MTK_MDIVRP_C0138
     186#if H3D_IVRP
    187187  if (pcPic->getSPS()->getViewId() != 0)
    188188  {
     
    257257#endif
    258258{
    259 #if MTK_C0138_FIXED
    260259  UInt  uiBaseViewId  = 0;
    261 #else
    262   UInt  uiBaseViewId  = m_pcDepthMapGenerator->getBaseViewId( 0 );
    263 #endif
    264260  if( !pcYuv )
    265261  {
     
    272268  xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, &uiXPosInRefView , &uiYPosInRefView , bRecon    );
    273269#endif
    274 #if MTK_MDIVRP_C0138
    275270  return true;
    276 #else
    277   return xIsNonZeroByCBF( uiBaseViewId , uiXPosInRefView , uiYPosInRefView , uiBlkWidth , uiBlkHeight );
    278 #endif
    279271}
    280272
     
    393385  Pel*    pRes      = pcCUResidual->getLumaAddr();
    394386  UInt    uiLumaTrMode, uiChromaTrMode;
    395 #if LG_RESTRICTEDRESPRED_M24766  && !MTK_MDIVRP_C0138
    396   Int     iPUPredResiShift[4];
    397 #endif
    398387  pcCU->convertTransIdx             ( 0, pcCU->getTransformIdx( 0 ), uiLumaTrMode, uiChromaTrMode );
    399388    m_pcTrQuant->setQPforQuant      ( pcCU->getQP( 0 ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 );
     
    410399  pRes        = pcCUResidual->getCrAddr();
    411400  m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_V, pRes, 0, pcCUResidual->getCStride(), uiWidth, uiHeight, uiChromaTrMode, 0, piCoeff );
    412 
    413 #if !MTK_MDIVRP_C0138
    414   if( pcCU->getResPredFlag( 0 ) )
    415   {
    416     AOF( pcCU->getResPredAvail( 0 ) );
    417     Bool bOK = pcCU->getResidualSamples( 0, true, m_ppcYuvTmp[0] );
    418     AOF( bOK );
    419 #if LG_RESTRICTEDRESPRED_M24766
    420     pcCU->getPUResiPredShift(iPUPredResiShift, 0);
    421     pcCUResidual->add(iPUPredResiShift, pcCU->getPartitionSize(0), m_ppcYuvTmp[0], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
    422 #else
    423     pcCUResidual->add( m_ppcYuvTmp[0], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
    424 #endif
    425   }
    426 #endif
    427401
    428402  //===== clear inter-view predicted parts =====
     
    570544  Int           iDesStrideC = pcYuv    ->getCStride();
    571545
    572 #if FIX_CHROMA_RESIDUAL_C0129
    573546  Pel*          pSrcSamplesU0= pcBaseRes->getCbAddr ( 0 ) + iCRefPosY0 * iSrcStrideC;
    574547  Pel*          pSrcSamplesU1= pcBaseRes->getCbAddr ( 0 ) + iCRefPosY1 * iSrcStrideC;
    575548  Pel*          pSrcSamplesV0= pcBaseRes->getCrAddr ( 0 ) + iCRefPosY0 * iSrcStrideC;
    576549  Pel*          pSrcSamplesV1= pcBaseRes->getCrAddr ( 0 ) + iCRefPosY1 * iSrcStrideC;
    577 #else
    578   Pel*          pSrcSamplesU0= pcBaseRes->getCbAddr ( 0 ) + ( iCRefPosY0 >> 1 ) * iSrcStrideC;
    579   Pel*          pSrcSamplesU1= pcBaseRes->getCbAddr ( 0 ) + ( iCRefPosY1 >> 1 ) * iSrcStrideC;
    580   Pel*          pSrcSamplesV0= pcBaseRes->getCrAddr ( 0 ) + ( iCRefPosY0 >> 1 ) * iSrcStrideC;
    581   Pel*          pSrcSamplesV1= pcBaseRes->getCrAddr ( 0 ) + ( iCRefPosY1 >> 1 ) * iSrcStrideC;
    582 #endif
    583550  Pel*          pDesSamplesU= pcYuv    ->getCbAddr ();
    584551  Pel*          pDesSamplesV= pcYuv    ->getCrAddr ();
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComRom.cpp

    r296 r325  
    306306
    307307#if RWTH_SDC_DLT_B0036
    308 #if SAIT_SDC_C0096
    309308UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, PLANAR_IDX };
    310 #else
    311 UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, DMM_WEDGE_PREDDIR_IDX, PLANAR_IDX };
    312 #endif
    313309#endif
    314310
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComRom.h

    r296 r325  
    194194
    195195#if RWTH_SDC_DLT_B0036
    196 #if SAIT_SDC_C0096
    197196#define RWTH_SDC_NUM_PRED_MODES 3
    198 #else
    199 #define RWTH_SDC_NUM_PRED_MODES 4
    200 #endif
    201197extern      UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES];
    202198#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComSlice.cpp

    r313 r325  
    15461546, m_bUseDMM34                   (false)
    15471547#endif
    1548 #if OL_QTLIMIT_PREDCODING_B0068
     1548#if H3D_QTL
    15491549, m_bUseQTLPC                 (false)
    15501550#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComSlice.h

    r313 r325  
    375375#endif
    376376
    377 #if OL_QTLIMIT_PREDCODING_B0068
     377#if H3D_QTL
    378378  Bool m_bUseQTLPC;
    379379#endif
     
    617617#endif
    618618
    619 #if OL_QTLIMIT_PREDCODING_B0068
     619#if H3D_QTL
    620620  Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b;    }
    621621  Bool getUseQTLPC()         { return m_bUseQTLPC; }
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComYuv.cpp

    r296 r325  
    392392}
    393393
    394 #if LG_RESTRICTEDRESPRED_M24766  && !MTK_MDIVRP_C0138
    395 Void
    396 TComYuv::add(Int *iPUResiPredShift, PartSize uhPartitionSize,  TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
    397 {
    398   addLuma   (iPUResiPredShift, uhPartitionSize, pcYuvAdd, iWidth,    iHeight,    bSubtract );
    399   addChroma (iPUResiPredShift, uhPartitionSize, pcYuvAdd, iWidth>>1, iHeight>>1, bSubtract );
    400 }
    401 #else
    402394Void
    403395TComYuv::add( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
     
    406398  addChroma ( pcYuvAdd, iWidth>>1, iHeight>>1, bSubtract );
    407399}
    408 #endif
    409 
    410 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    411 Void
    412 TComYuv::getPUXYOffset(PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset)
    413 {
    414   switch(uhPartitionSize)
    415   {   
    416   case SIZE_2NxN:
    417     iXOffset = iWidth;      iYOffset = iHeight >> 1;   break;
    418   case SIZE_2NxnU:
    419     iXOffset = iWidth;      iYOffset = iHeight >> 2;   break;
    420   case SIZE_2NxnD:
    421     iXOffset = iWidth;      iYOffset = (iHeight >> 1) + (iHeight >> 2);   break;
    422   case SIZE_Nx2N:
    423     iXOffset = iWidth >> 1; iYOffset = iHeight; break;
    424   case SIZE_nLx2N:
    425     iXOffset = iWidth >> 2; iYOffset = iHeight; break;
    426   case SIZE_nRx2N:
    427     iXOffset = (iWidth >> 1) + (iWidth >> 2); iYOffset = iHeight; break;
    428   case SIZE_NxN:
    429     iXOffset = iWidth >> 1; iYOffset = iHeight >> 1;  break;
    430   default:
    431     assert(uhPartitionSize == SIZE_2Nx2N);
    432     iXOffset = iWidth;     iYOffset = iHeight;    break;
    433   }
    434 }
    435 #endif
    436 
    437 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    438 Void
    439 TComYuv::addLuma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
    440 #else
     400
     401
    441402Void
    442403TComYuv::addLuma( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
    443 #endif
    444404{
    445405  Int   iScale      = ( bSubtract ? -1 : 1 );
     
    449409  Pel*  pDstSamples = getLumaAddr();
    450410
    451 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    452   Int iXOffset, iYOffset;
    453 
    454   getPUXYOffset(uhPartitionSize, iWidth, iHeight, iXOffset, iYOffset);
    455 
    456   for( Int iY = 0; iY < iYOffset; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride )
    457   {
    458     if(iPUResiPredShift[0] >= 0)
    459     {
    460       for( Int iX = 0; iX < iXOffset; iX++ )
    461       {
    462         pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[0]);
    463       }
    464     }
    465 
    466     if(iPUResiPredShift[1] >= 0)
    467     {
    468       for( Int iX = iXOffset; iX < iWidth; iX++ )
    469       {
    470         pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[1]);
    471       }
    472     }
    473   }
    474 
    475   for( Int iY = iYOffset; iY < iHeight; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride )
    476   {
    477     if(iPUResiPredShift[2] >= 0)
    478     {
    479       for( Int iX = 0; iX < iXOffset; iX++ )
    480       {
    481         pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[2]);
    482       }
    483     }
    484 
    485     if(iPUResiPredShift[3] >= 0)
    486     {
    487       for( Int iX = iXOffset; iX < iWidth; iX++ )
    488       {
    489         pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[3]);
    490       }
    491     }
    492   }
    493 #else
    494411  for( Int iY = 0; iY < iHeight; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride )
    495412  {
     
    499416    }
    500417  }
    501 #endif
    502 }
    503 
    504 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    505 Void
    506 TComYuv::addChroma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
    507 #else
     418}
     419
    508420Void
    509421TComYuv::addChroma( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
    510 #endif
    511422{
    512423  Int   iScale        = ( bSubtract ? -1 : 1 );
     
    518429  Pel*  pDstSamplesCr = getCrAddr();
    519430
    520 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    521   Int iXOffset, iYOffset;
    522  
    523   getPUXYOffset(uhPartitionSize, iWidth, iHeight, iXOffset, iYOffset);
    524 
    525   for( Int iY = 0; iY < iYOffset; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride,
    526     pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride  )
    527   {
    528     if(iPUResiPredShift[0] >= 0)
    529     {
    530       for( Int iX = 0; iX < iXOffset; iX++ )
    531       {
    532         pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[0]);
    533         pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[0]);
    534       }
    535     }
    536 
    537     if(iPUResiPredShift[1] >= 0)
    538     {
    539       for( Int iX = iXOffset; iX < iWidth; iX++ )
    540       {
    541         pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[1]);
    542         pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[1]);
    543       }
    544     }
    545   }
    546 
    547   for( Int iY = iYOffset; iY < iHeight; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride,
    548     pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride  )
    549   {
    550     if(iPUResiPredShift[2] >= 0)
    551     {
    552       for( Int iX = 0; iX < iXOffset; iX++ )
    553       {
    554         pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[2]);
    555         pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[2]);
    556       }
    557     }
    558 
    559     if(iPUResiPredShift[3] >= 0)
    560     {
    561       for( Int iX = iXOffset; iX < iWidth; iX++ )
    562       {
    563         pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[3]);
    564         pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[3]);
    565       }
    566     }
    567   }
    568 #else
    569431  for( Int iY = 0; iY < iHeight; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride,
    570432                                       pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride  )
     
    576438    }
    577439  }
    578 #endif
    579440}
    580441
     
    676537}
    677538
    678 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    679 Void TComYuv::subtract(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    680 {
    681   subtractLuma  (iPUResiPredShift, uhPartitionSize, pcYuvSrc0, pcYuvSrc1,  uiTrUnitIdx, uiPartSize    );
    682   subtractChroma(iPUResiPredShift, uhPartitionSize, pcYuvSrc0, pcYuvSrc1,  uiTrUnitIdx, uiPartSize>>1 );
    683 }
    684 #else
    685539Void TComYuv::subtract( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    686540{
     
    688542  subtractChroma( pcYuvSrc0, pcYuvSrc1,  uiTrUnitIdx, uiPartSize>>1 );
    689543}
    690 #endif
    691 
    692 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    693 Void TComYuv::subtractLuma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    694 #else
     544
    695545Void TComYuv::subtractLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    696 #endif
    697546{
    698547  Int x, y;
     
    706555  Int  iDstStride  = getStride();
    707556
    708 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    709   Int iXOffset, iYOffset;
    710 
    711   getPUXYOffset(uhPartitionSize, uiPartSize, uiPartSize, iXOffset, iYOffset);
    712 
    713 #if FIX_LG_RESTRICTEDRESPRED_M24766
    714   for ( y = 0; y < iYOffset; y++ )
    715   {
    716     if(iPUResiPredShift[0] >= 0)
    717     {
    718       for ( x = 0; x < iXOffset; x++ )
    719       {
    720         pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[0]);
    721       }
    722     }
    723 
    724     if(iPUResiPredShift[1] >= 0)
    725     {
    726       for ( x = iXOffset; x < uiPartSize; x++ )
    727       {
    728         pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[1]);
    729       }
     557  for ( y = uiPartSize-1; y >= 0; y-- )
     558  {
     559    for ( x = uiPartSize-1; x >= 0; x-- )
     560    {
     561      pDst[x] = pSrc0[x] - pSrc1[x];
    730562    }
    731563    pSrc0 += iSrc0Stride;
     
    733565    pDst  += iDstStride;
    734566  }
    735 
    736   for ( y = iYOffset; y < uiPartSize; y++ )
    737   {
    738     if(iPUResiPredShift[2] >= 0)
    739     {
    740       for ( x = 0; x < iXOffset; x++ )
    741       {
    742         pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[2]);
    743       }
    744     }
    745 
    746     if(iPUResiPredShift[3] >= 0)
    747     {
    748       for ( x = iXOffset; x < uiPartSize; x++ )
    749       {
    750         pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[3]);
    751       }
    752     }
    753     pSrc0 += iSrc0Stride;
    754     pSrc1 += iSrc1Stride;
    755     pDst  += iDstStride;
    756   }
    757 #else
    758   for ( y = uiPartSize-1; y >= iYOffset; y-- )
    759   {
    760     if(iPUResiPredShift[3] >= 0)
    761     {
    762       for ( x = uiPartSize-1; x >= iXOffset; x-- )
    763       {
    764         pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[3]);
    765       }
    766     }
    767 
    768     if(iPUResiPredShift[2] >= 0)
    769     {
    770       for ( x = iXOffset-1; x >= 0; x-- )
    771       {
    772         pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[2]);
    773       }
    774     }
    775     pSrc0 += iSrc0Stride;
    776     pSrc1 += iSrc1Stride;
    777     pDst  += iDstStride;
    778   }
    779 
    780   for ( y = iYOffset-1; y >= 0; y-- )
    781   {
    782     if(iPUResiPredShift[1] >= 0)
    783     {
    784       for ( x = uiPartSize-1; x >= iXOffset; x-- )
    785       {
    786         pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[3]);
    787       }
    788     }
    789 
    790     if(iPUResiPredShift[0] >= 0)
    791     {
    792       for ( x = iXOffset-1; x >= 0; x-- )
    793       {
    794         pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[2]);
    795       }
    796     }
    797     pSrc0 += iSrc0Stride;
    798     pSrc1 += iSrc1Stride;
    799     pDst  += iDstStride;
    800   }
    801 #endif
    802 #else
    803   for ( y = uiPartSize-1; y >= 0; y-- )
    804   {
    805     for ( x = uiPartSize-1; x >= 0; x-- )
    806     {
    807       pDst[x] = pSrc0[x] - pSrc1[x];
    808     }
    809     pSrc0 += iSrc0Stride;
    810     pSrc1 += iSrc1Stride;
    811     pDst  += iDstStride;
    812   }
    813 #endif
    814 }
    815 
    816 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    817 Void TComYuv::subtractChroma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    818 #else
     567}
     568
    819569Void TComYuv::subtractChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    820 #endif
    821570{
    822571  Int x, y;
     
    832581  Int  iSrc1Stride = pcYuvSrc1->getCStride();
    833582  Int  iDstStride  = getCStride();
    834 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    835   Int iXOffset, iYOffset;
    836  
    837   getPUXYOffset(uhPartitionSize, uiPartSize, uiPartSize, iXOffset, iYOffset);
    838 
    839 #if FIX_LG_RESTRICTEDRESPRED_M24766
    840   for ( y = 0; y < iYOffset; y++ )
    841   {
    842     if(iPUResiPredShift[0] >= 0)
    843     {
    844       for ( x = 0; x < iXOffset; x++ )
    845       {
    846         pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[0]);
    847         pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[0]);
    848       }
    849     }
    850 
    851     if(iPUResiPredShift[1] >= 0)
    852     {
    853       for ( x = iXOffset; x < uiPartSize; x++ )
    854       {
    855         pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[1]);
    856         pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[1]);
    857       }
     583  for ( y = uiPartSize-1; y >= 0; y-- )
     584  {
     585    for ( x = uiPartSize-1; x >= 0; x-- )
     586    {
     587      pDstU[x] = pSrcU0[x] - pSrcU1[x];
     588      pDstV[x] = pSrcV0[x] - pSrcV1[x];
    858589    }
    859590    pSrcU0 += iSrc0Stride;
     
    864595    pDstV  += iDstStride;
    865596  }
    866 
    867   for ( y = iYOffset; y < uiPartSize; y++ )
    868   {
    869     if(iPUResiPredShift[2] >= 0)
    870     {
    871       for ( x = 0; x < iXOffset; x++ )
    872       {
    873         pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[2]);
    874         pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[2]);
    875       }
    876     }
    877 
    878     if(iPUResiPredShift[3] >= 0)
    879     {
    880       for ( x = iXOffset; x < uiPartSize; x++ )
    881       {
    882         pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[3]);
    883         pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[3]);
    884       }
    885     }
    886     pSrcU0 += iSrc0Stride;
    887     pSrcU1 += iSrc1Stride;
    888     pSrcV0 += iSrc0Stride;
    889     pSrcV1 += iSrc1Stride;
    890     pDstU  += iDstStride;
    891     pDstV  += iDstStride;
    892   }
    893 #else
    894   for ( y = uiPartSize-1; y >= iYOffset; y-- )
    895   {
    896     if(iPUResiPredShift[3] >= 0)
    897     {
    898       for ( x = uiPartSize-1; x >= iXOffset; x-- )
    899       {
    900         pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[3]);
    901         pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[3]);
    902       }
    903     }
    904 
    905     if(iPUResiPredShift[2] >= 0)
    906     {
    907       for ( x = iXOffset-1; x >= 0; x-- )
    908       {
    909         pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[2]);
    910         pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[2]);
    911       }
    912     }
    913     pSrcU0 += iSrc0Stride;
    914     pSrcU1 += iSrc1Stride;
    915     pSrcV0 += iSrc0Stride;
    916     pSrcV1 += iSrc1Stride;
    917     pDstU  += iDstStride;
    918     pDstV  += iDstStride;
    919   }
    920 
    921   for ( y = iYOffset-1; y >= 0; y-- )
    922   {
    923     if(iPUResiPredShift[1] >= 0)
    924     {
    925       for ( x = uiPartSize-1; x >= iXOffset; x-- )
    926       {
    927         pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[1]);
    928         pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[1]);
    929       }
    930     }
    931 
    932     if(iPUResiPredShift[0] >= 0)
    933     {
    934       for ( x = iXOffset-1; x >= 0; x-- )
    935       {
    936         pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[0]);
    937         pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[0]);
    938       }
    939     }
    940     pSrcU0 += iSrc0Stride;
    941     pSrcU1 += iSrc1Stride;
    942     pSrcV0 += iSrc0Stride;
    943     pSrcV1 += iSrc1Stride;
    944     pDstU  += iDstStride;
    945     pDstV  += iDstStride;
    946   }
    947 #endif
    948 #else
    949   for ( y = uiPartSize-1; y >= 0; y-- )
    950   {
    951     for ( x = uiPartSize-1; x >= 0; x-- )
    952     {
    953       pDstU[x] = pSrcU0[x] - pSrcU1[x];
    954       pDstV[x] = pSrcV0[x] - pSrcV1[x];
    955     }
    956     pSrcU0 += iSrc0Stride;
    957     pSrcU1 += iSrc1Stride;
    958     pSrcV0 += iSrc0Stride;
    959     pSrcV1 += iSrc1Stride;
    960     pDstU  += iDstStride;
    961     pDstV  += iDstStride;
    962   }
    963 #endif
    964597}
    965598
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TComYuv.h

    r296 r325  
    146146  Void    addClipPartLuma   ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); //GT
    147147
    148 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    149   //  pcYuvSrc0 - pcYuvSrc1 -> m_apiBuf
    150   Void    subtract          (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    151   Void    subtractLuma      (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    152   Void    subtractChroma    (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    153 #else
    154148  Void    subtract          ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    155149  Void    subtractLuma      ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    156150  Void    subtractChroma    ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    157 #endif
    158151 
    159152  //  (pcYuvSrc0 + pcYuvSrc1)/2 for YUV partition
     
    166159  //   Remove High frequency
    167160  Void    removeHighFreq    ( TComYuv* pcYuvSrc, UInt uiPartIdx, UInt uiWidht, UInt uiHeight );
    168 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    169   Void    getPUXYOffset     (PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset);
    170   Void    add               (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract = false );
    171   Void    addLuma           (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );
    172   Void    addChroma         (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );
    173 #else
    174161  Void    add               ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract = false );
    175162  Void    addLuma           ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );
    176163  Void    addChroma         ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );
    177 #endif
    178164
    179165  Void    clip              ( Int iWidth, Int iHeight );
  • branches/HTM-6.1-Cleanup/source/Lib/TLibCommon/TypeDef.h

    r322 r325  
    5757#define HHI_DMM_PRED_TEX                  1   // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction )
    5858                                              // HHIQC_DMMFASTSEARCH_B0039, fast Wedgelet search for DMM modes 1 and 3
     59                                              // HHI_DMM_DELTADC_Q1_C0034   JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values
     60                                              // FIX_DMM_CTX_INIT_C0034 JCT3V-C0034 fix for wrong init type of DMM contexts (UChar instead of Short)
    5961
    6062#define LGE_EDGE_INTRA_A0070              1   // JCT3V-A0070
    61 
    62 #define HHI_DMM_DELTADC_Q1_C0034          1   // JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values
    63 #if ( HHI_DMM_PRED_TEX || HHI_DMM_WEDGE_INTRA ) && HHI_DMM_PRED_TEX
    6463#define LGE_DMM3_SIMP_C0044               1
    65 #endif
    66 #define FIX_DMM_CTX_INIT_C0034            1   // JCT3V-C0034 fix for wrong init type of DMM contexts (UChar instead of Short)
    6764
    6865///// ***** SDC *********
    6966#define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
    70 #if RWTH_SDC_DLT_B0036
    71 #define SAIT_SDC_C0096                    1   // JCT3V-C0096: Improved Simple Depth Coding(removal of DMM2 among four SDC modes(DC, Planar, DMM1 and DMM2))
    72 #endif
    73 #define FIX_SDC_ENC_C0143                 1   // JCT3V-C0143 fix for unnecessary encoder checks in case of SDC
     67                                              // SAIT_SDC_C0096 JCT3V-C0096: Improved Simple Depth Coding(removal of DMM2 among four SDC modes(DC, Planar, DMM1 and DMM2))
     68                                              // FIX_SDC_ENC_C0143, JCT3V-C0143 fix for unnecessary encoder checks in case of SDC
    7469
    7570///// ***** TMVP/AMVP *********
     
    8782                                              // OL_DISMV_POS_B0069            , different pos for disparity MV candidate, B0069
    8883                                              // MTK_INTERVIEW_MERGE_A0049     , second part
    89 #define QC_AMVP_MRG_UNIFY_IVCAN_C0051     1
    90 #define QC_C0051_FIXED_BY_MTK             1   // Bug fix for C0051 implementation
     84                                              // QC_C0051_FIXED_BY_MTK             1   // Bug fix for C0051 implementation
     85                                              // QC_AMVP_MRG_UNIFY_IVCAN_C0051     1
    9186
    9287
     
    9590                                              // HHI_INTER_VIEW_RESIDUAL_PRED
    9691                                              // QC_SIMPLIFIEDIVRP_M24938
    97 #if H3D_IVRP       
    98 #define LG_RESTRICTEDRESPRED_M24766       1   // Restricted inter-view residual prediction
    99 #define FIX_LG_RESTRICTEDRESPRED_M24766   1
    100 #else                                 
    101 #define LG_RESTRICTEDRESPRED_M24766       0
    102 #endif
    103 
    104 #define MTK_MDIVRP_C0138                  1   // Mode-dependent inter-view residual prediction
    105 #define MTK_C0138_FIXED                   1   // Fix for IBP coding structure in view direction (not CTC)
    106 
     92                                              // MTK_C0138_FIXED                   // Fix for IBP coding structure in view direction (not CTC)
     93                                              // MTK_MDIVRP_C0138
     94                                              // LG_RESTRICTEDRESPRED_M24766       1   // Restricted inter-view residual prediction
     95                                              // FIX_LG_RESTRICTEDRESPRED_M24766   1
    10796
    10897///// ***** DISPARITY VECTOR DERIVATION *********
     
    121110                                              // MTK_RELEASE_DV_CONSTRAINT_C0129   
    122111                                              // MTK_SIMPLIFY_DVTC_C0135           
    123 #define FIX_CHROMA_RESIDUAL_C0129         1
     112                                              // FIX_CHROMA_RESIDUAL_C0129       
    124113
    125114///// ***** MOTION PARAMETER INHERITANCE  *********
     
    145134///// ***** ILLUMINATION COMPENSATON *********
    146135#define LGE_ILLUCOMP_B0045                1   // JCT2-B0045 Illumination compensation for Luma and Chroma
     136                                              // LGE_ILLUCOMP_B0045_ENCSIMP
     137                                              // FIX_LGE_ILLUCOMP_B0045           
    147138#if LGE_ILLUCOMP_B0045
    148 #define LGE_ILLUCOMP_B0045_ENCSIMP        1
    149 #define FIX_LGE_ILLUCOMP_B0045            1
    150139#define LGE_ILLUCOMP_DEPTH_C0046          1   // JCT2-C0046 Apply illumination compensation to depth
    151140#if LGE_ILLUCOMP_DEPTH_C0046
     
    158147
    159148///// ***** QUADTREE LIMITATION *********
    160 #define OL_QTLIMIT_PREDCODING_B0068       1    //JCT3V-B0068
    161 #define HHI_QTLPC_RAU_OFF_C0160           1   // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
     149#define H3D_QTL                            1 // OL_QTLIMIT_dPREDCODING_B0068 //JCT3V-B0068
     150                                             // HHI_QTLPC_RAU_OFF_C0160     // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
    162151
    163152///// ***** OTHERS *********
     
    211200#define MERL_VSP_BLOCKSIZE_C0152             4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4.
    212201#define VSP_MERGE_POS                        5 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 5.
    213 #define MTK_DVPREFINE_BVSP_BUG_FIX               1
     202                                               //MTK_DVPREFINE_BVSP_BUG_FIX               1
    214203
    215204#else // !MERL_VSP_C0152
  • branches/HTM-6.1-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r313 r325  
    12061206#endif
    12071207#endif
    1208 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     1208#if HHI_MPI || H3D_QTL
    12091209Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth)
    12101210#else
     
    14471447    }
    14481448#endif
    1449 #if OL_QTLIMIT_PREDCODING_B0068
     1449#if H3D_QTL
    14501450    if( bIsDepth )
    14511451    {
  • branches/HTM-6.1-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.h

    r296 r325  
    114114  Void  parseVPS            ( TComVPS* pcVPS );
    115115#endif
    116 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     116#if HHI_MPI || H3D_QTL
    117117  Void  parseSPS            ( TComSPS* pcSPS, Bool bIsDepth );
    118118#else
  • branches/HTM-6.1-Cleanup/source/Lib/TLibDecoder/TDecCu.cpp

    r296 r325  
    409409    }
    410410#endif
    411 #if H3D_IVRP && !MTK_MDIVRP_C0138
    412     m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
    413 #endif
    414411    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    415412    return;
     
    460457#endif
    461458
    462 #if H3D_IVRP && !MTK_MDIVRP_C0138
    463   if( !pcCU->isIntra( uiAbsPartIdx ) )
    464   {
    465     m_pcEntropyDecoder->decodeResPredFlag    ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
    466   }
    467 #endif
    468459#if LGE_ILLUCOMP_DEPTH_C0046 && HHI_MPI
    469460  }
     
    679670  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
    680671#endif
    681 #if MTK_MDIVRP_C0138
     672#if H3D_IVRP
    682673  if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0))
    683674  {
     
    691682#endif
    692683
    693 #if H3D_IVRP && !MTK_MDIVRP_C0138
    694   if( pcCU->getResPredFlag( 0 ) )
    695   {
    696     AOF( pcCU->getResPredAvail( 0 ) );
    697     Bool bOK = pcCU->getResidualSamples( 0,
    698 #if QC_SIMPLIFIEDIVRP_M24938
    699       true,
    700 #endif
    701       m_ppcYuvResPred[uiDepth] );
    702     AOF( bOK );
    703 #if LG_RESTRICTEDRESPRED_M24766
    704     Int iPUResiPredShift[4];
    705     pcCU->getPUResiPredShift(iPUResiPredShift, 0);
    706     m_ppcYuvReco[uiDepth]->add(iPUResiPredShift, pcCU->getPartitionSize(0), m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
    707 #else
    708     m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
    709 #endif
    710   }
    711 #endif
    712 
    713684  // inter recon
    714685  xDecodeInterTexture( pcCU, 0, uiDepth );
     
    722693  {
    723694#if H3D_IVRP
    724 #if MTK_MDIVRP_C0138
    725695    if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0))
    726 #else
    727     if( pcCU->getResPredFlag( 0 ) )
    728 #endif
    729696    {
    730697      m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
  • branches/HTM-6.1-Cleanup/source/Lib/TLibDecoder/TDecEntropy.cpp

    r296 r325  
    108108}
    109109
    110 #if H3D_IVRP && !MTK_MDIVRP_C0138
    111 Void
    112 TDecEntropy::decodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx )
    113 {
    114   Bool  bResPredAvailable   = false;
    115   Bool  bResPredFlag        = false;
    116 
    117   Bool  bResPredAllowed     =                    (!pcCU->getSlice()->getSPS()->isDepth                () );
    118   bResPredAllowed           = bResPredAllowed && ( pcCU->getSlice()->getSPS()->getViewId              () );
    119   bResPredAllowed           = bResPredAllowed && ( pcCU->getSlice()->getSPS()->getMultiviewResPredMode() );
    120   bResPredAllowed           = bResPredAllowed && (!pcCU->isIntra           ( uiAbsPartIdx )              );
    121 
    122   // check if supported
    123   if( bResPredAllowed )
    124   {
    125     bResPredAvailable       = pcSubCU->getResidualSamples( uiPUIdx , false  );
    126   }
    127 
    128   // read from bitstream
    129   if( bResPredAvailable )
    130   {
    131 #if LG_RESTRICTEDRESPRED_M24766
    132     Int iPUResiPredShift[4];
    133     pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx);
    134     if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0  || iPUResiPredShift[2] >= 0  || iPUResiPredShift[3] >= 0 )
    135 #endif
    136     m_pcEntropyDecoderIf->parseResPredFlag( pcCU, bResPredFlag, uiAbsPartIdx, uiDepth );
    137   }
    138 
    139   // set data
    140   pcCU->setResPredAvailSubParts ( bResPredAvailable, uiAbsPartIdx, uiPUIdx, uiDepth );
    141   pcCU->setResPredFlagSubParts  ( bResPredFlag,      uiAbsPartIdx, uiPUIdx, uiDepth );
    142 }
    143 #endif
    144 
    145110Void TDecEntropy::decodeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    146111{
  • branches/HTM-6.1-Cleanup/source/Lib/TLibDecoder/TDecEntropy.h

    r296 r325  
    7272  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
    7373#endif
    74 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     74#if HHI_MPI || H3D_QTL
    7575  virtual Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth )                       = 0;
    7676#else
     
    171171#endif
    172172 
    173 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     173#if HHI_MPI || H3D_QTL
    174174  Void    decodeSPS                   ( TComSPS* pcSPS, Bool bIsDepth ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, bIsDepth); }
    175175#else
     
    198198  Void decodeMergeFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    199199  Void decodeMergeIndex        ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth );
    200 #if H3D_IVRP && !MTK_MDIVRP_C0138
    201   Void decodeResPredFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx );
    202 #endif
    203200  Void decodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    204201  Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-6.1-Cleanup/source/Lib/TLibDecoder/TDecSbac.cpp

    r296 r325  
    707707  UInt uiSymbol;
    708708
    709 #if OL_QTLIMIT_PREDCODING_B0068
     709#if H3D_QTL
    710710  Bool bParseSplitFlag    = true;
    711711
     
    715715  Bool bIntraSliceDetect  = (pcCU->getSlice()->getSliceType() == I_SLICE);
    716716
    717 #if HHI_QTLPC_RAU_OFF_C0160
    718717  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    719718  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
    720 #else
    721   if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
    722 #endif
    723719  {
    724720    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    733729    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    734730    DTRACE_CABAC_T( "\tSplitFlag\n" )
    735 #if OL_QTLIMIT_PREDCODING_B0068
     731#if H3D_QTL
    736732  }
    737733  else
     
    755751  PartSize eMode;
    756752
    757 #if OL_QTLIMIT_PREDCODING_B0068
     753#if H3D_QTL
    758754  Bool bParsePartSize    = true;
    759755  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
     
    762758  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
    763759
    764 #if HHI_QTLPC_RAU_OFF_C0160
    765760  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    766761  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
    767 #else
    768   if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
    769 #endif
    770762  {
    771763    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    781773  if ( pcCU->isIntra( uiAbsPartIdx ) )
    782774  {
    783 #if OL_QTLIMIT_PREDCODING_B0068
     775#if H3D_QTL
    784776    if(bParsePartSize)
    785777    {
     
    791783      }
    792784      eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
    793 #if OL_QTLIMIT_PREDCODING_B0068
     785#if H3D_QTL
    794786    }
    795787#endif
     
    809801  else
    810802  {
    811 #if OL_QTLIMIT_PREDCODING_B0068
     803#if H3D_QTL
    812804    if(bParsePartSize)
    813805    {
     
    849841        }
    850842      }
    851 #if OL_QTLIMIT_PREDCODING_B0068
     843#if H3D_QTL
    852844    }
    853845#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibDecoder/TDecSbac.h

    r296 r325  
    8888  Void  parseVPS                  ( TComVPS* pcVPS )  {}
    8989#endif
    90 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     90#if HHI_MPI || H3D_QTL
    9191  Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth ) {}
    9292#else
  • branches/HTM-6.1-Cleanup/source/Lib/TLibDecoder/TDecTop.cpp

    r313 r325  
    12571257  TComRPSList* rps = new TComRPSList();
    12581258  sps->setRPSList(rps);
    1259 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     1259#if HHI_MPI || H3D_QTL
    12601260  m_cEntropyDecoder.decodeSPS( sps, m_isDepth );
    12611261#else
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncCavlc.cpp

    r313 r325  
    442442#endif
    443443#endif
    444 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     444#if HHI_MPI || H3D_QTL
    445445Void TEncCavlc::codeSPS( TComSPS* pcSPS, Bool bIsDepth )
    446446#else
     
    632632#endif
    633633
    634 #if OL_QTLIMIT_PREDCODING_B0068
     634#if H3D_QTL
    635635  if( bIsDepth )
    636636  {
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncCavlc.h

    r296 r325  
    114114#endif
    115115
    116 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     116#if HHI_MPI || H3D_QTL
    117117  Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth );
    118118#else
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncCfg.h

    r296 r325  
    309309#endif
    310310
    311 #if OL_QTLIMIT_PREDCODING_B0068
     311#if H3D_QTL
    312312  Bool     m_bUseQTLPC;
    313313#endif
     
    790790#endif
    791791
    792 #if OL_QTLIMIT_PREDCODING_B0068
     792#if H3D_QTL
    793793  Void      setUseQTLPC( Bool b ) { m_bUseQTLPC = b;    }
    794794  Bool      getUseQTLPC()         { return m_bUseQTLPC; }
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncCu.cpp

    r296 r325  
    420420  TComPic* pcPic = rpcBestCU->getPic();
    421421
    422 #if OL_QTLIMIT_PREDCODING_B0068
     422#if H3D_QTL
    423423  TComSPS *sps         = pcPic->getSlice(0)->getSPS();
    424424  TComPic *pcTexture   = rpcBestCU->getSlice()->getTexturePic();
     
    427427  Bool  bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE);
    428428
    429 #if HHI_QTLPC_RAU_OFF_C0160
    430429  Bool rapPic     = (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    431 #endif
    432430
    433431  Bool bTry2NxN = true;
     
    571569      rpcTempCU->initEstData( uiDepth, iQP );
    572570
    573 #if OL_QTLIMIT_PREDCODING_B0068
     571#if H3D_QTL
    574572      //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
    575573
    576 #if HHI_QTLPC_RAU_OFF_C0160
    577574      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
    578 #else
    579       if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
    580 #endif
    581575      {
    582576        TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU
     
    602596      {
    603597#if H3D_IVRP
    604 #if MTK_MDIVRP_C0138
    605598        Bool  bResPredAvailable   = false;
    606599        UInt uiResPrdId = 0;
    607 #else
    608         // check availability of residual prediction
    609         Bool  bResPredAvailable   = false;
    610         Bool  bResPredAllowed     =                    (!rpcBestCU->getSlice()->getSPS()->isDepth                () );
    611         bResPredAllowed           = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getViewId              () );
    612         bResPredAllowed           = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getMultiviewResPredMode() );
    613         if( bResPredAllowed )
    614         {
    615           bResPredAvailable       = rpcBestCU->getResidualSamples( 0, true , m_ppcResPredTmp[uiDepth] );
    616         }
    617 
    618         for( UInt uiResPrdId = 0; uiResPrdId < ( bResPredAvailable ? 2 : 1 ); uiResPrdId++ )
    619 #endif
    620600        {
    621601          Bool bResPredFlag  = ( uiResPrdId > 0 );
     
    648628            }
    649629          }
    650 #if LGE_ILLUCOMP_B0045_ENCSIMP
     630#if LGE_ILLUCOMP_B0045
    651631          if(bICFlag && rpcBestCU->getMergeFlag(0) && !rpcBestCU->getICFlag(0))
    652632          {
     
    661641            rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    662642#endif
    663 #if FIX_LGE_ILLUCOMP_B0045
     643#if LGE_ILLUCOMP_B0045
    664644            rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    665645#endif
     
    684664      } // != I_SLICE
    685665
    686 #if LGE_ILLUCOMP_B0045_ENCSIMP
     666#if LGE_ILLUCOMP_B0045
    687667    bICEnabled = rpcBestCU->getICFlag(0);
    688668#endif
    689669
    690 #if OL_QTLIMIT_PREDCODING_B0068
    691 
    692 #if HHI_QTLPC_RAU_OFF_C0160
     670#if H3D_QTL
     671
    693672      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
    694 #else
    695       if(depthMapDetect && !bIntraSliceDetect  && sps->getUseQTLPC())
    696 #endif
    697673      {
    698674        bTrySplitDQP = bTrySplit;
     
    712688          bTrySplitDQP = bTrySplit;
    713689        }
    714 #if OL_QTLIMIT_PREDCODING_B0068
     690#if H3D_QTL
    715691      }
    716692#endif
     
    739715      {
    740716#if H3D_IVRP
    741 #if MTK_MDIVRP_C0138
    742717        Bool  bResPredAvailable   = false;
    743718        UInt uiResPrdId = 0;
    744 #else
    745         // check availability of residual prediction
    746         Bool  bResPredAvailable   = false;
    747         Bool  bResPredAllowed     =                    (!rpcBestCU->getSlice()->getSPS()->isDepth                () );
    748         bResPredAllowed           = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getViewId              () );
    749         bResPredAllowed           = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getMultiviewResPredMode() );
    750         if( bResPredAllowed )
    751         {
    752           bResPredAvailable       = rpcBestCU->getResidualSamples( 0, true, m_ppcResPredTmp[uiDepth] );
    753         }
    754 
    755         for( UInt uiResPrdId = 0; uiResPrdId < ( bResPredAvailable ? 2 : 1 ); uiResPrdId++ )
    756 #endif
    757719        {
    758720          Bool bResPredFlag  = ( uiResPrdId > 0 );
     
    772734              if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu)
    773735              {
    774 #if OL_QTLIMIT_PREDCODING_B0068 //try InterNxN
     736#if H3D_QTL //try InterNxN
    775737                if(bTrySplit)
    776738                {
     
    785747#endif
    786748                  rpcTempCU->initEstData( uiDepth, iQP );
    787 #if OL_QTLIMIT_PREDCODING_B0068
     749#if H3D_QTL
    788750                }
    789751#endif
     
    793755
    794756          { // 2NxN, Nx2N
    795 #if OL_QTLIMIT_PREDCODING_B0068 //try Nx2N
     757#if H3D_QTL //try Nx2N
    796758            if(bTryNx2N)
    797759            {
     
    802764                rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    803765#endif
    804 #if FIX_LGE_ILLUCOMP_B0045
     766#if LGE_ILLUCOMP_B0045
    805767                rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    806768#endif
     
    816778                }
    817779              }
    818 #if OL_QTLIMIT_PREDCODING_B0068
     780#if H3D_QTL
    819781            }
    820782#endif
    821783
    822 #if OL_QTLIMIT_PREDCODING_B0068 //try 2NxN
     784#if H3D_QTL //try 2NxN
    823785            if(bTry2NxN)
    824786            {
     
    829791                rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    830792#endif
    831 #if FIX_LGE_ILLUCOMP_B0045
     793#if LGE_ILLUCOMP_B0045
    832794                rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    833795#endif
     
    843805                }
    844806              }
    845 #if OL_QTLIMIT_PREDCODING_B0068
     807#if H3D_QTL
    846808            }
    847809#endif
     
    866828            if ( bTestAMP_Hor )
    867829            {
    868 #if OL_QTLIMIT_PREDCODING_B0068 //try 2NxnU & 2NxnD
     830#if H3D_QTL //try 2NxnU & 2NxnD
    869831              if(bTry2NxN)
    870832              {
     
    875837                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    876838#endif
    877 #if FIX_LGE_ILLUCOMP_B0045
     839#if LGE_ILLUCOMP_B0045
    878840                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    879841#endif
     
    894856                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    895857#endif
    896 #if FIX_LGE_ILLUCOMP_B0045
     858#if LGE_ILLUCOMP_B0045
    897859                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    898860#endif
     
    908870                  }
    909871                }
    910 #if OL_QTLIMIT_PREDCODING_B0068
     872#if H3D_QTL
    911873              }
    912874#endif
     
    915877            else if ( bTestMergeAMP_Hor )
    916878            {
    917 #if OL_QTLIMIT_PREDCODING_B0068 //try 2NxnU & 2NxnD Merge
     879#if H3D_QTL //try 2NxnU & 2NxnD Merge
    918880              if(bTry2NxN)
    919881              {
     
    924886                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    925887#endif
    926 #if FIX_LGE_ILLUCOMP_B0045
     888#if LGE_ILLUCOMP_B0045
    927889                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    928890#endif
     
    943905                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    944906#endif
    945 #if FIX_LGE_ILLUCOMP_B0045
     907#if LGE_ILLUCOMP_B0045
    946908                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    947909#endif
     
    957919                  }
    958920                }
    959 #if OL_QTLIMIT_PREDCODING_B0068
     921#if H3D_QTL
    960922              }
    961923#endif
     
    966928            if ( bTestAMP_Ver )
    967929            {
    968 #if OL_QTLIMIT_PREDCODING_B0068 //try nLx2N & nRx2N
     930#if H3D_QTL //try nLx2N & nRx2N
    969931              if(bTryNx2N)
    970932              {
     
    975937                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    976938#endif
    977 #if FIX_LGE_ILLUCOMP_B0045
     939#if LGE_ILLUCOMP_B0045
    978940                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    979941#endif
     
    994956                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    995957#endif
    996 #if FIX_LGE_ILLUCOMP_B0045
     958#if LGE_ILLUCOMP_B0045
    997959                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    998960#endif
     
    1004966                  rpcTempCU->initEstData( uiDepth, iQP );
    1005967                }
    1006 #if OL_QTLIMIT_PREDCODING_B0068
     968#if H3D_QTL
    1007969              }
    1008970#endif
     
    1011973            else if ( bTestMergeAMP_Ver )
    1012974            {
    1013 #if OL_QTLIMIT_PREDCODING_B0068 //try nLx2N & nRx2N (Merge)
     975#if H3D_QTL //try nLx2N & nRx2N (Merge)
    1014976              if(bTryNx2N)
    1015977              {
     
    1020982                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1021983#endif
    1022 #if FIX_LGE_ILLUCOMP_B0045
     984#if LGE_ILLUCOMP_B0045
    1023985                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    1024986#endif
     
    10391001                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    10401002#endif
    1041 #if FIX_LGE_ILLUCOMP_B0045
     1003#if LGE_ILLUCOMP_B0045
    10421004                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    10431005#endif
     
    10491011                  rpcTempCU->initEstData( uiDepth, iQP );
    10501012                }
    1051 #if OL_QTLIMIT_PREDCODING_B0068
     1013#if H3D_QTL
    10521014              }
    10531015#endif
     
    11431105          if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    11441106          {
    1145 #if OL_QTLIMIT_PREDCODING_B0068 //Try IntraNxN
     1107#if H3D_QTL //Try IntraNxN
    11461108            if(bTrySplit)
    11471109            {
     
    11551117                rpcTempCU->initEstData( uiDepth, iQP );
    11561118              }
    1157 #if OL_QTLIMIT_PREDCODING_B0068
     1119#if H3D_QTL
    11581120            }
    11591121#endif
     
    18051767        );
    18061768#endif
    1807 #if H3D_IVRP && !MTK_MDIVRP_C0138
    1808     m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );
    1809 #endif
    18101769    finishCU(pcCU,uiAbsPartIdx,uiDepth);
    18111770    return;
     
    18391798#endif
    18401799        );
    1841 #endif
    1842 #if H3D_IVRP && !MTK_MDIVRP_C0138
    1843     if( !pcCU->isIntra( uiAbsPartIdx ) )
    1844     {
    1845       m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );
    1846     }
    18471800#endif
    18481801#if HHI_MPI
     
    18801833  Int numValidMergeCand = 0;
    18811834
    1882 #if H3D_IVRP && !MTK_MDIVRP_C0138
    1883   Bool  bResPrdAvail  = rpcTempCU->getResPredAvail( 0 );
    1884   Bool  bResPrdFlag   = rpcTempCU->getResPredFlag ( 0 );
    1885 #endif
    18861835#if LGE_ILLUCOMP_B0045
    18871836  Bool  bICFlag = rpcTempCU->getICFlag(0);
     
    19161865  rpcTempCU->getInterMergeCandidates( 0, 0, uhDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    19171866#endif
    1918 #if MTK_MDIVRP_C0138
     1867#if H3D_IVRP
    19191868  Bool bResPredAvail = rpcTempCU->getResPredAvail(0);
    19201869#endif
     
    19781927
    19791928#if H3D_IVRP
    1980 #if MTK_MDIVRP_C0138
    19811929          rpcTempCU->setResPredAvailSubParts(bResPredAvail, 0, 0, uhDepth);
    1982 #else
    1983           rpcTempCU->setResPredAvailSubParts( bResPrdAvail, 0, 0, uhDepth );
    1984           rpcTempCU->setResPredFlagSubParts ( bResPrdFlag,  0, 0, uhDepth );
    1985 #endif
    19861930#endif
    19871931#if LGE_ILLUCOMP_B0045
     
    20011945            m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
    20021946#endif
    2003 #if MTK_MDIVRP_C0138
     1947#if H3D_IVRP
    20041948            if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0))
    20051949            {
     
    20201964              m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
    20211965#endif
    2022 #if MTK_MDIVRP_C0138
     1966#if H3D_IVRP
    20231967              if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0))
    20241968              {
     
    21202064#endif
    21212065  rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
    2122  
    2123 #if H3D_IVRP
    2124 #if !LG_RESTRICTEDRESPRED_M24766
    2125   if( rpcTempCU->getResPredFlag( 0 ) )
    2126   { // subtract residual prediction from original in motion search
    2127     m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ), true );
    2128   }
    2129 #endif
    2130 #endif
    21312066
    21322067#if AMP_MRG
    21332068  rpcTempCU->setMergeAMP (true);
    21342069  #if HHI_INTERVIEW_SKIP
    2135 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    2136   m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG);
    2137 #else
    21382070  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG  );
    2139 #endif
    21402071#else
    21412072  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], false, bUseMRG );
     
    21462077#else 
    21472078  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] );
    2148 #endif
    2149 #endif
    2150 
    2151 #if H3D_IVRP
    2152 #if !LG_RESTRICTEDRESPRED_M24766
    2153   if( rpcTempCU->getResPredFlag( 0 ) )
    2154   { // add residual prediction to original again
    2155     m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ) );
    2156   }
    21572079#endif
    21582080#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncEntropy.cpp

    r296 r325  
    122122#endif
    123123
    124 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     124#if HHI_MPI || H3D_QTL
    125125Void TEncEntropy::encodeSPS( TComSPS* pcSPS, Bool bIsDepth )
    126126{
     
    455455}
    456456
    457 #if H3D_IVRP && !MTK_MDIVRP_C0138
    458 Void
    459 TEncEntropy::encodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD )
    460 {
    461   if( bRD )
    462   {
    463     uiAbsPartIdx = 0;
    464   }
    465 
    466   // check whether flag is coded
    467   ROTVS( pcCU->getSlice()->getSPS()->isDepth                () );
    468   ROFVS( pcCU->getSlice()->getSPS()->getViewId              () );
    469   ROFVS( pcCU->getSlice()->getSPS()->getMultiviewResPredMode() );
    470   ROTVS( pcCU->isIntra           ( uiAbsPartIdx )              );
    471   ROFVS( pcCU->getResPredAvail   ( uiAbsPartIdx )              );
    472 #if LG_RESTRICTEDRESPRED_M24766
    473   Int iPUResiPredShift[4];
    474   pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx);
    475   if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0  || iPUResiPredShift[2] >= 0  || iPUResiPredShift[3] >= 0 )
    476 #endif
    477   // encode flag
    478   m_pcEntropyCoderIf->codeResPredFlag( pcCU, uiAbsPartIdx );
    479 }
    480 #endif
    481457
    482458/** parse the fixed length code (smaller than one max value) in ALF
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncEntropy.h

    r296 r325  
    8080#endif
    8181
    82 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     82#if HHI_MPI || H3D_QTL
    8383  virtual Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth )                       = 0;
    8484#else
     
    222222#endif
    223223  // SPS
    224 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     224#if HHI_MPI || H3D_QTL
    225225  Void encodeSPS               ( TComSPS* pcSPS, Bool bIsDepth );
    226226#else
     
    250250  Void encodeMergeFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx );
    251251  Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false );
    252 #if H3D_IVRP && !MTK_MDIVRP_C0138
    253   Void encodeResPredFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false );
    254 #endif
    255252  Void encodeAlfCtrlFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    256253
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncGOP.cpp

    r313 r325  
    887887        m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
    888888        pcSlice->getSPS()->setNumSubstreams( pcSlice->getPPS()->getNumSubstreams() );
    889 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     889#if HHI_MPI || H3D_QTL
    890890        m_pcEntropyCoder->encodeSPS(pcSlice->getSPS(), m_pcEncTop->getIsDepth());
    891891#else
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncSbac.cpp

    r296 r325  
    376376#endif
    377377
    378 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     378#if HHI_MPI || H3D_QTL
    379379Void TEncSbac::codeSPS( TComSPS* pcSPS, Bool bIsDepth )
    380380#else
     
    578578  PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
    579579
    580 #if OL_QTLIMIT_PREDCODING_B0068
     580#if H3D_QTL
    581581  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
    582582  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
     
    584584  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
    585585 
    586 #if HHI_QTLPC_RAU_OFF_C0160
    587586  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    588587  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
    589 #else
    590   if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
    591 #endif
    592588  {
    593589    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    855851  assert( uiCtx < 3 );
    856852
    857 #if OL_QTLIMIT_PREDCODING_B0068
     853#if H3D_QTL
    858854  Bool bCodeSplitFlag    = true;
    859855
     
    863859  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
    864860
    865 #if HHI_QTLPC_RAU_OFF_C0160
    866861  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    867862  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
    868 #else
    869   if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
    870 #endif
    871863  {
    872864    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncSbac.h

    r296 r325  
    102102#endif
    103103 
    104 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     104#if HHI_MPI || H3D_QTL
    105105  Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth );
    106106#else
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncSearch.cpp

    r296 r325  
    23112311      for( UInt uiSDC=0; uiSDC<=uiUseSDC; uiSDC++ )
    23122312      {
    2313 #if FIX_SDC_ENC_C0143
    23142313        for( UInt uiRes = 0; uiRes<=uiSDC; uiRes++ )
    2315 #else
    2316         for( UInt uiRes = 0; uiRes<=uiUseSDC; uiRes++ )
    2317 #endif
    23182314        {
    23192315#endif
     
    29092905 * \returns Void
    29102906 */
     2907
     2908Void TEncSearch::xMergeEstimation( TComDataCU*     pcCU,
     2909                                 TComYuv*        pcYuvOrg,
     2910                                 Int             iPUIdx,
     2911                                 UInt&           uiInterDir,
     2912                                 TComMvField*    pacMvField,
     2913                                 UInt&           uiMergeIndex,
     2914                                 UInt&           ruiCost
    29112915#if CU_BASED_MRG_CAND_LIST
    2912 #if LG_RESTRICTEDRESPRED_M24766
    2913 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand )
    2914 #else
    2915 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand )
    2916 #endif
    2917 #else
    2918 #if LG_RESTRICTEDRESPRED_M24766
    2919 #if MERL_VSP_C0152 || MTK_MDIVRP_C0138
    2920 #if !MTK_MDIVRP_C0138
    2921 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue )
    2922 #endif
    2923 #if !MERL_VSP_C0152
    2924 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
    2925 #endif
    2926 #if MERL_VSP_C0152 && MTK_MDIVRP_C0138
    2927 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue  )
    2928 #endif
    2929 #else
    2930 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
    2931 #endif
    2932 #else
    2933 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
    2934 #endif
    2935 #endif
     2916                                 , TComMvField* cMvFieldNeighbours, 
     2917                                 UChar* uhInterDirNeighbours,
     2918                                 Int& numValidMergeCand
     2919#endif
     2920#if MERL_VSP_C0152
     2921                                 , Int* iVSPIndexTrue
     2922#endif
     2923                                 )
    29362924{
    29372925#if !CU_BASED_MRG_CAND_LIST
     
    29852973  const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 );
    29862974#endif
    2987 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    2988   Int iPUResiPredShift[4];
    2989   Int iLastAddResiShift = -1000;
    2990 #endif
    29912975  ruiCost = MAX_UINT;
    29922976  for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
     
    30142998        }
    30152999        pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    3016       }
    3017 #endif
    3018 #if LG_RESTRICTEDRESPRED_M24766  && !MTK_MDIVRP_C0138
    3019       Int iAddResiShift;
    3020       UInt uiPartAddr;
    3021       Int iRoiWidth, iRoiHeight;
    3022 
    3023       pcCU->getPartIndexAndSize( iPUIdx, uiPartAddr, iRoiWidth, iRoiHeight );
    3024       iAddResiShift = pcCU->getResiPredMode(uiPartAddr);
    3025       iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || pcCU->getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1 - iAddResiShift : -1);
    3026 
    3027       if( pcCU->getResPredFlag( 0 ))
    3028       { // subtract residual prediction from original in motion search
    3029         if(iLastAddResiShift != iAddResiShift)
    3030         {
    3031           //add subtracted residual last time
    3032           if(iLastAddResiShift >= 0)
    3033           {
    3034             iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;
    3035             pcYuvOrg->add(iPUResiPredShift, ePartSize, rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
    3036           }
    3037           //subtract residual
    3038           if(iAddResiShift >= 0)
    3039           {
    3040             iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iAddResiShift;
    3041             pcYuvOrg->add(iPUResiPredShift, ePartSize, rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );
    3042           }
    3043           iLastAddResiShift = iAddResiShift;
    3044         }
    30453000      }
    30463001#endif
     
    30663021    }
    30673022  }
    3068 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3069   if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
    3070   {
    3071     iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;
    3072     pcYuvOrg->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
    3073   }
    3074 #endif
    30753023}
    30763024
     
    30853033 */
    30863034#if AMP_MRG
    3087 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3088 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG )
    3089 #else
    30903035Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG)
    3091 #endif
    30923036#else
    30933037Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes )
     
    31883132    for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT;
    31893133    UInt          uiBitsTempL0[MAX_NUM_REF];
    3190 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3191     Int iPUResiPredShift[4] = {0, 0, 0, 0};
    3192 #endif
    31933134    xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits);
    31943135   
     
    32093150    {
    32103151#endif
    3211 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3212       Bool bLastResiFlag = false;
    3213 #endif
    32143152
    32153153    //  Uni-directional prediction
     
    32203158      for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ )
    32213159      {
    3222 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3223         if( pcCU->getResPredFlag( 0 ))
    3224         {
    3225           if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp))
    3226           { // subtract residual prediction from original in motion search
    3227             if(!bLastResiFlag)
    3228               pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );
    3229             bLastResiFlag = true;
    3230           }
    3231           else
    3232           {
    3233             if(bLastResiFlag)
    3234               pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
    3235             bLastResiFlag = false;
    3236           }
    3237         }
    3238 #endif
    32393160        uiBitsTemp = uiMbBits[iRefList];
    32403161        if ( pcCU->getSlice()->getNumRefIdx(eRefPicList) > 1 )
     
    33943315      }
    33953316    }
    3396 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3397     if( pcCU->getResPredFlag( 0 ) && bLastResiFlag)
    3398     { // subtract residual prediction from original in motion search
    3399       pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
    3400     }
    3401 #endif
    34023317    //  Bi-directional prediction
    34033318    if ( pcCU->getSlice()->isInterB() )
    34043319    {
    3405 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3406       Int iLastAddResiShift = -1000;
    3407 #endif
    34083320      cMvBi[0] = cMv[0];            cMvBi[1] = cMv[1];
    34093321      iRefIdxBi[0] = iRefIdx[0];    iRefIdxBi[1] = iRefIdx[1];
     
    34993411#else
    35003412          uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS];
    3501 #endif
    3502 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3503           Int iAddResiShift = -1, iPredFrom = 0;
    3504           Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr);
    3505 
    3506           iPredFrom = iBestRefIdx >= 0 ? 3 : 1;
    3507           if(iBestRefIdx >= 0 && pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx))
    3508             iAddResiShift++;
    3509           if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp))
    3510             iAddResiShift++;
    3511           iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || iPredFrom != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
    3512 
    3513           if( pcCU->getResPredFlag( 0 ) )
    3514           {
    3515             if(iLastAddResiShift != iAddResiShift)
    3516             {
    3517               //add substracted residual last time
    3518               if(iLastAddResiShift >= 0 )
    3519               {
    3520                 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;
    3521                 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
    3522               }
    3523               //substract residual
    3524               if(iAddResiShift >= 0)
    3525               {
    3526                 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iAddResiShift;
    3527                 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );
    3528               }
    3529               iLastAddResiShift = iAddResiShift;
    3530             }
    3531           }
    35323413#endif
    35333414          // call ME
     
    35813462        }
    35823463      } // for loop-iter
    3583 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3584       if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
    3585       {
    3586         iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;
    3587         pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
    3588       }
    3589 #endif
    35903464    } // if (B_SLICE)
    35913465#if ZERO_MVD_EST
     
    37963670      if (bTestNormalMC)
    37973671      {
    3798 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3799         Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr);
    3800         iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \
    3801           (pcCU->getSlice()->getPPS()->getUseWP() || pcCU->getInterDir(uiPartAddr) != 3)? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
    3802         if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)
    3803         {
    3804           pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true);
    3805         }
    3806 #endif
    38073672        xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() );
    38083673        uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits );
    3809 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    3810         if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)
    3811         {
    3812           pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
    3813         }
    3814 #endif
    38153674      }
    38163675#else
     
    38273686      // find Merge result
    38283687      UInt uiMRGCost = MAX_UINT;
     3688
     3689
     3690xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost
    38293691#if CU_BASED_MRG_CAND_LIST
    3830 #if LG_RESTRICTEDRESPRED_M24766
    3831       xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    3832 #else
    3833       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    3834 #endif
    3835 #else
    3836 #if LG_RESTRICTEDRESPRED_M24766
    3837 #if MERL_VSP_C0152 || MTK_MDIVRP_C0138
    3838 
    3839 #if !MTK_MDIVRP_C0138
    3840       xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost,  iVSPIndexTrue );
    3841 #endif
    3842 
    3843 #if !MERL_VSP_C0152
    3844       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
    3845 #endif
    3846 
    3847 #if MERL_VSP_C0152 && MTK_MDIVRP_C0138
    3848       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost,  iVSPIndexTrue );
    3849 #endif
    3850 
    3851 #else
    3852       xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
    3853 #endif
    3854 
    3855 
    3856 #else
    3857       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
    3858 #endif
    3859 #endif
     3692                 , cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand,
     3693#endif
     3694#if MERL_VSP_C0152
     3695                 , iVSPIndexTrue
     3696#endif
     3697        );
     3698
    38603699      if ( uiMRGCost < uiMECost )
    38613700      {
     
    47754614  UInt      uiWidth      = pcCU->getWidth ( 0 );
    47764615  UInt      uiHeight     = pcCU->getHeight( 0 );
    4777 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    4778   Int       iPUResiPredShift[4];
    4779 #endif
    47804616  //  No residual coding : SKIP mode
    47814617  if ( ePredMode == MODE_SKIP && bSkipRes )
     
    47854621    pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );
    47864622   
    4787 #if MTK_MDIVRP_C0138
     4623#if H3D_IVRP
    47884624    if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0))
    47894625    {
    47904626      rpcYuvRec->clip( uiWidth, uiHeight );
    47914627    }
    4792 #else
    4793 #if H3D_IVRP
    4794     // add residual prediction
    4795     if( pcCU->getResPredFlag( 0 ) )
    4796     {
    4797 #if LG_RESTRICTEDRESPRED_M24766
    4798       pcCU->getPUResiPredShift(iPUResiPredShift, 0);
    4799       rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResPrd, uiWidth, uiHeight );
    4800 #else
    4801       rpcYuvRec->add( rpcYuvResPrd, uiWidth, uiHeight );
    4802 #endif
    4803       rpcYuvRec->clip( uiWidth, uiHeight );
    4804     }
    4805 #endif
    48064628#endif
    48074629
     
    48534675      );
    48544676#endif
    4855 #if H3D_IVRP && !MTK_MDIVRP_C0138
    4856     m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    4857 #endif
    48584677#if HHI_MPI
    48594678    }
     
    49224741  else
    49234742  {
    4924 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    4925     iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;
    4926     rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth );
    4927 #else
    49284743  rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth );
    4929 #endif
    4930 #if H3D_IVRP && !MTK_MDIVRP_C0138
    4931     // subtract residual prediction
    4932     if( pcCU->getResPredFlag( 0 ) )
    4933     {
    4934 #if LG_RESTRICTEDRESPRED_M24766
    4935       pcCU->getPUResiPredShift(iPUResiPredShift, 0);
    4936       rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResi, rpcYuvResPrd, 0, uiWidth );
    4937 #else
    4938       rpcYuvResi->subtract( rpcYuvResi, rpcYuvResPrd, 0, uiWidth );
    4939 #endif
    4940     }
    4941 #endif
    49424744  }
    49434745#else
     
    51344936#endif
    51354937  }
    5136 #if H3D_IVRP && !MTK_MDIVRP_C0138
    5137   // add residual prediction
    5138   if( pcCU->getResPredFlag( 0 ) )
    5139   {
    5140     pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );
    5141 #if LG_RESTRICTEDRESPRED_M24766
    5142     pcCU->getPUResiPredShift(iPUResiPredShift, 0);
    5143     rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResPrd,   uiWidth, uiHeight );
    5144     iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;
    5145     rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResiBest, uiWidth, uiHeight );
    5146 #else
    5147     rpcYuvRec->add( rpcYuvResPrd,   uiWidth, uiHeight );
    5148     rpcYuvRec->add( rpcYuvResiBest, uiWidth, uiHeight );
    5149 #endif
    5150     rpcYuvRec->clip( uiWidth, uiHeight );
    5151   }
    5152   else
    5153 #endif
    51544938  rpcYuvRec->addClip ( pcYuvPred, rpcYuvResiBest, 0, uiWidth );
    51554939 
     
    61705954      );
    61715955#endif
    6172 #if H3D_IVRP && !MTK_MDIVRP_C0138
    6173     m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    6174 #endif
    61755956    ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits();
    61765957  }
     
    61965977#endif
    61975978      );
    6198 #endif
    6199 #if H3D_IVRP && !MTK_MDIVRP_C0138
    6200     m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    62015979#endif
    62025980#if HHI_MPI
     
    65346312    Int iFullDeltaDC2 = riDeltaDC2;
    65356313
    6536 #if HHI_DMM_DELTADC_Q1_C0034
    6537 #else
    6538     xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC1 );
    6539     xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC2 );
    6540 #endif
    6541 
    65426314    Dist uiBestDist     = RDO_DIST_MAX;
    65436315    UInt  uiBestQStepDC1 = 0;
     
    65516323    uiDeltaDC2Max += (uiDeltaDC2Max>>1);
    65526324
    6553 #if HHI_DMM_DELTADC_Q1_C0034
    65546325    // limit search range to [0, IBDI_MAX]
    65556326    if( iFullDeltaDC1 <  0 && uiDeltaDC1Max >                abs(iPredDC1) ) { uiDeltaDC1Max =                abs(iPredDC1); }
     
    66986469      }
    66996470    }
    6700 #else
    6701     for( UInt uiQStepDC1 = 1; uiQStepDC1 <= uiDeltaDC1Max; uiQStepDC1++  )
    6702     {
    6703       Int iLevelDeltaDC1 = (Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1);
    6704       xDeltaDCQuantScaleUp( pcCU, iLevelDeltaDC1 );
    6705 
    6706       Int iTestDC1 = Clip( iPredDC1 + iLevelDeltaDC1 );
    6707       for( UInt uiQStepDC2 = 1; uiQStepDC2 <= uiDeltaDC2Max; uiQStepDC2++  )
    6708       {
    6709         Int iLevelDeltaDC2 = (Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1);
    6710         xDeltaDCQuantScaleUp( pcCU, iLevelDeltaDC2 );
    6711 
    6712         Int iTestDC2 = Clip( iPredDC2 + iLevelDeltaDC2 );
    6713 
    6714         assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 );
    6715        
    6716         Dist uiActDist = RDO_DIST_MAX;
    6717 #if SAIT_VSO_EST_A0033
    6718         if ( m_pcRdCost->getUseEstimatedVSD() )
    6719         {         
    6720           TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
    6721           TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
    6722           uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
    6723 #if LGE_WVSO_A0119
    6724           if ( m_pcRdCost->getUseWVSO() )
    6725           {   
    6726             Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
    6727             Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
    6728             Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
    6729             uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight);
    6730           }
    6731 #endif // LGE_WVSO_A0119
    6732         }
    6733         else       
    6734 #endif // SAIT_VSO_EST_A0033
    6735         {       
    6736           uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
    6737 #if LGE_WVSO_A0119
    6738           if ( m_pcRdCost->getUseWVSO() )
    6739           {   
    6740             Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
    6741             Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
    6742             Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
    6743             uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight);
    6744           }
    6745 #endif // LGE_WVSO_A0119
    6746         }
    6747 
    6748         if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
    6749         {
    6750           uiBestDist     = uiActDist;
    6751           uiBestQStepDC1 = uiQStepDC1;
    6752           uiBestQStepDC2 = uiQStepDC2;
    6753         }
    6754       }
    6755     }
    6756 #endif
     6471
    67576472    iFullDeltaDC1 = (Int)(uiBestQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1);
    67586473    iFullDeltaDC2 = (Int)(uiBestQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1);
    6759 #if HHI_DMM_DELTADC_Q1_C0034
    6760 #else
    6761     xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC1 );
    6762     xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC2 );
    6763 #endif
     6474
    67646475    riDeltaDC1 = iFullDeltaDC1;
    67656476    riDeltaDC2 = iFullDeltaDC2;
     
    67676478#endif
    67686479
    6769 #if HHI_DMM_DELTADC_Q1_C0034
    6770 #else
    6771   xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 );
    6772   xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 );
    6773 #endif
    67746480}
    67756481#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncSearch.h

    r296 r325  
    196196  Void predInterSearch          ( TComDataCU* pcCU,
    197197                                  TComYuv*    pcOrgYuv,
    198 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    199                                   TComYuv*    rpcResiPredYuv,
    200 #endif
    201198                                  TComYuv*&   rpcPredYuv,
    202199                                  TComYuv*&   rpcResiYuv,
     
    501498  Void xMergeEstimation           ( TComDataCU*     pcCU,
    502499                                    TComYuv*        pcYuvOrg,
    503 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    504                                     TComYuv*        rpcResiPredYuv,
    505 #endif
    506500                                    Int             iPartIdx,
    507501                                    UInt&           uiInterDir,
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncSlice.cpp

    r313 r325  
    11931193    }
    11941194
    1195 #if OL_QTLIMIT_PREDCODING_B0068
     1195#if H3D_QTL
    11961196    rpcPic->setReduceBitsFlag(true);
    11971197#endif
     
    12351235    }
    12361236
    1237 #if OL_QTLIMIT_PREDCODING_B0068
     1237#if H3D_QTL
    12381238    rpcPic->setReduceBitsFlag(false);
    12391239#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp

    r313 r325  
    703703#endif
    704704
    705 #if OL_QTLIMIT_PREDCODING_B0068
     705#if H3D_QTL
    706706  m_cSPS.setUseQTLPC( m_bUseQTLPC );
    707707#endif
  • branches/HTM-6.1-Cleanup/source/Lib/TLibExtractor/TExtrTop.cpp

    r296 r325  
    7979     TComRPSList cRPS;
    8080     cSPS.setRPSList( &cRPS );
    81 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
     81#if HHI_MPI || H3D_QTL
    8282#if VIDYO_VPS_INTEGRATION
    8383     m_cEntropyDecoder.decodeSPS( &cSPS, m_cVPS.getDepthFlag(uiLayerId) );
Note: See TracChangeset for help on using the changeset viewer.