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


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

Integrated 5.1-dev1-LG-Fix Rev. 282

Location:
branches/HTM-5.1-dev0
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev0/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg

    r210 r287  
    157157SignHideFlag                   : 1                                 # sign hiding
    158158SignHideThreshold              : 4                                 # sign hiding threshold
    159 IlluCompEnable                 : 1                                 # illumination compensation (0: OFF, 1: ON)
     159IlluCompEnable                 : 1 1                               # illumination compensation (0: OFF, 1: ON)
    160160
    161161#============ PCM ================
  • branches/HTM-5.1-dev0/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg

    r210 r287  
    161161SignHideFlag                   : 1                                 # sign hiding
    162162SignHideThreshold              : 4                                 # sign hiding threshold
    163 IlluCompEnable                 : 1                                 # illumination compensation (0: OFF, 1: ON)
     163IlluCompEnable                 : 1 1                               # illumination compensation (0: OFF, 1: ON)
    164164
    165165#============ PCM ================
  • branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r280 r287  
    340340  ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 )
    341341#if LGE_ILLUCOMP_B0045
     342#if LGE_ILLUCOMP_DEPTH_C0046
     343  ("IlluCompEnable", m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation for inter-view prediction")
     344#else
    342345  ("IlluCompEnable",                  m_bUseIC                  , true         , "Use illumination compensation for inter-view prediction" )
     346#endif
    343347#endif
    344348#if INTER_VIEW_VECTOR_SCALING_C0115
     
    18071811#endif
    18081812#if LGE_ILLUCOMP_B0045
     1813#if LGE_ILLUCOMP_DEPTH_C0046
     1814  printf("IlluCompEnable: %d %d", m_abUseIC[0] ? 1 : 0, m_abUseIC[1] ? 1 : 0);
     1815#else
    18091816  printf("IlluCompEnable: %d ", m_bUseIC);
     1817#endif
    18101818#endif
    18111819#if INTER_VIEW_VECTOR_SCALING_C0115
  • branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r280 r287  
    170170  vector<Bool> m_abUseSAO;
    171171#if LGE_ILLUCOMP_B0045
     172#if LGE_ILLUCOMP_DEPTH_C0046
     173  vector<Bool> m_abUseIC;                                    ///< flag for using illumination compensation for inter-view prediction
     174#else
    172175  Bool      m_bUseIC;                                     ///< flag for using illumination compensation for inter-view prediction
     176#endif
    173177#endif
    174178#if INTER_VIEW_VECTOR_SCALING_C0115
  • branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r280 r287  
    318318    m_acTEncTopList[iViewIdx]->setUseSAO               ( m_abUseSAO[0]     );
    319319#if LGE_ILLUCOMP_B0045
     320#if LGE_ILLUCOMP_DEPTH_C0046
     321    m_acTEncTopList[iViewIdx]->setUseIC                ( m_abUseIC[0]      );
     322#else
    320323    m_acTEncTopList[iViewIdx]->setUseIC                ( m_bUseIC          );
     324#endif
    321325#endif
    322326#if INTER_VIEW_VECTOR_SCALING_C0115
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/ContextTables.h

    r189 r287  
    153153#define NUM_DMM_FLAG_CTX              1       ///< number of context models for DMM flag
    154154#define NUM_DMM_MODE_CTX              1       ///< number of context models for DMM mode
     155#if LGE_DMM3_SIMP_C0044
     156#define NUM_DMM_DATA_CTX              4       ///< number of context models for DMM data
     157#else
    155158#define NUM_DMM_DATA_CTX              3       ///< number of context models for DMM data
     159#endif
    156160#endif
    157161
     
    12611265
    12621266#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1267#if FIX_DMM_CTX_INIT_C0034
     1268static const UChar
     1269#else
    12631270static const Short
     1271#endif
    12641272INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] =
    12651273{
     
    12751283};
    12761284
     1285#if FIX_DMM_CTX_INIT_C0034
     1286static const UChar
     1287#else
    12771288static const Short
     1289#endif
    12781290INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] =
    12791291{
     
    12891301};
    12901302
     1303#if FIX_DMM_CTX_INIT_C0034
     1304static const UChar
     1305#else
    12911306static const Short
     1307#endif
    12921308INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] =
    12931309{
     1310#if LGE_DMM3_SIMP_C0044
     1311  {
     1312    CNU, CNU, CNU, CNU
     1313  },
     1314  {
     1315    CNU, CNU, CNU, CNU
     1316  },
     1317  {
     1318    CNU, CNU, CNU, CNU
     1319  }
     1320#else
    12941321  {
    12951322    CNU, CNU, CNU
     
    13011328    CNU, CNU, CNU
    13021329  }
     1330#endif
    13031331};
    13041332
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r280 r287  
    207207#if HHI_DMM_PRED_TEX
    208208  m_puiWedgePredTexTabIdx    = NULL;
     209#if LGE_DMM3_SIMP_C0044
     210  m_puiWedgePredTexIntraTabIdx = NULL;
     211#endif
    209212  m_piWedgePredTexDeltaDC1   = NULL;
    210213  m_piWedgePredTexDeltaDC2   = NULL;
     
    358361#if HHI_DMM_PRED_TEX
    359362    m_puiWedgePredTexTabIdx    = (UInt*)xMalloc(UInt, uiNumPartition);
     363#if LGE_DMM3_SIMP_C0044
     364    m_puiWedgePredTexIntraTabIdx    = (UInt*)xMalloc(UInt, uiNumPartition);
     365#endif
    360366    m_piWedgePredTexDeltaDC1   = (Int* )xMalloc(Int,  uiNumPartition);
    361367    m_piWedgePredTexDeltaDC2   = (Int* )xMalloc(Int,  uiNumPartition);
     
    486492#if HHI_DMM_PRED_TEX
    487493    if ( m_puiWedgePredTexTabIdx    ) { xFree(m_puiWedgePredTexTabIdx   ); m_puiWedgePredTexTabIdx    = NULL; }
     494#if LGE_DMM3_SIMP_C0044
     495    if ( m_puiWedgePredTexIntraTabIdx ) { xFree(m_puiWedgePredTexIntraTabIdx); m_puiWedgePredTexIntraTabIdx    = NULL; }
     496#endif
    488497    if ( m_piWedgePredTexDeltaDC1   ) { xFree(m_piWedgePredTexDeltaDC1  ); m_piWedgePredTexDeltaDC1   = NULL; }
    489498    if ( m_piWedgePredTexDeltaDC2   ) { xFree(m_piWedgePredTexDeltaDC2  ); m_piWedgePredTexDeltaDC2   = NULL; }
     
    702711#if HHI_DMM_PRED_TEX
    703712    memset( m_puiWedgePredTexTabIdx    + firstElement, 0, sizeof( UInt ) * numElements );
     713#if LGE_DMM3_SIMP_C0044
     714    memset( m_puiWedgePredTexIntraTabIdx + firstElement, 0, sizeof( UInt ) * numElements );
     715#endif
    704716    memset( m_piWedgePredTexDeltaDC1   + firstElement, 0, sizeof( Int  ) * numElements );
    705717    memset( m_piWedgePredTexDeltaDC2   + firstElement, 0, sizeof( Int  ) * numElements );
     
    890902#if HHI_DMM_PRED_TEX
    891903    m_puiWedgePredTexTabIdx   [ui] = 0;
     904#if LGE_DMM3_SIMP_C0044
     905    m_puiWedgePredTexIntraTabIdx [ui] = 0;
     906#endif
    892907    m_piWedgePredTexDeltaDC1  [ui] = 0;
    893908    m_piWedgePredTexDeltaDC2  [ui] = 0;
     
    10141029#if HHI_DMM_PRED_TEX
    10151030  memset( m_puiWedgePredTexTabIdx,    0, sizeof( UInt ) * m_uiNumPartition );
     1031#if LGE_DMM3_SIMP_C0044
     1032  memset( m_puiWedgePredTexIntraTabIdx, 0, sizeof( UInt ) * m_uiNumPartition );
     1033#endif
    10161034  memset( m_piWedgePredTexDeltaDC1,   0, sizeof( Int  ) * m_uiNumPartition );
    10171035  memset( m_piWedgePredTexDeltaDC2,   0, sizeof( Int  ) * m_uiNumPartition );
     
    10881106#if HHI_DMM_PRED_TEX
    10891107      m_puiWedgePredTexTabIdx   [ui]=pcCU->getWedgePredTexTabIdx    (uiPartOffset+ui);
     1108#if LGE_DMM3_SIMP_C0044
     1109      m_puiWedgePredTexIntraTabIdx [ui]=pcCU->getWedgePredTexIntraTabIdx (uiPartOffset+ui);
     1110#endif
    10901111      m_piWedgePredTexDeltaDC1  [ui]=pcCU->getWedgePredTexDeltaDC1  (uiPartOffset+ui);
    10911112      m_piWedgePredTexDeltaDC2  [ui]=pcCU->getWedgePredTexDeltaDC2  (uiPartOffset+ui);
     
    12921313#if HHI_DMM_PRED_TEX
    12931314  m_puiWedgePredTexTabIdx    = pcCU->getWedgePredTexTabIdx()     + uiPart;   
     1315#if LGE_DMM3_SIMP_C0044
     1316  m_puiWedgePredTexIntraTabIdx = pcCU->getWedgePredTexIntraTabIdx() + uiPart;   
     1317#endif
    12941318  m_piWedgePredTexDeltaDC1   = pcCU->getWedgePredTexDeltaDC1()   + uiPart;   
    12951319  m_piWedgePredTexDeltaDC2   = pcCU->getWedgePredTexDeltaDC2()   + uiPart;   
     
    14831507#if HHI_DMM_PRED_TEX
    14841508  memcpy( m_puiWedgePredTexTabIdx    + uiOffset, pcCU->getWedgePredTexTabIdx(),     sizeof( UInt ) * uiNumPartition );
     1509#if LGE_DMM3_SIMP_C0044
     1510  memcpy( m_puiWedgePredTexIntraTabIdx + uiOffset, pcCU->getWedgePredTexIntraTabIdx(), sizeof( UInt ) * uiNumPartition );
     1511#endif
    14851512  memcpy( m_piWedgePredTexDeltaDC1   + uiOffset, pcCU->getWedgePredTexDeltaDC1(),   sizeof( Int  ) * uiNumPartition );
    14861513  memcpy( m_piWedgePredTexDeltaDC2   + uiOffset, pcCU->getWedgePredTexDeltaDC2(),   sizeof( Int  ) * uiNumPartition );
     
    16151642#if HHI_DMM_PRED_TEX
    16161643  memcpy( rpcCU->getWedgePredTexTabIdx()     + m_uiAbsIdxInLCU, m_puiWedgePredTexTabIdx,    sizeof( UInt ) * m_uiNumPartition );
     1644#if LGE_DMM3_SIMP_C0044
     1645  memcpy( rpcCU->getWedgePredTexIntraTabIdx() + m_uiAbsIdxInLCU, m_puiWedgePredTexIntraTabIdx,    sizeof( UInt ) * m_uiNumPartition );
     1646#endif
    16171647  memcpy( rpcCU->getWedgePredTexDeltaDC1()   + m_uiAbsIdxInLCU, m_piWedgePredTexDeltaDC1,   sizeof( Int  ) * m_uiNumPartition );
    16181648  memcpy( rpcCU->getWedgePredTexDeltaDC2()   + m_uiAbsIdxInLCU, m_piWedgePredTexDeltaDC2,   sizeof( Int  ) * m_uiNumPartition );
     
    17481778#if HHI_DMM_PRED_TEX
    17491779  memcpy( rpcCU->getWedgePredTexTabIdx()     + uiPartOffset, m_puiWedgePredTexTabIdx,    sizeof( UInt ) * uiQNumPart );
     1780#if LGE_DMM3_SIMP_C0044
     1781  memcpy( rpcCU->getWedgePredTexIntraTabIdx() + uiPartOffset, m_puiWedgePredTexIntraTabIdx, sizeof( UInt ) * uiQNumPart );
     1782#endif
    17501783  memcpy( rpcCU->getWedgePredTexDeltaDC1()   + uiPartOffset, m_piWedgePredTexDeltaDC1,   sizeof( Int  ) * uiQNumPart );
    17511784  memcpy( rpcCU->getWedgePredTexDeltaDC2()   + uiPartOffset, m_piWedgePredTexDeltaDC2,   sizeof( Int  ) * uiQNumPart );
     
    31903223}
    31913224
     3225#if LGE_ILLUCOMP_DEPTH_C0046
     3226//This modification is not needed after integrating JCT3V-C0137
     3227Bool TComDataCU::isICFlagRequired(UInt uiAbsPartIdx, UInt uiDepth)
     3228{
     3229  UInt uiPartAddr;
     3230  UInt iNumbPart;
     3231
     3232  if(!getSlice()->getIsDepth())
     3233  {
     3234    Int iWidth, iHeight;
     3235
     3236    iNumbPart = ( getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ? 1 : (getPartitionSize(uiAbsPartIdx) == SIZE_NxN ? 4 : 2) );
     3237
     3238    for(UInt i = 0; i < iNumbPart; i++)
     3239    {
     3240      getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true);
     3241      uiPartAddr += uiAbsPartIdx;
     3242
     3243      for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++)
     3244      {
     3245        RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
     3246        Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr);
     3247
     3248        if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx))
     3249        {
     3250          return true;
     3251        }
     3252      }
     3253    }
     3254  }
     3255  else
     3256  {
     3257    iNumbPart = getPic()->getNumPartInCU() >> (uiDepth << 1);
     3258
     3259    for(UInt i = 0; i < iNumbPart; i++)
     3260    {
     3261      uiPartAddr = uiAbsPartIdx + i;
     3262
     3263      for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++)
     3264      {
     3265        RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
     3266        Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr);
     3267
     3268        if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx))
     3269        {
     3270          return true;
     3271        }
     3272      }
     3273    }
     3274  }
     3275
     3276  return false;
     3277}
     3278#else
    31923279Bool TComDataCU::isICFlagRequired(UInt uiAbsPartIdx)
    31933280{
     
    32113298
    32123299      if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx))
     3300      {
    32133301        return true;
    32143302    }
    32153303  }
     3304  }
    32163305  return false;
    32173306}
     3307#endif
    32183308#endif
    32193309
     
    89259015}
    89269016
     9017#if LGE_DMM3_SIMP_C0044
     9018Void TComDataCU::setWedgePredTexIntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
     9019{
     9020  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
     9021
     9022  for ( UInt ui = 0; ui < uiCurrPartNumb; ui++ )
     9023  {
     9024    m_puiWedgePredTexIntraTabIdx[uiAbsPartIdx+ui] = uiTIdx;
     9025  }
     9026}
     9027#endif
     9028
    89279029Void TComDataCU::setWedgePredTexDeltaDC1SubParts( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth )
    89289030{
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.h

    r280 r287  
    266266#if HHI_DMM_PRED_TEX
    267267  UInt*         m_puiWedgePredTexTabIdx;
     268#if LGE_DMM3_SIMP_C0044
     269  UInt*         m_puiWedgePredTexIntraTabIdx;
     270#endif
    268271  Int*          m_piWedgePredTexDeltaDC1;
    269272  Int*          m_piWedgePredTexDeltaDC2;
     
    500503  Void          setICFlag             ( UInt uiIdx, Bool  uh )  { m_pbICFlag[uiIdx] = uh;          }
    501504  Void          setICFlagSubParts     ( Bool bICFlag,  UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
     505#if LGE_ILLUCOMP_DEPTH_C0046
     506  Bool          isICFlagRequired      (UInt uiAbsPartIdx, UInt uiDepth); //This modification is not needed after integrating JCT3V-C0137
     507#else
    502508  Bool          isICFlagRequired      (UInt uiAbsPartIdx);
     509#endif
    503510#endif
    504511
     
    838845  Void  setWedgePredTexTabIdx             ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexTabIdx[uiIdx] = uh;      }
    839846  Void  setWedgePredTexTabIdxSubParts     ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth );
     847#if LGE_DMM3_SIMP_C0044
     848  UInt* getWedgePredTexIntraTabIdx             ()                      { return m_puiWedgePredTexIntraTabIdx;           }
     849  UInt  getWedgePredTexIntraTabIdx             ( UInt uiIdx )          { return m_puiWedgePredTexIntraTabIdx[uiIdx];    }
     850  Void  setWedgePredTexIntraTabIdx             ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexIntraTabIdx[uiIdx] = uh;      }
     851  Void  setWedgePredTexIntraTabIdxSubParts     ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth );
     852#endif
    840853  Int*  getWedgePredTexDeltaDC1           ()                      { return m_piWedgePredTexDeltaDC1;          }
    841854  Int   getWedgePredTexDeltaDC1           ( UInt uiIdx )          { return m_piWedgePredTexDeltaDC1[uiIdx];   }
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp

    r280 r287  
    949949      UInt uiRShift = ( bi ? 14-g_uiBitDepth-g_uiBitIncrement : 0 );
    950950      UInt uiOffset = bi ? IF_INTERNAL_OFFS : 0;
     951#if LGE_ILLUCOMP_DEPTH_C0046
     952    Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefViewId( eRefPicList, iRefIdx ) != pcCU->getSlice()->getViewId());
     953#endif
    951954#if DEPTH_MAP_GENERATION
    952       xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, 0, 0, rpcYuvPred, uiRShift, uiOffset );
     955    xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, 0, 0, rpcYuvPred, uiRShift, uiOffset
     956#if LGE_ILLUCOMP_DEPTH_C0046
     957        , bICFlag
     958#endif
     959        );
    953960#else
    954961      xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, uiRShift, uiOffset );
     
    11521159Void
    11531160#if DEPTH_MAP_GENERATION
    1154 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset )
     1161TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset
     1162#if LGE_ILLUCOMP_DEPTH_C0046
     1163, Bool bICFlag
     1164#endif
     1165)
    11551166#else
    11561167TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset )
     
    12041215    }
    12051216  }
     1217
     1218#if LGE_ILLUCOMP_DEPTH_C0046
     1219  if(bICFlag)
     1220  {
     1221    Int a, b, iShift;
     1222    TComMv tTmpMV(pcMv->getHor()<<2, pcMv->getVer()<<2);
     1223
     1224    piRefY      = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr ) + iRefOffset;
     1225    piDstY      = rpcYuv->getLumaAddr( uiPartAddr );
     1226
     1227    xGetLLSICPrediction(pcCU, &tTmpMV, pcPicYuvRef, a, b, iShift);
     1228
     1229    for( Int y = 0; y < iHeight; y++, piDstY += iDstStride, piRefY += iRefStride )
     1230    {
     1231      for( Int x = 0; x < iWidth; x++ )
     1232      {
     1233        if(uiOffset)
     1234        {
     1235          Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement );
     1236          piDstY[ x ] = ( (a*piDstY[ x ]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS;
     1237        }
     1238        else
     1239          piDstY[ x ] = Clip( ( (a*piDstY[ x ]) >> iShift ) + b );
     1240      }
     1241    }
     1242  }
     1243#endif
    12061244}
    12071245
     
    23392377  iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
    23402378  iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
     2379#if FIX_LGE_ILLUCOMP_B0045
     2380  iRefX   = iCUPelX + (pMv->getHor() >> 2);
     2381  iRefY   = iCUPelY + (pMv->getVer() >> 2);
     2382#else
    23412383  iRefX   = iCUPelX + (pMv->getHor() >> 3);
    23422384  iRefY   = iCUPelY + (pMv->getVer() >> 3);
     2385#endif
    23432386  uiWidth = pcCU->getWidth(0) >> 1;
    23442387  uiHeight = pcCU->getHeight(0) >> 1;
     
    25542597  UInt  uiWedgeStride   = pcWedgelet->getStride();
    25552598
     2599#if HS_REFERENCE_SUBSAMPLE_C0154
     2600  Int subSamplePix;
     2601  if ( pcWedgelet->getWidth() == 32 )
     2602  {
     2603    subSamplePix = 2;
     2604  }
     2605  else
     2606  {
     2607    subSamplePix = 1;
     2608  }
     2609#endif
     2610
    25562611  if( bAbove )
    25572612  {
     2613#if HS_REFERENCE_SUBSAMPLE_C0154
     2614    for( Int k = 0; k < pcWedgelet->getWidth(); k+=subSamplePix )
     2615#else
    25582616    for( Int k = 0; k < pcWedgelet->getWidth(); k++ )
     2617#endif
    25592618    {
    25602619      if( true == pabWedgePattern[k] )
     
    25722631  if( bLeft )
    25732632  {
     2633#if HS_REFERENCE_SUBSAMPLE_C0154
     2634    for( Int k = 0; k < pcWedgelet->getHeight(); k+=subSamplePix )
     2635#else
    25742636    for( Int k = 0; k < pcWedgelet->getHeight(); k++ )
     2637#endif
    25752638    {
    25762639      if( true == pabWedgePattern[k*uiWedgeStride] )
     
    27512814}
    27522815
     2816#if LGE_DMM3_SIMP_C0044
     2817/**
     2818 - fetch best Wedgelet pattern at decoder
     2819 */
     2820UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt IntraTabIdx)
     2821{
     2822  assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
     2823
     2824  UInt          uiBestTabIdx = 0;
     2825  TComPic*      pcPicTex = pcCU->getSlice()->getTexturePic();
     2826  TComDataCU*   pcColTexCU = pcPicTex->getCU(pcCU->getAddr());
     2827  UInt          uiTexPartIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
     2828  Int           uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255;
     2829
     2830  std::vector< std::vector<UInt> > pauiWdgLstSz = g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]];
     2831
     2832  if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 )
     2833  {
     2834    std::vector<UInt>* pauiWdgLst = &pauiWdgLstSz[uiColTexIntraDir-2];
     2835    uiBestTabIdx    =   pauiWdgLst->at(IntraTabIdx);
     2836  }
     2837  else
     2838  {
     2839    WedgeNodeList* pacWedgeNodeList = &g_aacWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
     2840    uiBestTabIdx = pacWedgeNodeList->at(IntraTabIdx).getPatternIdx();
     2841  }
     2842
     2843  return uiBestTabIdx;
     2844}
     2845#endif
     2846
     2847#if LGE_DMM3_SIMP_C0044
     2848/**
     2849 - calculate best Wedgelet pattern at encoder
     2850 */
     2851UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Pel* piOrigi, UInt uiStride, UInt & ruiIntraTabIdx)
     2852#else
    27532853UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight )
     2854#endif
    27542855{
    27552856  assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
     
    27792880  Int  iDC2 = 0;
    27802881  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
    2781 
     2882#if LGE_DMM3_SIMP_C0044
     2883  ruiIntraTabIdx  = 0;
     2884#endif
    27822885#if HHIQC_DMMFASTSEARCH_B0039
    27832886  TComPic*      pcPicTex = pcCU->getSlice()->getTexturePic();
     
    27932896    {
    27942897      UInt uiIdx     =   pauiWdgLst->at(uiIdxW);
     2898#if LGE_DMM3_SIMP_C0044
     2899      calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piOrigi,   uiWidth,      iDC1, iDC2 );
     2900#else
    27952901      calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piRefBlkY, uiWidth,      iDC1, iDC2 );
     2902#endif
    27962903      assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred,    uiPredStride, iDC1, iDC2 );
    27972904
     2905#if LGE_DMM3_SIMP_C0044
     2906      UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piOrigi, uiStride, uiWidth, uiHeight, WedgeDist_SAD );
     2907#else
    27982908      UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD );
     2909#endif
    27992910
    28002911      if( uiActDist < uiBestDist || uiBestDist == MAX_UINT )
     
    28022913        uiBestDist   = uiActDist;
    28032914        uiBestTabIdx = uiIdx;
     2915#if LGE_DMM3_SIMP_C0044
     2916        ruiIntraTabIdx = uiIdxW;
     2917#endif
    28042918      }
    28052919    }
     
    28122926    for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ )
    28132927    {
     2928#if LGE_DMM3_SIMP_C0044
     2929      calcWedgeDCs       ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piOrigi, uiWidth,      iDC1, iDC2 );
     2930#else
    28142931      calcWedgeDCs       ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piRefBlkY, uiWidth,      iDC1, iDC2 );
     2932#endif
    28152933      assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piPred,    uiPredStride, iDC1, iDC2 );
    28162934
     2935#if LGE_DMM3_SIMP_C0044
     2936      UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piOrigi, uiStride, uiWidth, uiHeight, WedgeDist_SAD );
     2937#else
    28172938      UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD );
     2939#endif
    28182940
    28192941      if( uiActDist < uiBestNodeDist || uiBestNodeDist == MAX_UINT )
     
    28212943        uiBestNodeDist = uiActDist;
    28222944        uiBestNodeId   = uiNodeId;
    2823       }
    2824     }
    2825 
     2945#if LGE_DMM3_SIMP_C0044
     2946        ruiIntraTabIdx = uiNodeId;
     2947#endif
     2948      }
     2949    }
     2950#if LGE_DMM3_SIMP_C0044
     2951    uiBestTabIdx = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx();
     2952#else
    28262953    // refinement
    28272954    uiBestDist   = uiBestNodeDist;
     
    28432970      }
    28442971    }
     2972#endif
    28452973  }
    28462974#else
     
    28973025  {
    28983026    // decoder: get and store wedge pattern in CU
     3027      // decoder: get and store wedge pattern in CU
     3028#if LGE_DMM3_SIMP_C0044
     3029    UInt uiIntraTabIdx   = pcCU->getWedgePredTexIntraTabIdx ( uiAbsPartIdx );
     3030    uiTextureWedgeTabIdx = getBestWedgeFromTex( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight, uiIntraTabIdx );
     3031#else
    28993032    uiTextureWedgeTabIdx = getBestWedgeFromTex( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight );
     3033#endif
    29003034
    29013035    UInt uiDepth = (pcCU->getDepth(0)) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1);
     
    29123046  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    29133047
     3048#if HHI_DMM_DELTADC_Q1_C0034
     3049#else
    29143050  if( bDelta )
    29153051  {
     
    29173053    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    29183054  }
     3055#endif
    29193056
    29203057  // assign wedge pred DCs to prediction
     
    29373074  getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    29383075
     3076#if HHI_DMM_DELTADC_Q1_C0034
     3077#else
    29393078  if( bDelta )
    29403079  {
     
    29423081    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    29433082  }
     3083#endif
    29443084
    29453085  // assign wedge pred DCs to prediction
     
    31183258  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    31193259
     3260#if HHI_DMM_DELTADC_Q1_C0034
     3261#else
    31203262  if( bDelta )
    31213263  {
     
    31233265    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    31243266  }
     3267#endif
    31253268
    31263269  // assign wedge pred DCs to prediction
     
    31593302  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    31603303
     3304#if HHI_DMM_DELTADC_Q1_C0034
     3305#else
    31613306  if( bDelta )
    31623307  {
     
    31643309    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    31653310  }
     3311#endif
    31663312
    31673313  // assign wedge pred DCs to prediction
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPrediction.h

    r280 r287  
    106106  Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap );
    107107#endif
    108   Void xPredInterPrdDepthMap    ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset );
     108  Void xPredInterPrdDepthMap    ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset
     109#if LGE_ILLUCOMP_DEPTH_C0046
     110      , Bool bICFlag = false
     111#endif
     112      );
    109113#else
    110114#if MERL_VSP_C0152
     
    218222#if HHI_DMM_PRED_TEX
    219223  Void  getBestContourFromTex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge );
     224#if LGE_DMM3_SIMP_C0044
     225  UInt  getBestWedgeFromTex     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Pel * piOrgi, UInt uiStride, UInt &ruiIntraTabIdx);//encoder
     226  UInt  getBestWedgeFromTex     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt IntraTabIdx);//decoder
     227#else
    220228  UInt  getBestWedgeFromTex     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight );
     229#endif
    221230  Void  copyTextureLumaBlock    ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piDestBlockY, UInt uiWidth, UInt uiHeight );
    222231#endif
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComRom.cpp

    r189 r287  
    306306
    307307#if RWTH_SDC_DLT_B0036
     308#if SAIT_SDC_C0096
     309UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, PLANAR_IDX };
     310#else
    308311UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, DMM_WEDGE_PREDDIR_IDX, PLANAR_IDX };
     312#endif
    309313#endif
    310314
     
    587591};
    588592
     593#if LGE_DMM3_SIMP_C0044
     594const UChar g_aucWedgeTexPredBitsListIdx[7] =
     595{
     596  0,   //   2x2
     597  6,   //   4x4   
     598  9,  //   8x8   
     599  9,  //  16x16   
     600  9,  //  32x32   
     601  0,  //  64x64   
     602  0    // 128x128 
     603};
     604#endif
     605
    589606const UChar g_aucIntraSizeIdxToWedgeSize[7] =
    590607{
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComRom.h

    r189 r287  
    188188extern const WedgeResolution g_aeWedgeResolutionList[5];
    189189extern const UChar           g_aucWedgeFullBitsListIdx[7];
     190#if LGE_DMM3_SIMP_C0044
     191extern const UChar           g_aucWedgeTexPredBitsListIdx[7];
     192#endif
    190193extern const UChar           g_aucIntraSizeIdxToWedgeSize[7];
    191194
     
    199202
    200203#if RWTH_SDC_DLT_B0036
     204#if SAIT_SDC_C0096
     205#define RWTH_SDC_NUM_PRED_MODES 3
     206#else
    201207#define RWTH_SDC_NUM_PRED_MODES 4
     208#endif
    202209extern      UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES];
    203210#endif
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComSlice.cpp

    r280 r287  
    14081408    Int iRefStride = pcRefPicYuvOrg->getStride();
    14091409    Int iSumOrgSAD = 0;
     1410#if LGE_ILLUCOMP_DEPTH_C0046
     1411    Double dThresholdOrgSAD = getIsDepth() ? 0.1 : 0.05;
     1412#else
    14101413    double dThresholdOrgSAD = 0.05;
     1414#endif
    14111415    // Histogram building - luminance
    14121416    for ( Int y = 0; y < iHeight; y++)
  • branches/HTM-5.1-dev0/source/Lib/TLibCommon/TypeDef.h

    r284 r287  
    7171#define FIX_LGE_DVMCP_B0133               1
    7272
     73// 3rd meeting
     74#define FIX_DMM_CTX_INIT_C0034            1    // JCT3V-C0034 fix for wrong init type of DMM contexts (UChar instead of Short)
     75#define FIX_SDC_ENC_C0143                 1    // JCT3V-C0143 fix for unnecessary encoder checks in case of SDC
    7376
    7477// FCO
     
    8891#define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
    8992#define HHIQC_DMMFASTSEARCH_B0039         1   // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3
     93#define HHI_DMM_DELTADC_Q1_C0034          1   // JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values
     94#if HHIQC_DMMFASTSEARCH_B0039 && HHI_DMM_PRED_TEX
     95#define LGE_DMM3_SIMP_C0044               1
     96#endif
     97
     98#if RWTH_SDC_DLT_B0036
     99#define SAIT_SDC_C0096                    1   // JCT3V-C0096: Improved Simple Depth Coding(removal of DMM2 among four SDC modes(DC, Planar, DMM1 and DMM2))
     100#endif
    90101
    91102///// ***** INTERVIEW MOTION VECTOR PREDICTION *********
     
    147158#if LGE_ILLUCOMP_B0045
    148159#define LGE_ILLUCOMP_B0045_ENCSIMP        1
     160#define FIX_LGE_ILLUCOMP_B0045            1
     161#define LGE_ILLUCOMP_DEPTH_C0046          1   // JCT2-C0046 Apply illumination compensation to depth
     162#if LGE_ILLUCOMP_DEPTH_C0046
     163#define FIX_ILLUCOMP_DEPTH                1
     164#endif
    149165#endif
    150166
     
    154170///// ***** QUADTREE LIMITATION *********
    155171#define OL_QTLIMIT_PREDCODING_B0068       1    //JCT3V-B0068
     172#define HHI_QTLPC_RAU_OFF_C0160           1   // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
    156173
    157174///// ***** OTHERS *********
     
    161178#define HHI_FULL_PEL_DEPTH_MAP_MV_ACC     1   // full-pel mv accuracy for depth maps
    162179#define VIDYO_VPS_INTEGRATION             1
     180#define HHI_DEPTH_INTRA_SEARCH_RAU_C0160  1   // JCT3V-C0160 change 1: full Intra search in depth random access units
    163181
    164182///// ***** VSP *********
     
    237255#if RWTH_SDC_DLT_B0036
    238256#define Log2( n ) ( log((double)n) / log(2.0) )
     257#define HS_REFERENCE_SUBSAMPLE_C0154      1
    239258#endif
    240259
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r280 r287  
    19341934  {
    19351935    UInt uiCodeTmp = 0;
    1936     if ( rpcSlice->getSPS()->getViewId() && !rpcSlice->getSPS()->isDepth() )
     1936    if ( rpcSlice->getSPS()->getViewId()
     1937#if !LGE_ILLUCOMP_DEPTH_C0046
     1938        && !rpcSlice->getSPS()->isDepth()
     1939#endif
     1940        )
    19371941    {
    19381942      READ_FLAG (uiCodeTmp, "applying IC flag");
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r280 r287  
    375375        pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );
    376376      }
     377#if LGE_ILLUCOMP_DEPTH_C0046
     378      m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     379#endif
    377380    }
    378381    else
     
    473476 
    474477#if LGE_ILLUCOMP_B0045
     478#if LGE_ILLUCOMP_DEPTH_C0046 && HHI_MPI
     479  if( pcCU->getTextureModeDepth( uiAbsPartIdx ) != uiDepth )
     480  {
     481#endif
    475482  m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    476483#endif
     
    480487  {
    481488    m_pcEntropyDecoder->decodeResPredFlag    ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
     489  }
     490#endif
     491#if LGE_ILLUCOMP_DEPTH_C0046 && HHI_MPI
    482492  }
    483493#endif
     
    505515        pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );
    506516      }
    507 
     517#if LGE_ILLUCOMP_DEPTH_C0046
     518      m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     519#endif
    508520      if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary )
    509521      {
     
    14181430  Int iSumPix[2];
    14191431  memset(iSumPix, 0, sizeof(Int)*2);
    1420  
     1432#if HS_REFERENCE_SUBSAMPLE_C0154
     1433  Int subSamplePix;
     1434  if ( uiSize == 64 || uiSize == 32 )
     1435  {
     1436    subSamplePix = 2;
     1437  }
     1438  else
     1439  {
     1440    subSamplePix = 1;
     1441  }
     1442  for (Int y=0; y<uiSize; y+=subSamplePix)
     1443  {
     1444    for (Int x=0; x<uiSize; x+=subSamplePix)
     1445    {
     1446      UChar ucSegment = pMask?(UChar)pMask[x]:0;
     1447      assert( ucSegment < uiNumSegments );
     1448 
     1449      iSumDepth[ucSegment] += pOrig[x];
     1450      iSumPix[ucSegment]   += 1;
     1451    }
     1452    pOrig  += uiStride*subSamplePix;
     1453    pMask  += uiMaskStride*subSamplePix;
     1454  }
     1455#else
    14211456  for (Int y=0; y<uiSize; y++)
    14221457  {
     
    14331468    pMask  += uiMaskStride;
    14341469  }
    1435  
     1470#endif
    14361471  // compute mean for each segment
    14371472  for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r280 r287  
    7272  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
    7373
    74   if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth())
     74  if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0)
     75#if !LGE_ILLUCOMP_DEPTH_C0046
     76      || pcCU->getSlice()->getSPS()->isDepth()
     77#endif
     78      )
    7579  {
    7680    return;
     
    8084    return;
    8185
     86#if LGE_ILLUCOMP_DEPTH_C0046
     87  if(pcCU->isICFlagRequired(uiAbsPartIdx, uiDepth)) //This modification is not needed after integrating JCT3V-C0137
     88#else
    8289  if(pcCU->isICFlagRequired(uiAbsPartIdx))
     90#endif
    8391    m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth );
    8492}
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r189 r287  
    762762  Bool bIntraSliceDetect  = (pcCU->getSlice()->getSliceType() == I_SLICE);
    763763
     764#if HHI_QTLPC_RAU_OFF_C0160
     765  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
     766  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
     767#else
    764768  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
     769#endif
    765770  {
    766771    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    804809  Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE);
    805810
     811#if HHI_QTLPC_RAU_OFF_C0160
     812  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
     813  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC())
     814#else
    806815  if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())
     816#endif
    807817  {
    808818    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     
    970980#if HHI_DMM_PRED_TEX
    971981    if( intraPredMode == DMM_WEDGE_PREDTEX_D_IDX )     { xParseWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
     982#if LGE_DMM3_SIMP_C0044
     983    if( intraPredMode == DMM_WEDGE_PREDTEX_IDX )       { xParseWedgePredTexInfo       ( pcCU, uiAbsPartIdx, uiDepth ); }
     984#endif
    972985    if( intraPredMode == DMM_CONTOUR_PREDTEX_D_IDX )   { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); }
    973986#endif
     
    24122425#endif
    24132426#if HHI_DMM_PRED_TEX
     2427#if LGE_DMM3_SIMP_C0044
     2428Void TDecSbac::xParseWedgePredTexInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2429{
     2430  Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx);
     2431  Int iBits = g_aucWedgeTexPredBitsListIdx[iIntraIdx];
     2432
     2433  UInt uiSymbol, uiTabIdx = 0;
     2434  for ( Int i = 0; i < iBits; i++ )
     2435  {
     2436    m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmmDataSCModel.get(0, 0, 3) );
     2437    uiTabIdx += ( uiSymbol && i == 0 ) ? 1 : 0;
     2438    uiTabIdx += ( uiSymbol && i == 1 ) ? 2 : 0;
     2439    uiTabIdx += ( uiSymbol && i == 2 ) ? 4 : 0;
     2440    uiTabIdx += ( uiSymbol && i == 3 ) ? 8 : 0;
     2441    uiTabIdx += ( uiSymbol && i == 4 ) ? 16 : 0;
     2442    uiTabIdx += ( uiSymbol && i == 5 ) ? 32 : 0;
     2443    uiTabIdx += ( uiSymbol && i == 6 ) ? 64 : 0;
     2444    uiTabIdx += ( uiSymbol && i == 7 ) ? 128 : 0;
     2445    uiTabIdx += ( uiSymbol && i == 8 ) ? 256 : 0;
     2446    uiTabIdx += ( uiSymbol && i == 9 ) ? 512 : 0;
     2447    uiTabIdx += ( uiSymbol && i == 10 ) ? 1024 : 0;
     2448  }
     2449
     2450  pcCU->setWedgePredTexIntraTabIdxSubParts( uiTabIdx, uiAbsPartIdx, uiDepth );
     2451}
     2452#endif
     2453
    24142454Void TDecSbac::xParseWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    24152455{
     2456#if LGE_DMM3_SIMP_C0044
     2457  xParseWedgePredTexInfo( pcCU, uiAbsPartIdx, uiDepth );
     2458#endif
    24162459  UInt uiDC1, uiDC2;
    24172460  xReadExGolombLevel( uiDC1, m_cDmmDataSCModel.get(0, 0, 1) );
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.h

    r280 r287  
    152152#endif
    153153#if HHI_DMM_PRED_TEX
     154#if LGE_DMM3_SIMP_C0044
     155  Void xParseWedgePredTexInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     156#endif
    154157  Void xParseWedgePredTexDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    155158  Void xParseContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • 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.