Changeset 287 in 3DVCSoftware for branches/HTM-5.1-dev0/source/Lib/TLibEncoder


Ignore:
Timestamp:
17 Feb 2013, 01:49:33 (12 years ago)
Author:
tech
Message:

Integrated 5.1-dev1-LG-Fix Rev. 282

Location:
branches/HTM-5.1-dev0/source/Lib/TLibEncoder
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r280 r287  
    869869  if (address==0)
    870870  {
    871     if( pcSlice->getSPS()->getViewId() && !pcSlice->getIsDepth() )
     871    if( pcSlice->getSPS()->getViewId()
     872#if !LGE_ILLUCOMP_DEPTH_C0046
     873        && !pcSlice->getIsDepth()
     874#endif
     875        )
    872876    {
    873877      WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "applying IC flag" );
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r280 r287  
    458458  Bool  bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE);
    459459
     460#if HHI_QTLPC_RAU_OFF_C0160
     461  Bool rapPic     = (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
     462#endif
     463
    460464  Bool bTry2NxN = true;
    461465  Bool bTryNx2N = true;
     
    494498
    495499#if LGE_ILLUCOMP_B0045
    496   Bool bICEnabled = (!rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewId());
     500  Bool bICEnabled = (
     501#if !LGE_ILLUCOMP_DEPTH_C0046
     502      !rpcTempCU->getSlice()->getIsDepth() &&
     503#endif
     504      rpcTempCU->getSlice()->getViewId());
    497505
    498506  bICEnabled = bICEnabled && rpcTempCU->getSlice()->getApplyIC();
     
    612620#if OL_QTLIMIT_PREDCODING_B0068
    613621      //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
     622
     623#if HHI_QTLPC_RAU_OFF_C0160
     624      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
     625#else
    614626      if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
     627#endif
    615628      {
    616629        TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU
     
    699712            rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    700713#endif
     714#if FIX_LGE_ILLUCOMP_B0045
     715            rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     716#endif
    701717#if HHI_INTERVIEW_SKIP
    702718            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec );
     
    724740
    725741#if OL_QTLIMIT_PREDCODING_B0068
     742
     743#if HHI_QTLPC_RAU_OFF_C0160
     744      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
     745#else
    726746      if(depthMapDetect && !bIntraSliceDetect  && sps->getUseQTLPC())
     747#endif
    727748      {
    728749        bTrySplitDQP = bTrySplit;
     
    836857                rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    837858#endif
     859#if FIX_LGE_ILLUCOMP_B0045
     860                rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     861#endif
    838862#if HHI_INTERVIEW_SKIP
    839863                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec   );
     
    860884                rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    861885#endif
     886#if FIX_LGE_ILLUCOMP_B0045
     887                rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     888#endif
    862889#if HHI_INTERVIEW_SKIP
    863890                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec   );
     
    903930                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    904931#endif
     932#if FIX_LGE_ILLUCOMP_B0045
     933                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     934#endif
    905935#if HHI_INTERVIEW_SKIP
    906936                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec );
     
    919949                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    920950#endif
     951#if FIX_LGE_ILLUCOMP_B0045
     952                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     953#endif
    921954#if HHI_INTERVIEW_SKIP
    922955                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec );
     
    946979                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    947980#endif
     981#if FIX_LGE_ILLUCOMP_B0045
     982                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     983#endif
    948984#if HHI_INTERVIEW_SKIP
    949985                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true );
     
    962998                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    963999#endif
     1000#if FIX_LGE_ILLUCOMP_B0045
     1001                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     1002#endif
    9641003#if HHI_INTERVIEW_SKIP
    9651004                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true );
     
    9911030                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    9921031#endif
     1032#if FIX_LGE_ILLUCOMP_B0045
     1033                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     1034#endif
    9931035#if HHI_INTERVIEW_SKIP
    9941036                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec );
     
    10071049                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    10081050#endif
     1051#if FIX_LGE_ILLUCOMP_B0045
     1052                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     1053#endif
    10091054#if HHI_INTERVIEW_SKIP
    10101055                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec );
     
    10291074#if HHI_INTER_VIEW_RESIDUAL_PRED
    10301075                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
     1076#endif
     1077#if FIX_LGE_ILLUCOMP_B0045
     1078                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    10311079#endif
    10321080#if HHI_INTERVIEW_SKIP
     
    10461094                  rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    10471095#endif
     1096#if FIX_LGE_ILLUCOMP_B0045
     1097                  rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     1098#endif
    10481099#if HHI_INTERVIEW_SKIP
    10491100                  xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true );
     
    11131164
    11141165      // do normal intra modes
    1115       if ( !bEarlySkip )
     1166      if ( !bEarlySkip
     1167#if HHI_DEPTH_INTRA_SEARCH_RAU_C0160
     1168        || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))
     1169#endif
     1170        )
    11161171      {
    11171172        // speedup for inter frames
     
    11201175          rpcBestCU->getCbf( 0, TEXT_LUMA     ) != 0   ||
    11211176          rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0   ||
    1122           rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely
     1177          rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0
     1178#if HHI_DEPTH_INTRA_SEARCH_RAU_C0160
     1179          || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))
     1180#endif           
     1181          ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely
    11231182#else
    11241183        if( rpcBestCU->getSlice()->getSliceType() == I_SLICE ||
    11251184          rpcBestCU->getCbf( 0, TEXT_LUMA     ) != 0   ||
    11261185          rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0   ||
    1127           rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0     ) // avoid very complex intra if it is unlikely
     1186          rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0     
     1187#if HHI_DEPTH_INTRA_SEARCH_RAU_C0160
     1188          || ((rpcBestCU->getSlice()->getIsDepth() == true) && (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))
     1189#endif     
     1190          ) // avoid very complex intra if it is unlikely
    11281191#endif
    11291192        {
     
    11781241      if( rpcBestCU->getSlice()->getSPS()->getUseMVI() && rpcBestCU->getSlice()->getSliceType() != I_SLICE )
    11791242      {
     1243#if LGE_ILLUCOMP_DEPTH_C0046
     1244        for(UInt uiICId = 0; uiICId < (bICEnabled ? 2 : 1); uiICId++)
     1245        {
     1246          Bool bICFlag = (uiICId ? true : false);
     1247          rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     1248#endif
    11801249        xCheckRDCostMvInheritance( rpcBestCU, rpcTempCU, uiDepth, false, false );
    11811250        rpcTempCU->initEstData( uiDepth, iQP );
     1251#if FIX_ILLUCOMP_DEPTH
     1252        rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
     1253#endif
    11821254        xCheckRDCostMvInheritance( rpcBestCU, rpcTempCU, uiDepth, true, false );
    11831255        rpcTempCU->initEstData( uiDepth, iQP );
     1256#if LGE_ILLUCOMP_DEPTH_C0046
     1257        }
     1258#endif
    11841259      }
    11851260#endif
     
    17381813    {
    17391814      m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
     1815#if LGE_ILLUCOMP_DEPTH_C0046
     1816      m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx, false, uiDepth );
     1817#endif
    17401818      finishCU(pcCU,uiAbsPartIdx,uiDepth);
    17411819      xRestoreDepthWidthHeight( pcCU );
     
    17491827    // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    17501828    m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
     1829#if LGE_ILLUCOMP_DEPTH_C0046
     1830    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx, false, uiDepth );
     1831#endif
    17511832    xRestoreDepthWidthHeight( pcCU );
    17521833  }
     
    17971878    m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
    17981879#if LGE_ILLUCOMP_B0045
    1799     m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
     1880    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx
     1881#if LGE_ILLUCOMP_DEPTH_C0046
     1882        , false, uiDepth
     1883#endif
     1884        );
    18001885#endif
    18011886#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
     
    18281913  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
    18291914#if LGE_ILLUCOMP_B0045
    1830     m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
     1915    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx
     1916#if LGE_ILLUCOMP_DEPTH_C0046
     1917        ,false, uiDepth
     1918#endif
     1919        );
    18311920#endif
    18321921#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
     
    29433032    m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true );
    29443033#if LGE_ILLUCOMP_B0045
    2945     m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
     3034    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true
     3035#if LGE_ILLUCOMP_DEPTH_C0046
     3036        , uhDepth
     3037#endif
     3038        );
    29463039#endif
    29473040  }
     
    29533046    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    29543047#if LGE_ILLUCOMP_B0045
    2955     m_pcEntropyCoder->encodeICFlag( pcCU, 0,          true );
     3048    m_pcEntropyCoder->encodeICFlag( pcCU, 0,          true
     3049#if LGE_ILLUCOMP_DEPTH_C0046
     3050        , uhDepth
     3051#endif
     3052        );
    29563053#endif
    29573054  }
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp

    r280 r287  
    170170
    171171#if LGE_ILLUCOMP_B0045
    172 Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    173 {
    174   if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth())
     172Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD
     173#if LGE_ILLUCOMP_DEPTH_C0046
     174    , UInt uiDepth
     175#endif
     176    )
     177{
     178  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0)
     179#if !LGE_ILLUCOMP_DEPTH_C0046
     180      || pcCU->getSlice()->getSPS()->isDepth()
     181#endif
     182      )
    175183  {
    176184    return;
     
    185193  }
    186194
    187   if(pcCU->isICFlagRequired(uiAbsPartIdx))
     195  if(pcCU->isICFlagRequired(uiAbsPartIdx
     196#if LGE_ILLUCOMP_DEPTH_C0046
     197      , uiDepth //This modification is not needed after integrating JCT3V-C0137
     198#endif
     199      ))
    188200    m_pcEntropyCoderIf->codeICFlag( pcCU, uiAbsPartIdx );
    189201}
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h

    r280 r287  
    260260  Void encodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
    261261#if LGE_ILLUCOMP_B0045
    262   Void encodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
     262  Void encodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false
     263#if LGE_ILLUCOMP_DEPTH_C0046
     264      , UInt uiDepth = 0
     265#endif
     266      );
    263267#endif
    264268  Void encodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp

    r280 r287  
    625625  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
    626626 
     627#if HHI_QTLPC_RAU_OFF_C0160
     628  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
     629  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
     630#else
    627631  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
     632#endif
    628633  {
    629634    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    924929  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
    925930
     931#if HHI_QTLPC_RAU_OFF_C0160
     932  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
     933  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
     934#else
    926935  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())
     936#endif
    927937  {
    928938    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    10861096
    10871097    if( uiDir == DMM_WEDGE_PREDTEX_D_IDX )     { xCodeWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx ); }
     1098#if LGE_DMM3_SIMP_C0044
     1099    if( uiDir == DMM_WEDGE_PREDTEX_IDX )       { xCodeWedgePredTexInfo       ( pcCU, uiAbsPartIdx ); }
     1100#endif
    10881101    if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX )   { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); }
    10891102#endif
     
    26732686#endif
    26742687#if HHI_DMM_PRED_TEX
     2688#if LGE_DMM3_SIMP_C0044
     2689Void TEncSbac::xCodeWedgePredTexInfo( TComDataCU* pcCU, UInt uiAbsPartIdx )
     2690{
     2691  Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx);
     2692  Int iBits = g_aucWedgeTexPredBitsListIdx[iIntraIdx];
     2693
     2694  UInt uiTabIdx = pcCU->getWedgePredTexIntraTabIdx( uiAbsPartIdx );
     2695
     2696  for ( Int i = 0; i < iBits; i++ )
     2697  {
     2698    m_pcBinIf->encodeBin( ( uiTabIdx >> i ) & 1, m_cDmmDataSCModel.get(0, 0, 3) );
     2699  }
     2700}
     2701#endif
     2702
    26752703Void TEncSbac::xCodeWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx )
    26762704{
     2705#if LGE_DMM3_SIMP_C0044
     2706  xCodeWedgePredTexInfo( pcCU, uiAbsPartIdx );
     2707#endif
    26772708  Int iDeltaDC1 = pcCU->getWedgePredTexDeltaDC1( uiAbsPartIdx );
    26782709  Int iDeltaDC2 = pcCU->getWedgePredTexDeltaDC2( uiAbsPartIdx );
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSbac.h

    r280 r287  
    178178#endif
    179179#if HHI_DMM_PRED_TEX
     180#if LGE_DMM3_SIMP_C0044
     181  Void  xCodeWedgePredTexInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     182#endif
    180183  Void  xCodeWedgePredTexDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    181184  Void  xCodeContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx );
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r280 r287  
    22532253      Int  iTexDeltaDC1 = 0;
    22542254      Int  iTexDeltaDC2 = 0;
     2255#if LGE_DMM3_SIMP_C0044
     2256      UInt uiTexIntraIdx = 0;
     2257      findWedgeTexMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTexTabIdx, iTexDeltaDC1, iTexDeltaDC2, bAboveAvail, bLeftAvail, uiTexIntraIdx);
     2258      pcCU->setWedgePredTexIntraTabIdxSubParts( uiTexIntraIdx, uiPartOffset, uiDepth + uiInitTrDepth );
     2259#else
    22552260      findWedgeTexMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTexTabIdx, iTexDeltaDC1, iTexDeltaDC2, bAboveAvail, bLeftAvail );
     2261#endif
    22562262      pcCU->setWedgePredTexTabIdxSubParts  ( uiTexTabIdx,  uiPartOffset, uiDepth + uiInitTrDepth );
    22572263      pcCU->setWedgePredTexDeltaDC1SubParts( iTexDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth );
     
    23452351      for( UInt uiSDC=0; uiSDC<=uiUseSDC; uiSDC++ )
    23462352      {
     2353#if FIX_SDC_ENC_C0143
     2354        for( UInt uiRes = 0; uiRes<=uiSDC; uiRes++ )
     2355#else
    23472356        for( UInt uiRes = 0; uiRes<=uiUseSDC; uiRes++ )
     2357#endif
    23482358        {
    23492359#endif
     
    49264936    m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true );
    49274937#if LGE_ILLUCOMP_B0045
    4928     m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
     4938    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true
     4939#if FIX_ILLUCOMP_DEPTH
     4940      , pcCU->getDepth( 0 )
     4941#endif
     4942      );
    49294943#endif
    49304944#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
     
    63096323    m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, 0, true);
    63106324#if LGE_ILLUCOMP_B0045
    6311     m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
     6325    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true
     6326#if FIX_ILLUCOMP_DEPTH
     6327      , pcCU->getDepth( 0 )
     6328#endif
     6329      );
    63126330#endif
    63136331#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
     
    63326350    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    63336351#if LGE_ILLUCOMP_B0045
    6334     m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
     6352    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true
     6353#if FIX_ILLUCOMP_DEPTH
     6354      , pcCU->getDepth( 0 )
     6355#endif
     6356      );
    63356357#endif
    63366358#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
     
    66716693    Int iFullDeltaDC2 = riDeltaDC2;
    66726694
     6695#if HHI_DMM_DELTADC_Q1_C0034
     6696#else
    66736697    xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC1 );
    66746698    xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC2 );
     6699#endif
    66756700
    66766701    Dist uiBestDist     = RDO_DIST_MAX;
     
    66856710    uiDeltaDC2Max += (uiDeltaDC2Max>>1);
    66866711
     6712#if HHI_DMM_DELTADC_Q1_C0034
     6713    // limit search range to [0, IBDI_MAX]
     6714    if( iFullDeltaDC1 <  0 && uiDeltaDC1Max >                abs(iPredDC1) ) { uiDeltaDC1Max =                abs(iPredDC1); }
     6715    if( iFullDeltaDC1 >= 0 && uiDeltaDC1Max > g_uiIBDI_MAX - abs(iPredDC1) ) { uiDeltaDC1Max = g_uiIBDI_MAX - abs(iPredDC1); }
     6716
     6717    if( iFullDeltaDC2 <  0 && uiDeltaDC2Max >                abs(iPredDC2) ) { uiDeltaDC2Max =                abs(iPredDC2); }
     6718    if( iFullDeltaDC2 >= 0 && uiDeltaDC2Max > g_uiIBDI_MAX - abs(iPredDC2) ) { uiDeltaDC2Max = g_uiIBDI_MAX - abs(iPredDC2); }
     6719
     6720    // init dist with original DCs
     6721    assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iDC1, iDC2 );
     6722
     6723    Dist uiOrgDist = RDO_DIST_MAX;
     6724#if SAIT_VSO_EST_A0033
     6725    if ( m_pcRdCost->getUseEstimatedVSD() )
     6726    {         
     6727      TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
     6728      TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
     6729      uiOrgDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6730#if LGE_WVSO_A0119
     6731      if ( m_pcRdCost->getUseWVSO() )
     6732      {   
     6733        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6734        Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6735        Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6736        uiOrgDist = (iDWeight * iD + iVSDWeight * (Dist) uiOrgDist) / ( iDWeight + iVSDWeight);
     6737      }
     6738#endif // LGE_WVSO_A0119
     6739    }
     6740    else       
     6741#endif // SAIT_VSO_EST_A0033
     6742    {       
     6743      uiOrgDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
     6744#if LGE_WVSO_A0119
     6745      if ( m_pcRdCost->getUseWVSO() )
     6746      {   
     6747        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6748        Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6749        Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6750        uiOrgDist = (iDWeight * iD + iVSOWeight * (Dist) uiOrgDist) / ( iDWeight + iVSOWeight);
     6751      }
     6752#endif // LGE_WVSO_A0119
     6753    }
     6754    uiBestDist     = uiOrgDist;
     6755    uiBestQStepDC1 = abs(iFullDeltaDC1);
     6756    uiBestQStepDC2 = abs(iFullDeltaDC2);
     6757
     6758    // coarse search with step size 4
     6759    for( UInt uiQStepDC1 = 0; uiQStepDC1 < uiDeltaDC1Max; uiQStepDC1 += 4 )
     6760    {
     6761      Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) );
     6762      for( UInt uiQStepDC2 = 0; uiQStepDC2 < uiDeltaDC2Max; uiQStepDC2 += 4 )
     6763      {
     6764        Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) );
     6765
     6766        assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 );
     6767
     6768        Dist uiAct4Dist = RDO_DIST_MAX;
     6769#if SAIT_VSO_EST_A0033
     6770        if ( m_pcRdCost->getUseEstimatedVSD() )
     6771        {         
     6772          TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
     6773          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
     6774          uiAct4Dist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6775#if LGE_WVSO_A0119
     6776          if ( m_pcRdCost->getUseWVSO() )
     6777          {   
     6778            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6779            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6780            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6781            uiAct4Dist = (iDWeight * iD + iVSDWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSDWeight);
     6782          }
     6783#endif // LGE_WVSO_A0119
     6784        }
     6785        else       
     6786#endif // SAIT_VSO_EST_A0033
     6787        {       
     6788          uiAct4Dist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
     6789#if LGE_WVSO_A0119
     6790          if ( m_pcRdCost->getUseWVSO() )
     6791          {   
     6792            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6793            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6794            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6795            uiAct4Dist = (iDWeight * iD + iVSOWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSOWeight);
     6796          }
     6797#endif // LGE_WVSO_A0119
     6798        }
     6799
     6800        if( uiAct4Dist < uiBestDist || uiBestDist == RDO_DIST_MAX )
     6801        {
     6802          uiBestDist     = uiAct4Dist;
     6803          uiBestQStepDC1 = uiQStepDC1;
     6804          uiBestQStepDC2 = uiQStepDC2;
     6805        }
     6806      }
     6807    }
     6808
     6809    // refinement +-3
     6810    for( UInt uiQStepDC1 = (UInt)max(0, ((Int)uiBestQStepDC1-3)); uiQStepDC1 <= (uiBestQStepDC1+3); uiQStepDC1++ )
     6811    {
     6812      Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) );
     6813      for( UInt uiQStepDC2 = (UInt)max(0, ((Int)uiBestQStepDC2-3)); uiQStepDC2 <= (uiBestQStepDC2+3); uiQStepDC2++ )
     6814      {
     6815        Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) );
     6816
     6817        assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 );
     6818
     6819        Dist uiActDist = RDO_DIST_MAX;
     6820#if SAIT_VSO_EST_A0033
     6821        if ( m_pcRdCost->getUseEstimatedVSD() )
     6822        {         
     6823          TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
     6824          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
     6825          uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6826#if LGE_WVSO_A0119
     6827          if ( m_pcRdCost->getUseWVSO() )
     6828          {   
     6829            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6830            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6831            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6832            uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight);
     6833          }
     6834#endif // LGE_WVSO_A0119
     6835        }
     6836        else       
     6837#endif // SAIT_VSO_EST_A0033
     6838        {       
     6839          uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
     6840#if LGE_WVSO_A0119
     6841          if ( m_pcRdCost->getUseWVSO() )
     6842          {   
     6843            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6844            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6845            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6846            uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight);
     6847          }
     6848#endif // LGE_WVSO_A0119
     6849        }
     6850
     6851        if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
     6852        {
     6853          uiBestDist     = uiActDist;
     6854          uiBestQStepDC1 = uiQStepDC1;
     6855          uiBestQStepDC2 = uiQStepDC2;
     6856        }
     6857      }
     6858    }
     6859#else
    66876860    for( UInt uiQStepDC1 = 1; uiQStepDC1 <= uiDeltaDC1Max; uiQStepDC1++  )
    66886861    {
     
    67406913      }
    67416914    }
    6742 
     6915#endif
    67436916    iFullDeltaDC1 = (Int)(uiBestQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1);
    67446917    iFullDeltaDC2 = (Int)(uiBestQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1);
     6918#if HHI_DMM_DELTADC_Q1_C0034
     6919#else
    67456920    xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC1 );
    67466921    xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC2 );
     6922#endif
    67476923    riDeltaDC1 = iFullDeltaDC1;
    67486924    riDeltaDC2 = iFullDeltaDC2;
     
    67506926#endif
    67516927
     6928#if HHI_DMM_DELTADC_Q1_C0034
     6929#else
    67526930  xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 );
    67536931  xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 );
     6932#endif
    67546933}
    67556934#endif
     
    71117290                                      Int&         riDeltaDC2,
    71127291                                      Bool         bAboveAvail,
    7113                                       Bool         bLeftAvail )
     7292                                      Bool         bLeftAvail
     7293#if LGE_DMM3_SIMP_C0044
     7294                                      ,UInt&        ruiIntraTabIdx
     7295#endif
     7296                                      )
    71147297{
    71157298  assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
    71167299  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
    71177300
     7301#if LGE_DMM3_SIMP_C0044
     7302  ruiTabIdx = getBestWedgeFromTex( pcCU, uiAbsPtIdx, uiWidth, uiHeight, piOrig, uiStride, ruiIntraTabIdx );
     7303#else
    71187304  ruiTabIdx = getBestWedgeFromTex( pcCU, uiAbsPtIdx, uiWidth, uiHeight );
     7305#endif
    71197306
    71207307  TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx));
     
    82618448  Int iSumPix[2];
    82628449  memset(iSumPix, 0, sizeof(Int)*2);
    8263  
     8450#if HS_REFERENCE_SUBSAMPLE_C0154
     8451  Int subSamplePix;
     8452  if ( uiSize == 64 || uiSize == 32 )
     8453  {
     8454    subSamplePix = 2;
     8455  }
     8456  else
     8457  {
     8458    subSamplePix = 1;
     8459  }
     8460  for (Int y=0; y<uiSize; y+=subSamplePix)
     8461  {
     8462    for (Int x=0; x<uiSize; x+=subSamplePix)
     8463    {
     8464      UChar ucSegment = pMask?(UChar)pMask[x]:0;
     8465      assert( ucSegment < uiNumSegments );
     8466 
     8467      iSumDepth[ucSegment] += pOrig[x];
     8468      iSumPix[ucSegment]   += 1;
     8469    }
     8470
     8471    pOrig  += uiStride*subSamplePix;
     8472    pMask  += uiMaskStride*subSamplePix;
     8473  }
     8474#else
    82648475  for (Int y=0; y<uiSize; y++)
    82658476  {
     
    82768487    pMask  += uiMaskStride;
    82778488  }
    8278  
     8489#endif
    82798490  // compute mean for each segment
    82808491  for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSearch.h

    r280 r287  
    435435                                    Int&           riDeltaDC2,
    436436                                    Bool           bAboveAvail,
    437                                     Bool           bLeftAvail );
     437                                    Bool           bLeftAvail
     438#if LGE_DMM3_SIMP_C0044
     439                                    ,UInt&         ruiIntraTabIdx
     440#endif
     441                                    );
    438442  Void findContourPredTex         ( TComDataCU*    pcCU,
    439443                                    UInt           uiAbsPtIdx,
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp

    r280 r287  
    776776
    777777#if LGE_ILLUCOMP_B0045
    778   if (pcEncTop->getViewId() != 0 && !pcEncTop->isDepthCoder() && pcEncTop->getUseIC())   // DCP of ViewID 0 is not available
     778  if (pcEncTop->getViewId() != 0
     779#if !LGE_ILLUCOMP_DEPTH_C0046
     780      && !pcEncTop->isDepthCoder()
     781#endif
     782      && pcEncTop->getUseIC())   // DCP of ViewID 0 is not available
    779783  {
    780784    pcSlice ->xSetApplyIC();
Note: See TracChangeset for help on using the changeset viewer.