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


Ignore:
Timestamp:
18 Nov 2012, 22:11:37 (12 years ago)
Author:
tech
Message:

Reintegrated branch 4.1-dev0 Rev. 188.

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

Legend:

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

    r100 r189  
    645645#endif
    646646
     647#if OL_QTLIMIT_PREDCODING_B0068
     648  if( bIsDepth )
     649  {
     650    WRITE_FLAG( pcSPS->getUseQTLPC() ? 1 : 0, "use_qtlpc_flag");
     651  }
     652#endif
     653 
     654#if RWTH_SDC_DLT_B0036
     655  if( bIsDepth )
     656  {
     657    WRITE_FLAG( pcSPS->getUseDLT() ? 1 : 0, "use_dlt_flag" );
     658    if( pcSPS->getUseDLT() )
     659    {
     660      // code mapping
     661      xWriteUvlc  ( pcSPS->getNumDepthValues() );
     662      for(UInt i=0; i<pcSPS->getNumDepthValues(); i++)
     663      {
     664        xWriteUvlc( pcSPS->idx2DepthValue(i) );
     665      }
     666    }
     667  }
     668#endif
     669
    647670  if( pcSPS->getViewId() || pcSPS->isDepth() )
    648671  {
     
    749772  Int address = (pcSlice->getPic()->getPicSym()->getCUOrderMap(lCUAddress) << reqBitsInner) + innerAddress;
    750773  WRITE_FLAG( address==0, "first_slice_in_pic_flag" );
     774
     775#if LGE_ILLUCOMP_B0045
     776  // IC flag is on only first_slice_in_pic
     777  if (address==0)
     778  {
     779    if( pcSlice->getSPS()->getViewId() && !pcSlice->getIsDepth() )
     780    {
     781      WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "applying IC flag" );
     782    }
     783  }
     784#endif
     785
    751786  if(address>0)
    752787  {
     
    14271462}
    14281463
     1464#if LGE_ILLUCOMP_B0045
     1465Void TEncCavlc::codeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
     1466{
     1467  assert(0);
     1468}
     1469#endif
     1470
    14291471Void TEncCavlc::codeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    14301472{
     
    20472089  return true;
    20482090}
     2091
     2092#if RWTH_SDC_DLT_B0036
     2093Void TEncCavlc::codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx )
     2094{
     2095  assert(0);
     2096}
     2097
     2098Void TEncCavlc::codeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
     2099{
     2100  assert(0);
     2101}
     2102
     2103Void TEncCavlc::codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx )
     2104{
     2105  assert(0);
     2106}
     2107#endif
    20492108//! \}
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r77 r189  
    164164
    165165  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     166#if LGE_ILLUCOMP_B0045
     167  Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     168#endif
    166169  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    167170  Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     
    220223  Void codeDFFlag       ( UInt uiCode, const Char *pSymbolName );
    221224  Void codeDFSvlc       ( Int   iCode, const Char *pSymbolName );
     225 
     226#if RWTH_SDC_DLT_B0036
     227  Void codeSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     228  Void codeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
     229  Void codeSDCPredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     230#endif
    222231
    223232};
  • trunk/source/Lib/TLibEncoder/TEncCfg.h

    r121 r189  
    167167#endif
    168168  Bool      m_bUseSAO;
     169#if LGE_ILLUCOMP_B0045
     170  Bool      m_bUseIC;
     171#endif
    169172#if SAO_UNIT_INTERLEAVING
    170173  Int       m_maxNumOffsetsPerPic;
     
    246249#if HHI_MPI
    247250  Bool      m_bUseMVI;
     251#endif
     252#if RWTH_SDC_DLT_B0036
     253  Bool      m_bUseDLT;
     254  Bool      m_bUseSDC;
    248255#endif
    249256
     
    272279  Int       m_iColumnRowInfoPresent;
    273280  Int       m_iUniformSpacingIdr;
    274 #if FIX_REMOVE_TILE_DEPENDENCE
    275 #else
    276   Int       m_iTileBoundaryIndependenceIdr;
    277 #endif
    278281  Int       m_iNumColumnsMinus1;
    279282  UInt*     m_puiColumnWidth;
     
    321324#endif
    322325
    323 #if OL_DEPTHLIMIT_A0044
    324   Bool     m_bDepthPartitionLimiting;
     326#if OL_QTLIMIT_PREDCODING_B0068
     327  Bool     m_bUseQTLPC;
    325328#endif
    326329
     
    688691  Void  setUseMVI                      ( Bool bVal )   {m_bUseMVI = bVal;}
    689692#endif
     693#if RWTH_SDC_DLT_B0036
     694  Void  setUseDLT                       ( Bool  b )     { m_bUseDLT   = b; }
     695  Void  setUseSDC                       ( Bool  b )     { m_bUseSDC   = b; }
     696#endif
    690697  Void  setUseSAO                      ( Bool bVal )   {m_bUseSAO = bVal;}
    691698  Bool  getUseSAO                      ()              {return m_bUseSAO;}
     699#if LGE_ILLUCOMP_B0045
     700  Void  setUseIC                       ( Bool bVal )   {m_bUseIC = bVal;}
     701  Bool  getUseIC                       ()              {return m_bUseIC;}
     702#endif
    692703#if SAO_UNIT_INTERLEAVING
    693704  Void  setMaxNumOffsetsPerPic                   (Int iVal)            { m_maxNumOffsetsPerPic = iVal; }
     
    824835#endif
    825836
    826 #if OL_DEPTHLIMIT_A0044
    827   Void      setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; }
    828   Bool      getUseDPL()       {return m_bDepthPartitionLimiting;}
     837#if OL_QTLIMIT_PREDCODING_B0068
     838  Void      setUseQTLPC( Bool b ) { m_bUseQTLPC = b;    }
     839  Bool      getUseQTLPC()         { return m_bUseQTLPC; }
     840#endif
     841 
     842#if RWTH_SDC_DLT_B0036
     843  Bool      getUseDLT()      { return m_bUseDLT;     }
     844  Bool      getUseSDC()      { return m_bUseSDC;     }
    829845#endif
    830846
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r126 r189  
    451451  TComPic* pcPic = rpcBestCU->getPic();
    452452
    453 #if OL_DEPTHLIMIT_A0044
    454   TComSPS *sps = pcPic->getSlice(0)->getSPS();
    455   TComPic *pcTexture;
    456   TComDataCU * pcTextureCU;
    457   Bool  depthMapDetect =  false;
    458   UInt         uiPrevTexPartIndex = 0;
    459 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    460   Bool bIntraSliceDetect = false;
    461 #endif
    462   Bool bTry2NxN = false;
    463   Bool bTryNx2N = false;
    464     pcTexture = rpcBestCU->getSlice()->getTexturePic();
    465     if(pcTexture != NULL) //depth map being encoded
    466     {
    467     depthMapDetect = true;
    468 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    469       bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE);
    470 #endif
    471     if(uiDepth == 0)
    472     {
    473       pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() );
    474       pcTexture->setPartInfo(pcTextureCU->readPartInfo());
    475       pcTexture->setTexPartIndex(0);
    476     }
    477     }
    478     else
    479     {
    480       depthMapDetect = false;
    481     }
    482 #endif
     453#if OL_QTLIMIT_PREDCODING_B0068
     454  TComSPS *sps         = pcPic->getSlice(0)->getSPS();
     455  TComPic *pcTexture   = rpcBestCU->getSlice()->getTexturePic();
     456
     457  Bool  depthMapDetect    = (pcTexture != NULL);
     458  Bool  bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE);
     459
     460  Bool bTry2NxN = true;
     461  Bool bTryNx2N = true;
     462#endif
     463
    483464  // get Original YUV data from picture
    484465  m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
     
    511492  UInt uiTPelY   = rpcBestCU->getCUPelY();
    512493  UInt uiBPelY   = uiTPelY + rpcBestCU->getHeight(0) - 1;
     494
     495#if LGE_ILLUCOMP_B0045
     496  Bool bICEnabled = (!rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewId());
     497
     498  bICEnabled = bICEnabled && rpcTempCU->getSlice()->getApplyIC();
     499#endif
    513500
    514501#if HHI_INTERVIEW_SKIP
     
    618605      // variables for fast encoder decision
    619606      bEarlySkip  = false;
    620       bTrySplit    = true;
     607      bTrySplit   = true;
    621608      fRD_Skip    = MAX_DOUBLE;
    622609
    623610      rpcTempCU->initEstData( uiDepth, iQP );
    624611
    625 #if OL_DEPTHLIMIT_A0044
     612#if OL_QTLIMIT_PREDCODING_B0068
    626613      //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
    627 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    628       if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL())
    629 #else
    630       if(depthMapDetect && sps->getUseDPL()) //depth map being encoded
    631 #endif
    632       {
    633         assert(uiDepth == pcTexture->accessPartInfo(1));
    634         if(pcTexture->accessPartInfo(0) == 1) //NxN modes
     614      if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
     615      {
     616        TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU
     617        UInt uiCUIdx            = rpcBestCU->getZorderIdxInCU();
     618        assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); //Depth cannot be more partitionned than the texture.
     619        if (pcTextureCU->getDepth(uiCUIdx) > uiDepth || pcTextureCU->getPartitionSize(uiCUIdx) == SIZE_NxN) //Texture was split.
    635620        {
    636621          bTrySplit = true;
    637           bTryNx2N = true;
    638           bTry2NxN = true;
    639           uiPrevTexPartIndex = pcTexture->getTexPartIndex();
    640           pcTexture->incrementTexPartIndex();
     622          bTryNx2N  = true;
     623          bTry2NxN  = true;
    641624        }
    642         else if(pcTexture->accessPartInfo(0) == 0) //2Nx2N modes
    643         {
    644           UInt uiTexdepth;
    645           UInt temp_uiTexPartIndex;
    646           bTrySplit = false;
    647 
    648           //scan ahead till next depth
    649           uiTexdepth = pcTexture->accessPartInfo(1);
    650           uiPrevTexPartIndex = pcTexture->getTexPartIndex();
    651           pcTexture->incrementTexPartIndex();
    652           temp_uiTexPartIndex = pcTexture->getTexPartIndex(); //store in case to rewind
    653 
    654           while(uiTexdepth != pcTexture->accessPartInfo(1) && uiTexdepth != 0)
    655           {
    656             if(pcTexture->accessPartInfo(1) < uiTexdepth)
    657             {
    658               break;
    659             }
    660             pcTexture->incrementTexPartIndex();
    661 
    662             if(pcTexture->accessPartInfo(1) == OL_END_CU)
    663             {
    664               pcTexture->setTexPartIndex(temp_uiTexPartIndex);
    665               uiTexdepth++;
    666               if(uiTexdepth >= g_uiMaxCUDepth)
    667               {     
    668                 break;
    669               }
    670             }
    671           }
    672         }
    673         else if(pcTexture->accessPartInfo(0) == OL_END_CU)
     625        else
    674626        {
    675627          bTrySplit = false;
    676           bTryNx2N = false;
    677           bTry2NxN = false;
     628          bTryNx2N  = false;
     629          bTry2NxN  = false;
    678630        }
    679         else if(pcTexture->accessPartInfo(0) == 2) //2NxN case
    680         {
    681           bTrySplit = false;
    682           bTryNx2N = false;
    683           bTry2NxN = true;
    684           uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 
    685           pcTexture->incrementTexPartIndex(); ;
    686         }
    687         else if(pcTexture->accessPartInfo(0) == 3) //Nx2N case
    688         {
    689           bTrySplit = false;
    690           bTryNx2N = true;
    691           bTry2NxN = false;
    692           uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 
    693           pcTexture->incrementTexPartIndex(); ;
    694         }
    695       }
    696 #endif
    697 
     631      }
     632#endif
    698633
    699634      // do inter modes, SKIP and 2Nx2N
     
    718653        {
    719654          Bool bResPredFlag  = ( uiResPrdId > 0 );
     655#if LGE_ILLUCOMP_B0045
     656          for(UInt uiICId = 0; uiICId < (bICEnabled ? 2 : 1); uiICId++)
     657          {
     658            Bool bICFlag = (uiICId ? true : false);
     659            rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     660#endif
    720661#endif
    721662#if HHI_INTER_VIEW_RESIDUAL_PRED
     
    740681            }
    741682          }
    742 
     683#if LGE_ILLUCOMP_B0045_ENCSIMP
     684          if(bICFlag && rpcBestCU->getMergeFlag(0) && !rpcBestCU->getICFlag(0))
     685          {
     686             bICEnabled = false;
     687             break;
     688          }
     689#endif
    743690          // 2Nx2N, NxN
    744691          if ( !bEarlySkip )
     
    759706            }
    760707          }
     708#if LGE_ILLUCOMP_B0045
     709         }
     710#endif
    761711#if HHI_INTER_VIEW_RESIDUAL_PRED
    762712        } // uiResPrdId
     
    764714      } // != I_SLICE
    765715
    766 #if OL_DEPTHLIMIT_A0044
    767 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    768       if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    769 #else
    770       if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    771 #endif
     716#if LGE_ILLUCOMP_B0045_ENCSIMP
     717    bICEnabled = rpcBestCU->getICFlag(0);
     718#endif
     719
     720#if OL_QTLIMIT_PREDCODING_B0068
     721      if(depthMapDetect && !bIntraSliceDetect  && sps->getUseQTLPC())
    772722      {
    773723        bTrySplitDQP = bTrySplit;
     
    775725      else
    776726      {
     727#endif
    777728        if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() )
    778729        {
     
    786737          bTrySplitDQP = bTrySplit;
    787738        }
    788       }
    789 #else
    790 
    791       if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() )
    792       {
    793         if(iQP == iBaseQP)
    794         {
    795           bTrySplitDQP = bTrySplit;
    796         }
    797       }
    798       else
    799       {
    800         bTrySplitDQP = bTrySplit;
    801       }
    802 #endif
     739#if OL_QTLIMIT_PREDCODING_B0068
     740      }
     741#endif
     742
    803743#if LOSSLESS_CODING
    804744      if (isAddLowestQP && (iQP == lowestQP))
     
    841781        {
    842782          Bool bResPredFlag  = ( uiResPrdId > 0 );
     783#if LGE_ILLUCOMP_B0045
     784          for(UInt uiICId = 0; uiICId < (bICEnabled ? 2 : 1); uiICId++)
     785          {
     786            Bool bICFlag = (uiICId ? true : false);
     787            rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     788#endif
    843789#endif
    844790          // 2Nx2N, NxN
     
    850796              if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu)
    851797              {
    852 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
    853 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    854                 if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    855 #else
    856                 if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    857 #endif
     798#if OL_QTLIMIT_PREDCODING_B0068 //try InterNxN
     799                if(bTrySplit)
    858800                {
    859                   if (bTrySplit)
    860                   {
    861 #endif
    862 #if HHI_INTER_VIEW_RESIDUAL_PRED
    863                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    864 #endif
    865 #if HHI_INTERVIEW_SKIP
    866                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec   );
    867 #else
    868                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN   );
    869 #endif
    870                     rpcTempCU->initEstData( uiDepth, iQP );
    871 #if OL_DEPTHLIMIT_A0044
    872                   }//bTrySplit
    873                 }//depthMapDetect
    874                 else//do things normally
    875                 {
     801#endif
    876802#if HHI_INTER_VIEW_RESIDUAL_PRED
    877803                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
     
    883809#endif
    884810                  rpcTempCU->initEstData( uiDepth, iQP );
     811#if OL_QTLIMIT_PREDCODING_B0068
    885812                }
    886813#endif
     
    890817
    891818          { // 2NxN, Nx2N
    892 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
    893 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    894             if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    895 #else
    896             if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    897 #endif
     819#if OL_QTLIMIT_PREDCODING_B0068 //try Nx2N
     820            if(bTryNx2N)
    898821            {
    899               if (bTryNx2N)
    900               {
    901 #endif
    902                 if(doNotBlockPu)
    903                 {
    904 #if HHI_INTER_VIEW_RESIDUAL_PRED
    905                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    906 #endif
    907 #if HHI_INTERVIEW_SKIP
    908                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec   );
    909 #else
    910                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N  );
    911 #endif
    912                   rpcTempCU->initEstData( uiDepth, iQP );
    913                   if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N )
    914                   {
    915                     doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    916                   }
    917                 }
    918 #if OL_DEPTHLIMIT_A0044
    919               }//bTryNx2N
    920             }//depthMapDetect
    921             else//do things normally
    922             {
     822#endif
    923823              if(doNotBlockPu)
    924824              {
     
    937837                }
    938838              }
     839#if OL_QTLIMIT_PREDCODING_B0068
    939840            }
    940841#endif
    941842
    942 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
    943 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    944             if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    945 #else
    946             if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    947 #endif
     843#if OL_QTLIMIT_PREDCODING_B0068 //try 2NxN
     844            if(bTry2NxN)
    948845            {
    949               if (bTry2NxN)
    950               {
    951 #endif
    952                 if(doNotBlockPu)
    953                 {
    954 #if HHI_INTER_VIEW_RESIDUAL_PRED
    955                   rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    956 #endif
    957 #if HHI_INTERVIEW_SKIP
    958                   xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec   );
    959 #else
    960                   xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN  );
    961 #endif
    962                   rpcTempCU->initEstData( uiDepth, iQP );
    963                   if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN)
    964                   {
    965                     doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    966                   }
    967                 }
    968 #if OL_DEPTHLIMIT_A0044
    969               }//bTryNx2N
    970             }//depthMapDetect
    971             else//do things normally
    972             {
     846#endif
    973847              if(doNotBlockPu)
    974848              {
     
    987861                }
    988862              }
     863#if OL_QTLIMIT_PREDCODING_B0068
    989864            }
    990865#endif
     
    1009884            if ( bTestAMP_Hor )
    1010885            {
    1011 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
    1012 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    1013               if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    1014 #else
    1015               if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    1016 #endif
     886#if OL_QTLIMIT_PREDCODING_B0068 //try 2NxnU & 2NxnD
     887              if(bTry2NxN)
    1017888              {
    1018                 if (bTry2NxN)
    1019                 {
    1020 #endif
    1021                   if(doNotBlockPu)
    1022                   {
    1023 #if HHI_INTER_VIEW_RESIDUAL_PRED
    1024                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1025 #endif
    1026 #if HHI_INTERVIEW_SKIP
    1027                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec );
    1028 #else
    1029                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
    1030 #endif
    1031                     rpcTempCU->initEstData( uiDepth, iQP );
    1032                     if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU )
    1033                     {
    1034                       doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    1035                     }
    1036                   }
    1037                   if(doNotBlockPu)
    1038                   {
    1039 #if HHI_INTER_VIEW_RESIDUAL_PRED
    1040                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1041 #endif
    1042 #if HHI_INTERVIEW_SKIP
    1043                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec );
    1044 #else
    1045                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
    1046 #endif
    1047                     rpcTempCU->initEstData( uiDepth, iQP );
    1048                     if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD )
    1049                     {
    1050                       doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    1051                     }
    1052                   }
    1053 #if OL_DEPTHLIMIT_A0044
    1054                 }//bTry2NxN
    1055               }//depthMapDetect
    1056               else//do things normally
    1057               {
     889#endif
    1058890                if(doNotBlockPu)
    1059891                {
     
    1088920                  }
    1089921                }
     922#if OL_QTLIMIT_PREDCODING_B0068
    1090923              }
    1091924#endif
     
    1094927            else if ( bTestMergeAMP_Hor )
    1095928            {
    1096 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
    1097 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    1098               if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    1099 #else
    1100               if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    1101 #endif
     929#if OL_QTLIMIT_PREDCODING_B0068 //try 2NxnU & 2NxnD Merge
     930              if(bTry2NxN)
    1102931              {
    1103                 if (bTry2NxN)
    1104                 {
    1105 #endif
    1106                   if(doNotBlockPu)
    1107                   {
    1108 #if HHI_INTER_VIEW_RESIDUAL_PRED
    1109                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1110 #endif
    1111 #if HHI_INTERVIEW_SKIP
    1112                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true );
    1113 #else
    1114                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true );
    1115 #endif
    1116                     rpcTempCU->initEstData( uiDepth, iQP );
    1117                     if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU )
    1118                     {
    1119                       doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    1120                     }
    1121                   }
    1122                   if(doNotBlockPu)
    1123                   {
    1124 #if HHI_INTER_VIEW_RESIDUAL_PRED
    1125                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1126 #endif
    1127 #if HHI_INTERVIEW_SKIP
    1128                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true );
    1129 #else
    1130                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true );
    1131 #endif
    1132                     rpcTempCU->initEstData( uiDepth, iQP );
    1133                     if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD )
    1134                     {
    1135                       doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    1136                     }
    1137                   }
    1138 #if OL_DEPTHLIMIT_A0044
    1139                 }//bTry2NxN
    1140               }//depthMapDetect
    1141               else//do things normally
    1142               {
     932#endif
    1143933                if(doNotBlockPu)
    1144934                {
     
    1173963                  }
    1174964                }
    1175 
     965#if OL_QTLIMIT_PREDCODING_B0068
    1176966              }
    1177967#endif
     
    1182972            if ( bTestAMP_Ver )
    1183973            {
    1184 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
    1185 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    1186               if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    1187 #else
    1188               if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    1189 #endif
     974#if OL_QTLIMIT_PREDCODING_B0068 //try nLx2N & nRx2N
     975              if(bTryNx2N)
    1190976              {
    1191                 if (bTryNx2N)
    1192                 {
    1193 #endif
    1194                   if(doNotBlockPu)
    1195                   {
    1196 #if HHI_INTER_VIEW_RESIDUAL_PRED
    1197                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1198 #endif
    1199 #if HHI_INTERVIEW_SKIP
    1200                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec );
    1201 #else
    1202                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
    1203 #endif
    1204                     rpcTempCU->initEstData( uiDepth, iQP );
    1205                     if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N )
    1206                     {
    1207                       doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    1208                     }
    1209                   }
    1210                   if(doNotBlockPu)
    1211                   {
    1212 #if HHI_INTER_VIEW_RESIDUAL_PRED
    1213                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1214 #endif
    1215 #if HHI_INTERVIEW_SKIP
    1216                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec );
    1217 #else
    1218                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
    1219 #endif
    1220                     rpcTempCU->initEstData( uiDepth, iQP );
    1221                   }
    1222 #if OL_DEPTHLIMIT_A0044
    1223                 }//bTryNx2N
    1224               }//depthMapDetect
    1225               else//do things normally
    1226               {
     977#endif
    1227978                if(doNotBlockPu)
    1228979                {
     
    12531004                  rpcTempCU->initEstData( uiDepth, iQP );
    12541005                }
     1006#if OL_QTLIMIT_PREDCODING_B0068
    12551007              }
    12561008#endif
     
    12591011            else if ( bTestMergeAMP_Ver )
    12601012            {
    1261 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none
    1262 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    1263               if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    1264 #else
    1265               if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    1266 #endif
     1013#if OL_QTLIMIT_PREDCODING_B0068 //try nLx2N & nRx2N (Merge)
     1014              if(bTryNx2N)
    12671015              {
    1268                 if (bTryNx2N)
    1269                 {
    1270 #endif
    1271                   if(doNotBlockPu)
    1272                   {
    1273 #if HHI_INTER_VIEW_RESIDUAL_PRED
    1274                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1275 #endif
    1276 #if HHI_INTERVIEW_SKIP
    1277                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true );
    1278 #else
    1279                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true );
    1280 #endif
    1281                     rpcTempCU->initEstData( uiDepth, iQP );
    1282                     if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N )
    1283                     {
    1284                       doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    1285                     }
    1286                   }
    1287                   if(doNotBlockPu)
    1288                   {
    1289 #if HHI_INTER_VIEW_RESIDUAL_PRED
    1290                     rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    1291 #endif
    1292 #if HHI_INTERVIEW_SKIP
    1293                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true );
    1294 #else
    1295                     xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true );
    1296 #endif
    1297                     rpcTempCU->initEstData( uiDepth, iQP );
    1298                   }
    1299 #if OL_DEPTHLIMIT_A0044
    1300                 }//bTryNx2N
    1301               }//depthMapDetect
    1302               else//do things normally
    1303               {
     1016#endif
    13041017                if(doNotBlockPu)
    13051018                {
     
    13301043                  rpcTempCU->initEstData( uiDepth, iQP );
    13311044                }
     1045#if OL_QTLIMIT_PREDCODING_B0068
    13321046              }
    13331047#endif
     
    13751089#endif
    13761090          } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)
     1091#endif
     1092#if LGE_ILLUCOMP_B0045
     1093         }
    13771094#endif
    13781095#if HHI_INTER_VIEW_RESIDUAL_PRED
     
    14011118#endif
    14021119        {
     1120#if LGE_ILLUCOMP_B0045
     1121          rpcTempCU->setICFlagSubParts(false, 0, 0, uiDepth);
     1122#endif
    14031123          xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
    14041124          rpcTempCU->initEstData( uiDepth, iQP );
    14051125          if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    14061126          {
    1407 #if OL_DEPTHLIMIT_A0044 //add code here to select or deselect NxN mode for Intra
    1408 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART
    1409             if(depthMapDetect && !bIntraSliceDetect  && sps->getUseDPL())
    1410 #else
    1411             if(depthMapDetect  && sps->getUseDPL()) //depth map being encoded
    1412 #endif
     1127#if OL_QTLIMIT_PREDCODING_B0068 //Try IntraNxN
     1128            if(bTrySplit)
    14131129            {
    1414               if (bTrySplit)
    1415               {
    1416 
    1417 #endif
    1418                 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
    1419                 {
    1420                   xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
    1421                   rpcTempCU->initEstData( uiDepth, iQP );
    1422                 }
    1423 #if OL_DEPTHLIMIT_A0044
    1424               }//bTrySplit
    1425             }//depthMapDetect
    1426             else
    1427             {
     1130#endif
    14281131              if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
    14291132              {
     1133#if LGE_ILLUCOMP_B0045
     1134                rpcTempCU->setICFlagSubParts(false, 0, 0, uiDepth);
     1135#endif
    14301136                xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
    14311137                rpcTempCU->initEstData( uiDepth, iQP );
    14321138              }
     1139#if OL_QTLIMIT_PREDCODING_B0068
    14331140            }
    14341141#endif
     
    14511158#endif
    14521159        {
     1160#if LGE_ILLUCOMP_B0045
     1161          rpcTempCU->setICFlagSubParts(false, 0, 0, uiDepth);
     1162#endif
    14531163          xCheckIntraPCM (rpcBestCU, rpcTempCU);
    14541164          rpcTempCU->initEstData( uiDepth, iQP );
     
    16381348
    16391349#if HHI_VSO
    1640 #if HHI_VSO_SET_OPTIM
    1641 #else
    1642           if( m_pcRdCost->getUseRenModel() ) // necessary ??
    1643           {
    1644             UInt  uiWidth     = m_ppcRecoYuvBest[uhNextDepth]->getWidth   (  );
    1645             UInt  uiHeight    = m_ppcRecoYuvBest[uhNextDepth]->getHeight  (   );
    1646             Pel*  piSrc       = m_ppcRecoYuvBest[uhNextDepth]->getLumaAddr( 0 );
    1647             UInt  uiSrcStride = m_ppcRecoYuvBest[uhNextDepth]->getStride  (   );
    1648             m_pcRdCost->setRenModelData( pcSubBestPartCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    1649           }
    1650 #endif
    16511350#endif
    16521351        }
     
    20861785  if( pcCU->isSkipped( uiAbsPartIdx ) )
    20871786  {
    2088 #if OL_DEPTHLIMIT_A0044
    2089     if(pcCU->getPartDumpFlag())
    2090     {
    2091       pcCU->updatePartInfo(0,uiDepth);
    2092       pcCU->incrementPartInfo();
    2093     }
    2094 #endif
    20951787    m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
     1788#if LGE_ILLUCOMP_B0045
     1789    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
     1790#endif
    20961791#if HHI_INTER_VIEW_RESIDUAL_PRED
    20971792    m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );
     
    21221817  // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    21231818  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
     1819#if LGE_ILLUCOMP_B0045
     1820    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
     1821#endif
    21241822#if HHI_INTER_VIEW_RESIDUAL_PRED
    21251823    if( !pcCU->isIntra( uiAbsPartIdx ) )
     
    21651863  Bool  bResPrdAvail  = rpcTempCU->getResPredAvail( 0 );
    21661864  Bool  bResPrdFlag   = rpcTempCU->getResPredFlag ( 0 );
     1865#endif
     1866#if LGE_ILLUCOMP_B0045
     1867  Bool  bICFlag = rpcTempCU->getICFlag(0);
    21671868#endif
    21681869
     
    22401941          rpcTempCU->setResPredFlagSubParts ( bResPrdFlag,  0, 0, uhDepth );
    22411942#endif
     1943#if LGE_ILLUCOMP_B0045
     1944          rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uhDepth);
     1945#endif
    22421946
    22431947          // do MC
    22441948#if HHI_INTERVIEW_SKIP
    2245       if ( (uiNoResidual == 0) || bSkipRes ){
    2246 #else
    2247       if ( uiNoResidual == 0 ){
    2248 #endif
     1949      if ( (uiNoResidual == 0) || bSkipRes )
     1950#else
     1951      if ( uiNoResidual == 0 )
     1952#endif
     1953        {
    22491954            m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
    22501955            // save pred adress
     
    24762181  m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() );
    24772182 
     2183#if RWTH_SDC_DLT_B0036
     2184  if( !rpcTempCU->getSDCFlag( 0 ) )
     2185#endif
    24782186  m_pcPredSearch  ->estIntraPredChromaQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC );
    24792187 
     
    29442652  assert( bRecursiveCall == ( uhDepth != uhTextureModeDepth ) );
    29452653
     2654#if !MTK_UNCONSTRAINED_MVI_B0083
    29462655  if( uhDepth == uhTextureModeDepth )
    29472656  {
     
    29542663    }
    29552664  }
     2665#endif
    29562666
    29572667#if HHI_VSO
     
    30592769    rpcTempCU->setTextureModeDepthSubParts( uhTextureModeDepth, 0, uhDepth );
    30602770    rpcTempCU->copyTextureMotionDataFrom( pcTextureCU, uhDepth, rpcTempCU->getZorderIdxInCU() );
     2771#if FIX_MPI_B0065
     2772    UInt uiAbsPartIdx = rpcTempCU->getZorderIdxInCU();
     2773    if( rpcTempCU->getDepth(0) > pcTextureCU->getDepth(uiAbsPartIdx))
     2774    {
     2775      rpcTempCU->setPartSizeSubParts( SIZE_NxN, 0, uhDepth );
     2776    }
     2777    else
     2778    {
     2779      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     2780      rpcTempCU->setPartSizeSubParts( partSize, 0, uhDepth );
     2781    }
     2782#else
    30612783    rpcTempCU->setPartSizeSubParts( SIZE_NxN, 0, uhDepth );
     2784#endif
    30622785    for( UInt ui = 0; ui < rpcTempCU->getTotalNumPart(); ui++ )
    30632786    {
     
    31522875  {
    31532876    m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true );
     2877#if LGE_ILLUCOMP_B0045
     2878    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
     2879#endif
    31542880  }
    31552881  else
     
    31592885    // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    31602886    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
     2887#if LGE_ILLUCOMP_B0045
     2888    m_pcEntropyCoder->encodeICFlag( pcCU, 0,          true );
     2889#endif
    31612890  }
    31622891  xRestoreDepthWidthHeight( pcCU );
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r77 r189  
    169169}
    170170
     171#if LGE_ILLUCOMP_B0045
     172Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
     173{
     174  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth())
     175  {
     176    return;
     177  }
     178
     179  if(!pcCU->getSlice()->getApplyIC())
     180    return;
     181
     182  if( bRD )
     183  {
     184    uiAbsPartIdx = 0;
     185  }
     186
     187  if(pcCU->isICFlagRequired(uiAbsPartIdx))
     188    m_pcEntropyCoderIf->codeICFlag( pcCU, uiAbsPartIdx );
     189}
     190#endif
     191
    171192Void TEncEntropy::codeFiltCountBit(ALFParam* pAlfParam, Int64* ruiRate)
    172193{
     
    884905#endif
    885906
     907#if !RWTH_SDC_DLT_B0036
    886908  if ( pcCU->getSlice()->isIntra() )
    887909  {
    888910    return;
    889911  }
     912#endif
    890913
    891914  m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx );
     915 
     916#if RWTH_SDC_DLT_B0036
     917  // if B-Slice, code SDC flag later
     918  if( !pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) )
     919  {
     920    // encode SDC flag
     921    encodeSDCFlag(pcCU, uiAbsPartIdx, bRD);
     922  }
     923#endif
    892924}
    893925
     
    934966  }
    935967#endif 
     968#if RWTH_SDC_DLT_B0036
     969  if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx)  )
     970  {
     971    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     972    return;
     973  }
     974#endif
     975 
    936976  m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );
     977 
     978#if RWTH_SDC_DLT_B0036
     979  // code SDC flag now!
     980  if( pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->isDepth() )
     981  {
     982    // encode SDC flag
     983    encodeSDCFlag(pcCU, uiAbsPartIdx, bRD);
     984   
     985    if( pcCU->getSDCFlag(uiAbsPartIdx) )
     986    {
     987      // part size is also known for SDC intra
     988      assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     989    }
     990  }
     991#endif
    937992}
    938993
     
    9511006    return;
    9521007  }
     1008 
     1009#if RWTH_SDC_DLT_B0036
     1010  if( pcCU->getSDCFlag(uiAbsPartIdx) )
     1011  {
     1012    return;
     1013  }
     1014#endif
    9531015 
    9541016  if( bRD )
     
    12861348  }
    12871349 
     1350#if RWTH_SDC_DLT_B0036
     1351  if( pcCU->getSDCFlag(uiAbsPartIdx) )
     1352  {
     1353    encodeSDCPredMode(pcCU, uiAbsPartIdx, bRD);
     1354    return;
     1355  }
     1356#endif
     1357 
    12881358  PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx );
    12891359 
     
    16161686  pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode );
    16171687 
     1688#if RWTH_SDC_DLT_B0036
     1689  if( pcCU->getSDCFlag( uiAbsPartIdx ) )
     1690  {
     1691    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     1692    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
     1693    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     1694    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     1695    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     1696   
     1697    encodeSDCResidualData(pcCU, uiAbsPartIdx);
     1698    return;
     1699  }
     1700#endif
     1701 
    16181702  if( pcCU->isIntra(uiAbsPartIdx) )
    16191703  {
     
    16561740  }
    16571741 
     1742#if FIX_MPI_B0065
     1743  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 )
     1744  {
     1745    TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
     1746    if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx))
     1747    {
     1748      PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx);
     1749      pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth );
     1750    }
     1751    else
     1752    {
     1753      pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth );
     1754    }
     1755  }
     1756#endif
     1757
    16581758#if UNIFIED_TRANSFORM_TREE
    16591759  UInt temp = 0;
     
    16641764  xEncodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );
    16651765#endif // UNIFIED_TRANSFORM_TREE
     1766
     1767#if FIX_MPI_B0065
     1768  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N &&  pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 )
     1769  {
     1770    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 
     1771  }
     1772#endif
    16661773}
    16671774
     
    19882095}
    19892096
     2097#if RWTH_SDC_DLT_B0036
     2098Void TEncEntropy::encodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
     2099{
     2100  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2101 
     2102  if( bRD )
     2103    uiAbsPartIdx = 0;
     2104 
     2105  m_pcEntropyCoderIf->codeSDCPredMode(pcCU, uiAbsPartIdx);
     2106}
     2107
     2108Void TEncEntropy::encodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
     2109{
     2110  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2111 
     2112  if( bRD )
     2113    uiAbsPartIdx = 0;
     2114 
     2115  m_pcEntropyCoderIf->codeSDCFlag(pcCU, uiAbsPartIdx);
     2116}
     2117
     2118Void TEncEntropy::encodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
     2119{
     2120  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2121  assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     2122  assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     2123  assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     2124  assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
     2125 
     2126  if( bRD )
     2127    uiAbsPartIdx = 0;
     2128 
     2129  // number of segments depends on prediction mode for INTRA
     2130  UInt uiNumSegments = 2;
     2131  UInt uiLumaPredMode = pcCU->getLumaIntraDir( uiAbsPartIdx );
     2132  if( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX )
     2133    uiNumSegments = 1;
     2134 
     2135  // encode residual data for each segment
     2136  for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ )
     2137    m_pcEntropyCoderIf->codeSDCResidualData(pcCU, uiAbsPartIdx, uiSeg);
     2138}
     2139#endif
     2140
    19902141//! \}
  • trunk/source/Lib/TLibEncoder/TEncEntropy.h

    r100 r189  
    115115 
    116116  virtual Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     117#if LGE_ILLUCOMP_B0045
     118  virtual Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     119#endif
    117120  virtual Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    118121  virtual Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     
    124127  virtual Void codePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    125128  virtual Void codePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     129 
     130#if RWTH_SDC_DLT_B0036
     131  virtual Void codeSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     132  virtual Void codeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0;
     133  virtual Void codeSDCPredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     134#endif
    126135 
    127136#if BURST_IPCM
     
    250259 
    251260  Void encodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
     261#if LGE_ILLUCOMP_B0045
     262  Void encodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
     263#endif
    252264  Void encodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    253265  Void encodePUWise       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
     
    296308  Void encodeScalingList       ( TComScalingList* scalingList );
    297309  Void encodeDFParams          (TComAPS* pcAPS);
     310 
     311#if RWTH_SDC_DLT_B0036
     312  Void encodeSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
     313  Void encodeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
     314  Void encodeSDCPredMode   ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
     315#endif
    298316
    299317private:
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r120 r189  
    449449#endif
    450450
    451 #if HHI_VSO_SPEEDUP_A0033
    452 #else
    453     if ( iVSOMode == 4 )
    454     {
    455       m_pcEncTop->getEncTop()->setupRenModel( pcSlice->getPOC(), pcSlice->getViewId(), m_pcEncTop->isDepthCoder() ? 1 : 0 );
    456     }
    457     else
    458     {
    459       AOT(true);
    460     }
    461 #endif
    462451
    463452#if SAIT_VSO_EST_A0033
     
    708697      // init view component and predict virtual depth map
    709698      m_pcDepthMapGenerator->initViewComponent( pcPic );
    710 #if !QC_MULTI_DIS_CAN
     699#if !QC_MULTI_DIS_CAN_A0097
    711700      m_pcDepthMapGenerator->predictDepthMap  ( pcPic );
    712701#endif
     
    719708#endif
    720709
     710#if QC_SIMPLE_NBDV_B0047
     711      if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode())
     712      {
     713        Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx());
     714        pcPic->setRapbCheck(pcPic->getDisCandRefPictures(iColPoc));
     715      }
     716#endif
    721717      while(uiNextCUAddr<uiRealEndAddress) // determine slice boundaries
    722718      {
     
    777773#endif
    778774#if DEPTH_MAP_GENERATION
    779 #if !QC_MULTI_DIS_CAN
     775#if !QC_MULTI_DIS_CAN_A0097
    780776      // update virtual depth map
    781777      m_pcDepthMapGenerator->updateDepthMap( pcPic );
     
    11371133        if (!bEntropySlice)
    11381134        {
    1139 #if OL_DEPTHLIMIT_A0044 //start dumping partition information
    1140           m_pcSliceEncoder->setPartDumpFlag(1);
    1141 #endif
    11421135          pcSlice->setTileLocationCount ( 0 );
    11431136          m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info.
    1144 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information
    1145           m_pcSliceEncoder->setPartDumpFlag(0);
    1146 #endif
    11471137        }
    11481138        else
    11491139        {
    1150 #if OL_DEPTHLIMIT_A0044 //start dumping partition information
    1151           m_pcSliceEncoder->setPartDumpFlag(1);
    1152 #endif
    11531140          m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info.
    1154 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information
    1155           m_pcSliceEncoder->setPartDumpFlag(0);
    1156 #endif
    11571141        }
    11581142
  • trunk/source/Lib/TLibEncoder/TEncGOP.h

    r101 r189  
    137137 
    138138  Void  preLoopFilterPicAll  ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits );
    139 #if HHI_VSO_SPEEDUP_A0033
    140139  TEncTop* getEncTop() { return m_pcEncTop; }
    141 #endif
    142140 
    143141  TEncSlice*  getSliceEncoder()   { return m_pcSliceEncoder; }
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r116 r189  
    4242#include <algorithm>
    4343
     44#if RWTH_SDC_DLT_B0036
     45#define GetNumDepthValues()     (pcCU->getSlice()->getSPS()->getNumDepthValues())
     46#define GetBitsPerDepthValue()  (pcCU->getSlice()->getSPS()->getBitsPerDepthValue())
     47#endif
     48
    4449//! \ingroup TLibEncoder
    4550//! \{
     
    6065, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    6166, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     67#if LGE_ILLUCOMP_B0045
     68, m_cCUICFlagSCModel          ( 1,             1,               NUM_IC_FLAG_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
     69#endif
    6270, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
    6371, m_cCUMergeIdxExtSCModel     ( 1,             1,               NUM_MERGE_IDX_EXT_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
     
    106114, m_cDmmDataSCModel           ( 1,             1,               NUM_DMM_DATA_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    107115#endif
    108 #if LGE_EDGE_INTRA
     116#if LGE_EDGE_INTRA_A0070
    109117, m_cEdgeIntraSCModel         ( 1,             1,               NUM_EDGE_INTRA_CTX            , m_contextModels + m_numContextModels, m_numContextModels)
    110118#if LGE_EDGE_INTRA_DELTA_DC
     
    112120#endif
    113121#endif
     122#if RWTH_SDC_DLT_B0036
     123, m_cSDCFlagSCModel             ( 1,             1,                 SDC_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
     124, m_cSDCResidualFlagSCModel     ( 1,             2,  SDC_NUM_RESIDUAL_FLAG_CTX  , m_contextModels + m_numContextModels, m_numContextModels)
     125, m_cSDCResidualSignFlagSCModel ( 1,             2,  SDC_NUM_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     126, m_cSDCResidualSCModel         ( 1,             2,  SDC_NUM_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
     127, m_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
     128#endif
    114129{
    115130  assert( m_numContextModels <= MAX_NUM_CTX_MOD );
     
    141156 
    142157  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     158#if LGE_ILLUCOMP_B0045
     159  m_cCUICFlagSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );
     160#endif
    143161  m_cCUAlfCtrlFlagSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_ALF_CTRL_FLAG );
    144162  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT);
     
    187205  m_cDmmDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_DATA );
    188206#endif
    189 #if LGE_EDGE_INTRA
     207#if LGE_EDGE_INTRA_A0070
    190208  m_cEdgeIntraSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_EDGE_INTRA );
    191209#if LGE_EDGE_INTRA_DELTA_DC
    192210  m_cEdgeIntraDeltaDCSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_EDGE_INTRA_DELTA_DC );
    193211#endif
     212#endif
     213#if RWTH_SDC_DLT_B0036
     214  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
     215  m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
     216  m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
     217  m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
     218  m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
    194219#endif
    195220
     
    224249      curCost  = m_cCUSplitFlagSCModel.calcCost       ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    225250      curCost += m_cCUSkipFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG );
     251#if LGE_ILLUCOMP_B0045
     252      curCost += m_cCUICFlagSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_IC_FLAG );
     253#endif
    226254      curCost += m_cCUAlfCtrlFlagSCModel.calcCost     ( curSliceType, qp, (UChar*)INIT_ALF_CTRL_FLAG );
    227255      curCost += m_cCUMergeFlagExtSCModel.calcCost    ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT);
     
    279307  } 
    280308
    281   #if CABAC_INIT_FLAG && POZNAN_CABAC_INIT_FLAG_FIX
     309  #if CABAC_INIT_FLAG && FIX_POZNAN_CABAC_INIT_FLAG
    282310    m_pcSlice->getPPS()->setEncPrevPOC( m_pcSlice->getPOC() );
    283311  #endif
     
    295323 
    296324  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     325#if LGE_ILLUCOMP_B0045
     326  m_cCUICFlagSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );
     327#endif
    297328  m_cCUAlfCtrlFlagSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_ALF_CTRL_FLAG );
    298329  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT);
     
    341372  m_cDmmDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_DATA );
    342373#endif
     374#if RWTH_SDC_DLT_B0036
     375  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
     376  m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
     377  m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
     378  m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
     379  m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
     380#endif
    343381 
    344382  m_pcBinIf->start();
     
    580618{
    581619  PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
    582 #if OL_DEPTHLIMIT_A0044
    583   UInt uiSymbol;
    584 #endif
     620
     621#if OL_QTLIMIT_PREDCODING_B0068
     622  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
     623  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
     624  Bool bDepthMapDetect   = (pcTexture != NULL);
     625  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
     626 
     627  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
     628  {
     629    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     630    UInt uiCUIdx            = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();
     631    assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth);
     632    if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) != SIZE_NxN)
     633    {
     634      assert( eSize == SIZE_2Nx2N );
     635      return;
     636    }
     637  }
     638#endif
     639
    585640  if ( pcCU->isIntra( uiAbsPartIdx ) )
    586641  {
     
    588643    {
    589644      m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) );
    590 #if OL_DEPTHLIMIT_A0044
    591       if(pcCU->getPartDumpFlag())
    592       {
    593         uiSymbol = (UInt)(eSize == SIZE_2Nx2N? 1 : 0);
    594         pcCU->updatePartInfo(uiSymbol?0:1,uiDepth); //0 for 2Nx2N and 1 for NxN
    595         pcCU->incrementPartInfo();
    596       }
    597 #endif
    598     }
    599 #if OL_DEPTHLIMIT_A0044
    600     if(pcCU->getPartDumpFlag() && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth && !pcCU->getSlice()->isIntra())
    601     {
    602       pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N and 1 for NxN
    603       pcCU->incrementPartInfo();
    604     }
    605 #endif
     645    }
    606646    return;
    607647  }
     
    612652    {
    613653      m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) );
    614 #if OL_DEPTHLIMIT_A0044
    615       if(pcCU->getPartDumpFlag())
    616       {
    617         pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N
    618         pcCU->incrementPartInfo();
    619       }
    620 #endif
    621654      break;
    622655    }
     
    648681        }
    649682      }
    650 #if OL_DEPTHLIMIT_A0044
    651       if(pcCU->getPartDumpFlag())
    652       {
    653         pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN
    654         pcCU->incrementPartInfo();
    655       }
    656 #endif
    657683      break;
    658684    }
     
    688714        }
    689715      }
    690 #if OL_DEPTHLIMIT_A0044
    691       if(pcCU->getPartDumpFlag())
    692       {
    693         pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N
    694         pcCU->incrementPartInfo();
    695       }
    696 #endif
    697716      break;
    698717    }
     
    704723        m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) );
    705724        m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) );
    706 #if OL_DEPTHLIMIT_A0044
    707         if(pcCU->getPartDumpFlag())
    708         {
    709           pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter
    710           pcCU->incrementPartInfo();         
    711         }
    712 #endif
    713       }
    714       else
    715       {
    716 #if OL_DEPTHLIMIT_A0044
    717         if(pcCU->getPartDumpFlag())
    718         {
    719           pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter
    720           pcCU->incrementPartInfo();
    721         }
    722 #endif
    723725      }
    724726      break;
     
    738740Void TEncSbac::codePredMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
    739741{
     742#if RWTH_SDC_DLT_B0036
     743  if ( pcCU->getSlice()->isIntra() )
     744  {
     745    assert( pcCU->isIntra(uiAbsPartIdx) );
     746    return;
     747  }
     748#endif
     749 
    740750  // get context function is here
    741751  Int iPredMode = pcCU->getPredictionMode( uiAbsPartIdx );
     
    786796}
    787797
     798#if LGE_ILLUCOMP_B0045
     799/** code Illumination Compensation flag
     800 * \param pcCU
     801 * \param uiAbsPartIdx
     802 * \returns Void
     803 */
     804Void TEncSbac::codeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
     805{
     806  // get context function is here
     807  UInt uiSymbol = pcCU->getICFlag( uiAbsPartIdx ) ? 1 : 0;
     808  UInt uiCtxIC  = pcCU->getCtxICFlag( uiAbsPartIdx ) ;
     809  m_pcBinIf->encodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );
     810  DTRACE_CABAC_VL( g_nSymbolCounter++ );
     811  DTRACE_CABAC_T( "\tICFlag" );
     812  DTRACE_CABAC_T( "\tuiCtxIC: ");
     813  DTRACE_CABAC_V( uiCtxIC );
     814  DTRACE_CABAC_T( "\tuiSymbol: ");
     815  DTRACE_CABAC_V( uiSymbol );
     816  DTRACE_CABAC_T( "\n");
     817}
     818#endif
     819
    788820/** code merge flag
    789821 * \param pcCU
     
    883915 
    884916  assert( uiCtx < 3 );
     917
     918#if OL_QTLIMIT_PREDCODING_B0068
     919  Bool bCodeSplitFlag    = true;
     920
     921  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
     922  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
     923  Bool bDepthMapDetect   = (pcTexture != NULL);
     924  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
     925
     926  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
     927  {
     928    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     929    UInt uiCUIdx            = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();
     930    assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth);
     931    bCodeSplitFlag          = (pcTextureCU->getDepth(uiCUIdx) > uiDepth);
     932  }
     933
     934  if(!bCodeSplitFlag)
     935  {
     936    assert(uiCurrSplitFlag == 0);
     937    return;
     938  }
     939#endif
     940
    885941  m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) );
    886 #if OL_DEPTHLIMIT_A0044
    887   if(pcCU->getPartDumpFlag())
    888   {
    889     if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0))
    890     {
    891       pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth);
    892       pcCU->incrementPartInfo();
    893     }
    894   }
    895 #endif
    896942  DTRACE_CABAC_VL( g_nSymbolCounter++ )
    897943  DTRACE_CABAC_T( "\tSplitFlag\n" )
     
    911957}
    912958
    913 #if LGE_EDGE_INTRA
     959#if LGE_EDGE_INTRA_A0070
    914960Void TEncSbac::xCodeEdgeIntraInfo( TComDataCU* pcCU, UInt uiPartIdx )
    915961{
     
    9921038  if( pcCU->getSlice()->getSPS()->getUseDMM() && pcCU->getWidth( uiAbsPartIdx ) <= DMM_WEDGEMODEL_MAX_SIZE )
    9931039  {
    994 #if LGE_EDGE_INTRA
     1040#if LGE_EDGE_INTRA_A0070
    9951041    m_pcBinIf->encodeBin( uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX, m_cDmmFlagSCModel.get(0, 0, 0) );
    9961042#else
     
    9981044#endif
    9991045  }
    1000 #if LGE_EDGE_INTRA
     1046#if LGE_EDGE_INTRA_A0070
    10011047  if( uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX )
    10021048#else
     
    10351081  }
    10361082  else
    1037 #if LGE_EDGE_INTRA
     1083#if LGE_EDGE_INTRA_A0070
    10381084    if ( uiDir >= EDGE_INTRA_IDX)
    10391085    {
     
    10701116  Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx);
    10711117#endif
    1072 #if LGE_EDGE_INTRA
     1118#if LGE_EDGE_INTRA_A0070
    10731119  Bool bCodeEdgeIntra = false;
    10741120  if( pcCU->getSlice()->getSPS()->isDepth() )
     
    11361182#if LOGI_INTRA_NAME_3MPM
    11371183    m_pcBinIf->encodeBinsEP( uiDir, 5 );
    1138 #if LGE_EDGE_INTRA
     1184#if LGE_EDGE_INTRA_A0070
    11391185  if (bCodeEdgeIntra)
    11401186    if (uiDir == 31) m_pcBinIf->encodeBinsEP(0,1);
     
    24782524}
    24792525
    2480 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA && LGE_EDGE_INTRA_DELTA_DC)
     2526#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC)
    24812527Void TEncSbac::xWriteExGolombLevel( UInt uiSymbol, ContextModel& rcSCModel  )
    24822528{
     
    26442690}
    26452691#endif
     2692
     2693#if RWTH_SDC_DLT_B0036
     2694Void TEncSbac::codeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
     2695{
     2696  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2697  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     2698  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     2699 
     2700  UInt uiPredMode     = pcCU->getLumaIntraDir(uiAbsPartIdx);
     2701  UInt uiCtx          = 0;
     2702 
     2703  UInt uiMPModeIdx    = 0;
     2704 
     2705  for(Int i=0; i<RWTH_SDC_NUM_PRED_MODES-1; i++)
     2706  {
     2707    UInt uiBit = (uiPredMode == g_auiSDCPredModes[uiMPModeIdx]) ? 1 : 0;
     2708    m_pcBinIf->encodeBin( uiBit, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) );
     2709   
     2710    // if mode is most probable mode, we are done here
     2711    if ( uiBit == 1 )
     2712      break;
     2713   
     2714    // else: get next most probable pred mode
     2715    uiMPModeIdx = (uiMPModeIdx+1)%RWTH_SDC_NUM_PRED_MODES;
     2716  }
     2717 
     2718#if HHI_DMM_WEDGE_INTRA
     2719  if( uiPredMode == DMM_WEDGE_FULL_IDX )          { xCodeWedgeFullInfo          ( pcCU, uiAbsPartIdx ); }
     2720  if( uiPredMode == DMM_WEDGE_PREDDIR_IDX )       { xCodeWedgePredDirInfo       ( pcCU, uiAbsPartIdx ); }
     2721#endif
     2722 
     2723  AOF(uiPredMode == g_auiSDCPredModes[uiMPModeIdx]);
     2724}
     2725
     2726Void TEncSbac::codeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
     2727{
     2728  // get context function is here
     2729  UInt uiSymbol = pcCU->getSDCFlag( uiAbsPartIdx ) ? 1 : 0;
     2730  UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx );
     2731  m_pcBinIf->encodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
     2732 
     2733}
     2734
     2735Void TEncSbac::codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
     2736{
     2737  assert( pcCU->getSlice()->getSPS()->isDepth() );
     2738  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     2739  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
     2740  assert( uiSegment < 2 );
     2741 
     2742  Pel segmentDCOffset = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);
     2743 
     2744  UInt uiResidual = segmentDCOffset == 0 ? 0 : 1;
     2745  UInt uiSign     = segmentDCOffset < 0 ? 1 : 0;
     2746  UInt uiAbsIdx   = abs(segmentDCOffset);
     2747  UInt uiBit = 0;
     2748 
     2749  UInt uiMaxResidualBits  = GetBitsPerDepthValue();
     2750  assert( uiMaxResidualBits <= g_uiBitDepth );
     2751 
     2752  // residual flag
     2753  m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection
     2754 
     2755  if (uiResidual)
     2756  {
     2757    // encode sign bit of residual
     2758    m_pcBinIf->encodeBin( uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection
     2759       
     2760    assert(uiAbsIdx < GetNumDepthValues());
     2761   
     2762    // encode residual magnitude
     2763    uiAbsIdx -= 1;
     2764    for (Int i=0; i<uiMaxResidualBits; i++)
     2765    {
     2766      uiBit = (uiAbsIdx & (1<<i))>>i;
     2767     
     2768      m_pcBinIf->encodeBin( uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) ); //TODO depthmap: more sophisticated context selection
     2769    }
     2770   
     2771  }
     2772}
     2773#endif
    26462774//! \}
  • trunk/source/Lib/TLibEncoder/TEncSbac.h

    r100 r189  
    145145#endif
    146146  Void  codeScalingList      ( TComScalingList* scalingList     ){ assert (0);  return;};
     147 
     148#if RWTH_SDC_DLT_B0036
     149  Void codeSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     150  Void codeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
     151  Void codeSDCPredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     152#endif
    147153
    148154private:
     
    175181  Void  xCodeContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx );
    176182#endif
    177 #if LGE_EDGE_INTRA
     183#if LGE_EDGE_INTRA_A0070
    178184  Void  xCodeEdgeIntraInfo( TComDataCU* pcCU, UInt uiPartIdx );
    179185#endif
     
    202208  Void codeAlfCtrlFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    203209  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     210#if LGE_ILLUCOMP_B0045
     211  Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     212#endif
    204213  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    205214  Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     
    260269  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    261270  ContextModel3DBuffer m_cCUSkipFlagSCModel;
     271#if LGE_ILLUCOMP_B0045
     272  ContextModel3DBuffer m_cCUICFlagSCModel;
     273#endif
    262274  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    263275  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
     
    310322  ContextModel3DBuffer m_cDmmDataSCModel;
    311323#endif
    312 #if LGE_EDGE_INTRA
     324#if LGE_EDGE_INTRA_A0070
    313325  ContextModel3DBuffer m_cEdgeIntraSCModel;
    314326#if LGE_EDGE_INTRA_DELTA_DC
     
    316328#endif
    317329#endif
     330 
     331#if RWTH_SDC_DLT_B0036
     332  ContextModel3DBuffer m_cSDCFlagSCModel;
     333 
     334  ContextModel3DBuffer m_cSDCResidualFlagSCModel;
     335  ContextModel3DBuffer m_cSDCResidualSignFlagSCModel;
     336  ContextModel3DBuffer m_cSDCResidualSCModel;
     337 
     338  ContextModel3DBuffer m_cSDCPredModeSCModel;
     339#endif
    318340};
    319341
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r125 r189  
    4242#include <math.h>
    4343
     44#if RWTH_SDC_DLT_B0036
     45#define GetDepthValue2Idx(val)     (pcCU->getSlice()->getSPS()->depthValue2idx(val))
     46#define GetIdx2DepthValue(val)     (pcCU->getSlice()->getSPS()->idx2DepthValue(val))
     47#endif
     48
    4449//! \ingroup TLibEncoder
    4550//! \{
     
    195200  const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS + 1;
    196201  for( Int iNum = 0; iNum < iNumAMVPCands+1; iNum++)
    197   {
    198202    for( Int iIdx = 0; iIdx < iNumAMVPCands; iIdx++)
    199203#else
    200204  for( Int iNum = 0; iNum < AMVP_MAX_NUM_CANDS+1; iNum++)
    201   {
    202205    for( Int iIdx = 0; iIdx < AMVP_MAX_NUM_CANDS; iIdx++)
    203206#endif
     
    208211        m_auiMVPIdxCost[iIdx][iNum] = MAX_INT;
    209212    }
    210   }
    211213 
    212214  initTempBuff();
     
    300302
    301303  // distortion
     304#if LGE_ILLUCOMP_B0045
     305  m_cDistParam.bUseIC = pcPatternKey->getICFlag();
     306#endif
    302307  uiSad = m_cDistParam.DistFunc( &m_cDistParam );
    303308 
     
    717722
    718723    m_cDistParam.pCur = piRefPos;
     724#if LGE_ILLUCOMP_B0045
     725    m_cDistParam.bUseIC = pcPatternKey->getICFlag();
     726#endif
    719727    uiDist = m_cDistParam.DistFunc( &m_cDistParam );
    720728    uiDist += m_pcRdCost->getCost( cMvTest.getHor(), cMvTest.getVer() );
     
    957965                                TComYuv*    pcResiYuv,
    958966                                Dist&       ruiDist
    959 #if LG_ZEROINTRADEPTHRESI_M26039
     967#if LG_ZEROINTRADEPTHRESI_A0087
    960968                                ,Bool        bZeroResi
    961969#endif
     
    9921000  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    9931001 
    994 #if LGE_EDGE_INTRA
     1002#if LGE_EDGE_INTRA_A0070
    9951003  if( uiLumaPredMode >= EDGE_INTRA_IDX )
    9961004  {
     
    10401048    }
    10411049  }
    1042 #if LG_ZEROINTRADEPTHRESI_M26039
     1050#if LG_ZEROINTRADEPTHRESI_A0087
    10431051  if(bZeroResi)
    10441052  {
     
    13571365#endif
    13581366                                Double&      dRDCost
    1359 #if LG_ZEROINTRADEPTHRESI_M26039
     1367#if LG_ZEROINTRADEPTHRESI_A0087
    13601368                               ,Bool         bZeroResi
    13611369#endif
     
    13791387  }
    13801388#endif
    1381 #if LGE_EDGE_INTRA
     1389#if LGE_EDGE_INTRA_A0070
    13821390  if( pcCU->getLumaIntraDir( uiAbsPartIdx ) >= EDGE_INTRA_IDX )
    13831391  {
     
    14011409    //----- code luma block with given intra prediction mode and store Cbf-----
    14021410    dSingleCost   = 0.0;
    1403 #if LG_ZEROINTRADEPTHRESI_M26039
     1411#if LG_ZEROINTRADEPTHRESI_A0087
    14041412    xIntraCodingLumaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcOrgYuv, pcPredYuv, pcResiYuv, uiSingleDistY, bZeroResi );
    14051413#else
     
    15931601}
    15941602
     1603#if RWTH_SDC_DLT_B0036
     1604Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bResidual )
     1605{
     1606  UInt    uiLumaPredMode    = pcCU     ->getLumaIntraDir( uiAbsPartIdx );
     1607  UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
     1608  UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
     1609  UInt    uiStride          = pcOrgYuv ->getStride  ();
     1610  Pel*    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
     1611  Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1612  Pel*    piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1613 
     1614  UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
     1615  Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     1616  UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
     1617 
     1618  AOF( uiWidth == uiHeight );
     1619  AOF( uiAbsPartIdx == 0 );
     1620  AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
     1621  AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
     1622 
     1623  //===== init availability pattern =====
     1624  Bool  bAboveAvail = false;
     1625  Bool  bLeftAvail  = false;
     1626  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
     1627  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
     1628 
     1629  //===== get prediction signal =====
     1630#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1631  if( uiLumaPredMode >= NUM_INTRA_MODE )
     1632  {
     1633    predIntraLumaDMM( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail, true );
     1634  }
     1635  else
     1636  {
     1637#endif
     1638    predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail );
     1639#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1640  }
     1641#endif
     1642 
     1643  // number of segments depends on prediction mode
     1644  UInt uiNumSegments = 1; 
     1645  Bool* pbMask = NULL;
     1646  UInt uiMaskStride = 0;
     1647 
     1648  if( uiLumaPredMode == DMM_WEDGE_FULL_IDX || uiLumaPredMode == DMM_WEDGE_PREDDIR_IDX )
     1649  {
     1650    Int uiTabIdx = (uiLumaPredMode == DMM_WEDGE_FULL_IDX)?pcCU->getWedgeFullTabIdx(uiAbsPartIdx):pcCU->getWedgePredDirTabIdx(uiAbsPartIdx);
     1651   
     1652    WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
     1653    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
     1654   
     1655    uiNumSegments = 2;
     1656    pbMask = pcWedgelet->getPattern();
     1657    uiMaskStride = pcWedgelet->getStride();
     1658  }
     1659 
     1660  // get DC prediction for each segment
     1661  Pel apDCPredValues[2];
     1662  xAnalyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride );
     1663 
     1664  // get original DC for each segment
     1665  Pel apDCOrigValues[2];
     1666  xAnalyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride );
     1667 
     1668  for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
     1669  {
     1670    // remap reconstructed value to valid depth values
     1671    Pel pDCRec = bResidual?apDCOrigValues[uiSegment]:apDCPredValues[uiSegment];
     1672   
     1673    // get residual (idx)
     1674    Pel pResidualIdx = GetDepthValue2Idx( pDCRec ) - GetDepthValue2Idx( apDCPredValues[uiSegment] );
     1675   
     1676    // save SDC DC offset
     1677    pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx);
     1678  }
     1679 
     1680  // reconstruct residual based on mask + DC residuals
     1681  Pel apDCResiValues[2];
     1682  Pel apDCRecoValues[2];
     1683  for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
     1684  {
     1685    Pel   pPredIdx    = GetDepthValue2Idx( apDCPredValues[uiSegment] );
     1686    Pel   pResiIdx    = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);
     1687    Pel   pRecoValue  = GetIdx2DepthValue( pPredIdx + pResiIdx );
     1688   
     1689    apDCRecoValues[uiSegment]  = pRecoValue;
     1690    apDCResiValues[uiSegment]  = pRecoValue - apDCPredValues[uiSegment];
     1691  }
     1692 
     1693  //===== reconstruction =====
     1694  Bool* pMask     = pbMask;
     1695  Pel* pPred      = piPred;
     1696  Pel* pReco      = piReco;
     1697  Pel* pRecIPred  = piRecIPred;
     1698 
     1699  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     1700  {
     1701    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     1702    {
     1703      UChar ucSegment = pMask?(UChar)pMask[uiX]:0;
     1704      assert( ucSegment < uiNumSegments );
     1705     
     1706      Pel pPredVal= apDCPredValues[ucSegment];
     1707      Pel pResiDC = apDCResiValues[ucSegment];
     1708     
     1709      pReco    [ uiX ] = Clip( pPredVal + pResiDC );
     1710      pRecIPred[ uiX ] = pReco[ uiX ];
     1711    }
     1712    pPred     += uiStride;
     1713    pReco     += uiStride;
     1714    pRecIPred += uiRecIPredStride;
     1715    pMask     += uiMaskStride;
     1716  }
     1717 
     1718  // clear UV
     1719  UInt  uiStrideC     = pcPredYuv->getCStride();
     1720  Pel   *pRecCb       = pcPredYuv->getCbAddr();
     1721  Pel   *pRecCr       = pcPredYuv->getCrAddr();
     1722 
     1723  for (Int y=0; y<uiHeight/2; y++)
     1724  {
     1725    for (Int x=0; x<uiWidth/2; x++)
     1726    {
     1727      pRecCb[x] = (Pel)(128<<g_uiBitIncrement);
     1728      pRecCr[x] = (Pel)(128<<g_uiBitIncrement);
     1729    }
     1730   
     1731    pRecCb += uiStrideC;
     1732    pRecCr += uiStrideC;
     1733  }
     1734 
     1735  //===== determine distortion =====
     1736#if HHI_VSO
     1737  if ( m_pcRdCost->getUseVSO() )
     1738  {
     1739    ruiDist = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
     1740  }
     1741  else
     1742#endif
     1743  {
     1744    ruiDist = m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
     1745  }
     1746 
     1747  //----- determine rate and r-d cost -----
     1748  m_pcEntropyCoder->resetBits();
     1749
     1750  // encode reduced intra header
     1751  m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true );
     1752  m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
     1753 
     1754  // encode pred direction + residual data
     1755  m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
     1756 
     1757  UInt   uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
     1758 
     1759#if HHI_VSO
     1760  if ( m_pcRdCost->getUseLambdaScaleVSO())
     1761  {
     1762    dRDCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist );
     1763  }
     1764  else
     1765#endif
     1766  {
     1767    dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist );
     1768  }
     1769}
     1770#endif
    15951771
    15961772Void
     
    18302006  UInt    uiQNumParts    = pcCU->getTotalNumPart() >> 2;
    18312007  UInt    uiWidthBit     = pcCU->getIntraSizeIdx(0);
     2008#if FIX_RDO_NEGDIST
     2009  Dist    uiOverallDistY = 0;
     2010  Dist    uiOverallDistC = 0;
     2011#else
    18322012  UInt    uiOverallDistY = 0;
    18332013  UInt    uiOverallDistC = 0;
     2014#endif
    18342015  UInt    CandNum;
    18352016  Double  CandCostList[ FAST_UDI_MAX_RDMODE_NUM ];
     
    18672048    Int numModesForFullRD = g_aucIntraModeNumFast[ uiWidthBit ];
    18682049   
    1869 #if LGE_EDGE_INTRA
     2050#if LGE_EDGE_INTRA_A0070
    18702051  Bool bTestEdgeIntra = false;
    18712052  if ( m_pcEncCfg->isDepthCoder() && uiWidth >= LGE_EDGE_INTRA_MIN_SIZE && uiWidth <= LGE_EDGE_INTRA_MAX_SIZE && uiWidth == uiHeight )
     
    19182099            if ( m_pcRdCost->getUseWVSO() )
    19192100            {   
    1920               Int iDWeight = m_pcRdCost->getDWeight();
    1921               Int iVSDWeight = m_pcRdCost->getVSDWeight();
     2101              Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     2102              Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
    19222103              Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
    19232104              uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight);
     
    19332114            if ( m_pcRdCost->getUseWVSO() )
    19342115            {   
    1935               Int iDWeight = m_pcRdCost->getDWeight()*m_pcRdCost->getDWeight();
    1936               Int iVSDWeight = m_pcRdCost->getVSOWeight()*m_pcRdCost->getVSOWeight();
    1937               Dist iD = (Dist) m_pcRdCost->getDistPart( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
    1938               uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight);
     2116              Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     2117              Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getDWeight();
     2118              Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
     2119              uiSad = (Dist) (iDWeight * iD + iVSOWeight * uiSad) / (iDWeight + iVSOWeight);
    19392120            }
    19402121#endif
     
    19682149        CandNum += xUpdateCandList( uiMode, cost, numModesForFullRD, uiRdModeList, CandCostList );
    19692150
    1970 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2151#if (HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX) && !FIX_DMM_NEG_DIST
    19712152        if( bTestDmm ) bTestDmm = uiSad ? true : false;
    19722153#endif
    1973 #if LGE_EDGE_INTRA
     2154#if LGE_EDGE_INTRA_A0070
    19742155        if ( bTestEdgeIntra ) bTestEdgeIntra = uiSad ? true : false;
    19752156#endif
     
    20812262    }
    20822263#endif
    2083 #if LGE_EDGE_INTRA
     2264#if LGE_EDGE_INTRA_A0070
    20842265  if( bTestEdgeIntra )
    20852266  {
     
    20982279   
    20992280    UInt    uiBestPUMode  = 0;
     2281#if FIX_RDO_NEGDIST
     2282    Dist    uiBestPUDistY = 0;
     2283    Dist    uiBestPUDistC = 0;
     2284#else
    21002285    UInt    uiBestPUDistY = 0;
    21012286    UInt    uiBestPUDistC = 0;
     2287#endif
    21022288    Double  dBestPUCost   = MAX_DOUBLE;
     2289#if RWTH_SDC_DLT_B0036
     2290    Bool    bBestUseSDC   = false;
     2291    Pel     apBestDCOffsets[2] = {0,0};
     2292#endif
    21032293    for( UInt uiMode = 0; uiMode < numModesForFullRD; uiMode++ )
    21042294    {
    2105 #if LG_ZEROINTRADEPTHRESI_M26039
     2295#if LG_ZEROINTRADEPTHRESI_A0087
    21062296    Bool bAllowZeroResi = pcCU->getSlice()->getIsDepth() && (pcCU->getSlice()->getPOC()%pcCU->getPic()->getIntraPeriod());// && (uiMode < NUM_INTRA_MODE);
    21072297    for(UInt uiCnt = 0; uiCnt < (bAllowZeroResi ? 2 : 1); uiCnt++)
     
    21142304#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    21152305      if( m_pcEncCfg->getIsDepth() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight )
    2116 #if LGE_EDGE_INTRA
     2306#if LGE_EDGE_INTRA_A0070
    21172307        && uiOrgMode < EDGE_INTRA_IDX
    21182308#endif
     
    21212311        continue;
    21222312      }
     2313#endif
     2314     
     2315#if RWTH_SDC_DLT_B0036
     2316      UInt uiUseSDC = ( m_pcEncCfg->getUseSDC() && pcCU->getPartitionSize(uiPartOffset) == SIZE_2Nx2N )?1:0;
     2317     
     2318      for( UInt uiSDC=0; uiSDC<=uiUseSDC; uiSDC++ )
     2319      {
     2320        for( UInt uiRes = 0; uiRes<=uiUseSDC; uiRes++ )
     2321        {
    21232322#endif
    21242323
     
    21442343      }
    21452344#endif
    2146 
     2345#if RWTH_SDC_DLT_B0036
     2346          // last check: if not available for current intra prediction mode, don't try
     2347          if( uiSDC == 1 && !pcCU->getSDCAvailable(uiPartOffset) )
     2348            continue;
     2349         
     2350          pcCU->setSDCFlagSubParts( uiSDC == 1, uiPartOffset, 0, uiDepth + uiInitTrDepth );
     2351         
     2352          if(uiSDC == 1)
     2353          {
     2354            pcCU->setTrIdxSubParts(0, uiPartOffset, uiDepth + uiInitTrDepth);
     2355            pcCU->setCbfSubParts(1, 1, 1, uiPartOffset, uiDepth + uiInitTrDepth);
     2356           
     2357            // start encoding with SDC
     2358            xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, (uiRes==1));
     2359          }
     2360          else
     2361          {
     2362#endif
    21472363#if HHI_RQT_INTRA_SPEEDUP
    2148 #if LG_ZEROINTRADEPTHRESI_M26039
     2364#if LG_ZEROINTRADEPTHRESI_A0087
    21492365      xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost, bZeroResi );
    21502366#else
     
    21532369#else
    21542370      xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, dPUCost );
     2371#endif
     2372#if RWTH_SDC_DLT_B0036
     2373          }
    21552374#endif
    21562375     
     
    21662385        uiBestPUDistC = uiPUDistC;
    21672386        dBestPUCost   = dPUCost;
     2387       
     2388#if RWTH_SDC_DLT_B0036
     2389        if( uiSDC == 1 )
     2390        {
     2391          bBestUseSDC = true;
     2392         
     2393          // copy reconstruction
     2394          pcPredYuv->copyPartToPartYuv(pcRecoYuv, uiPartOffset, uiWidth, uiHeight);
     2395         
     2396          // copy DC values
     2397          apBestDCOffsets[0] = pcCU->getSDCSegmentDCOffset(0, uiPartOffset);
     2398          apBestDCOffsets[1] = pcCU->getSDCSegmentDCOffset(1, uiPartOffset);
     2399        }
     2400        else
     2401        {
     2402          bBestUseSDC = false;
     2403#endif
     2404       
     2405        xSetIntraResultQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcRecoYuv );
     2406       
     2407        UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth(0) + uiInitTrDepth ) << 1 );
     2408        ::memcpy( m_puhQTTempTrIdx,  pcCU->getTransformIdx()       + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     2409        ::memcpy( m_puhQTTempCbf[0], pcCU->getCbf( TEXT_LUMA     ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     2410        ::memcpy( m_puhQTTempCbf[1], pcCU->getCbf( TEXT_CHROMA_U ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     2411        ::memcpy( m_puhQTTempCbf[2], pcCU->getCbf( TEXT_CHROMA_V ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     2412#if RWTH_SDC_DLT_B0036
     2413        }
     2414#endif
     2415      }
     2416#if HHI_RQT_INTRA_SPEEDUP_MOD
     2417      else if( dPUCost < dSecondBestPUCost )
     2418      {
     2419        uiSecondBestMode  = uiOrgMode;
     2420        dSecondBestPUCost = dPUCost;
     2421      }
     2422#endif
     2423#if LG_ZEROINTRADEPTHRESI_A0087
     2424    }
     2425#endif
     2426#if RWTH_SDC_DLT_B0036
     2427      } // SDC residual loop
     2428    } // SDC loop
     2429#endif
     2430    } // Mode loop
     2431   
     2432#if HHI_RQT_INTRA_SPEEDUP
     2433#if HHI_RQT_INTRA_SPEEDUP_MOD
     2434    for( UInt ui =0; ui < 2; ++ui )
     2435#endif
     2436    {
     2437#if HHI_RQT_INTRA_SPEEDUP_MOD
     2438      UInt uiOrgMode   = ui ? uiSecondBestMode  : uiBestPUMode;
     2439      if( uiOrgMode == MAX_UINT )
     2440      {
     2441        break;
     2442      }
     2443#else
     2444      UInt uiOrgMode = uiBestPUMode;
     2445#endif
     2446     
     2447      pcCU->setLumaIntraDirSubParts ( uiOrgMode, uiPartOffset, uiDepth + uiInitTrDepth );
     2448     
     2449      // set context models
     2450      if( m_bUseSBACRD )
     2451      {
     2452        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
     2453      }
     2454     
     2455      // determine residual for partition
     2456      Dist   uiPUDistY = 0;
     2457      Dist   uiPUDistC = 0;
     2458      Double dPUCost   = 0.0;
     2459
     2460#if HHI_VSO
     2461      // reset Model
     2462      if( m_pcRdCost->getUseRenModel() )
     2463      {
     2464        m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight );
     2465      }
     2466#endif
     2467
     2468      xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, false, dPUCost );
     2469     
     2470      // check r-d cost
     2471      if( dPUCost < dBestPUCost )
     2472      {
     2473        uiBestPUMode  = uiOrgMode;
     2474        uiBestPUDistY = uiPUDistY;
     2475        uiBestPUDistC = uiPUDistC;
     2476        dBestPUCost   = dPUCost;
     2477#if RWTH_SDC_DLT_B0036
     2478        bBestUseSDC   = false;
     2479#endif
    21682480       
    21692481        xSetIntraResultQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcRecoYuv );
     
    21762488       
    21772489      }
    2178 #if HHI_RQT_INTRA_SPEEDUP_MOD
    2179       else if( dPUCost < dSecondBestPUCost )
    2180       {
    2181         uiSecondBestMode  = uiOrgMode;
    2182         dSecondBestPUCost = dPUCost;
    2183       }
    2184 #endif
    2185 #if LG_ZEROINTRADEPTHRESI_M26039
    2186     }
    2187 #endif
    2188     } // Mode loop
    2189    
    2190 #if HHI_RQT_INTRA_SPEEDUP
    2191 #if HHI_RQT_INTRA_SPEEDUP_MOD
    2192     for( UInt ui =0; ui < 2; ++ui )
    2193 #endif
    2194     {
    2195 #if HHI_RQT_INTRA_SPEEDUP_MOD
    2196       UInt uiOrgMode   = ui ? uiSecondBestMode  : uiBestPUMode;
    2197       if( uiOrgMode == MAX_UINT )
    2198       {
    2199         break;
    2200       }
    2201 #else
    2202       UInt uiOrgMode = uiBestPUMode;
    2203 #endif
    2204      
    2205       pcCU->setLumaIntraDirSubParts ( uiOrgMode, uiPartOffset, uiDepth + uiInitTrDepth );
    2206      
    2207       // set context models
    2208       if( m_bUseSBACRD )
    2209       {
    2210         m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
    2211       }
    2212      
    2213       // determine residual for partition
    2214       Dist   uiPUDistY = 0;
    2215       Dist   uiPUDistC = 0;
    2216       Double dPUCost   = 0.0;
    2217 
    2218 #if HHI_VSO
    2219       // reset Model
    2220       if( m_pcRdCost->getUseRenModel() )
    2221       {
    2222         m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight );
    2223       }
    2224 #endif
    2225 
    2226       xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, false, dPUCost );
    2227      
    2228       // check r-d cost
    2229       if( dPUCost < dBestPUCost )
    2230       {
    2231         uiBestPUMode  = uiOrgMode;
    2232         uiBestPUDistY = uiPUDistY;
    2233         uiBestPUDistC = uiPUDistC;
    2234         dBestPUCost   = dPUCost;
    2235        
    2236         xSetIntraResultQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcRecoYuv );
    2237        
    2238         UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth(0) + uiInitTrDepth ) << 1 );
    2239         ::memcpy( m_puhQTTempTrIdx,  pcCU->getTransformIdx()       + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    2240         ::memcpy( m_puhQTTempCbf[0], pcCU->getCbf( TEXT_LUMA     ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    2241         ::memcpy( m_puhQTTempCbf[1], pcCU->getCbf( TEXT_CHROMA_U ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    2242         ::memcpy( m_puhQTTempCbf[2], pcCU->getCbf( TEXT_CHROMA_V ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    2243        
    2244       }
    22452490    } // Mode loop
    22462491#endif
     
    22492494    uiOverallDistY += uiBestPUDistY;
    22502495    uiOverallDistC += uiBestPUDistC;
     2496   
     2497#if RWTH_SDC_DLT_B0036
     2498    if( bBestUseSDC )
     2499    {
     2500      pcCU->setTrIdxSubParts(0, uiPartOffset, uiDepth + uiInitTrDepth);
     2501      pcCU->setCbfSubParts(1, 1, 1, uiPartOffset, uiDepth + uiInitTrDepth);
     2502     
     2503      //=== copy best DC segment values back to CU ====
     2504      pcCU->setSDCSegmentDCOffset(apBestDCOffsets[0], 0, uiPartOffset);
     2505      pcCU->setSDCSegmentDCOffset(apBestDCOffsets[1], 1, uiPartOffset);
     2506    }
     2507    else
     2508    {
     2509#endif
    22512510   
    22522511    //--- update transform index and cbf ---
     
    22562515    ::memcpy( pcCU->getCbf( TEXT_CHROMA_U ) + uiPartOffset, m_puhQTTempCbf[1], uiQPartNum * sizeof( UChar ) );
    22572516    ::memcpy( pcCU->getCbf( TEXT_CHROMA_V ) + uiPartOffset, m_puhQTTempCbf[2], uiQPartNum * sizeof( UChar ) );
     2517#if RWTH_SDC_DLT_B0036
     2518    }
     2519#endif
    22582520   
    22592521    //--- set reconstruction for next intra prediction blocks ---
     
    23262588    //=== update PU data ====
    23272589    pcCU->setLumaIntraDirSubParts     ( uiBestPUMode, uiPartOffset, uiDepth + uiInitTrDepth );
     2590#if RWTH_SDC_DLT_B0036
     2591    pcCU->setSDCFlagSubParts          ( bBestUseSDC, uiPartOffset, 0, uiDepth + uiInitTrDepth );
     2592#endif
    23282593    pcCU->copyToPic                   ( uiDepth, uiPU, uiInitTrDepth );
    23292594  } // PU loop
     
    26252890                            iWidth, iHeight, m_pcEncCfg->getUseHADME() );
    26262891#endif
     2892#if LGE_ILLUCOMP_B0045
     2893  cDistParam.bUseIC = false;
     2894#endif
    26272895  ruiErr = cDistParam.DistFunc( &cDistParam );
    26282896}
     
    26422910 */
    26432911#if CU_BASED_MRG_CAND_LIST
     2912#if LG_RESTRICTEDRESPRED_M24766
     2913Void 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
    26442915Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand )
     2916#endif
    26452917#else
    26462918#if LG_RESTRICTEDRESPRED_M24766
     
    35393811      UInt uiMRGCost = MAX_UINT;
    35403812#if CU_BASED_MRG_CAND_LIST
     3813#if LG_RESTRICTEDRESPRED_M24766
     3814      xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     3815#else
    35413816      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     3817#endif
    35423818#else
    35433819#if LG_RESTRICTEDRESPRED_M24766
     
    38774153    cMvCand <<= 2;
    38784154#endif
     4155
     4156#if LGE_ILLUCOMP_B0045
     4157  Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getViewId() != pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdx));
     4158#endif
    38794159  // prediction pattern
    38804160  if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType()==P_SLICE )
     
    38844164  else
    38854165  {
     4166#if LGE_ILLUCOMP_B0045
     4167    xPredInterLumaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false, bICFlag );
     4168#else
    38864169    xPredInterLumaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false );
     4170#endif
    38874171  }
    38884172
     
    39384222  pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight );
    39394223 
     4224#if LGE_ILLUCOMP_B0045
     4225  Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getViewId() != pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxPred));
     4226  pcPatternKey->setICFlag(bICFlag);
     4227#endif
     4228
    39404229  if ( bBi )
    39414230  {
     
    41014390      setDistParamComp(0);
    41024391
     4392#if LGE_ILLUCOMP_B0045
     4393      m_cDistParam.bUseIC = pcPatternKey->getICFlag();
     4394#endif
    41034395      uiSad = m_cDistParam.DistFunc( &m_cDistParam );
    41044396     
     
    44574749    m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
    44584750    m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true );
     4751#if LGE_ILLUCOMP_B0045
     4752    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
     4753#endif
    44594754#if HHI_INTER_VIEW_RESIDUAL_PRED
    44604755    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
     
    52075502    }
    52085503   
     5504#if FIX_RDO_NEGDIST
     5505    Dist uiDistU = 0;
     5506    Dist uiDistV = 0;
     5507#else
    52095508    UInt uiDistU = 0;
    52105509    UInt uiDistV = 0;
     5510#endif
    52115511    if( bCodeChroma )
    52125512    {
     
    52465546#endif       
    52475547       
     5548#if FIX_RDO_NEGDIST
     5549        const Dist uiNonzeroDistU = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCbAddr( absTUPartIdxC), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(),
     5550          pcResi->getCbAddr( absTUPartIdxC), pcResi->getCStride(), trWidthC, trHeightC
     5551
     5552#else
    52485553        const UInt uiNonzeroDistU = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCbAddr( absTUPartIdxC), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(),
    52495554          pcResi->getCbAddr( absTUPartIdxC), pcResi->getCStride(), trWidthC, trHeightC
     5555#endif
    52505556#if WEIGHTED_CHROMA_DISTORTION
    52515557          , true
     
    53325638        m_pcTrQuant->invtransformNxN( TEXT_CHROMA,REG_DCT, pcResiCurrV, m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), pcCoeffCurrV, trWidthC, trHeightC, scalingListType );
    53335639#endif
    5334        
     5640#if FIX_RDO_NEGDIST
     5641        const Dist uiNonzeroDistV = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCrAddr( absTUPartIdxC ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(),
     5642          pcResi->getCrAddr( absTUPartIdxC ), pcResi->getCStride(), trWidthC, trHeightC
     5643#else
    53355644        const UInt uiNonzeroDistV = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCrAddr( absTUPartIdxC ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(),
    53365645          pcResi->getCrAddr( absTUPartIdxC ), pcResi->getCStride(), trWidthC, trHeightC
     5646#endif
    53375647#if WEIGHTED_CHROMA_DISTORTION
    53385648                                                   , true
     
    58226132    m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
    58236133    m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, 0, true);
     6134#if LGE_ILLUCOMP_B0045
     6135    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
     6136#endif
    58246137#if HHI_INTER_VIEW_RESIDUAL_PRED
    58256138    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
     
    58426155    m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    58436156    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
     6157#if LGE_ILLUCOMP_B0045
     6158    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
     6159#endif
    58446160#if HHI_INTER_VIEW_RESIDUAL_PRED
    58456161    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
     
    61976513       
    61986514        Dist uiActDist = RDO_DIST_MAX;
    6199 #if FIX_RDO_MACRO
    62006515#if SAIT_VSO_EST_A0033
    62016516        if ( m_pcRdCost->getUseEstimatedVSD() )
     
    62286543#endif // LGE_WVSO_A0119
    62296544        }
    6230 #else // FIX_RDO_MACRO
    6231 #if SAIT_VSO_EST_A0033
    6232         if ( m_pcRdCost->getUseEstimatedVSD() )
    6233         {         
    6234           TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
    6235           TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
    6236           uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
    6237 #if LGE_WVSO_A0119
    6238           if ( m_pcRdCost->getUseWVSO() )
    6239           {   
    6240             Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
    6241             Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
    6242             Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
    6243             uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight);
    6244           }
    6245 #endif // LGE_WVSO_A0119
    6246         }
    6247         else       
    6248 #else  // SAIT_VSO_EST_A0033 <-- wrong #else statement should be #endif
    6249         {       
    6250           uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
    6251 #if LGE_WVSO_A0119
    6252           if ( m_pcRdCost->getUseWVSO() )
    6253           {   
    6254             Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
    6255             Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
    6256             Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
    6257             uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight);
    6258           }
    6259 #endif // LGE_WVSO_A0119
    6260         }
    6261 #endif // SAIT_VSO_EST_A0033 <-- wrong #endif should be removed
    6262 #endif // FIX_RDO_MACRO
    62636545
    62646546        if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
     
    63026584  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
    63036585  Dist iDist = RDO_DIST_MAX;
     6586#if HHIQC_DMMFASTSEARCH_B0039
     6587  WedgeNodeList* pacWedgeNodeList = &g_aacWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
     6588  xSearchWedgeFullMinDistFast( pcCU, uiAbsPtIdx, pacWedgeNodeList, pacWedgeList, piOrig, uiStride, uiWidth, uiHeight, ruiTabIdx, iDist );
     6589#else
    63046590  xSearchWedgeFullMinDist( pcCU, uiAbsPtIdx, pacWedgeList, piOrig, uiStride, uiWidth, uiHeight, ruiTabIdx, iDist );
     6591#endif
    63056592
    63066593  TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx));
     
    64136700}
    64146701
     6702#if HHIQC_DMMFASTSEARCH_B0039
     6703Void TEncSearch::xSearchWedgeFullMinDistFast( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeNodeList* pacWedgeNodeList, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Dist& riDist )
     6704{
     6705  ruiTabIdx = 0;
     6706
     6707  // local pred buffer
     6708  TComYuv cPredYuv;
     6709  cPredYuv.create( uiWidth, uiHeight );
     6710  cPredYuv.clear();
     6711
     6712  UInt uiPredStride = cPredYuv.getStride();
     6713  Pel* piPred       = cPredYuv.getLumaAddr();
     6714
     6715  Int  iDC1 = 0;
     6716  Int  iDC2 = 0;
     6717
     6718  // coarse wedge search
     6719  Dist uiBestDist   = RDO_DIST_MAX;
     6720  UInt uiBestNodeId = 0;
     6721  for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ )
     6722  {
     6723    calcWedgeDCs       ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piRef,  uiRefStride,  iDC1, iDC2 );
     6724    assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piPred, uiPredStride, iDC1, iDC2 );
     6725
     6726    Dist uiActDist = RDO_DIST_MAX;
     6727#if HHI_VSO
     6728    if( m_pcRdCost->getUseVSO() )
     6729    {
     6730#if SAIT_VSO_EST_A0033
     6731      if ( m_pcRdCost->getUseEstimatedVSD() )
     6732      {         
     6733        TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
     6734        TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
     6735        uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6736#if LGE_WVSO_A0119
     6737        if ( m_pcRdCost->getUseWVSO() )
     6738        {   
     6739          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6740          Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6741          Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6742          uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight);
     6743        }
     6744#endif
     6745      }
     6746      else
     6747#endif
     6748      {
     6749        uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 );
     6750#if LGE_WVSO_A0119
     6751        if ( m_pcRdCost->getUseWVSO() )
     6752        {   
     6753          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6754          Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6755          Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6756          uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight);
     6757        }
     6758#endif
     6759      }
     6760    }
     6761    else
     6762    {
     6763      uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6764    }
     6765#else
     6766    uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6767#endif
     6768    if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
     6769    {
     6770      uiBestDist   = uiActDist;
     6771      uiBestNodeId = uiNodeId;
     6772    }
     6773  }
     6774
     6775  // refinement
     6776  Dist uiBestDistRef = uiBestDist;
     6777  UInt uiBestTabIdxRef  = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx();
     6778  for( UInt uiRefId = 0; uiRefId < NUM_WEDGE_REFINES; uiRefId++ )
     6779  {
     6780    if( pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ) != NO_IDX )
     6781    {
     6782      calcWedgeDCs       ( &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))), piRef,  uiRefStride,  iDC1, iDC2 );
     6783      assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))), piPred, uiPredStride, iDC1, iDC2 );
     6784
     6785      Dist uiActDist = RDO_DIST_MAX;
     6786#if HHI_VSO
     6787      if( m_pcRdCost->getUseVSO() )
     6788      {
     6789        uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 );
     6790#if LGE_WVSO_A0119
     6791        if ( m_pcRdCost->getUseWVSO() )
     6792        {   
     6793          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6794          Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6795          Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6796          uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight);
     6797        }
     6798#endif
     6799      }
     6800      else
     6801      {
     6802        uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6803      }
     6804#else
     6805      uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6806#endif
     6807      if( uiActDist < uiBestDistRef || uiBestDistRef == RDO_DIST_MAX )
     6808      {
     6809        uiBestDistRef   = uiActDist;
     6810        uiBestTabIdxRef = pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId );
     6811      }
     6812    }
     6813  }
     6814
     6815  riDist    = uiBestDistRef;
     6816  ruiTabIdx = uiBestTabIdxRef;
     6817
     6818  cPredYuv.destroy();
     6819  return;
     6820}
     6821#endif
     6822
    64156823Void TEncSearch::xSearchWedgePredDirMinDist( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd )
    64166824{
     
    65496957#endif
    65506958
    6551 #if LGE_EDGE_INTRA
     6959#if LGE_EDGE_INTRA_A0070
    65526960Bool TEncSearch::xCheckTerminatedEdge( Bool* pbEdge, Int iX, Int iY, Int iWidth, Int iHeight )
    65536961{
     
    76578065#endif
    76588066#endif
     8067 
     8068#if RWTH_SDC_DLT_B0036
     8069Void TEncSearch::xAnalyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride )
     8070{
     8071  Int iSumDepth[2];
     8072  memset(iSumDepth, 0, sizeof(Int)*2);
     8073  Int iSumPix[2];
     8074  memset(iSumPix, 0, sizeof(Int)*2);
     8075 
     8076  for (Int y=0; y<uiSize; y++)
     8077  {
     8078    for (Int x=0; x<uiSize; x++)
     8079    {
     8080      UChar ucSegment = pMask?(UChar)pMask[x]:0;
     8081      assert( ucSegment < uiNumSegments );
     8082     
     8083      iSumDepth[ucSegment] += pOrig[x];
     8084      iSumPix[ucSegment]   += 1;
     8085    }
     8086   
     8087    pOrig  += uiStride;
     8088    pMask  += uiMaskStride;
     8089  }
     8090 
     8091  // compute mean for each segment
     8092  for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
     8093  {
     8094    if( iSumPix[ucSeg] > 0 )
     8095      rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg];
     8096    else
     8097      rpSegMeans[ucSeg] = 0;  // this happens for zero-segments
     8098  }
     8099}
     8100#endif
    76598101
    76608102//! \}
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r100 r189  
    260260                                    TComYuv*     pcResiYuv,
    261261                                    Dist&        ruiDist
    262 #if LG_ZEROINTRADEPTHRESI_M26039
     262#if LG_ZEROINTRADEPTHRESI_A0087
    263263                                   ,Bool        bZeroResi = false
    264264#endif
     
    285285#endif
    286286                                    Double&      dRDCost
    287 #if LG_ZEROINTRADEPTHRESI_M26039
     287#if LG_ZEROINTRADEPTHRESI_A0087
    288288                                   ,Bool         bZeroResi = false
    289289#endif
     
    307307                                    UInt         uiAbsPartIdx,
    308308                                    TComYuv*     pcRecoYuv );
     309 
     310#if RWTH_SDC_DLT_B0036
     311  Void  xAnalyzeSegmentsSDC       ( Pel* pOrig,
     312                                   UInt uiStride,
     313                                   UInt uiSize,
     314                                   Pel* rpSegMeans,
     315                                   UInt uiNumSegments,
     316                                   Bool* pMask,
     317                                   UInt uiMaskStride );
     318 
     319  Void  xIntraCodingSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bResidual );
     320#endif
    309321 
    310322  // -------------------------------------------------------------------------------------------------------------------
     
    330342#endif
    331343
    332 #if LGE_EDGE_INTRA
     344#if LGE_EDGE_INTRA_A0070
    333345  Bool  xEdgePartition       ( TComDataCU* pcCU, UInt uiPartIdx, Bool bPU4x4 );
    334346  Bool  xCheckTerminatedEdge ( Bool* pbEdge, Int iX, Int iY, Int iWidth, Int iHeight );
     
    374386                                    UInt&          ruiTabIdx,
    375387                                    Dist&          riDist );
     388#if HHIQC_DMMFASTSEARCH_B0039
     389  Void xSearchWedgeFullMinDistFast( TComDataCU*    pcCU,
     390                                    UInt           uiAbsPtIdx,
     391                                    WedgeNodeList* pacWedgeNodeList,
     392                                    WedgeList*     pacWedgeList,
     393                                    Pel*           piRef,
     394                                    UInt           uiRefStride,
     395                                    UInt           uiWidth,
     396                                    UInt           uiHeight,
     397                                    UInt&          ruiTabIdx,
     398                                    Dist&          riDist );
     399#endif
    376400  Void xSearchWedgePredDirMinDist ( TComDataCU*    pcCU,
    377401                                    UInt           uiAbsPtIdx,
  • trunk/source/Lib/TLibEncoder/TEncSlice.cpp

    r120 r189  
    3838#include "TEncTop.h"
    3939#include "TEncSlice.h"
    40 #if HHI_VSO_SPEEDUP_A0033
    4140#include "../../App/TAppEncoder/TAppEncTop.h"
    42 #endif
    4341#include <math.h>
    4442
     
    191189  rpcSlice->setViewOrderIdx(m_pcCfg->getViewOrderIdx());
    192190#endif
    193 
     191#if LGE_ILLUCOMP_B0045
     192  rpcSlice->setApplyIC(false);
     193#endif
    194194  // set mutliview parameters
    195195  rpcSlice->initMultiviewSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() );
     
    648648  TComSlice* pcSlice            = rpcPic->getSlice(getSliceIdx());
    649649  xDetermineStartAndBoundingCUAddr ( uiStartCUAddr, uiBoundingCUAddr, rpcPic, false );
    650 #if LG_ZEROINTRADEPTHRESI_M26039
     650#if LG_ZEROINTRADEPTHRESI_A0087
    651651  rpcPic->setIntraPeriod(this->m_pcCfg->getIntraPeriod());
    652652#endif
     
    657657  m_uiPicDist       = 0;
    658658 
    659 #if CABAC_INIT_FLAG && POZNAN_CABAC_INIT_FLAG_FIX
     659#if CABAC_INIT_FLAG && FIX_POZNAN_CABAC_INIT_FLAG
    660660  Bool bReset =(pcSlice->getPOC() == 0) ||
    661661    (pcSlice->getPOC() % m_pcCfg->getIntraPeriod() == 0) ||
     
    769769  UInt uiTilesAcross  = 0;
    770770
     771#if LGE_ILLUCOMP_B0045
     772  if (pcEncTop->getViewId() != 0 && !pcEncTop->isDepthCoder() && pcEncTop->getUseIC())   // DCP of ViewID 0 is not available
     773  {
     774    pcSlice ->xSetApplyIC();
     775  }
     776#endif
     777
    771778  if( m_pcCfg->getUseSBACRD() )
    772779  {
     
    814821  UInt uiTileLCUX     = 0;
    815822
    816 #if HHI_VSO_SPEEDUP_A0033
    817823  Int iLastPosY = -1;
    818 #endif
    819824
    820825  // for every CU in slice
     
    829834    pcCU->initCU( rpcPic, uiCUAddr );
    830835
    831 #if HHI_VSO_SPEEDUP_A0033
    832836    if ( m_pcRdCost->getUseRenModel() )
    833837    {
     
    843847      }
    844848    }   
    845 #endif
    846 
    847 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information
    848     m_bDumpPartInfo = 0;
    849     pcCU->setPartDumpFlag(m_bDumpPartInfo);
    850 #endif
    851849
    852850    // inherit from TR if necessary, select substream to use.
     
    13071305    }
    13081306
     1307#if OL_QTLIMIT_PREDCODING_B0068
     1308    rpcPic->setReduceBitsFlag(true);
     1309#endif
     1310
    13091311    TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr );   
    1310 #if OL_DEPTHLIMIT_A0044
    1311     pcCU->setPartDumpFlag(m_bDumpPartInfo);
    1312     pcCU->resetPartInfo();
    1313 #endif
    13141312#if !REMOVE_TILE_DEPENDENCE
    13151313    if( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) )
     
    13991397    }
    14001398#endif
     1399
     1400#if OL_QTLIMIT_PREDCODING_B0068
     1401    rpcPic->setReduceBitsFlag(false);
     1402#endif
     1403
    14011404  }
    14021405
  • trunk/source/Lib/TLibEncoder/TEncSlice.h

    r116 r189  
    101101 
    102102  UInt                    m_uiSliceIdx;
    103 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping
    104   Bool                    m_bDumpPartInfo;
    105 #endif
    106103public:
    107104  TEncSlice();
     
    131128  UInt    getSliceIdx()         { return m_uiSliceIdx;                    }
    132129  Void    setSliceIdx(UInt i)   { m_uiSliceIdx = i;                       }
    133 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping
    134   Void    setPartDumpFlag(Bool flag) { m_bDumpPartInfo = flag;};
    135 #endif
    136130};
    137131
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r121 r189  
    9191{
    9292  // initialize global variables
    93 #if FIX_INIT_ROM
    9493  if( m_viewId == 0 && m_isDepth == false )
    9594  {
    96 #endif
    9795    initROM();
    98 #if FIX_INIT_ROM
    99   }
    100 #endif
     96  }
    10197
    10298
     
    605601  // mark it should be extended
    606602  rpcPic->getPicYuvRec()->setBorderExtension(false);
    607 #if FIXES
    608603  rpcPic->getPicYuvOrg()->setBorderExtension(false);
    609 #endif
    610604}
    611605
     
    648642#endif
    649643 
     644#if RWTH_SDC_DLT_B0036
     645  m_cSPS.setUseDLT        ( m_bUseDLT );
     646#endif
     647 
    650648  m_cSPS.setQuadtreeTULog2MaxSize( m_uiQuadtreeTULog2MaxSize );
    651649  m_cSPS.setQuadtreeTULog2MinSize( m_uiQuadtreeTULog2MinSize );
     
    768766  m_cSPS.setUseDMM( m_bUseDMM );
    769767#endif
    770 #if OL_DEPTHLIMIT_A0044
    771   m_cSPS.setUseDPL( m_bDepthPartitionLimiting );
     768#if OL_QTLIMIT_PREDCODING_B0068
     769  m_cSPS.setUseQTLPC( m_bUseQTLPC );
    772770#endif
    773771#if HHI_MPI
     
    11021100
    11031101    // # substreams is "per tile" when tiles are independent.
    1104 #if FIX_REMOVE_TILE_DEPENDENCE
    11051102    if ( m_iWaveFrontSynchro )
    1106 #else
    1107     if (m_iTileBoundaryIndependenceIdr && m_iWaveFrontSynchro)
    1108 #endif
    11091103    {
    11101104      m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1));
Note: See TracChangeset for help on using the changeset viewer.