Changeset 332 in 3DVCSoftware for trunk/source/Lib/TLibEncoder


Ignore:
Timestamp:
21 Apr 2013, 19:13:11 (12 years ago)
Author:
tech
Message:

Merged branch 6.1-Cleanup@329.

Location:
trunk/source/Lib/TLibEncoder
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r313 r332  
    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  {
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r296 r332  
    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
  • trunk/source/Lib/TLibEncoder/TEncCfg.h

    r296 r332  
    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; }
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r296 r332  
    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
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r296 r332  
    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
  • trunk/source/Lib/TLibEncoder/TEncEntropy.h

    r296 r332  
    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
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r313 r332  
    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
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r296 r332  
    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());
  • trunk/source/Lib/TLibEncoder/TEncSbac.h

    r296 r332  
    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
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r296 r332  
    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
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r296 r332  
    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,
  • trunk/source/Lib/TLibEncoder/TEncSlice.cpp

    r313 r332  
    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
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r313 r332  
    703703#endif
    704704
    705 #if OL_QTLIMIT_PREDCODING_B0068
     705#if H3D_QTL
    706706  m_cSPS.setUseQTLPC( m_bUseQTLPC );
    707707#endif
Note: See TracChangeset for help on using the changeset viewer.