Changeset 646 in 3DVCSoftware


Ignore:
Timestamp:
19 Oct 2013, 02:18:06 (11 years ago)
Author:
tech
Message:

Macro removal part 1.

Location:
branches/HTM-8.2-dev0-Cleanup/source
Files:
43 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev0-Cleanup/source/App/TAppDecoder/TAppDecTop.cpp

    r622 r646  
    311311        TComPic* picLastCoded = m_ivPicLists.getPic( m_tDecTop[dI]->getLayerId(), pocLastPic );
    312312        assert( picLastCoded != NULL );       
    313 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
    314313        picLastCoded->compressMotion(1);
    315 #else
    316         picLastCoded->compressMotion();         
    317 #endif
    318314      }
    319315    }
  • branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncCfg.cpp

    r638 r646  
    521521  ("IlluCompEnable",           m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation")
    522522#endif
    523 #if LGE_INTER_SDC_E0156
     523#if H_3D_INTER_SDC
    524524  ("InterSDC",                 m_bDepthInterSDCFlag,        true, "Enable depth inter SDC")
    525525#endif
     
    24762476  printf("DLT:%d ", m_useDLT );
    24772477#endif
    2478 #if LGE_INTER_SDC_E0156
     2478#if H_3D_INTER_SDC
    24792479  printf( "interSDC: %d ", m_bDepthInterSDCFlag ? 1 : 0 );
    24802480#endif
  • branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncCfg.h

    r638 r646  
    473473  Bool      m_bUsePC;                                         ///< flag for using Predictive Coding with QTL
    474474#endif
    475 #if LGE_INTER_SDC_E0156
     475#if H_3D_INTER_SDC
    476476  Bool m_bDepthInterSDCFlag;                                ///< flag for inter SDC of depth map coding
    477477#endif
  • branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncTop.cpp

    r638 r646  
    232232#endif
    233233    //====== Depth Inter SDC =========
    234 #if LGE_INTER_SDC_E0156
     234#if H_3D_INTER_SDC
    235235    m_cTEncTop.setInterSDCEnable               ( isDepth ? m_bDepthInterSDCFlag    : false );
    236236#endif
     
    16991699    vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && m_viewSynthesisPredFlag );         
    17001700#endif     
    1701 #if LGE_INTER_SDC_E0156
     1701#if H_3D_INTER_SDC
    17021702    vps.setInterSDCFlag( layer, !isLayerZero && isDepth && m_bDepthInterSDCFlag );
    17031703#endif
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TAppCommon/TAppComCamPara.cpp

    r637 r646  
    615615{
    616616  UInt uiFoundLine = -1;
    617 #if H_3D_FIX_REN_WARNING
    618617  if ( !xGetCameraDataRow( iView, uiFrame, uiFoundLine ) && xIsIn( m_aiSortedBaseViews, iView ))
    619 #else 
    620   if ( !xGetCameraDataRow( iView, uiFrame, uiFoundLine ) )
    621 #endif
    622618  {
    623619    AOT( m_aadCameraParameters[ uiFoundLine ].size() < 6 );
     
    635631    Int  iDummy;
    636632
    637 #if H_3D_FIX_REN_WARNING
    638633    if( !xGetLeftRightView( iView, m_aiSortedBaseViews, iLeftView, iRightView, iDummy, iDummy ) ||
    639 #else
    640     if( !xGetLeftRightView( iView, m_aiViewsInCfgFile, iLeftView, iRightView, iDummy, iDummy ) ||
    641 #endif
    642634         xGetCameraDataRow( iLeftView,  uiFrame, uiLeftViewLine  )                             ||
    643635         xGetCameraDataRow( iRightView, uiFrame, uiRightViewLine )
    644636      )
    645637    {
    646 #if H_3D_FIX_REN_WARNING
    647638      std::cerr << "No left or no right base view next to view " << (Double)iView / m_dViewNumPrec << " for Frame " << uiFrame << " given in CameraParameterFile" << std::endl;
    648 #else
    649       std::cerr << "No Left or no Right View next to View " << (Double)iView / m_dViewNumPrec << " for Frame " << uiFrame << " given in CameraParameterFile" << std::endl;
    650 #endif
    651639      AOT(true);
    652640      exit( EXIT_FAILURE );
     
    13521340      }
    13531341    }
    1354 #if H_3D_FIX_REN_WARNING
     1342
    13551343    Bool bIgnoreFirst = true;     
    13561344    for( UInt uiERView = 0; uiERView < m_aiSynthViews.size() && !m_bSetupFromCoded; uiERView++ )
     
    13711359      std::cout << std::endl;
    13721360    }
    1373 #endif
    13741361
    13751362    Bool bInterpolateFirst = true;
     
    13901377        if ( bInterpolateFirst )
    13911378        {
    1392 #if H_3D_FIX_REN_WARNING                       
    13931379          std::cout << "Interpolating camera parameters      for virtual view(s): " ;
    1394 #else
    1395           std::cout << "Interpolating Camera Parameters for View(s) " ;
    1396 #endif
    13971380            bInterpolateFirst = false;
    13981381        }         
     
    14981481}
    14991482
    1500 #if H_3D_FIX_REN_WARNING
    15011483Bool
    15021484  TAppComCamPara::xIsIn( std::vector<Int>& rVec, Int iElem)
     
    15091491  return bFound;
    15101492}
    1511 #endif
    15121493
    15131494Int TAppComCamPara::getRelDistLeft( Int iSynthViewIdx, Int iLeftViewIdx, Int iRightViewIdx )
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TAppCommon/TAppComCamPara.h

    r637 r646  
    131131  Void  xSetupBaseViewsFromCoded  ();
    132132  Void  xSetupBaseViews           ( Char* pchBaseViewNumbers, UInt uiNumBaseViews );
    133 #if H_3D_FIX_REN_WARNING
    134133  Bool  xIsIn                     ( std::vector<Int>& rVec, Int iNumber);
    135 #endif
    136 
    137134
    138135  // functions for getting and setting scales and offsets
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/ContextTables.h

    r622 r646  
    112112#if H_3D_DIM_DMM
    113113#define NUM_DMM1_DATA_CTX             1       ///< number of context models for DMM1 data
    114 #if !SEC_DMM2_E0146_HHIFIX
    115 #define NUM_DMM2_DATA_CTX             1       ///< number of context models for DMM2 data
    116 #endif
    117114#define NUM_DMM3_DATA_CTX             1       ///< number of context models for DMM3 data
    118115#endif
     
    127124#endif
    128125
    129 #if LGE_INTER_SDC_E0156
     126#if H_3D_INTER_SDC
    130127#define NUM_INTER_SDC_FLAG_CTX        1      ///< number of context models for inter SDC flag
    131128#define NUM_INTER_SDC_SIGN_FLAG_CTX   1      ///< number of context models for sign of inter SDC residual
     
    390387#endif
    391388#if H_3D_DIM
    392 #if ZJU_DEPTH_INTRA_MODE_E0204
    393389static const UChar
    394390INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] =
     
    398394    {64, 0, CNU, CNU, 168, 109,   0, 0}
    399395};
    400 #else
    401 static const UChar
    402 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] =
    403 {
    404   {0,  0,  64,   0, CNU,   0, CNU, 0},
    405   {0, 64,   0, CNU,   0, CNU,   0, 0},
    406   {64, 0, CNU,   0, CNU,   0,   0, 0}
    407 };
    408 #endif
     396
    409397static const UChar
    410398INIT_DDC_FLAG[3][NUM_DDC_FLAG_CTX] =
     
    429417  { CNU },
    430418};
    431 #if !SEC_DMM2_E0146_HHIFIX
    432 static const UChar
    433 INIT_DMM2_DATA[3][NUM_DMM2_DATA_CTX] =
    434 {
    435   { CNU },
    436   { CNU },
    437   { CNU },
    438 };
    439 #endif
    440419static const UChar
    441420INIT_DMM3_DATA[3][NUM_DMM3_DATA_CTX] =
     
    473452#endif
    474453
    475 #if LGE_INTER_SDC_E0156
     454#if H_3D_INTER_SDC
    476455static const UChar
    477456INIT_INTER_SDC_FLAG[3][NUM_INTER_SDC_FLAG_CTX] =
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComDataCU.cpp

    r630 r646  
    120120    m_dmmWedgeTabIdx[i] = NULL;
    121121  }
    122 #if !SEC_DMM2_E0146_HHIFIX
    123   m_dmm2DeltaEnd    = NULL;
    124 #endif
    125122  m_dmm3IntraTabIdx = NULL;
    126123#endif
     
    153150  m_pbICFlag             = NULL;
    154151#endif
    155 #if LGE_INTER_SDC_E0156
     152#if H_3D_INTER_SDC
    156153  m_pbInterSDCFlag       = NULL;
    157154  for( Int i = 0; i < 4; i++ )
     
    274271      m_dmmWedgeTabIdx[i]    = (UInt*)xMalloc(UInt, uiNumPartition);
    275272    }
    276 #if !SEC_DMM2_E0146_HHIFIX
    277     m_dmm2DeltaEnd    = (Int* )xMalloc(Int,  uiNumPartition);
    278 #endif
    279273    m_dmm3IntraTabIdx = (UInt*)xMalloc(UInt, uiNumPartition);
    280274#endif
     
    292286#endif
    293287#endif
    294 #if LGE_INTER_SDC_E0156
     288#if H_3D_INTER_SDC
    295289    m_pbInterSDCFlag     = (Bool*  )xMalloc(Bool,   uiNumPartition);
    296290    for( Int i = 0; i < 4; i++ )
     
    305299    m_acCUMvField[1].setNumPartition(uiNumPartition );
    306300  }
    307 #if LGE_INTER_SDC_E0156
     301#if H_3D_INTER_SDC
    308302  m_pucInterSDCMask     = (UChar*  )xMalloc(UChar,    g_uiMaxCUHeight*g_uiMaxCUWidth);
    309303#endif
     
    410404      if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; }
    411405    }
    412 #if !SEC_DMM2_E0146_HHIFIX
    413     if ( m_dmm2DeltaEnd    ) { xFree( m_dmm2DeltaEnd    ); m_dmm2DeltaEnd    = NULL; }
    414 #endif
    415406    if ( m_dmm3IntraTabIdx ) { xFree( m_dmm3IntraTabIdx ); m_dmm3IntraTabIdx = NULL; }
    416407#endif
     
    428419#endif
    429420#endif   
    430 #if LGE_INTER_SDC_E0156
     421#if H_3D_INTER_SDC
    431422    if ( m_pbInterSDCFlag     ) { xFree(m_pbInterSDCFlag);      m_pbInterSDCFlag    = NULL; }
    432423    for(Int i = 0; i < 4; i++ )
     
    436427#endif
    437428  }
    438 #if LGE_INTER_SDC_E0156
     429#if H_3D_INTER_SDC
    439430  if ( m_pucInterSDCMask     ) { xFree(m_pucInterSDCMask);      m_pucInterSDCMask    = NULL; }
    440431#endif
     
    575566    m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui];
    576567#endif
    577 #if LGE_INTER_SDC_E0156
     568#if H_3D_INTER_SDC
    578569    m_pbInterSDCFlag[ui] = pcFrom->m_pbInterSDCFlag[ui];
    579570#endif
     
    631622      memset( m_dmmWedgeTabIdx[i] + firstElement, 0,                      numElements * sizeof( *m_dmmWedgeTabIdx[i] ) );
    632623    }
    633 #if !SEC_DMM2_E0146_HHIFIX
    634     memset( m_dmm2DeltaEnd      + firstElement, 0,                        numElements * sizeof( *m_dmm2DeltaEnd    ) );
    635 #endif
    636624    memset( m_dmm3IntraTabIdx   + firstElement, 0,                        numElements * sizeof( *m_dmm3IntraTabIdx ) );
    637625#endif
     
    649637#endif
    650638#endif
    651 #if LGE_INTER_SDC_E0156
     639#if H_3D_INTER_SDC
    652640    memset( m_pbInterSDCFlag   + firstElement,     0,                    numElements * sizeof( *m_pbInterSDCFlag ) );
    653641    for( Int i = 0; i < 4; i++ )
     
    811799        m_dmmWedgeTabIdx[i] [ui] = 0;
    812800      }
    813 #if !SEC_DMM2_E0146_HHIFIX
    814       m_dmm2DeltaEnd    [ui] = 0;
    815 #endif
    816801      m_dmm3IntraTabIdx [ui] = 0;
    817802#endif
     
    822807#endif
    823808#endif
    824 #if LGE_INTER_SDC_E0156
     809#if H_3D_INTER_SDC
    825810      m_pbInterSDCFlag[ui] = false;
    826811      for( Int i = 0; i < 4; i++ )
     
    925910    memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition );
    926911  }
    927 #if !SEC_DMM2_E0146_HHIFIX
    928   memset( m_dmm2DeltaEnd   , 0, sizeof(Int ) * m_uiNumPartition );
    929 #endif
    930912  memset( m_dmm3IntraTabIdx, 0, sizeof(UInt) * m_uiNumPartition );
    931913#endif
     
    943925#endif
    944926#endif
    945 #if LGE_INTER_SDC_E0156
     927#if H_3D_INTER_SDC
    946928  memset( m_pbInterSDCFlag,           0, sizeof( Bool ) * m_uiNumPartition );
    947929  for( Int i = 0; i < 4; i++ )
     
    1010992        m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui];
    1011993      }
    1012 #if !SEC_DMM2_E0146_HHIFIX
    1013       m_dmm2DeltaEnd    [ui] = pcCU->m_dmm2DeltaEnd   [uiPartOffset+ui];
    1014 #endif
    1015994      m_dmm3IntraTabIdx [ui] = pcCU->m_dmm3IntraTabIdx[uiPartOffset+ui];
    1016995#endif
     
    10211000#endif
    10221001#endif
    1023 #if LGE_INTER_SDC_E0156
     1002#if H_3D_INTER_SDC
    10241003      m_pbInterSDCFlag      [ui] = pcCU->m_pbInterSDCFlag    [ uiPartOffset + ui ];
    10251004      for( Int i = 0; i < 4; i++ )
     
    11671146    m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart;
    11681147  }
    1169 #if !SEC_DMM2_E0146_HHIFIX
    1170   m_dmm2DeltaEnd    = pcCU->getDmm2DeltaEnd()    + uiPart;
    1171 #endif
    11721148  m_dmm3IntraTabIdx = pcCU->getDmm3IntraTabIdx() + uiPart;
    11731149#endif
     
    11851161#endif
    11861162#endif 
    1187 #if LGE_INTER_SDC_E0156
     1163#if H_3D_INTER_SDC
    11881164  m_pbInterSDCFlag          = pcCU->getInterSDCFlag()       + uiPart;
    11891165  for( Int i = 0; i < 4; i++ )
     
    13661342    memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition );
    13671343  }
    1368 #if !SEC_DMM2_E0146_HHIFIX
    1369   memcpy( m_dmm2DeltaEnd    + uiOffset, pcCU->getDmm2DeltaEnd()   , sizeof(Int ) * uiNumPartition );
    1370 #endif
    13711344  memcpy( m_dmm3IntraTabIdx + uiOffset, pcCU->getDmm3IntraTabIdx(), sizeof(UInt) * uiNumPartition );
    13721345#endif
     
    13841357#endif
    13851358#endif
    1386 #if LGE_INTER_SDC_E0156
     1359#if H_3D_INTER_SDC
    13871360  memcpy( m_pbInterSDCFlag  + uiOffset, pcCU->getInterSDCFlag(),      iSizeInBool  );
    13881361  for( Int i = 0; i < 4; i++ )
     
    14961469    memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition );
    14971470  }
    1498 #if !SEC_DMM2_E0146_HHIFIX
    1499   memcpy( rpcCU->getDmm2DeltaEnd()    + m_uiAbsIdxInLCU, m_dmm2DeltaEnd   , sizeof(Int ) * m_uiNumPartition );
    1500 #endif
    15011471  memcpy( rpcCU->getDmm3IntraTabIdx() + m_uiAbsIdxInLCU, m_dmm3IntraTabIdx, sizeof(UInt) * m_uiNumPartition );
    15021472#endif
     
    15141484#endif
    15151485#endif
    1516 #if LGE_INTER_SDC_E0156
     1486#if H_3D_INTER_SDC
    15171487  memcpy( rpcCU->getInterSDCFlag() + m_uiAbsIdxInLCU, m_pbInterSDCFlag,      iSizeInBool  );
    15181488  for( Int i = 0;i < 4; i++ )
     
    16121582    memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart );
    16131583  }
    1614 #if !SEC_DMM2_E0146_HHIFIX
    1615   memcpy( rpcCU->getDmm2DeltaEnd()    + uiPartOffset, m_dmm2DeltaEnd   , sizeof(Int ) * uiQNumPart );
    1616 #endif
    16171584  memcpy( rpcCU->getDmm3IntraTabIdx() + uiPartOffset, m_dmm3IntraTabIdx, sizeof(UInt) * uiQNumPart );
    16181585#endif
     
    16301597#endif
    16311598#endif
    1632 #if LGE_INTER_SDC_E0156
     1599#if H_3D_INTER_SDC
    16331600  memcpy( rpcCU->getInterSDCFlag() + uiPartOffset, m_pbInterSDCFlag,      iSizeInBool  );
    16341601  for( Int i = 0; i < 4; i++ )
     
    23512318#endif
    23522319
    2353 #if LGE_INTER_SDC_E0156
     2320#if H_3D_INTER_SDC
    23542321Void TComDataCU::setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    23552322{
     
    50074974                                        + ( iPartWidth/m_pcPic->getMinCUWidth()  )/2];
    50084975}
    5009 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
    5010 Void TComDataCU::compressMV(int scale)
     4976#if H_3D
     4977Void TComDataCU::compressMV(Int scale)
    50114978#else
    50124979Void TComDataCU::compressMV()
    50134980#endif
    50144981{
    5015 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
     4982#if H_3D
    50164983  Int scaleFactor = (4 / scale ) * AMVP_DECIMATION_FACTOR / m_unitSize;
    50174984#else
     
    57205687  TComMv defaultDV(0, 0);
    57215688  pDInfo->m_acNBDV = defaultDV;
    5722 #if NBDV_DEFAULT_VIEWIDX_BUGFIX
     5689
    57235690  Int valid = 0;
    57245691  Int viewIndex = 0;
     
    57715738#endif
    57725739  }
    5773 #else
    5774   pDInfo->m_aVIdxCan = 0;
    5775 #if H_3D_NBDV_REF
    5776   TComPic* picDepth = NULL;
    5777   picDepth = getSlice()->getIvPic( true, 0 );
    5778   assert(picDepth!=NULL);
    5779 
    5780   if (picDepth && bDepthRefine)
    5781   {
    5782     estimateDVFromDM(0, uiPartIdx, picDepth, uiPartAddr, &defaultDV ); // from base view
    5783   }
    5784   pDInfo->m_acDoNBDV = defaultDV;
    5785 #endif
    5786 #endif
    57875740  return false;
    57885741}
     
    63086261  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; }
    63096262}
    6310 #if !SEC_DMM2_E0146_HHIFIX
    6311 Void  TComDataCU::setDmm2DeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth )
    6312 {
    6313   UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
    6314   for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm2DeltaEnd[uiAbsPartIdx+ui] = iDelta; }
    6315 }
    6316 #endif
    63176263Void  TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
    63186264{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComDataCU.h

    r622 r646  
    208208#if H_3D_DIM_DMM
    209209  UInt*         m_dmmWedgeTabIdx[DMM_NUM_TYPE];
    210 #if !SEC_DMM2_E0146_HHIFIX
    211   Int*          m_dmm2DeltaEnd;
    212 #endif
    213210  UInt*         m_dmm3IntraTabIdx;
    214211#endif
     
    225222#endif
    226223#endif
    227 #if LGE_INTER_SDC_E0156
     224#if H_3D_INTER_SDC
    228225  Bool*         m_pbInterSDCFlag;
    229226  Int*          m_apSegmentInterDCOffset[4];
     
    545542  Void  setDmmWedgeTabIdxSubParts     ( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth );
    546543
    547 #if !SEC_DMM2_E0146_HHIFIX
    548   Int*  getDmm2DeltaEnd               ()                      { return m_dmm2DeltaEnd;        }
    549   Int   getDmm2DeltaEnd               ( UInt uiIdx )          { return m_dmm2DeltaEnd[uiIdx]; }
    550   Void  setDmm2DeltaEnd               ( UInt uiIdx, Int iD )  { m_dmm2DeltaEnd[uiIdx] = iD;   }
    551   Void  setDmm2DeltaEndSubParts       ( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth );
    552 #endif
    553 
    554544  UInt* getDmm3IntraTabIdx            ()                      { return m_dmm3IntraTabIdx;        }
    555545  UInt  getDmm3IntraTabIdx            ( UInt uiIdx )          { return m_dmm3IntraTabIdx[uiIdx]; }
     
    588578#endif
    589579#endif
    590 #if LGE_INTER_SDC_E0156
     580#if H_3D_INTER_SDC
    591581  Bool*         getInterSDCFlag     ()                        { return m_pbInterSDCFlag;               }
    592582  Bool          getInterSDCFlag     ( UInt uiIdx )            { return m_pbInterSDCFlag[uiIdx];        }
     
    626616  Void          getMvPredAbove        ( TComMv&     rcMvPred )   { rcMvPred = m_cMvFieldB.getMv(); }
    627617  Void          getMvPredAboveRight   ( TComMv&     rcMvPred )   { rcMvPred = m_cMvFieldC.getMv(); }
    628 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
    629   Void          compressMV            (int scale);
     618#if H_3D
     619  Void          compressMV            ( Int scale );
    630620#else           
    631621  Void          compressMV            ();
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComPattern.h

    r608 r646  
    102102  Bool              m_bICFlag;
    103103#endif
    104 #if LGE_INTER_SDC_E0156
     104#if H_3D_INTER_SDC
    105105  Bool              m_bSDCMRSADFlag;
    106106#endif
     
    119119  Void  setICFlag( Bool bICFlag ) { m_bICFlag = bICFlag; }
    120120#endif
    121 #if LGE_INTER_SDC_E0156
     121#if H_3D_INTER_SDC
    122122  Bool  getSDCMRSADFlag()         { return m_bSDCMRSADFlag; }
    123123  Void  setSDCMRSADFlag( Bool bSDCMRSADFlag )    { m_bSDCMRSADFlag = bSDCMRSADFlag; }
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComPic.cpp

    r630 r646  
    157157  deleteSEIs(m_SEIs);
    158158}
    159 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
    160 Void TComPic::compressMotion(int scale)
     159#if H_3D
     160Void TComPic::compressMotion(Int scale)
    161161#else
    162162Void TComPic::compressMotion()
     
    167167  {
    168168    TComDataCU* pcCU = pPicSym->getCU(uiCUAddr);
    169 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
     169#if H_3D
    170170    pcCU->compressMV(scale);
    171171#else
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComPic.h

    r608 r646  
    186186  Void          setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i;    }
    187187  Int           getNumReorderPics(UInt tlayer)        { return m_numReorderPics[tlayer]; }
    188 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
    189   Void          compressMotion(int scale);
     188#if H_3D
     189  Void          compressMotion(Int scale);
    190190#else   
    191191  Void          compressMotion();
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComPrediction.cpp

    r630 r646  
    3939#include "TComPrediction.h"
    4040
    41 #if SHARP_ILLUCOMP_REFINE_E0046
    42 #define IC_REG_COST_SHIFT 7
    43 #define IC_CONST_SHIFT 5
    44 #define IC_SHIFT_DIFF 12
    45 #endif
    46 
    4741//! \ingroup TLibCommon
    4842//! \{
     
    6963  if (m_pDepthBlock != NULL)
    7064      free(m_pDepthBlock);
    71 #if NTT_VSP_COMMON_E0207_E0208
    7265  m_cYuvDepthOnVsp.destroy();
    73 #endif
    7466#endif
    7567
     
    129121    m_acYuvPredBase[1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight );
    130122#endif
    131 #if NTT_VSP_COMMON_E0207_E0208
     123#if H_3D_VSP
    132124    m_cYuvDepthOnVsp.create( g_uiMaxCUWidth, g_uiMaxCUHeight );
    133125#endif
     
    143135  }
    144136#if H_3D_IC
    145 #if SHARP_ILLUCOMP_REFINE_E0046
    146137  m_uiaShift[0] = 0;
    147138  for( Int i = 1; i < 64; i++ )
     
    149140    m_uiaShift[i] = ( (1 << 15) + i/2 ) / i;
    150141  }
    151 #else
    152   for( Int i = 1; i < 64; i++ )
    153   {
    154     m_uiaShift[i-1] = ( (1 << 15) + i/2 ) / i;
    155   }
    156 #endif
    157142#endif
    158143}
     
    456441        dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
    457442      } break;
    458 #if !SEC_DMM2_E0146_HHIFIX
    459     case( DMM2_IDX ):
    460       {
    461         UInt uiTabIdx = 0;
    462         if( bFastEnc ) { uiTabIdx = pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ); }
    463         else
    464         {
    465           uiTabIdx = xPredWedgeFromIntra( pcCU, uiAbsPartIdx, iWidth, iHeight, pcCU->getDmm2DeltaEnd( uiAbsPartIdx ) );
    466           pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, uiAbsPartIdx, (pcCU->getDepth(0) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1)) );
    467         }
    468         dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ uiTabIdx ]);
    469       } break;
    470 #endif
    471443    case( DMM3_IDX ):
    472444      {
     
    709681#endif
    710682      , bICFlag );
    711 #if SHARP_ILLUCOMP_REFINE_E0046
    712683    bICFlag = bICFlag && (iWidth > 8);
    713 #endif
    714684    xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
    715685#if H_3D_ARP
     
    772742  }
    773743#endif
    774 
    775 #if NTT_VSP_COMMON_E0207_E0208
    776744  // fetch virtual depth map
    777 #if NTT_VSP_VECTOR_CLIP_E0208
    778745  pcBaseViewDepthPicYuv->extendPicBorder();
    779 #endif
    780746  xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp );
    781747  // sub-PU based compensation
    782748  xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    783749  xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    784 #else
    785   UInt uiAbsPartIdx = pcCU->getZorderIdxInCU();
    786   Int iBlkX = ( pcCU->getAddr() % pRefPicBaseDepth->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ uiAbsPartIdx ] ];
    787   Int iBlkY = ( pcCU->getAddr() / pRefPicBaseDepth->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ uiAbsPartIdx ] ];
    788   xPredInterLumaBlkFromDM  ( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &cDv, uiPartAddr, iBlkX,    iBlkY,    iWidth,    iHeight,    pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    789   xPredInterChromaBlkFromDM( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &cDv, uiPartAddr, iBlkX>>1, iBlkY>>1, iWidth>>1, iHeight>>1, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    790 #endif
    791 
    792750}
    793751#endif
     
    1005963  if ( yFrac == 0 )
    1006964  {
    1007 #if MTK_CLIPPING_ALIGN_IC_E0168
     965#if H_3D_IC
    1008966    m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac,       !bi || bICFlag
    1009967#else
     
    1017975  else if ( xFrac == 0 )
    1018976  {
    1019 #if MTK_CLIPPING_ALIGN_IC_E0168
     977#if H_3D_IC
    1020978    m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi || bICFlag
    1021979#else
     
    1040998#endif
    1041999      );
    1042 #if MTK_CLIPPING_ALIGN_IC_E0168
     1000#if H_3D_IC
    10431001    m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height,              yFrac, false, !bi || bICFlag
    10441002#else
     
    10541012  if( bICFlag )
    10551013  {
    1056 #if SHARP_ILLUCOMP_REFINE_E0046
    10571014    Int a, b, i, j;
    10581015    const Int iShift = IC_CONST_SHIFT;
    10591016
    10601017    xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_LUMA );
    1061 #else
    1062     Int a, b, iShift, i, j;
    1063 
    1064     xGetLLSICPrediction( cu, mv, refPic, a, b, iShift, TEXT_LUMA );
    1065 #endif
    10661018
    10671019
     
    10701022      for ( j = 0; j < width; j++ )
    10711023      {
    1072 #if !MTK_CLIPPING_ALIGN_IC_E0168
    1073         if( bi )
    1074         {
    1075           Int iIFshift = IF_INTERNAL_PREC - g_bitDepthY;
    1076           dst[j] = ( ( a*dst[j] + a*IF_INTERNAL_OFFS ) >> iShift ) + b*( 1 << iIFshift ) - IF_INTERNAL_OFFS;
    1077         }
    1078         else
    1079 #endif
    10801024          dst[j] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, ( ( a*dst[j] ) >> iShift ) + b );
    10811025      }
    10821026      dst += dstStride;
    10831027    }
    1084 #if MTK_CLIPPING_ALIGN_IC_E0168
     1028
    10851029    if(bi)
    10861030    {
     
    10971041      }
    10981042    }
    1099 #endif
    11001043  }
    11011044#endif
     
    11481091  if ( yFrac == 0 )
    11491092  {
    1150 #if MTK_CLIPPING_ALIGN_IC_E0168
     1093#if H_3D_IC
    11511094    m_if.filterHorChroma(refCb, refStride, dstCb,  dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag
    11521095#else
     
    11571100#endif
    11581101    );   
    1159 #if MTK_CLIPPING_ALIGN_IC_E0168
     1102#if H_3D_IC
    11601103    m_if.filterHorChroma(refCr, refStride, dstCr,  dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag
    11611104#else
     
    11691112  else if ( xFrac == 0 )
    11701113  {
    1171 #if MTK_CLIPPING_ALIGN_IC_E0168
     1114#if H_3D_IC
    11721115    m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag
    11731116#else
     
    11781121#endif
    11791122    );
    1180 #if MTK_CLIPPING_ALIGN_IC_E0168
     1123#if H_3D_IC
    11811124    m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag
    11821125#else
     
    11951138#endif 
    11961139      );
    1197 #if MTK_CLIPPING_ALIGN_IC_E0168
     1140#if H_3D_IC
    11981141    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight  , yFrac, false, !bi || bICFlag
    11991142#else
     
    12101153#endif
    12111154      );
    1212 #if MTK_CLIPPING_ALIGN_IC_E0168
     1155#if H_3D_IC
    12131156    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight  , yFrac, false, !bi || bICFlag
    12141157#else
     
    12241167  if( bICFlag )
    12251168  {
    1226 #if SHARP_ILLUCOMP_REFINE_E0046
    12271169    Int a, b, i, j;
    12281170    const Int iShift = IC_CONST_SHIFT;
    12291171    xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_CHROMA_U ); // Cb
    1230 #else
    1231     Int a, b, iShift, i, j;
    1232     xGetLLSICPrediction( cu, mv, refPic, a, b, iShift, TEXT_CHROMA_U ); // Cb
    1233 #endif
    12341172    for ( i = 0; i < cxHeight; i++ )
    12351173    {
    12361174      for ( j = 0; j < cxWidth; j++ )
    12371175      {
    1238 #if !MTK_CLIPPING_ALIGN_IC_E0168
    1239         if( bi )
    1240         {
    1241           Int iIFshift = IF_INTERNAL_PREC - g_bitDepthC;
    1242           dstCb[j] = ( ( a*dstCb[j] + a*IF_INTERNAL_OFFS ) >> iShift ) + b*( 1<<iIFshift ) - IF_INTERNAL_OFFS;
    1243         }
    1244         else
    1245 #endif
    12461176          dstCb[j] = Clip3(  0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCb[j] ) >> iShift ) + b );
    12471177      }
    12481178      dstCb += dstStride;
    12491179    }
    1250 #if SHARP_ILLUCOMP_REFINE_E0046
    12511180    xGetLLSICPrediction( cu, mv, refPic, a, b, TEXT_CHROMA_V ); // Cr
    1252 #else
    1253     xGetLLSICPrediction( cu, mv, refPic, a, b, iShift, TEXT_CHROMA_V ); // Cr
    1254 #endif
    12551181    for ( i = 0; i < cxHeight; i++ )
    12561182    {
    12571183      for ( j = 0; j < cxWidth; j++ )
    12581184      {
    1259 #if !MTK_CLIPPING_ALIGN_IC_E0168
    1260         if( bi )
    1261         {
    1262           Int iIFshift = IF_INTERNAL_PREC - g_bitDepthC;
    1263           dstCr[j] = ( ( a*dstCr[j] + a*IF_INTERNAL_OFFS ) >> iShift ) + b*( 1<<iIFshift ) - IF_INTERNAL_OFFS;
    1264         }
    1265         else
    1266 #endif
    12671185          dstCr[j] = Clip3( 0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCr[j] ) >> iShift ) + b );
    12681186      }
    12691187      dstCr += dstStride;
    12701188    }
    1271 #if MTK_CLIPPING_ALIGN_IC_E0168
     1189
    12721190    if(bi)
    12731191    {
     
    12891207      }
    12901208    }
    1291 #endif
    12921209  }
    12931210#endif
     
    14381355}
    14391356
    1440 #if !SHARP_ILLUCOMP_REFINE_E0046
    1441 /** Function for counting leading number of zeros/ones
    1442  * \param x input value
    1443  \ This function counts leading number of zeros for positive numbers and
    1444  \ leading number of ones for negative numbers. This can be implemented in
    1445  \ single instructure cycle on many processors.
    1446  */
    1447 
    1448 Short CountLeadingZerosOnes (Short x)
    1449 {
    1450   Short clz;
    1451   Short i;
    1452 
    1453   if(x == 0)
    1454   {
    1455     clz = 0;
    1456   }
    1457   else
    1458   {
    1459     if (x == -1)
    1460     {
    1461       clz = 15;
    1462     }
    1463     else
    1464     {
    1465       if(x < 0)
    1466       {
    1467         x = ~x;
    1468       }
    1469       clz = 15;
    1470       for(i = 0;i < 15;++i)
    1471       {
    1472         if(x)
    1473         {
    1474           clz --;
    1475         }
    1476         x = x >> 1;
    1477       }
    1478     }
    1479   }
    1480   return clz;
    1481 }
    1482 #endif
    14831357
    14841358/** Function for deriving LM illumination compensation.
    14851359 */
    1486 #if SHARP_ILLUCOMP_REFINE_E0046
    14871360Void TComPrediction::xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, TextType eType )
    1488 #else
    1489 Void TComPrediction::xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift, TextType eType )
    1490 #endif
    14911361{
    14921362  TComPicYuv *pRecPic = pcCU->getPic()->getPicYuvRec();
     
    15161386
    15171387  Int x = 0, y = 0, xx = 0, xy = 0;
    1518 #if SHARP_ILLUCOMP_REFINE_E0046
    15191388  Int precShift = std::max(0, (( eType == TEXT_LUMA ) ? g_bitDepthY : g_bitDepthC) - 12);
    1520 #endif
    15211389
    15221390  if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) && iCUPelY > 0 && iRefY > 0 )
     
    15401408    }
    15411409
    1542 #if SHARP_ILLUCOMP_REFINE_E0046
    15431410    for( j = 0; j < uiWidth; j+=2 )
    1544 #else
    1545     for( j = 0; j < uiWidth; j++ )
    1546 #endif
    15471411    {
    15481412      x += pRef[j];
    15491413      y += pRec[j];
    1550 #if SHARP_ILLUCOMP_REFINE_E0046
    15511414      xx += (pRef[j] * pRef[j])>>precShift;
    15521415      xy += (pRef[j] * pRec[j])>>precShift;
    1553 #else
    1554       xx += pRef[j] * pRef[j];
    1555       xy += pRef[j] * pRec[j];
    1556 #endif
    1557     }
    1558 #if SHARP_ILLUCOMP_REFINE_E0046
     1416    }
    15591417    iCountShift += g_aucConvertToBit[ uiWidth ] + 1;
    1560 #else
    1561     iCountShift += g_aucConvertToBit[ uiWidth ] + 2;
    1562 #endif
    15631418  }
    15641419
     
    15841439    }
    15851440
    1586 #if SHARP_ILLUCOMP_REFINE_E0046
    15871441    for( i = 0; i < uiHeight; i+=2 )
    1588 #else
    1589     for( i = 0; i < uiHeight; i++ )
    1590 #endif
    15911442    {
    15921443      x += pRef[0];
    15931444      y += pRec[0];
    1594 #if SHARP_ILLUCOMP_REFINE_E0046
     1445
    15951446      xx += (pRef[0] * pRef[0])>>precShift;
    15961447      xy += (pRef[0] * pRec[0])>>precShift;
     
    15981449      pRef += iRefStride*2;
    15991450      pRec += iRecStride*2;
    1600 #else
    1601       xx += pRef[0] * pRef[0];
    1602       xy += pRef[0] * pRec[0];
    1603 
    1604       pRef += iRefStride;
    1605       pRec += iRecStride;
    1606 #endif
    1607     }
    1608 #if SHARP_ILLUCOMP_REFINE_E0046
     1451    }
    16091452    iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 1 );
    1610 #else
    1611     iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 2 );
    1612 #endif
    1613   }
    1614 
    1615 #if SHARP_ILLUCOMP_REFINE_E0046
     1453  }
     1454
    16161455  xy += xx >> IC_REG_COST_SHIFT;
    16171456  xx += xx >> IC_REG_COST_SHIFT;
     
    16201459  const Int iShift = IC_CONST_SHIFT;
    16211460  {
    1622 #else
    1623   Int iTempShift = ( ( eType == TEXT_LUMA ) ? g_bitDepthY : g_bitDepthC ) + g_aucConvertToBit[ uiWidth ] + 3 - 15;
    1624 
    1625   if( iTempShift > 0 )
    1626   {
    1627     x  = ( x +  ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift;
    1628     y  = ( y +  ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift;
    1629     xx = ( xx + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift;
    1630     xy = ( xy + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift;
    1631     iCountShift -= iTempShift;
    1632   }
    1633 
    1634   iShift = 13;
    1635 
    1636   if( iCountShift == 0 )
    1637   {
    1638     a = 1;
    1639     b = 0;
    1640     iShift = 0;
    1641   }
    1642   else
    1643   {
    1644     Int a1 = ( xy << iCountShift ) - y * x;
    1645     Int a2 = ( xx << iCountShift ) - x * x;             
    1646 #endif
    16471461    {
    16481462      const Int iShiftA2 = 6;
    1649 #if !SHARP_ILLUCOMP_REFINE_E0046
    1650       const Int iShiftA1 = 15;
    1651 #endif
    16521463      const Int iAccuracyShift = 15;
    16531464
     
    16571468      Int a2s = a2;
    16581469
    1659 #if SHARP_ILLUCOMP_REFINE_E0046
    16601470      a1 = Clip3(0, 2*a2, a1);
    16611471      iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2;
    16621472      iScaleShiftA1 = iScaleShiftA2 - IC_SHIFT_DIFF;
    1663 #else
    1664       iScaleShiftA1 = GetMSB( abs( a1 ) ) - iShiftA1;
    1665       iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2; 
    1666 #endif
    16671473
    16681474      if( iScaleShiftA1 < 0 )
     
    16831489      a1s = a1 >> iScaleShiftA1;
    16841490
    1685 #if SHARP_ILLUCOMP_REFINE_E0046
    16861491      a = a1s * m_uiaShift[ a2s ];
    16871492      a = a >> iScaleShiftA;
    1688 #else
    1689       if (a2s >= 1)
    1690       {
    1691         a = a1s * m_uiaShift[ a2s - 1];
    1692       }
    1693       else
    1694       {
    1695         a = 0;
    1696       }
    1697 
    1698       if( iScaleShiftA < 0 )
    1699       {
    1700         a = a << -iScaleShiftA;
    1701       }
    1702       else
    1703       {
    1704         a = a >> iScaleShiftA;
    1705       }
    1706 
    1707       a = Clip3( -( 1 << 15 ), ( 1 << 15 ) - 1, a );
    1708 
    1709       Int minA = -(1 << (6));
    1710       Int maxA = (1 << 6) - 1;
    1711       if( a <= maxA && a >= minA )
    1712       {
    1713         // do nothing
    1714       }
    1715       else
    1716       {
    1717         Short n = CountLeadingZerosOnes( a );
    1718         a = a >> (9-n);
    1719         iShift -= (9-n);
    1720       }
    1721 #endif
    17221493      b = (  y - ( ( a * x ) >> iShift ) + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift;
    17231494    }
     
    17271498
    17281499#if H_3D_VSP
    1729 
    1730 #if NTT_VSP_COMMON_E0207_E0208
    17311500// not fully support iRatioTxtPerDepth* != 1
    17321501Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
     
    17361505
    17371506  Int refDepStride = picRefDepth->getStride();
    1738 
    1739 #if NTT_VSP_VECTOR_CLIP_E0208
    17401507
    17411508  Int refDepOffset  = ( (mv->getHor()+2) >> 2 ) + ( (mv->getVer()+2) >> 2 ) * refDepStride;
     
    17571524  refDepth += refDepOffset;
    17581525
    1759 #else // NTT_VSP_VECTOR_CLIP_E0208
    1760 
    1761   Int widthDepth = picRefDepth->getWidth();
    1762   Int heightDepth = picRefDepth->getHeight();
    1763   Int posX, posY;
    1764   cu->getPic()->getPicYuvRec()->getTopLeftSamplePos( cu->getAddr(), cu->getZorderIdxInCU() + partAddr, posX, posY ); // top-left position in texture
    1765   posX /= ratioTxtPerDepthX; // texture position -> depth postion
    1766   posY /= ratioTxtPerDepthY;
    1767  
    1768   posX = Clip3(0, widthDepth-width,   posX + ((mv->getHor()+2)>>2));
    1769   posY = Clip3(0, heightDepth-height, posY + ((mv->getVer()+2)>>2));
    1770  
    1771   Pel *refDepth  = picRefDepth->getLumaAddr() + posX + posY * refDepStride;
    1772 
    1773 #endif // NTT_VSP_VECTOR_CLIP_E0208
    1774 
    17751526  Int depStride = yuvDepth->getStride();
    17761527  Pel *depth = yuvDepth->getLumaAddr();
    1777 
    1778 #if NTT_VSP_ADAPTIVE_SPLIT_E0207
    17791528
    17801529  if( width<8 || height<8 )
     
    19151664  }
    19161665
    1917 #else // NTT_VSP_ADAPTIVE_SPLIT_E0207
    1918 
    1919   Int rightOffset = nTxtPerDepthX - 1;
    1920   Int depStrideBlock = depStride * nTxtPerDepthY;
    1921   Int refDepStrideBlock = refDepStride * nTxtPerDepthY;
    1922   Pel *refDepthTop = refDepth;
    1923   Pel *refDepthBot = refDepthTop + (nTxtPerDepthY-1)*refDepStride;
    1924 
    1925   for( Int y=0; y<height; y+= nTxtPerDepthY )
    1926   {
    1927     for( Int x=0; x<width; x+=nTxtPerDepthX )
    1928     {
    1929       Pel maxDepth = refDepthTop[x] > refDepthBot[x] ? refDepthTop[x] : refDepthBot[x];
    1930 
    1931       if( maxDepth < refDepthTop[x+rightOffset] )
    1932       {
    1933         maxDepth = refDepthTop[x+rightOffset];
    1934       }
    1935       if( maxDepth < refDepthBot[x+rightOffset] )
    1936       {
    1937         maxDepth = refDepthBot[x+rightOffset];
    1938       }
    1939 
    1940       depth[x] = maxDepth;
    1941 
    1942     }
    1943     refDepthTop += refDepStrideBlock;
    1944     refDepthBot += refDepStrideBlock;
    1945     depth       += depStrideBlock;
    1946   }
    1947 
    1948 #endif // NTT_VSP_ADAPTIVE_SPLIT_E0207
     1666
    19491667}
    19501668
     
    19641682  Pel *dst    = yuvDst->getLumaAddr(partAddr);
    19651683  Pel *depth  = yuvDepth->getLumaAddr();
    1966  
    1967 #if !(NTT_VSP_DC_BUGFIX_E0208)
    1968   Int widthLuma = picRef->getWidth();
    1969   Int posX, posY;
    1970   cu->getPic()->getPicYuvRec()->getTopLeftSamplePos( cu->getAddr(), cu->getZorderIdxInCU() + partAddr, posX, posY ); // top-left position in texture
    1971 #endif
    19721684
    19731685#if H_3D_VSP_BLOCKSIZE == 1
     
    20421754      Int xFrac = disparity & 0x3;
    20431755
    2044 #if NTT_VSP_DC_BUGFIX_E0208
    2045 
    20461756      dv.setHor( disparity );
    20471757      cu->clipMv( dv );
     
    20591769      assert( ref[refOffset] >= 0 && ref[refOffset]<= 255 );
    20601770      m_if.filterHorLuma( &ref[refOffset], refStride, &dst[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );
    2061 
    2062 #else // NTT_VSP_DC_BUGFIX_E0208
    2063 
    2064       for( Int j=0; j < nTxtPerDepthX; j++ )
    2065       {
    2066         Int refOffset = xTxt+j + (disparity >> 2);
    2067 #if H_3D_VSP_CONSTRAINED
    2068         if(refOffset<minRelativePos || refOffset>maxRelativePos)
    2069         {
    2070           xFrac = 0;
    2071         }
    2072         refOffset = Clip3(minRelativePos, maxRelativePos, refOffset);
    2073 #endif
    2074         Int absX  = posX + refOffset;
    2075 
    2076         if (xFrac == 0)
    2077         {
    2078           absX = Clip3(0, widthLuma-1, absX);
    2079         }
    2080         else
    2081         {
    2082           absX = Clip3(4, widthLuma-5, absX);
    2083         }
    2084 
    2085         refOffset = absX - posX;
    2086         assert( ref[refOffset] >= 0 && ref[refOffset] <= 255 );
    2087        
    2088         m_if.filterHorLuma( &ref[refOffset], refStride, &dst[xTxt+j], dstStride, 1, nTxtPerDepthY, xFrac, !isBi );
    2089       }
    2090 
    2091 #endif // NTT_VSP_DC_BUGFIX_E0208
    2092 
    20931771    }
    20941772    ref   += refStrideBlock;
     
    21221800  Pel *depth  = yuvDepth->getLumaAddr();
    21231801
    2124 #if !(NTT_VSP_DC_BUGFIX_E0208)
    2125   Int widthChroma = picRef->getWidth() >> 1;
    2126   Int posX, posY;
    2127   cu->getPic()->getPicYuvRec()->getTopLeftSamplePos( cu->getAddr(), cu->getZorderIdxInCU() + partAddr, posX, posY ); // top-left position in texture
    2128   posX >>= 1;
    2129   posY >>= 1;
    2130 #endif
    2131  
    21321802#if H_3D_VSP_BLOCKSIZE == 1
    21331803#if H_3D_VSP_CONSTRAINED
     
    21941864      Int xFrac = disparity & 0x7;
    21951865     
    2196 #if NTT_VSP_DC_BUGFIX_E0208
    2197 
    21981866      dv.setHor( disparity );
    21991867      cu->clipMv( dv );
     
    22141882      m_if.filterHorChroma( &refCb[refOffset], refStride, &dstCb[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );
    22151883      m_if.filterHorChroma( &refCr[refOffset], refStride, &dstCr[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );
    2216 
    2217 #else // NTT_VSP_DC_BUGFIX_E0208
    2218      
    2219       for( Int j=0; j < nTxtPerDepthX; j++ )
    2220       {
    2221         Int refOffset = xTxt+j + (disparity >> 3);
    2222 #if H_3D_VSP_CONSTRAINED
    2223         if(refOffset<minRelativePos || refOffset>maxRelativePos)
    2224         {
    2225           xFrac = 0;
    2226         }
    2227         refOffset = Clip3(minRelativePos, maxRelativePos, refOffset);
    2228 #endif
    2229         Int absX  = posX + refOffset;
    2230 
    2231         if (xFrac == 0)
    2232         {
    2233           absX = Clip3(0, widthChroma-1, absX);
    2234         }
    2235         else
    2236         {
    2237           absX = Clip3(4, widthChroma-5, absX);
    2238         }
    2239 
    2240         refOffset = absX - posX;
    2241         assert( refCb[refOffset] >= 0 && refCb[refOffset] <= 255 );
    2242         assert( refCr[refOffset] >= 0 && refCr[refOffset] <= 255 );
    2243 
    2244         m_if.filterHorChroma( &refCb[refOffset], refStride, &dstCb[xTxt+j], dstStride, 1, nTxtPerDepthY, xFrac, !isBi );
    2245         m_if.filterHorChroma( &refCr[refOffset], refStride, &dstCr[xTxt+j], dstStride, 1, nTxtPerDepthY, xFrac, !isBi );
    2246       }
    2247 
    2248 #endif // NTT_VSP_DC_BUGFIX_E0208
    22491884    }
    22501885    refCb += refStrideBlock;
     
    22541889    depth += depStrideBlock;
    22551890  }
    2256 
    2257 }
    2258 #else // NTT_VSP_COMMON_E0207_E0208
    2259 
    2260 // Input:
    2261 // refPic: Ref picture. Full picture, with padding
    2262 // posX, posY:     PU position, texture
    2263 // sizeX, sizeY: PU size
    2264 // partAddr: z-order index
    2265 // dv: disparity vector. derived from neighboring blocks
    2266 //
    2267 // Output: dstPic, PU predictor 64x64
    2268 Void TComPrediction::xPredInterLumaBlkFromDM( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv* dv, UInt partAddr,Int posX, Int posY
    2269                                             , Int sizeX, Int sizeY, Bool isDepth, TComYuv *&dstPic, Bool bi )
    2270 {
    2271   Int widthLuma;
    2272   Int heightLuma;
    2273 
    2274   if (isDepth)
    2275   {
    2276     widthLuma   =  pPicBaseDepth->getWidth();
    2277     heightLuma  =  pPicBaseDepth->getHeight();
    2278   }
    2279   else
    2280   {
    2281     widthLuma   =  refPic->getWidth();
    2282     heightLuma  =  refPic->getHeight();
    2283   }
    2284 
    2285 #if H_3D_VSP_BLOCKSIZE != 1
    2286   Int widthDepth  = pPicBaseDepth->getWidth();
    2287   Int heightDepth = pPicBaseDepth->getHeight();
    2288 #endif
    2289 
    2290 #if H_3D_VSP_CONSTRAINED
    2291   Int widthDepth  = pPicBaseDepth->getWidth();
    2292   Int heightDepth = pPicBaseDepth->getHeight();
    2293 #endif
    2294 
    2295   Int nTxtPerDepthX = widthLuma  / ( pPicBaseDepth->getWidth() );  // texture pixel # per depth pixel
    2296   Int nTxtPerDepthY = heightLuma / ( pPicBaseDepth->getHeight() );
    2297 
    2298   Int refStride = refPic->getStride();
    2299   Int dstStride = dstPic->getStride();
    2300   Int depStride =  pPicBaseDepth->getStride();
    2301   Int depthPosX = Clip3(0,   widthLuma - sizeX,  (posX/nTxtPerDepthX) + ((dv->getHor()+2)>>2));
    2302   Int depthPosY = Clip3(0,   heightLuma- sizeY,  (posY/nTxtPerDepthY) + ((dv->getVer()+2)>>2));
    2303   Pel *ref    = refPic->getLumaAddr() + posX + posY * refStride;
    2304   Pel *dst    = dstPic->getLumaAddr(partAddr);
    2305   Pel *depth  = pPicBaseDepth->getLumaAddr() + depthPosX + depthPosY * depStride;
    2306 
    2307 #if H_3D_VSP_BLOCKSIZE != 1
    2308 #if H_3D_VSP_BLOCKSIZE == 2
    2309   Int  dW = sizeX>>1;
    2310   Int  dH = sizeY>>1;
    2311 #endif
    2312 #if H_3D_VSP_BLOCKSIZE == 4
    2313   Int  dW = sizeX>>2;
    2314   Int  dH = sizeY>>2;
    2315 #endif
    2316   {
    2317     Pel* depthi = depth;
    2318     for (Int j = 0; j < dH; j++)
    2319     {
    2320       for (Int i = 0; i < dW; i++)
    2321       {
    2322         Pel* depthTmp;
    2323 #if H_3D_VSP_BLOCKSIZE == 2
    2324         if (depthPosX + (i<<1) < widthDepth)
    2325           depthTmp = depthi + (i << 1);
    2326         else
    2327           depthTmp = depthi + (widthDepth - depthPosX - 1);
    2328 #endif
    2329 #if H_3D_VSP_BLOCKSIZE == 4
    2330         if (depthPosX + (i<<2) < widthDepth)
    2331           depthTmp = depthi + (i << 2);
    2332         else
    2333           depthTmp = depthi + (widthDepth - depthPosX - 1);
    2334 #endif
    2335         Int maxV = 0;
    2336         for (Int blockj = 0; blockj < H_3D_VSP_BLOCKSIZE; blockj+=(H_3D_VSP_BLOCKSIZE-1))
    2337         {
    2338           Int iX = 0;
    2339           for (Int blocki = 0; blocki < H_3D_VSP_BLOCKSIZE; blocki+=(H_3D_VSP_BLOCKSIZE-1))
    2340           {
    2341             if (maxV < depthTmp[iX])
    2342               maxV = depthTmp[iX];
    2343 #if H_3D_VSP_BLOCKSIZE == 2
    2344             if (depthPosX + (i<<1) + blocki < widthDepth - 1)
    2345 #else // H_3D_VSP_BLOCKSIZE == 4
    2346             if (depthPosX + (i<<2) + blocki < widthDepth - 1)
    2347 #endif
    2348               iX = (H_3D_VSP_BLOCKSIZE-1);
    2349           }
    2350 #if H_3D_VSP_BLOCKSIZE == 2
    2351           if (depthPosY + (j<<1) + blockj < heightDepth - 1)
    2352 #else // H_3D_VSP_BLOCKSIZE == 4
    2353           if (depthPosY + (j<<2) + blockj < heightDepth - 1)
    2354 #endif
    2355             depthTmp += depStride * (H_3D_VSP_BLOCKSIZE-1);
    2356         }
    2357         m_pDepthBlock[i+j*dW] = maxV;
    2358       } // end of i < dW
    2359 #if H_3D_VSP_BLOCKSIZE == 2
    2360       if (depthPosY + ((j+1)<<1) < heightDepth)
    2361         depthi += (depStride << 1);
    2362       else
    2363         depthi  = depth + (heightDepth-depthPosY-1)*depStride;
    2364 #endif
    2365 #if H_3D_VSP_BLOCKSIZE == 4
    2366       if (depthPosY + ((j+1)<<2) < heightDepth) // heightDepth-1
    2367         depthi += (depStride << 2);
    2368       else
    2369         depthi  = depth + (heightDepth-depthPosY-1)*depStride; // the last line
    2370 #endif
    2371     }
    2372   }
    2373 #endif // H_3D_VSP_BLOCKSIZE != 1
    2374 
    2375 #if H_3D_VSP_BLOCKSIZE == 1
    2376 #if H_3D_VSP_CONSTRAINED
    2377   //get LUT based horizontal reference range
    2378   Int range = xGetConstrainedSize(sizeX, sizeY);
    2379 
    2380   // The minimum depth value
    2381   Int minRelativePos = MAX_INT;
    2382   Int maxRelativePos = MIN_INT;
    2383 
    2384   Pel* depthTemp, *depthInitial=depth;
    2385   for (Int yTxt = 0; yTxt < sizeY; yTxt++)
    2386   {
    2387     for (Int xTxt = 0; xTxt < sizeX; xTxt++)
    2388     {
    2389       if (depthPosX+xTxt < widthDepth)
    2390         depthTemp = depthInitial + xTxt;
    2391       else
    2392         depthTemp = depthInitial + (widthDepth - depthPosX - 1);
    2393 
    2394       Int disparity = pShiftLUT[ *depthTemp ]; // << iShiftPrec;
    2395       Int disparityInt = disparity >> 2;
    2396 
    2397       if( disparity <= 0)
    2398       {
    2399         if (minRelativePos > disparityInt+xTxt)
    2400             minRelativePos = disparityInt+xTxt;
    2401       }
    2402       else
    2403       {
    2404         if (maxRelativePos < disparityInt+xTxt)
    2405             maxRelativePos = disparityInt+xTxt;
    2406       }
    2407     }
    2408     if (depthPosY+yTxt < heightDepth)
    2409       depthInitial = depthInitial + depStride;
    2410   }
    2411 
    2412   Int disparity_tmp = pShiftLUT[ *depth ]; // << iShiftPrec;
    2413   if (disparity_tmp <= 0)
    2414     maxRelativePos = minRelativePos + range -1 ;
    2415   else
    2416     minRelativePos = maxRelativePos - range +1 ;
    2417 #endif
    2418 #endif // H_3D_VSP_BLOCKSIZE == 1
    2419 
    2420 #if H_3D_VSP_BLOCKSIZE != 1
    2421   Int yDepth = 0;
    2422 #endif
    2423   for ( Int yTxt = 0; yTxt < sizeY; yTxt += nTxtPerDepthY )
    2424   {
    2425     for ( Int xTxt = 0, xDepth = 0; xTxt < sizeX; xTxt += nTxtPerDepthX, xDepth++ )
    2426     {
    2427       Pel repDepth = 0; // to store the depth value used for warping
    2428 #if H_3D_VSP_BLOCKSIZE == 1
    2429       repDepth = depth[xDepth];
    2430 #endif
    2431 #if H_3D_VSP_BLOCKSIZE == 2
    2432       repDepth = m_pDepthBlock[(xTxt>>1) + (yTxt>>1)*dW];
    2433 #endif
    2434 #if H_3D_VSP_BLOCKSIZE == 4
    2435       repDepth = m_pDepthBlock[(xTxt>>2) + (yTxt>>2)*dW];
    2436 #endif
    2437 
    2438       assert( repDepth >= 0 && repDepth <= 255 );
    2439       Int disparity = pShiftLUT[ repDepth ]; // remove << iShiftPrec ??
    2440       Int refOffset = xTxt + (disparity >> 2);
    2441       Int xFrac = disparity & 0x3;
    2442 #if H_3D_VSP_CONSTRAINED
    2443       if(refOffset<minRelativePos || refOffset>maxRelativePos)
    2444         xFrac = 0;
    2445       refOffset = Clip3(minRelativePos, maxRelativePos, refOffset);
    2446 #endif
    2447       Int absX  = posX + refOffset;
    2448 
    2449       if (xFrac == 0)
    2450         absX = Clip3(0, widthLuma-1, absX);
    2451       else
    2452         absX = Clip3(4, widthLuma-5, absX);
    2453 
    2454       refOffset = absX - posX;
    2455 
    2456       assert( ref[refOffset] >= 0 && ref[refOffset]<= 255 );
    2457       m_if.filterHorLuma( &ref[refOffset], refStride, &dst[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !bi );
    2458     }
    2459     ref   += refStride*nTxtPerDepthY;
    2460     dst   += dstStride*nTxtPerDepthY;
    2461     depth += depStride;
    2462 #if H_3D_VSP_BLOCKSIZE != 1
    2463     yDepth++;
    2464 #endif
    2465 
    2466   }
    2467 }
    2468 
    2469 Void TComPrediction::xPredInterChromaBlkFromDM ( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv*dv, UInt partAddr, Int posX, Int posY
    2470                                                , Int sizeX, Int sizeY, Bool isDepth, TComYuv *&dstPic, Bool bi)
    2471 {
    2472   Int refStride = refPic->getCStride();
    2473   Int dstStride = dstPic->getCStride();
    2474   Int depStride = pPicBaseDepth->getStride();
    2475 
    2476   Int widthChroma, heightChroma;
    2477   if( isDepth)
    2478   {
    2479      widthChroma   = pPicBaseDepth->getWidth()>>1;
    2480      heightChroma  = pPicBaseDepth->getHeight()>>1;
    2481   }
    2482   else
    2483   {
    2484      widthChroma   = refPic->getWidth()>>1;
    2485      heightChroma  = refPic->getHeight()>>1;
    2486   }
    2487 
    2488   // Below is only for Texture chroma component
    2489 
    2490   Int widthDepth  = pPicBaseDepth->getWidth();
    2491   Int heightDepth = pPicBaseDepth->getHeight();
    2492 
    2493   Int nTxtPerDepthX, nTxtPerDepthY;  // Number of texture samples per one depth sample
    2494   Int nDepthPerTxtX, nDepthPerTxtY;  // Number of depth samples per one texture sample
    2495 
    2496   Int depthPosX;  // Starting position in depth image
    2497   Int depthPosY;
    2498 
    2499   if ( widthChroma > widthDepth )
    2500   {
    2501     nTxtPerDepthX = widthChroma / widthDepth;
    2502     nDepthPerTxtX = 1;
    2503     depthPosX = posX / nTxtPerDepthX + ((dv->getHor()+2)>>2);
    2504   }
    2505   else
    2506   {
    2507     nTxtPerDepthX = 1;
    2508     nDepthPerTxtX = widthDepth / widthChroma;
    2509     depthPosX = posX * nDepthPerTxtX + ((dv->getHor()+2)>>2);
    2510   }
    2511   depthPosX = Clip3(0, widthDepth - (sizeX<<1), depthPosX);
    2512   if ( heightChroma > heightDepth )
    2513   {
    2514     nTxtPerDepthY = heightChroma / heightDepth;
    2515     nDepthPerTxtY = 1;
    2516     depthPosY = posY / nTxtPerDepthY + ((dv->getVer()+2)>>2);
    2517   }
    2518   else
    2519   {
    2520     nTxtPerDepthY = 1;
    2521     nDepthPerTxtY = heightDepth / heightChroma;
    2522     depthPosY = posY * nDepthPerTxtY + ((dv->getVer()+2)>>2);
    2523   }
    2524   depthPosY = Clip3(0, heightDepth - (sizeY<<1), depthPosY);
    2525 
    2526   Pel *refCb  = refPic->getCbAddr() + posX + posY * refStride;
    2527   Pel *refCr  = refPic->getCrAddr() + posX + posY * refStride;
    2528   Pel *dstCb  = dstPic->getCbAddr(partAddr);
    2529   Pel *dstCr  = dstPic->getCrAddr(partAddr);
    2530   Pel *depth  = pPicBaseDepth->getLumaAddr() + depthPosX + depthPosY * depStride;  // move the pointer to the current depth pixel position
    2531 
    2532   Int refStrideBlock = refStride * nTxtPerDepthY;
    2533   Int dstStrideBlock = dstStride * nTxtPerDepthY;
    2534   Int depStrideBlock = depStride * nDepthPerTxtY;
    2535 
    2536   if ( widthChroma > widthDepth ) // We assume
    2537   {
    2538     assert( heightChroma > heightDepth );
    2539     printf("This branch should never been reached.\n");
    2540     exit(0);
    2541   }
    2542   else
    2543   {
    2544 #if H_3D_VSP_BLOCKSIZE == 1
    2545   Int  dW = sizeX;
    2546   Int  dH = sizeY;
    2547   Int  sW = 2; // search window size
    2548   Int  sH = 2;
    2549 #endif
    2550 #if H_3D_VSP_BLOCKSIZE == 2
    2551   Int  dW = sizeX;
    2552   Int  dH = sizeY;
    2553   Int  sW = 2; // search window size
    2554   Int  sH = 2;
    2555 #endif
    2556 #if H_3D_VSP_BLOCKSIZE == 4
    2557   Int  dW = sizeX>>1;
    2558   Int  dH = sizeY>>1;
    2559   Int  sW = 4; // search window size
    2560   Int  sH = 4;
    2561 #endif
    2562 
    2563   {
    2564     Pel* depthi = depth;
    2565     for (Int j = 0; j < dH; j++)
    2566     {
    2567       for (Int i = 0; i < dW; i++)
    2568       {
    2569         Pel* depthTmp;
    2570 #if H_3D_VSP_BLOCKSIZE == 1
    2571         depthTmp = depthi + (i << 1);
    2572 #endif
    2573 #if H_3D_VSP_BLOCKSIZE == 2
    2574         if (depthPosX + (i<<1) < widthDepth)
    2575           depthTmp = depthi + (i << 1);
    2576         else
    2577           depthTmp = depthi + (widthDepth - depthPosX - 1);
    2578 #endif
    2579 #if H_3D_VSP_BLOCKSIZE == 4
    2580         if (depthPosX + (i<<2) < widthDepth)
    2581           depthTmp = depthi + (i << 2);
    2582         else
    2583           depthTmp = depthi + (widthDepth - depthPosX - 1);
    2584 #endif
    2585         Int maxV = 0;
    2586         for (Int blockj = 0; blockj < sH; blockj+=(sH-1))
    2587         {
    2588           Int iX = 0;
    2589           for (Int blocki = 0; blocki < sW; blocki+=(sW-1))
    2590           {
    2591             if (maxV < depthTmp[iX])
    2592               maxV = depthTmp[iX];
    2593             if (depthPosX + i*sW + blocki < widthDepth - 1)
    2594                 iX = (sW-1);
    2595           }
    2596           if (depthPosY + j*sH + blockj < heightDepth - 1)
    2597                 depthTmp += depStride * (sH-1);
    2598         }
    2599         m_pDepthBlock[i+j*dW] = maxV;
    2600       } // end of i < dW
    2601 #if H_3D_VSP_BLOCKSIZE == 1
    2602       if (depthPosY + ((j+1)<<1) < heightDepth)
    2603         depthi += (depStride << 1);
    2604       else
    2605         depthi  = depth + (heightDepth-1)*depStride;
    2606 #endif
    2607 #if H_3D_VSP_BLOCKSIZE == 2
    2608       if (depthPosY + ((j+1)<<1) < heightDepth)
    2609         depthi += (depStride << 1);
    2610       else
    2611         depthi  = depth + (heightDepth-depthPosY-1)*depStride;
    2612 #endif
    2613 #if H_3D_VSP_BLOCKSIZE == 4
    2614       if (depthPosY + ((j+1)<<2) < heightDepth) // heightDepth-1
    2615         depthi += (depStride << 2);
    2616       else
    2617         depthi  = depth + (heightDepth-depthPosY-1)*depStride; // the last line
    2618 #endif
    2619     }
    2620   }
    2621 
    2622 
    2623 #if H_3D_VSP_BLOCKSIZE == 1
    2624 #if H_3D_VSP_CONSTRAINED
    2625   //get LUT based horizontal reference range
    2626   Int range = xGetConstrainedSize(sizeX, sizeY, false);
    2627 
    2628   // The minimum depth value
    2629   Int minRelativePos = MAX_INT;
    2630   Int maxRelativePos = MIN_INT;
    2631 
    2632   Int depthTmp;
    2633   for (Int yTxt=0; yTxt<sizeY; yTxt++)
    2634   {
    2635     for (Int xTxt=0; xTxt<sizeX; xTxt++)
    2636     {
    2637       depthTmp = m_pDepthBlock[xTxt+yTxt*dW];
    2638       Int disparity = pShiftLUT[ depthTmp ]; // << iShiftPrec;
    2639       Int disparityInt = disparity >> 3;//in chroma resolution
    2640 
    2641       if (disparityInt < 0)
    2642       {
    2643         if (minRelativePos > disparityInt+xTxt)
    2644             minRelativePos = disparityInt+xTxt;
    2645       }
    2646       else
    2647       {
    2648         if (maxRelativePos < disparityInt+xTxt)
    2649             maxRelativePos = disparityInt+xTxt;
    2650       }
    2651     }
    2652   }
    2653 
    2654   depthTmp = m_pDepthBlock[0];
    2655   Int disparity_tmp = pShiftLUT[ depthTmp ]; // << iShiftPrec;
    2656   if ( disparity_tmp < 0 )
    2657     maxRelativePos = minRelativePos + range - 1;
    2658   else
    2659     minRelativePos = maxRelativePos - range + 1;
    2660 
    2661 #endif // H_3D_VSP_CONSTRAINED
    2662 #endif // H_3D_VSP_BLOCKSIZE == 1
    2663 
    2664     // (sizeX, sizeY) is Chroma block size
    2665     for ( Int yTxt = 0, yDepth = 0; yTxt < sizeY; yTxt += nTxtPerDepthY, yDepth += nDepthPerTxtY )
    2666     {
    2667       for ( Int xTxt = 0, xDepth = 0; xTxt < sizeX; xTxt += nTxtPerDepthX, xDepth += nDepthPerTxtX )
    2668       {
    2669         Pel repDepth = 0; // to store the depth value used for warping
    2670 #if H_3D_VSP_BLOCKSIZE == 1
    2671         repDepth = m_pDepthBlock[(xTxt) + (yTxt)*dW];
    2672 #endif
    2673 #if H_3D_VSP_BLOCKSIZE == 2
    2674         repDepth = m_pDepthBlock[(xTxt) + (yTxt)*dW];
    2675 #endif
    2676 #if H_3D_VSP_BLOCKSIZE == 4
    2677         repDepth = m_pDepthBlock[(xTxt>>1) + (yTxt>>1)*dW];
    2678 #endif
    2679 
    2680       // calculate the offset in the reference picture
    2681         Int disparity = pShiftLUT[ repDepth ]; // Remove << iShiftPrec;
    2682         Int refOffset = xTxt + (disparity >> 3); // in integer pixel in chroma image
    2683         Int xFrac = disparity & 0x7;
    2684 #if H_3D_VSP_CONSTRAINED
    2685         if(refOffset < minRelativePos || refOffset > maxRelativePos)
    2686           xFrac = 0;
    2687         refOffset = Clip3(minRelativePos, maxRelativePos, refOffset);
    2688 #endif
    2689         Int absX  = posX + refOffset;
    2690 
    2691         if (xFrac == 0)
    2692           absX = Clip3(0, widthChroma-1, absX);
    2693         else
    2694           absX = Clip3(4, widthChroma-5, absX);
    2695 
    2696         refOffset = absX - posX;
    2697 
    2698         assert( refCb[refOffset] >= 0 && refCb[refOffset]<= 255 );
    2699         assert( refCr[refOffset] >= 0 && refCr[refOffset]<= 255 );
    2700         m_if.filterHorChroma(&refCb[refOffset], refStride, &dstCb[xTxt],  dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !bi);
    2701         m_if.filterHorChroma(&refCr[refOffset], refStride, &dstCr[xTxt],  dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !bi);
    2702       }
    2703       refCb += refStrideBlock;
    2704       refCr += refStrideBlock;
    2705       dstCb += dstStrideBlock;
    2706       dstCr += dstStrideBlock;
    2707       depth += depStrideBlock;
    2708     }
    2709   }
    2710 
    2711 }
    2712 
    2713 #endif // NTT_VSP_COMMON_E0207_E0208
     1891}
     1892
    27141893
    27151894#if H_3D_VSP_CONSTRAINED
     
    27891968
    27901969#if H_3D_DIM_DMM
    2791 #if !SEC_DMM2_E0146_HHIFIX
    2792 UInt TComPrediction::xPredWedgeFromIntra( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Int iDeltaEnd )
    2793 {
    2794   UInt uiThisBlockSize = uiWidth;
    2795 
    2796   TComDataCU* pcTempCU;
    2797   UInt        uiTempPartIdx;
    2798   // 1st: try continue above wedgelet
    2799   pcTempCU = pcCU->getPUAbove( uiTempPartIdx, pcCU->getZorderIdxInCU() + uiAbsPartIdx );
    2800   if( pcTempCU && isDimMode( pcTempCU->getLumaIntraDir( uiTempPartIdx ) ) )
    2801   {
    2802     UInt dimType =  getDimType( pcTempCU->getLumaIntraDir( uiTempPartIdx ) );
    2803     if( DMM1_IDX == dimType || DMM2_IDX == dimType || DMM3_IDX == dimType )
    2804     {
    2805       // get offset between current and reference block
    2806       UInt uiOffsetX = 0, uiOffsetY = 0;
    2807       xGetBlockOffset( pcCU, uiAbsPartIdx, pcTempCU, uiTempPartIdx, uiOffsetX, uiOffsetY );
    2808 
    2809       // get reference wedgelet
    2810       WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[(pcTempCU->getWidth( uiTempPartIdx )>>((pcTempCU->getPartitionSize( uiTempPartIdx ) == SIZE_NxN) ? 1 : 0))])];
    2811       TComWedgelet* pcRefWedgelet = &(pacWedgeList->at( pcTempCU->getDmmWedgeTabIdx( dimType, uiTempPartIdx ) ) );
    2812 
    2813       // find wedgelet, if direction is suitable for continue wedge
    2814       if( pcRefWedgelet->checkPredDirAbovePossible( uiThisBlockSize, uiOffsetX ) )
    2815       {
    2816         UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
    2817         pcRefWedgelet->getPredDirStartEndAbove( uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, uiThisBlockSize, uiOffsetX, iDeltaEnd );
    2818         return xGetWedgePatternIdx( uiThisBlockSize, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
    2819       }
    2820     }
    2821   }
    2822 
    2823   // 2nd: try continue left wedglelet
    2824   pcTempCU = pcCU->getPULeft( uiTempPartIdx, pcCU->getZorderIdxInCU() + uiAbsPartIdx );
    2825   if( pcTempCU && isDimMode( pcTempCU->getLumaIntraDir( uiTempPartIdx ) ) )
    2826   {
    2827     UInt dimType = getDimType( pcTempCU->getLumaIntraDir( uiTempPartIdx ) );
    2828     if( DMM1_IDX == dimType || DMM2_IDX == dimType || DMM3_IDX == dimType )
    2829     {
    2830       // get offset between current and reference block
    2831       UInt uiOffsetX = 0, uiOffsetY = 0;
    2832       xGetBlockOffset( pcCU, uiAbsPartIdx, pcTempCU, uiTempPartIdx, uiOffsetX, uiOffsetY );
    2833 
    2834       // get reference wedgelet
    2835       WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[(pcTempCU->getWidth( uiTempPartIdx )>>((pcTempCU->getPartitionSize( uiTempPartIdx ) == SIZE_NxN) ? 1 : 0))])];
    2836       TComWedgelet* pcRefWedgelet = &(pacWedgeList->at( pcTempCU->getDmmWedgeTabIdx( dimType, uiTempPartIdx ) ) );
    2837 
    2838       // find wedgelet, if direction is suitable for continue wedge
    2839       if( pcRefWedgelet->checkPredDirLeftPossible( uiThisBlockSize, uiOffsetY ) )
    2840       {
    2841         UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
    2842         pcRefWedgelet->getPredDirStartEndLeft( uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, uiThisBlockSize, uiOffsetY, iDeltaEnd );
    2843         return xGetWedgePatternIdx( uiThisBlockSize, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
    2844       }
    2845     }
    2846   }
    2847 
    2848   // 3rd: (default) make wedglet from intra dir and max slope point
    2849   Int iSlopeX = 0, iSlopeY = 0;
    2850   UInt uiStartPosX = 0, uiStartPosY = 0;
    2851   if( xGetWedgeIntraDirPredData( pcCU, uiAbsPartIdx, uiThisBlockSize, iSlopeX, iSlopeY, uiStartPosX, uiStartPosY ) )
    2852   {
    2853     UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
    2854     xGetWedgeIntraDirStartEnd( pcCU, uiAbsPartIdx, uiThisBlockSize, iSlopeX, iSlopeY, uiStartPosX, uiStartPosY, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, iDeltaEnd );
    2855     return xGetWedgePatternIdx( uiThisBlockSize, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
    2856   }
    2857 
    2858   return 0;
    2859 }
    2860 #endif
    2861 
    28621970UInt TComPrediction::xPredWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx )
    28631971{
     
    28962004  }
    28972005
    2898 #if SCU_HS_DMM4_REMOVE_DIV_E0242
    2899   Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2;
    2900   iDC = iDC >> (cuMaxLog2Size - pcCU->getDepth(0))*2;
    2901 #else
    2902   iDC /= (uiWidth*uiHeight);
    2903 #endif
     2006  Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2;   //
     2007  iDC = iDC >> (cuMaxLog2Size - pcCU->getDepth(0))*2;        //  iDC /= (uiWidth*uiHeight);
     2008
    29042009  piRefBlkY = cTempYuv.getLumaAddr();
    29052010
     
    29282033  }
    29292034}
    2930 
    2931 #if !SEC_DMM2_E0146_HHIFIX
    2932 Void TComPrediction::xGetBlockOffset( TComDataCU* pcCU, UInt uiAbsPartIdx, TComDataCU* pcRefCU, UInt uiRefAbsPartIdx, UInt& ruiOffsetX, UInt& ruiOffsetY )
    2933 {
    2934   ruiOffsetX = 0;
    2935   ruiOffsetY = 0;
    2936 
    2937   // get offset between current and above/left block
    2938   UInt uiThisOriginX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
    2939   UInt uiThisOriginY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
    2940 
    2941   UInt uiNumPartInRefCU = pcRefCU->getTotalNumPart();
    2942   UInt uiMaxDepthRefCU = 0;
    2943   while( uiNumPartInRefCU > 1 )
    2944   {
    2945     uiNumPartInRefCU >>= 2;
    2946     uiMaxDepthRefCU++;
    2947   }
    2948 
    2949   UInt uiDepthRefPU = (pcRefCU->getDepth(uiRefAbsPartIdx)) + (pcRefCU->getPartitionSize(uiRefAbsPartIdx) == SIZE_2Nx2N ? 0 : 1);
    2950   UInt uiShifts = (uiMaxDepthRefCU - uiDepthRefPU)*2;
    2951   UInt uiRefBlockOriginPartIdx = (uiRefAbsPartIdx>>uiShifts)<<uiShifts;
    2952 
    2953   UInt uiRefOriginX = pcRefCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiRefBlockOriginPartIdx] ];
    2954   UInt uiRefOriginY = pcRefCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiRefBlockOriginPartIdx] ];
    2955 
    2956   if( (uiThisOriginX - uiRefOriginX) > 0 ) { ruiOffsetX = (UInt)(uiThisOriginX - uiRefOriginX); }
    2957   if( (uiThisOriginY - uiRefOriginY) > 0 ) { ruiOffsetY = (UInt)(uiThisOriginY - uiRefOriginY); }
    2958 }
    2959 
    2960 Bool TComPrediction::xGetWedgeIntraDirPredData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int& riSlopeX, Int& riSlopeY, UInt& ruiStartPosX, UInt& ruiStartPosY )
    2961 {
    2962   riSlopeX = 0, riSlopeY = 0, ruiStartPosX = 0, ruiStartPosY = 0;
    2963 
    2964   // 1st step: get wedge start point (max. slope)
    2965   Int* piSource = pcCU->getPattern()->getAdiOrgBuf( uiBlockSize, uiBlockSize, m_piYuvExt );
    2966   Int iSourceStride = ( uiBlockSize<<1 ) + 1;
    2967 
    2968   UInt uiSlopeMaxAbove = 0, uiPosSlopeMaxAbove = 0;
    2969   for( UInt uiPosHor = 0; uiPosHor < (uiBlockSize-1); uiPosHor++ )
    2970   {
    2971     if( abs( piSource[uiPosHor+1] - piSource[uiPosHor] ) > uiSlopeMaxAbove )
    2972     {
    2973       uiSlopeMaxAbove = abs( piSource[uiPosHor+1] - piSource[uiPosHor] );
    2974       uiPosSlopeMaxAbove = uiPosHor;
    2975     }
    2976   }
    2977 
    2978   UInt uiSlopeMaxLeft = 0, uiPosSlopeMaxLeft = 0;
    2979   for( UInt uiPosVer = 0; uiPosVer < (uiBlockSize-1); uiPosVer++ )
    2980   {
    2981     if( abs( piSource[(uiPosVer+1)*iSourceStride] - piSource[uiPosVer*iSourceStride] ) > uiSlopeMaxLeft )
    2982     {
    2983       uiSlopeMaxLeft = abs( piSource[(uiPosVer+1)*iSourceStride] - piSource[uiPosVer*iSourceStride] );
    2984       uiPosSlopeMaxLeft = uiPosVer;
    2985     }
    2986   }
    2987 
    2988   if( uiSlopeMaxAbove == 0 && uiSlopeMaxLeft == 0 )
    2989   {
    2990     return false;
    2991   }
    2992 
    2993   ruiStartPosX = ( uiSlopeMaxAbove >  uiSlopeMaxLeft  ) ? uiPosSlopeMaxAbove : 0;
    2994   ruiStartPosY = ( uiSlopeMaxLeft  >= uiSlopeMaxAbove ) ? uiPosSlopeMaxLeft  : 0;
    2995 
    2996   // 2nd step: derive wedge direction
    2997   Int uiPreds[3] = {-1, -1, -1};
    2998   Int iMode = -1;
    2999   Int iPredNum = pcCU->getIntraDirLumaPredictor( uiAbsPartIdx, uiPreds, &iMode ); 
    3000 
    3001   UInt uiDirMode = 0;
    3002   if( iMode >= 0 ) { iPredNum = iMode; }
    3003   if( iPredNum == 1 ) { uiDirMode = uiPreds[0]; }
    3004   if( iPredNum == 2 ) { uiDirMode = uiPreds[1]; }
    3005 
    3006   if( uiDirMode < 2 ) { return false; } // no planar & DC
    3007 
    3008   Bool modeHor       = (uiDirMode < 18);
    3009   Bool modeVer       = !modeHor;
    3010   Int intraPredAngle = modeVer ? (Int)uiDirMode - VER_IDX : modeHor ? -((Int)uiDirMode - HOR_IDX) : 0;
    3011   Int absAng         = abs(intraPredAngle);
    3012   Int signAng        = intraPredAngle < 0 ? -1 : 1;
    3013   Int angTable[9]    = {0,2,5,9,13,17,21,26,32};
    3014   absAng             = angTable[absAng];
    3015   intraPredAngle     = signAng * absAng;
    3016 
    3017   // 3rd step: set slope for direction
    3018   if( modeHor )
    3019   {
    3020     riSlopeX = ( intraPredAngle > 0 ) ?            -32 :              32;
    3021     riSlopeY = ( intraPredAngle > 0 ) ? intraPredAngle : -intraPredAngle;
    3022   }
    3023   else if( modeVer )
    3024   {
    3025     riSlopeX = ( intraPredAngle > 0 ) ? intraPredAngle : -intraPredAngle;
    3026     riSlopeY = ( intraPredAngle > 0 ) ?            -32 :              32;
    3027   }
    3028 
    3029   return true;
    3030 }
    3031 
    3032 Void TComPrediction::xGetWedgeIntraDirStartEnd( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int iDeltaX, Int iDeltaY, UInt uiPMSPosX, UInt uiPMSPosY, UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, Int iDeltaEnd )
    3033 {
    3034   ruhXs = 0;
    3035   ruhYs = 0;
    3036   ruhXe = 0;
    3037   ruhYe = 0;
    3038 
    3039   // scaling of start pos and block size to wedge resolution
    3040   UInt uiScaledStartPosX = 0;
    3041   UInt uiScaledStartPosY = 0;
    3042   UInt uiScaledBlockSize = 0;
    3043   WedgeResolution eWedgeRes = g_dmmWedgeResolution[(UInt)g_aucConvertToBit[uiBlockSize]];
    3044   switch( eWedgeRes )
    3045   {
    3046   case( DOUBLE_PEL ): { uiScaledStartPosX = (uiPMSPosX>>1); uiScaledStartPosY = (uiPMSPosY>>1); uiScaledBlockSize = (uiBlockSize>>1); break; }
    3047   case(   FULL_PEL ): { uiScaledStartPosX =  uiPMSPosX;     uiScaledStartPosY =  uiPMSPosY;     uiScaledBlockSize =  uiBlockSize;     break; }
    3048   case(   HALF_PEL ): { uiScaledStartPosX = (uiPMSPosX<<1); uiScaledStartPosY = (uiPMSPosY<<1); uiScaledBlockSize = (uiBlockSize<<1); break; }
    3049   }
    3050   Int iMaxPos = (Int)uiScaledBlockSize - 1;
    3051 
    3052   // case above
    3053   if( uiScaledStartPosX > 0 && uiScaledStartPosY == 0 )
    3054   {
    3055     ruhXs = (UChar)uiScaledStartPosX;
    3056     ruhYs = 0;
    3057 
    3058     if( iDeltaY == 0 )
    3059     {
    3060       if( iDeltaX < 0 )
    3061       {
    3062         ruhXe = 0;
    3063         ruhYe = (UChar)std::min( std::max( iDeltaEnd, 0 ), iMaxPos );
    3064         return;
    3065       }
    3066       else
    3067       {
    3068         ruhXe = (UChar)iMaxPos;
    3069         ruhYe = (UChar)std::min( std::max( -iDeltaEnd, 0 ), iMaxPos );
    3070         std::swap( ruhXs, ruhXe );
    3071         std::swap( ruhYs, ruhYe );
    3072         return;
    3073       }
    3074     }
    3075 
    3076     // regular case
    3077     Int iVirtualEndX = (Int)ruhXs + roftoi( (Double)iMaxPos * ((Double)iDeltaX / (Double)iDeltaY) );
    3078 
    3079     if( iVirtualEndX < 0 )
    3080     {
    3081       Int iYe = roftoi( (Double)(0 - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) + iDeltaEnd;
    3082       if( iYe < (Int)uiScaledBlockSize )
    3083       {
    3084         ruhXe = 0;
    3085         ruhYe = (UChar)std::max( iYe, 0 );
    3086         return;
    3087       }
    3088       else
    3089       {
    3090         ruhXe = (UChar)std::min( (iYe - iMaxPos), iMaxPos );
    3091         ruhYe = (UChar)iMaxPos;
    3092         return;
    3093       }
    3094     }
    3095     else if( iVirtualEndX > iMaxPos )
    3096     {
    3097       Int iYe = roftoi( (Double)(iMaxPos - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) - iDeltaEnd;
    3098       if( iYe < (Int)uiScaledBlockSize )
    3099       {
    3100         ruhXe = (UChar)iMaxPos;
    3101         ruhYe = (UChar)std::max( iYe, 0 );
    3102         std::swap( ruhXs, ruhXe );
    3103         std::swap( ruhYs, ruhYe );
    3104         return;
    3105       }
    3106       else
    3107       {
    3108         ruhXe = (UChar)std::max( (iMaxPos - (iYe - iMaxPos)), 0 );
    3109         ruhYe = (UChar)iMaxPos;
    3110         return;
    3111       }
    3112     }
    3113     else
    3114     {
    3115       Int iXe = iVirtualEndX + iDeltaEnd;
    3116       if( iXe < 0 )
    3117       {
    3118         ruhXe = 0;
    3119         ruhYe = (UChar)std::max( (iMaxPos + iXe), 0 );
    3120         return;
    3121       }
    3122       else if( iXe > iMaxPos )
    3123       {
    3124         ruhXe = (UChar)iMaxPos;
    3125         ruhYe = (UChar)std::max( (iMaxPos - (iXe - iMaxPos)), 0 );
    3126         std::swap( ruhXs, ruhXe );
    3127         std::swap( ruhYs, ruhYe );
    3128         return;
    3129       }
    3130       else
    3131       {
    3132         ruhXe = (UChar)iXe;
    3133         ruhYe = (UChar)iMaxPos;
    3134         return;
    3135       }
    3136     }
    3137   }
    3138 
    3139   // case left
    3140   if( uiScaledStartPosY > 0 && uiScaledStartPosX == 0 )
    3141   {
    3142     ruhXs = 0;
    3143     ruhYs = (UChar)uiScaledStartPosY;
    3144 
    3145     if( iDeltaX == 0 )
    3146     {
    3147       if( iDeltaY < 0 )
    3148       {
    3149         ruhXe = (UChar)std::min( std::max( -iDeltaEnd, 0 ), iMaxPos );
    3150         ruhYe = 0;
    3151         std::swap( ruhXs, ruhXe );
    3152         std::swap( ruhYs, ruhYe );
    3153         return;
    3154       }
    3155       else
    3156       {
    3157         ruhXe = (UChar)std::min( std::max( iDeltaEnd, 0 ), iMaxPos );
    3158         ruhYe = (UChar)iMaxPos;
    3159         return;
    3160       }
    3161     }
    3162 
    3163     // regular case
    3164     Int iVirtualEndY = (Int)ruhYs + roftoi( (Double)iMaxPos * ((Double)iDeltaY / (Double)iDeltaX) );
    3165 
    3166     if( iVirtualEndY < 0 )
    3167     {
    3168       Int iXe = roftoi( (Double)(0 - (Int)ruhYs ) * ((Double)iDeltaX / (Double)iDeltaY) ) - iDeltaEnd;
    3169       if( iXe < (Int)uiScaledBlockSize )
    3170       {
    3171         ruhXe = (UChar)std::max( iXe, 0 );
    3172         ruhYe = 0;
    3173         std::swap( ruhXs, ruhXe );
    3174         std::swap( ruhYs, ruhYe );
    3175         return;
    3176       }
    3177       else
    3178       {
    3179         ruhXe = (UChar)iMaxPos;
    3180         ruhYe = (UChar)std::min( (iXe - iMaxPos), iMaxPos );
    3181         std::swap( ruhXs, ruhXe );
    3182         std::swap( ruhYs, ruhYe );
    3183         return;
    3184       }
    3185     }
    3186     else if( iVirtualEndY > (uiScaledBlockSize-1) )
    3187     {
    3188       Int iXe = roftoi( (Double)((Int)(uiScaledBlockSize-1) - (Int)ruhYs ) * ((Double)iDeltaX / (Double)iDeltaY) ) + iDeltaEnd;
    3189       if( iXe < (Int)uiScaledBlockSize )
    3190       {
    3191         ruhXe = (UChar)std::max( iXe, 0 );
    3192         ruhYe = (UChar)(uiScaledBlockSize-1);
    3193         return;
    3194       }
    3195       else
    3196       {
    3197         ruhXe = (UChar)iMaxPos;
    3198         ruhYe = (UChar)std::max( (iMaxPos - (iXe - iMaxPos)), 0 );
    3199         std::swap( ruhXs, ruhXe );
    3200         std::swap( ruhYs, ruhYe );
    3201         return;
    3202       }
    3203     }
    3204     else
    3205     {
    3206       Int iYe = iVirtualEndY - iDeltaEnd;
    3207       if( iYe < 0 )
    3208       {
    3209         ruhXe = (UChar)std::max( (iMaxPos + iYe), 0 );
    3210         ruhYe = 0;
    3211         std::swap( ruhXs, ruhXe );
    3212         std::swap( ruhYs, ruhYe );
    3213         return;
    3214       }
    3215       else if( iYe > iMaxPos )
    3216       {
    3217         ruhXe = (UChar)std::max( (iMaxPos - (iYe - iMaxPos)), 0 );
    3218         ruhYe = (UChar)iMaxPos;
    3219         return;
    3220       }
    3221       else
    3222       {
    3223         ruhXe = (UChar)iMaxPos;
    3224         ruhYe = (UChar)iYe;
    3225         std::swap( ruhXs, ruhXe );
    3226         std::swap( ruhYs, ruhYe );
    3227         return;
    3228       }
    3229     }
    3230   }
    3231 
    3232   // case origin
    3233   if( uiScaledStartPosX == 0 && uiScaledStartPosY == 0 )
    3234   {
    3235     if( iDeltaX*iDeltaY < 0 )
    3236     {
    3237       return;
    3238     }
    3239 
    3240     ruhXs = 0;
    3241     ruhYs = 0;
    3242 
    3243     if( iDeltaY == 0 )
    3244     {
    3245       ruhXe = (UChar)iMaxPos;
    3246       ruhYe = 0;
    3247       std::swap( ruhXs, ruhXe );
    3248       std::swap( ruhYs, ruhYe );
    3249       return;
    3250     }
    3251 
    3252     if( iDeltaX == 0 )
    3253     {
    3254       ruhXe = 0;
    3255       ruhYe = (UChar)iMaxPos;
    3256       return;
    3257     }
    3258 
    3259     Int iVirtualEndX = (Int)ruhXs + roftoi( (Double)iMaxPos * ((Double)iDeltaX / (Double)iDeltaY) );
    3260 
    3261     if( iVirtualEndX > iMaxPos )
    3262     {
    3263       Int iYe = roftoi( (Double)((Int)iMaxPos - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) - iDeltaEnd;
    3264       if( iYe < (Int)uiScaledBlockSize )
    3265       {
    3266         ruhXe = (UChar)(uiScaledBlockSize-1);
    3267         ruhYe = (UChar)std::max( iYe, 0 );
    3268         std::swap( ruhXs, ruhXe );
    3269         std::swap( ruhYs, ruhYe );
    3270         return;
    3271       }
    3272       else
    3273       {
    3274         ruhXe = (UChar)std::max( (iMaxPos - (iYe - iMaxPos)), 0 );
    3275         ruhYe = (UChar)(uiScaledBlockSize-1);
    3276         return;
    3277       }
    3278     }
    3279     else
    3280     {
    3281       Int iXe = iVirtualEndX + iDeltaEnd;
    3282       if( iXe < 0 )
    3283       {
    3284         ruhXe = 0;
    3285         ruhYe = (UChar)std::max( (iMaxPos + iXe), 0 );
    3286         return;
    3287       }
    3288       else if( iXe > iMaxPos )
    3289       {
    3290         ruhXe = (UChar)(uiScaledBlockSize-1);
    3291         ruhYe = (UChar)std::max( (iMaxPos - (iXe - iMaxPos)), 0 );
    3292         std::swap( ruhXs, ruhXe );
    3293         std::swap( ruhYs, ruhYe );
    3294         return;
    3295       }
    3296       else
    3297       {
    3298         ruhXe = (UChar)iXe;
    3299         ruhYe = (UChar)(uiScaledBlockSize-1);
    3300         return;
    3301       }
    3302     }
    3303   }
    3304 }
    3305 
    3306 UInt TComPrediction::xGetWedgePatternIdx( UInt uiBlockSize, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe )
    3307 {
    3308   WedgeRefList* pcWedgeRefList = &g_dmmWedgeRefLists[(g_aucConvertToBit[uiBlockSize])];
    3309   for( UInt uiIdx = 0; uiIdx < pcWedgeRefList->size(); uiIdx++ )
    3310   {
    3311     TComWedgeRef* pcTestWedgeRef = &(pcWedgeRefList->at(uiIdx));
    3312     if( pcTestWedgeRef->getStartX() == uhXs && pcTestWedgeRef->getStartY() == uhYs && pcTestWedgeRef->getEndX() == uhXe && pcTestWedgeRef->getEndY() == uhYe )
    3313     {
    3314       return pcTestWedgeRef->getRefIdx();
    3315     }
    3316   }
    3317   return 0;
    3318 }
    3319 #endif
    3320 #endif
     2035#endif
     2036
    33212037#if H_3D_DIM_RBC
    33222038Void TComPrediction::xDeltaDCQuantScaleUp( TComDataCU* pcCU, Pel& rDeltaDC )
     
    33482064#if H_3D_DIM_SDC
    33492065Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride
    3350 #if KWU_SDC_SIMPLE_DC_E0117
    33512066                                         ,UInt uiIntraMode
    33522067                                         ,Bool orgDC
    3353 #endif
    33542068                                        )
    33552069{
     
    33592073  memset(iSumPix, 0, sizeof(Int)*2);
    33602074 
    3361 #if KWU_SDC_SIMPLE_DC_E0117
    33622075  if (orgDC == false)
    33632076  {
     
    33852098    return;
    33862099  }
    3387 #endif
    33882100
    33892101  Int subSamplePix;
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComPrediction.h

    r622 r646  
    7676  Int    m_iLumaRecStride;       ///< stride of #m_pLumaRecBuffer array
    7777#if H_3D_IC
    78 #if SHARP_ILLUCOMP_REFINE_E0046
    7978  UInt   m_uiaShift[ 64 ];       // Table for multiplication to substitue of division operation
    80 #else
    81   UInt   m_uiaShift[ 63 ];       // Table for multiplication to substitue of division operation
    82 #endif
    8379#endif
    8480
     
    8884  Int  xGetConstrainedSize(Int nPbW, Int nPbH, Bool bLuma = true);
    8985#endif
    90 #if NTT_VSP_COMMON_E0207_E0208
    9186  TComYuv   m_cYuvDepthOnVsp;
    92 #endif
    9387#endif
    9488
     
    126120
    127121#if H_3D_VSP
    128 #if NTT_VSP_COMMON_E0207_E0208
    129122  Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int txtPerDepthX=1, Int txtPerDepthY=1 );
    130123  Void xPredInterLumaBlkFromDM    ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );
    131124  Void xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );
    132 #else
    133   Void xPredInterLumaBlkFromDM  ( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv* dv, UInt partAddr, Int posX, Int posY, Int sizeX, Int sizeY, Bool isDepth, TComYuv *&dstPic, Bool bi );
    134   Void xPredInterChromaBlkFromDM( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv* dv, UInt partAddr, Int posX, Int posY, Int sizeX, Int sizeY, Bool isDepth, TComYuv *&dstPic, Bool bi );
    135 #endif
    136125#endif
    137126
     
    140129  Void xGetLLSPrediction ( TComPattern* pcPattern, Int* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0 );
    141130#if H_3D_IC
    142 #if SHARP_ILLUCOMP_REFINE_E0046
    143131  Void xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, TextType eType );
    144 #else
    145   Void xGetLLSICPrediction( TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift, TextType eType );
    146 #endif
    147132#endif
    148133  Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight );
     
    154139  Void xAssignBiSegDCs          ( Pel* ptrDst, UInt dstStride, Bool* biSegPattern, Int patternStride, Pel   valDC1, Pel   valDC2 );
    155140#if H_3D_DIM_DMM
    156 #if !SEC_DMM2_E0146_HHIFIX
    157   UInt xPredWedgeFromIntra      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Int iDeltaEnd = 0 );
    158 #endif
    159141  UInt xPredWedgeFromTex        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx );
    160142  Void xPredContourFromTex      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge );
    161 
    162143  Void xCopyTextureLumaBlock    ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piDestBlockY, UInt uiWidth, UInt uiHeight );
    163 
    164 #if !SEC_DMM2_E0146_HHIFIX
    165   Void xGetBlockOffset          ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComDataCU* pcRefCU, UInt uiRefAbsPartIdx, UInt& ruiOffsetX, UInt& ruiOffsetY );
    166   Bool xGetWedgeIntraDirPredData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int& riSlopeX, Int& riSlopeY, UInt& ruiStartPosX, UInt& ruiStartPosY );
    167   Void xGetWedgeIntraDirStartEnd( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int iDeltaX, Int iDeltaY, UInt uiPMSPosX, UInt uiPMSPosY, UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, Int iDeltaEnd = 0 );
    168   UInt xGetWedgePatternIdx      ( UInt uiBlockSize, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe );
    169 #endif
    170144#endif
    171145#if H_3D_DIM_RBC
     
    196170#if H_3D_DIM_SDC
    197171  Void analyzeSegmentsSDC         ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride
    198 #if KWU_SDC_SIMPLE_DC_E0117
    199172                                    ,UInt uiIntraMode
    200173                                    ,Bool orgDC=false
    201 #endif
    202174    );
    203175#endif
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComRdCost.cpp

    r635 r646  
    542542  cDtParam.bUseIC       = false;
    543543#endif
    544 #if LGE_INTER_SDC_E0156
     544#if H_3D_INTER_SDC
    545545  cDtParam.bUseSDCMRSAD = false;
    546546#endif
     
    605605    dist = (Dist) (iDWeight * distDepth + iVSOWeight * dist ) / ( iDWeight + iVSOWeight);
    606606  }
    607 #if H_3D_FIX_UINT_WARNING
     607
    608608  return (UInt) dist;
    609 #else
    610   return dist;
    611 #endif
    612 
    613609}
    614610#endif
     
    652648  }
    653649#endif
    654 #if LGE_INTER_SDC_E0156
     650#if H_3D_INTER_SDC
    655651  if( pcDtParam->bUseSDCMRSAD )
    656652  {
     
    692688  }
    693689#endif
    694 #if LGE_INTER_SDC_E0156
     690#if H_3D_INTER_SDC
    695691  if( pcDtParam->bUseSDCMRSAD )
    696692  {
     
    735731  }
    736732#endif
    737 #if LGE_INTER_SDC_E0156
     733#if H_3D_INTER_SDC
    738734  if( pcDtParam->bUseSDCMRSAD )
    739735  {
     
    782778  }
    783779#endif
    784 #if LGE_INTER_SDC_E0156
     780#if H_3D_INTER_SDC
    785781  if( pcDtParam->bUseSDCMRSAD )
    786782  {
     
    838834  }
    839835#endif
    840 #if LGE_INTER_SDC_E0156
     836#if H_3D_INTER_SDC
    841837  if( pcDtParam->bUseSDCMRSAD )
    842838  {
     
    886882  }
    887883#endif
    888 #if LGE_INTER_SDC_E0156
     884#if H_3D_INTER_SDC
    889885  if( pcDtParam->bUseSDCMRSAD )
    890886  {
     
    944940  }
    945941#endif
    946 #if LGE_INTER_SDC_E0156
     942#if H_3D_INTER_SDC
    947943  if( pcDtParam->bUseSDCMRSAD )
    948944  {
     
    10161012  }
    10171013#endif
    1018 #if LGE_INTER_SDC_E0156
     1014#if H_3D_INTER_SDC
    10191015  if( pcDtParam->bUseSDCMRSAD )
    10201016  {
     
    10811077  }
    10821078#endif
    1083 #if LGE_INTER_SDC_E0156
     1079#if H_3D_INTER_SDC
    10841080  if( pcDtParam->bUseSDCMRSAD )
    10851081  {
     
    11851181  }
    11861182#endif
    1187 #if LGE_INTER_SDC_E0156
     1183#if H_3D_INTER_SDC
    11881184  if( pcDtParam->bUseSDCMRSAD )
    11891185  {
     
    12611257#endif
    12621258
    1263 #if H_3D_IC || LGE_INTER_SDC_E0156
     1259#if H_3D_IC || H_3D_INTER_SDC
    12641260UInt TComRdCost::xGetSADic( DistParam* pcDtParam )
    12651261{
     
    35133509  }
    35143510#endif
    3515 #if LGE_INTER_SDC_E0156
     3511#if H_3D_INTER_SDC
    35163512  if( pcDtParam->bUseSDCMRSAD )
    35173513  {
     
    36163612}
    36173613
    3618 #if H_3D_IC || LGE_INTER_SDC_E0156
     3614#if H_3D_IC || H_3D_INTER_SDC
    36193615UInt TComRdCost::xGetHADsic( DistParam* pcDtParam )
    36203616{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComRdCost.h

    r635 r646  
    9494  Bool  bUseIC;
    9595#endif
    96 #if LGE_INTER_SDC_E0156
     96#if H_3D_INTER_SDC
    9797  Bool  bUseSDCMRSAD;
    9898#endif
     
    136136    iStrideVir = 0;
    137137#endif
    138 #if LGE_INTER_SDC_E0156
     138#if H_3D_INTER_SDC
    139139    bUseSDCMRSAD = false;
    140140#endif
     
    283283  static UInt xGetSSE64         ( DistParam* pcDtParam );
    284284  static UInt xGetSSE16N        ( DistParam* pcDtParam );
    285 #if H_3D_IC || LGE_INTER_SDC_E0156
     285#if H_3D_IC || H_3D_INTER_SDC
    286286  static UInt xGetSADic         ( DistParam* pcDtParam );
    287287  static UInt xGetSAD4ic        ( DistParam* pcDtParam );
     
    311311
    312312#if AMP_SAD
    313 #if H_3D_IC || LGE_INTER_SDC_E0156
     313#if H_3D_IC || H_3D_INTER_SDC
    314314  static UInt xGetSAD12ic       ( DistParam* pcDtParam );
    315315  static UInt xGetSAD24ic       ( DistParam* pcDtParam );
     
    322322#endif
    323323
    324 #if H_3D_IC || LGE_INTER_SDC_E0156
     324#if H_3D_IC || H_3D_INTER_SDC
    325325  static UInt xGetHADsic          ( DistParam* pcDtParam );
    326326#endif
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComSlice.cpp

    r635 r646  
    19501950    m_depthRefinementFlag  [ i ] = false;
    19511951#endif
    1952 #if LGE_INTER_SDC_E0156
     1952#if H_3D_INTER_SDC
    19531953    m_bInterSDCFlag        [ i ] = false;
    19541954#endif
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComSlice.h

    r622 r646  
    653653  Bool        m_ivMvScalingFlag;
    654654#endif
    655 #if LGE_INTER_SDC_E0156
     655#if H_3D_INTER_SDC
    656656  Bool        m_bInterSDCFlag[MAX_NUM_LAYERS   ];
    657657#endif
     
    943943  Bool    getIvMvScalingFlag   (  )                       { return m_ivMvScalingFlag; }
    944944  Void    setIvMvScalingFlag   ( Bool b )                 { m_ivMvScalingFlag = b;    } 
    945 #if LGE_INTER_SDC_E0156
     945#if H_3D_INTER_SDC
    946946  Bool    getInterSDCFlag      ( Int layerIdInVps )           { return m_bInterSDCFlag[layerIdInVps]; }
    947947  Void    setInterSDCFlag      ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; }
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComWedgelet.cpp

    r622 r646  
    175175}
    176176
    177 #if !SEC_DMM2_E0146_HHIFIX
    178 Bool TComWedgelet::checkPredDirAbovePossible( UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset )
    179 {
    180   WedgeResolution eContDWedgeRes = g_dmmWedgeResolution[(UInt)g_aucConvertToBit[uiPredDirBlockSize]];
    181   UInt uiContDStartEndMax = 0;
    182   UInt uiContDStartEndOffset = 0;
    183   switch( eContDWedgeRes )
    184   {
    185   case( DOUBLE_PEL ): { uiContDStartEndMax = (uiPredDirBlockSize>>1); uiContDStartEndOffset = (uiPredDirBlockOffset>>1); break; }
    186   case(   FULL_PEL ): { uiContDStartEndMax =  uiPredDirBlockSize;     uiContDStartEndOffset =  uiPredDirBlockOffset;     break; }
    187   case(   HALF_PEL ): { uiContDStartEndMax = (uiPredDirBlockSize<<1); uiContDStartEndOffset = (uiPredDirBlockOffset<<1); break; }
    188   }
    189 
    190   if( m_uhOri == 2 || m_uhOri == 3 || m_uhOri == 4 )
    191   {
    192     UInt uiThisStartEndMax = 0;
    193     switch( m_eWedgeRes )
    194     {
    195     case( DOUBLE_PEL ): { uiThisStartEndMax = (m_uiWidth>>1); break; }
    196     case(   FULL_PEL ): { uiThisStartEndMax =  m_uiWidth;     break; }
    197     case(   HALF_PEL ): { uiThisStartEndMax = (m_uiWidth<<1); break; }
    198     }
    199 
    200     UChar uhStartX = m_uhXs;
    201     UChar uhStartY = m_uhYs;
    202     UChar uhEndX   = m_uhXe;
    203     UChar uhEndY   = m_uhYe;
    204 
    205     if( 2 == m_uhOri )
    206     {
    207       std::swap( uhStartX, uhEndX );
    208       std::swap( uhStartY, uhEndY );
    209     }
    210 
    211     UInt uiScaledEndX = (UInt)uhEndX;
    212     Int iDeltaRes = (Int)eContDWedgeRes - (Int)m_eWedgeRes;
    213     if( iDeltaRes > 0 ) { uiScaledEndX <<=  iDeltaRes; }
    214     if( iDeltaRes < 0 ) { uiScaledEndX >>= -iDeltaRes; }
    215 
    216     if( ((UInt)uhEndY == (uiThisStartEndMax-1)) && ((uiScaledEndX-uiContDStartEndOffset) > 0 && (uiScaledEndX-uiContDStartEndOffset) < (uiContDStartEndMax-1)) )
    217     {
    218       return true;
    219     }
    220   }
    221 
    222   return false;
    223 }
    224 
    225 Bool TComWedgelet::checkPredDirLeftPossible( UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset )
    226 {
    227   WedgeResolution eContDWedgeRes = g_dmmWedgeResolution[(UInt)g_aucConvertToBit[uiPredDirBlockSize]];
    228   UInt uiContDStartEndMax = 0;
    229   UInt uiContDStartEndOffset = 0;
    230   switch( eContDWedgeRes )
    231   {
    232   case( DOUBLE_PEL ): { uiContDStartEndMax = (uiPredDirBlockSize>>1); uiContDStartEndOffset = (uiPredDirBlockOffset>>1); break; }
    233   case(   FULL_PEL ): { uiContDStartEndMax =  uiPredDirBlockSize;     uiContDStartEndOffset =  uiPredDirBlockOffset;     break; }
    234   case(   HALF_PEL ): { uiContDStartEndMax = (uiPredDirBlockSize<<1); uiContDStartEndOffset = (uiPredDirBlockOffset<<1); break; }
    235   }
    236 
    237   if( m_uhOri == 1 || m_uhOri == 2 || m_uhOri == 5 )
    238   {
    239     UInt uiThisStartEndMax = 0;
    240     switch( m_eWedgeRes )
    241     {
    242     case( DOUBLE_PEL ): { uiThisStartEndMax = (m_uiHeight>>1); break; }
    243     case(   FULL_PEL ): { uiThisStartEndMax =  m_uiHeight;     break; }
    244     case(   HALF_PEL ): { uiThisStartEndMax = (m_uiHeight<<1); break; }
    245     }
    246 
    247     UChar uhStartX = m_uhXs;
    248     UChar uhStartY = m_uhYs;
    249     UChar uhEndX   = m_uhXe;
    250     UChar uhEndY   = m_uhYe;
    251 
    252     if( 1 == m_uhOri || 5 == m_uhOri )
    253     {
    254       std::swap( uhStartX, uhEndX );
    255       std::swap( uhStartY, uhEndY );
    256     }
    257 
    258     UInt uiScaledEndY = (UInt)uhEndY;
    259     Int iDeltaRes = (Int)eContDWedgeRes - (Int)m_eWedgeRes;
    260     if( iDeltaRes > 0 ) { uiScaledEndY <<=  iDeltaRes; }
    261     if( iDeltaRes < 0 ) { uiScaledEndY >>= -iDeltaRes; }
    262 
    263     if( ((UInt)uhEndX == (uiThisStartEndMax-1)) && ((uiScaledEndY-uiContDStartEndOffset) > 0 && (uiScaledEndY-uiContDStartEndOffset) < (uiContDStartEndMax-1)) )
    264     {
    265       return true;
    266     }
    267   }
    268 
    269   return false;
    270 }
    271 
    272 Void TComWedgelet::getPredDirStartEndAbove( UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset, Int iDeltaEnd )
    273 {
    274   ruhXs = 0;
    275   ruhYs = 0;
    276   ruhXe = 0;
    277   ruhYe = 0;
    278 
    279   // get start/end of reference (=this) wedgelet
    280   UInt uiRefStartX = (UInt)getStartX();
    281   UInt uiRefStartY = (UInt)getStartY();
    282   UInt uiRefEndX   = (UInt)getEndX();
    283   UInt uiRefEndY   = (UInt)getEndY();
    284 
    285   WedgeResolution eContDWedgeRes = g_dmmWedgeResolution[(UInt)g_aucConvertToBit[uiPredDirBlockSize]];
    286   UInt uiContDStartEndMax = 0;
    287   UInt uiContDStartEndOffset = 0;
    288   switch( eContDWedgeRes )
    289   {
    290   case( DOUBLE_PEL ): { uiContDStartEndMax = (uiPredDirBlockSize>>1); uiContDStartEndOffset = (uiPredDirBlockOffset>>1); break; }
    291   case(   FULL_PEL ): { uiContDStartEndMax =  uiPredDirBlockSize;     uiContDStartEndOffset =  uiPredDirBlockOffset;     break; }
    292   case(   HALF_PEL ): { uiContDStartEndMax = (uiPredDirBlockSize<<1); uiContDStartEndOffset = (uiPredDirBlockOffset<<1); break; }
    293   }
    294   Int iContDMaxPos = (Int)uiContDStartEndMax - 1;
    295 
    296   // swap if start/end if line orientation is not from top to bottom
    297   if( 2 == (UInt)getOri() )
    298   {
    299     std::swap( uiRefStartX, uiRefEndX );
    300     std::swap( uiRefStartY, uiRefEndY );
    301   }
    302 
    303   // calc slopes
    304   Int iA_DeltaX = (Int)uiRefEndX - (Int)uiRefStartX;
    305   Int iA_DeltaY = (Int)uiRefEndY - (Int)uiRefStartY;
    306 
    307   // get aligned end x value of ref wedge
    308   UInt uiScaledRefEndX = uiRefEndX;
    309   Int iDeltaRes = (Int)eContDWedgeRes - (Int)m_eWedgeRes;
    310   if( iDeltaRes > 0 ) { uiScaledRefEndX <<=  iDeltaRes; }
    311   if( iDeltaRes < 0 ) { uiScaledRefEndX >>= -iDeltaRes; }
    312 
    313   assert( uiScaledRefEndX >= uiContDStartEndOffset );
    314   Int iAlignedRefEndX = (Int)uiScaledRefEndX - (Int)uiContDStartEndOffset;
    315 
    316   // special for straight vertical wedge
    317   if( iA_DeltaX == 0 )
    318   {
    319     ruhXs = (UChar)iAlignedRefEndX;
    320     ruhYs = 0;
    321 
    322     Int iXe = iAlignedRefEndX + iDeltaEnd;
    323     if( iXe < 0 )
    324     {
    325       ruhXe = 0;
    326       ruhYe = (UChar)min( max( (iContDMaxPos + iXe), 0 ), iContDMaxPos );
    327 
    328       return;
    329     }
    330     else if( iXe > iContDMaxPos )
    331     {
    332       ruhXe = (UChar)iContDMaxPos;
    333       ruhYe = (UChar)min( max( (iContDMaxPos - (iXe - iContDMaxPos)), 0 ), iContDMaxPos );
    334 
    335       std::swap( ruhXs, ruhXe );
    336       std::swap( ruhYs, ruhYe );
    337       return;
    338     }
    339     else
    340     {
    341       ruhXe = (UChar)iXe;
    342       ruhYe = (UChar)iContDMaxPos;
    343 
    344       return;
    345     }
    346   }
    347 
    348   // special for straight horizontal short bottom line
    349   if( iA_DeltaY == 0 )
    350   {
    351     switch( (UInt)getOri() )
    352     {
    353     case( 2 ):
    354       {
    355         ruhXs = (UChar)(iAlignedRefEndX-1);
    356         ruhYs = 0;
    357         ruhXe = 0;
    358         ruhYe = (UChar)min( max( iDeltaEnd, 0 ), iContDMaxPos );
    359 
    360         return;
    361       }
    362     case( 3 ):
    363       {
    364         ruhXs = (UChar)(iAlignedRefEndX+1);
    365         ruhYs = 0;
    366         ruhXe = (UChar)iContDMaxPos;
    367         ruhYe = (UChar)min( max( -iDeltaEnd, 0 ), iContDMaxPos );
    368 
    369         std::swap( ruhXs, ruhXe );
    370         std::swap( ruhYs, ruhYe );
    371         return;
    372       }
    373     default:
    374       {
    375         assert( 0 );
    376         return;
    377       }
    378     }
    379   }
    380 
    381   // set start point depending on slope
    382   if( abs( iA_DeltaX ) >= abs( iA_DeltaY ) ) { if( iA_DeltaX < 0 ) { ruhXs = (UChar)(iAlignedRefEndX-1); ruhYs = 0; }
    383                                                 if( iA_DeltaX > 0 ) { ruhXs = (UChar)(iAlignedRefEndX+1); ruhYs = 0; } }
    384   else                                                             { ruhXs = (UChar)(iAlignedRefEndX);   ruhYs = 0;   }
    385 
    386   // calc end point and determine orientation
    387   Int iVirtualEndX = (Int)ruhXs + roftoi( (Double)iContDMaxPos * ((Double)iA_DeltaX / (Double)iA_DeltaY) );
    388 
    389   if( iVirtualEndX < 0 )
    390   {
    391     Int iYe = roftoi( (Double)(0 - (Int)ruhXs) * ((Double)iA_DeltaY / (Double)iA_DeltaX) ) + iDeltaEnd;
    392     if( iYe < (Int)uiContDStartEndMax )
    393     {
    394       ruhXe = 0;
    395       ruhYe = (UChar)max( iYe, 0 );
    396 
    397       return;
    398     }
    399     else
    400     {
    401       ruhXe = (UChar)min( (iYe - iContDMaxPos), iContDMaxPos );
    402       ruhYe = (UChar)iContDMaxPos;
    403 
    404       return;
    405     }
    406   }
    407   else if( iVirtualEndX > iContDMaxPos )
    408   {
    409     Int iYe = roftoi( (Double)(iContDMaxPos - (Int)ruhXs) * ((Double)iA_DeltaY / (Double)iA_DeltaX) ) - iDeltaEnd;
    410     if( iYe < (Int)uiContDStartEndMax )
    411     {
    412       ruhXe = (UChar)iContDMaxPos;
    413       ruhYe = (UChar)max( iYe, 0 );
    414 
    415       std::swap( ruhXs, ruhXe );
    416       std::swap( ruhYs, ruhYe );
    417       return;
    418     }
    419     else
    420     {
    421       ruhXe = (UChar)max( (iContDMaxPos - (iYe - iContDMaxPos)), 0 );
    422       ruhYe = (UChar)iContDMaxPos;
    423 
    424       return;
    425     }
    426   }
    427   else
    428   {
    429     Int iXe = iVirtualEndX + iDeltaEnd;
    430     if( iXe < 0 )
    431     {
    432       ruhXe = 0;
    433       ruhYe = (UChar)max( (iContDMaxPos + iXe), 0 );
    434 
    435       return;
    436     }
    437     else if( iXe > iContDMaxPos )
    438     {
    439       ruhXe = (UChar)iContDMaxPos;
    440       ruhYe = (UChar)max( (iContDMaxPos - (iXe - iContDMaxPos)), 0 );
    441 
    442       std::swap( ruhXs, ruhXe );
    443       std::swap( ruhYs, ruhYe );
    444       return;
    445     }
    446     else
    447     {
    448       ruhXe = (UChar)iXe;
    449       ruhYe = (UChar)iContDMaxPos;
    450 
    451       return;
    452     }
    453   }
    454 }
    455 
    456 Void TComWedgelet::getPredDirStartEndLeft( UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset, Int iDeltaEnd )
    457 {
    458   ruhXs = 0;
    459   ruhYs = 0;
    460   ruhXe = 0;
    461   ruhYe = 0;
    462 
    463   // get start/end of reference (=this) wedgelet
    464   UInt uiRefStartX = (UInt)getStartX();
    465   UInt uiRefStartY = (UInt)getStartY();
    466   UInt uiRefEndX   = (UInt)getEndX();
    467   UInt uiRefEndY   = (UInt)getEndY();
    468 
    469   WedgeResolution eContDWedgeRes = g_dmmWedgeResolution[(UInt)g_aucConvertToBit[uiPredDirBlockSize]];
    470   UInt uiContDStartEndMax = 0;
    471   UInt uiContDStartEndOffset = 0;
    472   switch( eContDWedgeRes )
    473   {
    474   case( DOUBLE_PEL ): { uiContDStartEndMax = (uiPredDirBlockSize>>1); uiContDStartEndOffset = (uiPredDirBlockOffset>>1); break; }
    475   case(   FULL_PEL ): { uiContDStartEndMax =  uiPredDirBlockSize;     uiContDStartEndOffset =  uiPredDirBlockOffset;     break; }
    476   case(   HALF_PEL ): { uiContDStartEndMax = (uiPredDirBlockSize<<1); uiContDStartEndOffset = (uiPredDirBlockOffset<<1); break; }
    477   }
    478   Int iContDMaxPos = (Int)uiContDStartEndMax - 1;
    479 
    480   // swap if start/end if line orientation is not from left to right
    481   if( 1 == (UInt)getOri() || 5 == (UInt)getOri() )
    482   {
    483     std::swap( uiRefStartX, uiRefEndX );
    484     std::swap( uiRefStartY, uiRefEndY );
    485   }
    486 
    487   Int iL_DeltaX = (Int)uiRefEndX - (Int)uiRefStartX;
    488   Int iL_DeltaY = (Int)uiRefEndY - (Int)uiRefStartY;
    489 
    490   UInt uiScaledRefEndY = uiRefEndY;
    491   Int iDeltaRes = (Int)eContDWedgeRes - (Int)m_eWedgeRes;
    492   if( iDeltaRes > 0 ) { uiScaledRefEndY <<=  iDeltaRes; }
    493   if( iDeltaRes < 0 ) { uiScaledRefEndY >>= -iDeltaRes; }
    494 
    495   assert( uiScaledRefEndY >= uiContDStartEndOffset );
    496   Int iAlignedRefEndY = (Int)uiScaledRefEndY - (Int)uiContDStartEndOffset;
    497 
    498   // special for straight horizontal wedge
    499   if( iL_DeltaY == 0 )
    500   {
    501     ruhXs = 0;
    502     ruhYs = (UChar)iAlignedRefEndY;
    503 
    504     Int iYe = iAlignedRefEndY - iDeltaEnd;
    505     if( iYe < 0 )
    506     {
    507       ruhXe = (UChar)min( max( (iContDMaxPos + iYe), 0 ), iContDMaxPos );
    508       ruhYe = 0;
    509 
    510       std::swap( ruhXs, ruhXe );
    511       std::swap( ruhYs, ruhYe );
    512       return;
    513     }
    514     else if( iYe > iContDMaxPos )
    515     {
    516       ruhXe = (UChar)min( max( (iContDMaxPos - (iYe - iContDMaxPos)), 0 ), iContDMaxPos );
    517       ruhYe = (UChar)iContDMaxPos;
    518 
    519       return;
    520     }
    521     else
    522     {
    523       ruhXe = (UChar)iContDMaxPos;
    524       ruhYe = (UChar)iYe;
    525 
    526       std::swap( ruhXs, ruhXe );
    527       std::swap( ruhYs, ruhYe );
    528       return;
    529     }
    530   }
    531 
    532   // special for straight vertical short right line
    533   if( iL_DeltaX == 0 )
    534   {
    535     switch( (UInt)getOri() )
    536     {
    537     case( 1 ):
    538       {
    539         ruhXs = 0;
    540         ruhYs = (UChar)(iAlignedRefEndY+1);
    541         ruhXe = (UChar)min( max( iDeltaEnd, 0 ), iContDMaxPos );
    542         ruhYe = (UChar)iContDMaxPos;
    543 
    544         return;
    545       }
    546     case( 2 ):
    547       {
    548         ruhXs = 0;
    549         ruhYs = (UChar)(iAlignedRefEndY-1);
    550         ruhXe = (UChar)min( max( -iDeltaEnd, 0 ), iContDMaxPos );
    551         ruhYe = 0;
    552 
    553         std::swap( ruhXs, ruhXe );
    554         std::swap( ruhYs, ruhYe );
    555         return;
    556       }
    557     default:
    558       {
    559         assert( 0 );
    560         return;
    561       }
    562     }
    563   }
    564 
    565   // set start point depending on slope
    566   if( abs( iL_DeltaY ) >= abs( iL_DeltaX ) ) { if( iL_DeltaY < 0 ) { ruhYs = (UChar)(iAlignedRefEndY-1); ruhXs = 0; }
    567                                                if( iL_DeltaY > 0 ) { ruhYs = (UChar)(iAlignedRefEndY+1); ruhXs = 0; } }
    568   else                                       {                       ruhYs = (UChar)(iAlignedRefEndY);   ruhXs = 0;   }
    569 
    570   // calc end point and determine orientation
    571   Int iVirtualEndY = (Int)ruhYs + roftoi( (Double)iContDMaxPos * ((Double)iL_DeltaY / (Double)iL_DeltaX) );
    572 
    573   if( iVirtualEndY < 0 )
    574   {
    575     Int iXe = roftoi( (Double)(0 - (Int)ruhYs ) * ((Double)iL_DeltaX / (Double)iL_DeltaY) ) - iDeltaEnd;
    576     if( iXe < (Int)uiContDStartEndMax )
    577     {
    578       ruhXe = (UChar)max( iXe, 0 );
    579       ruhYe = 0;
    580 
    581       std::swap( ruhXs, ruhXe );
    582       std::swap( ruhYs, ruhYe );
    583       return;
    584     }
    585     else
    586     {
    587       ruhXe = (UChar)iContDMaxPos;
    588       ruhYe = (UChar)min( (iXe - iContDMaxPos), iContDMaxPos );
    589 
    590       std::swap( ruhXs, ruhXe );
    591       std::swap( ruhYs, ruhYe );
    592       return;
    593     }
    594   }
    595   else if( iVirtualEndY > iContDMaxPos )
    596   {
    597     Int iXe = roftoi( (Double)(iContDMaxPos - (Int)ruhYs ) * ((Double)iL_DeltaX / (Double)iL_DeltaY) ) + iDeltaEnd;
    598     if( iXe < (Int)uiContDStartEndMax )
    599     {
    600       ruhXe = (UChar)max( iXe, 0 );
    601       ruhYe = (UChar)iContDMaxPos;
    602 
    603       return;
    604     }
    605     else
    606     {
    607       ruhXe = (UChar)iContDMaxPos;
    608       ruhYe = (UChar)max( (iContDMaxPos - (iXe - iContDMaxPos)), 0 );
    609 
    610       std::swap( ruhXs, ruhXe );
    611       std::swap( ruhYs, ruhYe );
    612       return;
    613     }
    614   }
    615   else
    616   {
    617     Int iYe = iVirtualEndY - iDeltaEnd;
    618     if( iYe < 0 )
    619     {
    620       ruhXe = (UChar)max( (iContDMaxPos + iYe), 0 );
    621       ruhYe = 0;
    622 
    623       std::swap( ruhXs, ruhXe );
    624       std::swap( ruhYs, ruhYe );
    625       return;
    626     }
    627     else if( iYe > iContDMaxPos )
    628     {
    629       ruhXe = (UChar)max( (iContDMaxPos - (iYe - iContDMaxPos)), 0 );
    630       ruhYe = (UChar)iContDMaxPos;
    631 
    632       return;
    633     }
    634     else
    635     {
    636       ruhXe = (UChar)iContDMaxPos;
    637       ruhYe = (UChar)iYe;
    638 
    639       std::swap( ruhXs, ruhXe );
    640       std::swap( ruhYs, ruhYe );
    641       return;
    642     }
    643   }
    644 }
    645 #endif
    646 
    647177Void TComWedgelet::xGenerateWedgePattern()
    648178{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComWedgelet.h

    r622 r646  
    5050enum DIM_IDX
    5151{
    52 #if SEC_DMM2_E0146_HHIFIX
    5352  DMM1_IDX = 0,
    5453  DMM3_IDX = 1,
    5554  DMM4_IDX = 2,
    5655  RBC_IDX  = 3
    57 #else
    58   DMM1_IDX = 0,
    59   DMM2_IDX = 3,
    60   DMM3_IDX = 1,
    61   DMM4_IDX = 2,
    62   RBC_IDX  = 4
    63 #endif
    6456};
    65 #if SEC_DMM2_E0146_HHIFIX
     57
    6658#define DMM_NUM_TYPE   3
    67 #else
    68 #define DMM_NUM_TYPE   4
    69 #endif
    7059#define RBC_NUM_TYPE   1
    7160#define DIM_NUM_TYPE   (DMM_NUM_TYPE+RBC_NUM_TYPE)
     
    8675#define DMM_NO_WEDGEINDEX       MAX_UINT
    8776#define DMM_NUM_WEDGE_REFINES   8
    88 #if !SEC_DMM2_E0146_HHIFIX
    89 #define DMM2_DELTAEND_MAX       4
    90 #endif
    9177#define DMM3_SIMPLIFY_TR        1
    9278
     
    151137  Bool  checkInvIdentical( Bool* pbRefPattern );
    152138
    153 #if !SEC_DMM2_E0146_HHIFIX
    154   // functions for DMM2 prediction
    155   Bool  checkPredDirAbovePossible( UInt uiPredDirBlockSize, UInt uiPredDirBlockOffsett );
    156   Bool  checkPredDirLeftPossible ( UInt uiPredDirBlockSize, UInt uiPredDirBlockOffsett );
    157   Void  getPredDirStartEndAbove( UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset, Int iDeltaEnd );
    158   Void  getPredDirStartEndLeft ( UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset, Int iDeltaEnd );
    159 #endif
    160139};  // END CLASS DEFINITION TComWedgelet
    161140
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TypeDef.h

    r643 r646  
    9797                                              // Unifying rounding offset, for IC part, JCT3V-D0135
    9898                                              // Full Pel Interpolation for Depth, HHI_FULL_PEL_DEPTH_MAP_MV_ACC
     99                                              // SHARP_ILLUCOMP_REFINE_E0046
     100                                              // MTK_CLIPPING_ALIGN_IC_E0168       // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168
    99101
    100102#if H_3D_NBDV
     
    103105                                              // MERL_D0166: Reference view selection in NBDV & Bi-VSP
    104106                                              // MERL_C0152: Basic VSP
     107                                              // NBDV_DEFAULT_VIEWIDX_BUGFIX Bug fix for invalid default view index for NBDV
    105108#endif
    106109
     
    112115                                              // LG_D0092: Multiple VSP candidate allowed
    113116                                              // MTK_VSP_FIX_ALIGN_WD_E0172
     117                                              // NTT_VSP_ADAPTIVE_SPLIT_E0207 adaptive sub-PU partitioning in VSP, JCT3V-E0207
     118                                              // NTT_VSP_DC_BUGFIX_E0208 bugfix for sub-PU based DC in VSP, JCT3V-E0208
     119                                              // NTT_VSP_COMMON_E0207_E0208 common part of JCT3V-E0207 and JCT3V-E0208
    114120#define H_3D_IV_MERGE                     1   // Inter-view motion merge candidate
    115121                                              // HHI_INTER_VIEW_MOTION_PRED
     
    139145                                              // FIX_SDC_ENC_RD_WVSO_D0163
    140146                                              // MTK_SAMPLE_BASED_SDC_D0110
     147                                              // SEC_DMM2_E0146_HHIFIX Removal of DMM2 from DMMs
     148                                              // ZJU_DEPTH_INTRA_MODE_E0204 Simplified Binarization for depth_intra_mode
     149                                              // KWU_SDC_SIMPLE_DC_E0117 Simplified DC calculation for SDC
     150                                              // SCU_HS_DMM4_REMOVE_DIV_E0242 DMM4 Division Removal
     151#define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
     152                                              // LGE_INTER_SDC_E0156  Enable inter SDC for depth coding
    141153#define H_3D_FCO_E0163                          0   // Flexible coding order for 3D
    142154
    143155
     156
     157// OTHERS
     158                                              // MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 // Progressive MV Compression, JCT3V-E0170
     159
     160#define H_3D_REN_MAX_DEV_OUT              0  // Output maximal possible shift deviation
     161
    144162/////////////////////////////////////////////////////////////////////////////////////////
    145163///////////////////////////////////   HTM-8.0 INTEGRATIONS //////////////////////////////
    146164/////////////////////////////////////////////////////////////////////////////////////////
    147165
    148 #define SHARP_ILLUCOMP_REFINE_E0046       1
    149166#define MTK_FAST_TEXTURE_ENCODING_E0173   1   // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173
    150 #define MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170            1   // Progressive MV Compression, JCT3V-E0170
    151 #define LGE_INTER_SDC_E0156               1   // Enable inter SDC for depth coding
    152 
    153 #if H_3D_IC
    154 #define MTK_CLIPPING_ALIGN_IC_E0168       1   // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168
    155 #endif
     167
    156168
    157169#if H_3D_NBDV
    158 #define NBDV_DEFAULT_VIEWIDX_BUGFIX       1  // Bug fix for invalid default view index for NBDV
    159170#define MTK_RVS_BUGFIX_E0172              1  // Bug fix for issues caused by reference view selection, JCT3V-E0172
    160171#define MTK_TEXTURE_MRGCAND_BUGFIX_E0182  1  // Bug fix for TEXTURE MERGING CANDIDATE     , JCT3V-E0182
     
    172183
    173184#if H_3D_DIM
    174 #define SEC_DMM2_E0146_HHIFIX             1   // Removal of DMM2 from DMMs
    175 #define ZJU_DEPTH_INTRA_MODE_E0204        1   // Simplified Binarization for depth_intra_mode
    176 #define KWU_SDC_SIMPLE_DC_E0117           1   // Simplified DC calculation for SDC
    177 #define SCU_HS_DMM4_REMOVE_DIV_E0242      1   // DMM4 Division Removal
    178185#define SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX     1   // Fast DMM and RBC Mode Selection
    179 #endif
    180 
    181 #if H_3D_VSP
    182 #define NTT_VSP_COMMON_E0207_E0208        1 // common part of JCT3V-E0207 and JCT3V-E0208
    183 #if NTT_VSP_COMMON_E0207_E0208
    184 #define NTT_VSP_DC_BUGFIX_E0208           1 // bugfix for sub-PU based DC in VSP, JCT3V-E0208
    185 #define NTT_VSP_VECTOR_CLIP_E0208         1 // disparity vector clipping on fetching depth map in VSP, JCT3V-E0208
    186 #define NTT_VSP_ADAPTIVE_SPLIT_E0207      1 // adaptive sub-PU partitioning in VSP, JCT3V-E0207
    187 #endif
    188186#endif
    189187
     
    193191#define H_3D_FCO_VSP_DONBDV_E0163               0   // Adaptive depth reference for flexible coding order
    194192#endif
    195 
    196 #define H_3D_REN_MAX_DEV_OUT              0  // Output maximal possible shift deviation
    197 
    198 /// FIXES
    199 #define H_3D_FIX_BVSP                     1  // DV from NBDV instead of DoNBDV should be used
    200 #define H_3D_FIX_TICKET_036               1  // fix for ticket #36
    201 #define H_3D_FIX_REN                      1  // fix of erroneous inpainting for renderer
    202 #define H_3D_FIX_REN_WARNING              1  // fix of warning related to camera parameter precision
    203 
    204 #define H_3D_FIX_UINT_WARNING             1  // explicit in VSD
    205193#endif // H_3D
    206194
     
    281269#endif
    282270
     271///// ***** ILLUMATION COMPENSATION *********
     272
     273
     274#if H_3D_IC
     275#define IC_REG_COST_SHIFT 7
     276#define IC_CONST_SHIFT 5
     277#define IC_SHIFT_DIFF 12
     278#endif
     279
    283280/////////////////////////////////////////////////////////////////////////////////////////
    284281///////////////////////////////////   HM RELATED DEFINES ////////////////////////////////
     
    505502
    506503#if H_3D_VSO_DIST_INT
    507 #if H_3D_FIX_TICKET_036
    508504typedef       Int64            Dist;       ///< RDO distortion
    509 #else
    510 typedef       Int              Dist;       ///< RDO distortion
    511 #endif
    512505typedef       Int64            Dist64;
    513506#define       RDO_DIST_MIN     MIN_INT
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r622 r646  
    12531253            }
    12541254#endif
    1255 #if LGE_INTER_SDC_E0156
     1255#if H_3D_INTER_SDC
    12561256            READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
    12571257#endif
     
    16401640        }
    16411641#endif
    1642 #if LGE_INTER_SDC_E0156
     1642#if H_3D_INTER_SDC
    16431643            READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
    16441644#endif
     
    26512651}
    26522652#endif
    2653 #if LGE_INTER_SDC_E0156
     2653#if H_3D_INTER_SDC
    26542654Void TDecCavlc::parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    26552655{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.h

    r622 r646  
    117117  Void  parseICFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    118118#endif
    119 #if LGE_INTER_SDC_E0156
     119#if H_3D_INTER_SDC
    120120  Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    121121  Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCu.cpp

    r622 r646  
    458458  m_pcEntropyDecoder->decodeARPW    ( pcCU , uiAbsPartIdx , uiDepth ); 
    459459#endif 
    460 #if LGE_INTER_SDC_E0156
     460#if H_3D_INTER_SDC
    461461  m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    462462#endif
     
    525525  {
    526526    case MODE_INTER:
    527 #if LGE_INTER_SDC_E0156
     527#if H_3D_INTER_SDC
    528528      if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) )
    529529      {
     
    534534#endif
    535535      xReconInter( m_ppcCU[uiDepth], uiDepth );
    536 #if LGE_INTER_SDC_E0156
     536#if H_3D_INTER_SDC
    537537      }
    538538#endif
     
    578578}
    579579
    580 #if LGE_INTER_SDC_E0156
     580#if H_3D_INTER_SDC
    581581Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    582582{
     
    895895  // get DC prediction for each segment
    896896  Pel apDCPredValues[2];
    897 #if KWU_SDC_SIMPLE_DC_E0117
    898897  m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode);
    899 #else
    900   m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride);
    901 #endif
    902898 
    903899  // reconstruct residual based on mask + DC residuals
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCu.h

    r608 r646  
    118118  Void xReconIntraSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    119119#endif
    120 #if LGE_INTER_SDC_E0156
     120#if H_3D_INTER_SDC
    121121  Void xReconInterSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    122122#endif
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecEntropy.cpp

    r622 r646  
    650650#endif
    651651 
    652 #if LGE_INTER_SDC_E0156
     652#if H_3D_INTER_SDC
    653653  if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
    654654  {
     
    683683}
    684684
    685 #if LGE_INTER_SDC_E0156
     685#if H_3D_INTER_SDC
    686686Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    687687{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecEntropy.h

    r608 r646  
    9191  virtual Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9292#endif
    93 #if LGE_INTER_SDC_E0156
     93#if H_3D_INTER_SDC
    9494  virtual Void parseInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9595  virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0;
     
    170170  Void decodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    171171#endif
    172 #if LGE_INTER_SDC_E0156
     172#if H_3D_INTER_SDC
    173173  Void decodeInterSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    174174  Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecGop.cpp

    r608 r646  
    226226    rpcPic->destroyNonDBFilterInfo();
    227227  }
    228 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
     228#if H_3D
    229229  rpcPic->compressMotion(2);
    230230#endif
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecSbac.cpp

    r622 r646  
    8989#if H_3D_DIM_DMM
    9090, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    91 #if !SEC_DMM2_E0146_HHIFIX
    92 , m_cDmm2DataSCModel          ( 1,             1,               NUM_DMM2_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    93 #endif
    9491, m_cDmm3DataSCModel          ( 1,             1,               NUM_DMM3_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    9592#endif
     
    10299#endif
    103100#endif
    104 #if LGE_INTER_SDC_E0156
     101#if H_3D_INTER_SDC
    105102, m_cInterSDCFlagSCModel             ( 1,             1,  NUM_INTER_SDC_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    106103, m_cInterSDCResidualSCModel         ( 1,             1,  NUM_INTER_SDC_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
     
    179176#if H_3D_DIM_DMM
    180177  m_cDmm1DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM1_DATA );
    181 #if !SEC_DMM2_E0146_HHIFIX
    182   m_cDmm2DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM2_DATA );
    183 #endif
    184178  m_cDmm3DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM3_DATA );
    185179#endif
     
    192186#endif
    193187#endif
    194 #if LGE_INTER_SDC_E0156
     188#if H_3D_INTER_SDC
    195189  m_cInterSDCFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG );
    196190  m_cInterSDCResidualSCModel.initBuffer   ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
     
    255249#if H_3D_DIM_DMM
    256250  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
    257 #if !SEC_DMM2_E0146_HHIFIX
    258   m_cDmm2DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );
    259 #endif
    260251  m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    261252#endif
     
    268259#endif
    269260#endif
    270 #if LGE_INTER_SDC_E0156
     261#if H_3D_INTER_SDC
    271262  m_cInterSDCFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    272263  m_cInterSDCResidualSCModel.initBuffer   ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
     
    444435  ruiTabIdx = uiIdx;
    445436}
    446 #if !SEC_DMM2_E0146_HHIFIX
    447 Void TDecSbac::xParseDmm2Offset( Int& riOffset )
    448 {
    449   Int iDeltaEnd = 0;
    450   if( DMM2_DELTAEND_MAX > 0 )
    451   {
    452     UInt uiFlag = 0;
    453     m_pcTDecBinIf->decodeBin( uiFlag, m_cDmm2DataSCModel.get(0, 0, 0) );
    454 
    455     if( uiFlag )
    456     {
    457       UInt uiAbsValMinus1;
    458       UInt uiSymbol;
    459       m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm2DataSCModel.get(0, 0, 0) ); uiAbsValMinus1  = uiSymbol;
    460       m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm2DataSCModel.get(0, 0, 0) ); uiAbsValMinus1 |= uiSymbol << 1;
    461       iDeltaEnd = uiAbsValMinus1 + 1;
    462       UInt uiSign;
    463       m_pcTDecBinIf->decodeBinEP( uiSign );
    464       if( uiSign )
    465       {
    466         iDeltaEnd = -iDeltaEnd;
    467       }
    468     }
    469   }
    470   riOffset = iDeltaEnd;
    471 }
    472 #endif
     437
    473438Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit )
    474439{
     
    11751140      pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth );
    11761141    } break;
    1177 #if !SEC_DMM2_E0146_HHIFIX
    1178   case( DMM2_IDX ):
    1179     {
    1180       Int iOffset = 0;
    1181       xParseDmm2Offset( iOffset );
    1182       pcCU->setDmm2DeltaEndSubParts( iOffset, absPartIdx, depth );
    1183     } break;
    1184 #endif
    11851142  case( DMM3_IDX ):
    11861143    {
     
    12831240  else
    12841241  {
    1285 #if ZJU_DEPTH_INTRA_MODE_E0204
    1286       UInt maxBinNum = 0;
    1287       m_pcTDecBinIf->decodeBinEP(symbol);
    1288       if( symbol == 1 )
    1289       {
    1290           maxBinNum = 3;
    1291       }
    1292       else
    1293       {
    1294           maxBinNum = 2;
    1295           symbol = 1;
    1296       }
    1297       while( binNum<maxBinNum && symbol )
    1298       {
    1299           ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum );
    1300           m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode));
    1301           modeCode = (modeCode<<1)+symbol;
    1302           binNum++;
    1303       }
    1304       if( maxBinNum == 3 )
    1305       {
    1306           if ( modeCode == 0 )       { dir =  PLANAR_IDX;             sdcFlag = 1;}
    1307           else if ( modeCode == 2 )  { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
    1308           else if ( modeCode == 6 )  { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
    1309           else if ( modeCode == 7 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
    1310       }
    1311       else
    1312       {
    1313           if ( modeCode == 0 )       { dir = 5;                       sdcFlag = 0;}
    1314           else if ( modeCode == 2 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
    1315           else if ( modeCode == 3 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
    1316       }
    1317 #else
    1318     ctxDepthMode = puIdx*3 ;
    1319     m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1320     modeCode = (modeCode<<1) + symbol;
    1321     if( !symbol )
    1322     {
    1323       ctxDepthMode = puIdx*3 + 1;
    1324       m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1325       modeCode = (modeCode<<1) + symbol;
    1326       if( symbol )
    1327       {
    1328         ctxDepthMode = puIdx*3 + 2;
    1329         m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1330         modeCode = (modeCode<<1) + symbol;
    1331       }
     1242    UInt maxBinNum = 0;
     1243    m_pcTDecBinIf->decodeBinEP(symbol);
     1244    if( symbol == 1 )
     1245    {
     1246      maxBinNum = 3;
    13321247    }
    13331248    else
    13341249    {
    1335       ctxDepthMode = puIdx*3 + 1;
    1336       m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1337       modeCode = (modeCode<<1) + symbol;
    1338       if( !symbol )
    1339       {
    1340         ctxDepthMode = puIdx*3 + 2;
    1341         m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1342         modeCode = (modeCode<<1) + symbol;
    1343       }
    1344       else
    1345       {
    1346         binNum = 0;
    1347 #if LGE_SDC_REMOVE_DC_E0158
    1348 #if !SEC_DMM2_E0146_HHIFIX
    1349         while( symbol && binNum < 2 )
    1350 #endif
    1351 #else
    1352 #if SEC_DMM2_E0146_HHIFIX
    1353         while( symbol && binNum < 2 )
    1354 #else
    1355         while( symbol && binNum < 3 )
    1356 #endif
    1357 #endif
    1358         {
    1359           ctxDepthMode = puIdx*3 + 2;
    1360           m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1361           modeCode = (modeCode<<1) + symbol;
    1362           binNum++;
    1363         }
    1364       }
    1365     }
    1366          if( modeCode == 0  ) { dir =  PLANAR_IDX;             sdcFlag = 1;}
    1367     else if( modeCode == 2  ) { dir = 5;                       sdcFlag = 0;}
    1368     else if( modeCode == 3  ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
    1369     else if( modeCode == 4  ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
    1370     else if( modeCode == 5  ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
    1371     else if( modeCode == 6  ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
    1372 #if LGE_SDC_REMOVE_DC_E0158
    1373 #if SEC_DMM2_E0146_HHIFIX
    1374     else if( modeCode == 7 )  { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
    1375 #else
    1376     else if( modeCode == 14 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
    1377     else if( modeCode == 15 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;}
    1378 #endif
    1379 #else
    1380     else if( modeCode == 14 ) { dir =      DC_IDX;             sdcFlag = 1;}
    1381 #if SEC_DMM2_E0146_HHIFIX
    1382     else if( modeCode == 15 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
    1383 #else
    1384     else if( modeCode == 30 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
    1385     else if( modeCode == 31 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;}
    1386 #endif
    1387 #endif
    1388 #endif
     1250      maxBinNum = 2;
     1251      symbol = 1;
     1252    }
     1253    while( binNum<maxBinNum && symbol )
     1254    {
     1255      ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum );
     1256      m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode));
     1257      modeCode = (modeCode<<1)+symbol;
     1258      binNum++;
     1259    }
     1260    if( maxBinNum == 3 )
     1261    {
     1262      if ( modeCode == 0 )       { dir =  PLANAR_IDX;             sdcFlag = 1;}
     1263      else if ( modeCode == 2 )  { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
     1264      else if ( modeCode == 6 )  { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
     1265      else if ( modeCode == 7 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
     1266    }
     1267    else
     1268    {
     1269      if ( modeCode == 0 )       { dir = 5;                       sdcFlag = 0;}
     1270      else if ( modeCode == 2 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
     1271      else if ( modeCode == 3 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
     1272    }
    13891273  }
    13901274  pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
     
    23382222#endif
    23392223
    2340 #if LGE_INTER_SDC_E0156
     2224#if H_3D_INTER_SDC
    23412225Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    23422226{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecSbac.h

    r622 r646  
    102102#if H_3D_DIM_DMM
    103103  Void  xParseDmm1WedgeIdx   ( UInt& ruiTabIdx, Int iNumBit );
    104 #if !SEC_DMM2_E0146_HHIFIX
    105   Void  xParseDmm2Offset     ( Int& riOffset );
    106 #endif
    107104  Void  xParseDmm3WedgeIdx   ( UInt& ruiIntraIdx, Int iNumBit );
    108105#endif
     
    114111#endif
    115112#endif
    116 #if LGE_INTER_SDC_E0156
     113#if H_3D_INTER_SDC
    117114  Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    118115  Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
     
    216213#if H_3D_DIM_DMM
    217214  ContextModel3DBuffer m_cDmm1DataSCModel;
    218 #if !SEC_DMM2_E0146_HHIFIX
    219   ContextModel3DBuffer m_cDmm2DataSCModel;
    220 #endif
    221215  ContextModel3DBuffer m_cDmm3DataSCModel;
    222216#endif
     
    229223#endif
    230224#endif
    231 #if LGE_INTER_SDC_E0156
     225#if H_3D_INTER_SDC
    232226  ContextModel3DBuffer m_cInterSDCFlagSCModel;
    233227  ContextModel3DBuffer m_cInterSDCResidualSCModel;
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCavlc.cpp

    r622 r646  
    968968        }       
    969969#endif
    970 #if LGE_INTER_SDC_E0156
     970#if H_3D_INTER_SDC
    971971        WRITE_FLAG( pcVPS->getInterSDCFlag( i ) ? 1 : 0, "depth_inter_SDC_flag" );
    972972#endif
     
    13091309        }       
    13101310#endif
    1311 #if LGE_INTER_SDC_E0156
     1311#if H_3D_INTER_SDC
    13121312        WRITE_FLAG( pcVPS->getInterSDCFlag( i ) ? 1 : 0, "depth_inter_SDC_flag" );
    13131313#endif
     
    22822282}
    22832283
    2284 #if LGE_INTER_SDC_E0156
     2284#if H_3D_INTER_SDC
    22852285Void TEncCavlc::codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    22862286{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCavlc.h

    r622 r646  
    133133  Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    134134#endif
    135 #if LGE_INTER_SDC_E0156
     135#if H_3D_INTER_SDC
    136136  Void codeInterSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    137137  Void codeInterSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCfg.h

    r638 r646  
    417417  Bool      m_bUseIC;
    418418#endif
    419 #if LGE_INTER_SDC_E0156
     419#if H_3D_INTER_SDC
    420420  bool      m_bInterSDC;
    421421#endif
     
    528528  Bool       getUseIC                       ()               { return m_bUseIC; }
    529529#endif
    530 #if LGE_INTER_SDC_E0156
     530#if H_3D_INTER_SDC
    531531  Void       setInterSDCEnable              ( Bool bVal )    { m_bInterSDC = bVal; }
    532532  Bool       getInterSDCEnable              ()               { return m_bInterSDC; }
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCu.cpp

    r643 r646  
    16531653  m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
    16541654#endif
    1655 #if LGE_INTER_SDC_E0156
     1655#if H_3D_INTER_SDC
    16561656  m_pcEntropyCoder->encodeInterSDCFlag( pcCU, uiAbsPartIdx, false );
    16571657#endif
     
    19481948
    19491949          rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
    1950 #if LGE_INTER_SDC_E0156
     1950#if H_3D_INTER_SDC
    19511951          TComDataCU *rpcTempCUPre = rpcTempCU;
    19521952#endif
     
    19541954          xCheckDQP( rpcTempCU );
    19551955          xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
    1956 #if LGE_INTER_SDC_E0156
     1956#if H_3D_INTER_SDC
    19571957          if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual )
    19581958          {
     
    19901990      if( m_pcEncCfg->getUseFastDecisionForMerge() && !bestIsSkip )
    19911991      {
    1992 #if LGE_INTER_SDC_E0156
     1992#if H_3D_INTER_SDC
    19931993        if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) )
    19941994        {
     
    19991999#endif
    20002000        bestIsSkip = rpcBestCU->getQtRootCbf(0) == 0;
    2001 #if LGE_INTER_SDC_E0156
     2001#if H_3D_INTER_SDC
    20022002        }
    20032003#endif
     
    22032203#endif
    22042204  rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    2205 #if LGE_INTER_SDC_E0156
     2205#if H_3D_INTER_SDC
    22062206  TComDataCU *rpcTempCUPre = rpcTempCU;
    22072207#endif
    22082208  xCheckDQP( rpcTempCU );
    22092209  xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
    2210 #if LGE_INTER_SDC_E0156
     2210#if H_3D_INTER_SDC
    22112211  if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() )
    22122212  {
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncEntropy.cpp

    r608 r646  
    662662#endif
    663663
    664 #if LGE_INTER_SDC_E0156
     664#if H_3D_INTER_SDC
    665665  if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
    666666  {
     
    824824}
    825825
    826 #if LGE_INTER_SDC_E0156
     826#if H_3D_INTER_SDC
    827827Void TEncEntropy::encodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    828828{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncEntropy.h

    r608 r646  
    9494  virtual Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9595#endif
    96 #if LGE_INTER_SDC_E0156
     96#if H_3D_INTER_SDC
    9797  virtual Void codeInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9898  virtual Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0;
     
    185185  Void encodeICFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    186186#endif
    187 #if LGE_INTER_SDC_E0156
     187#if H_3D_INTER_SDC
    188188  Void encodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    189189  Void encodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD );
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncGOP.cpp

    r637 r646  
    18941894        pcPic->destroyNonDBFilterInfo();
    18951895      }
    1896 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
     1896#if H_3D
    18971897      pcPic->compressMotion(2);
    18981898#endif
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSbac.cpp

    r622 r646  
    9595#if H_3D_DIM_DMM
    9696, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    97 #if !SEC_DMM2_E0146_HHIFIX
    98 , m_cDmm2DataSCModel          ( 1,             1,               NUM_DMM2_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    99 #endif
    10097, m_cDmm3DataSCModel          ( 1,             1,               NUM_DMM3_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    10198#endif
     
    108105#endif
    109106#endif
    110 #if LGE_INTER_SDC_E0156
     107#if H_3D_INTER_SDC
    111108, m_cInterSDCFlagSCModel             ( 1,             1,  NUM_INTER_SDC_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    112109, m_cInterSDCResidualSCModel         ( 1,             1,  NUM_INTER_SDC_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
     
    177174#if H_3D_DIM_DMM
    178175  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
    179 #if !SEC_DMM2_E0146_HHIFIX
    180   m_cDmm2DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );
    181 #endif
    182176  m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    183177#endif
     
    190184#endif
    191185#endif
    192 #if LGE_INTER_SDC_E0156
     186#if H_3D_INTER_SDC
    193187  m_cInterSDCFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    194188  m_cInterSDCResidualSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
     
    232226      curCost += m_cCUICFlagSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_IC_FLAG );
    233227#endif
    234 #if LGE_INTER_SDC_E0156
     228#if H_3D_INTER_SDC
    235229      curCost += m_cInterSDCFlagSCModel.calcCost      ( curSliceType, qp, (UChar*)INIT_INTER_SDC_FLAG );
    236230      curCost += m_cInterSDCResidualSCModel.calcCost  ( curSliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
     
    268262#if H_3D_DIM_DMM
    269263      curCost += m_cDmm1DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM1_DATA );
    270 #if !SEC_DMM2_E0146_HHIFIX
    271       curCost += m_cDmm2DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM2_DATA );
    272 #endif
    273264      curCost += m_cDmm3DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM3_DATA );
    274265#endif
     
    340331#if H_3D_DIM_DMM
    341332  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
    342 #if !SEC_DMM2_E0146_HHIFIX
    343   m_cDmm2DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );
    344 #endif
    345333  m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    346334#endif
     
    353341#endif
    354342#endif
    355 #if LGE_INTER_SDC_E0156
     343#if H_3D_INTER_SDC
    356344  m_cInterSDCFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    357345  m_cInterSDCResidualSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
     
    548536  }
    549537}
    550 
    551 #if !SEC_DMM2_E0146_HHIFIX
    552 Void TEncSbac::xCodeDmm2Offset( Int iOffset )
    553 {
    554   if( DMM2_DELTAEND_MAX > 0 )
    555   {
    556     m_pcBinIf->encodeBin( (iOffset != 0) , m_cDmm2DataSCModel.get(0, 0, 0) );
    557     if( iOffset != 0 )
    558     {
    559       UInt uiAbsValMinus1 = abs(iOffset)-1;
    560       m_pcBinIf->encodeBin( (uiAbsValMinus1 & 0x01),      m_cDmm2DataSCModel.get(0, 0, 0) );
    561       m_pcBinIf->encodeBin( (uiAbsValMinus1 & 0x02) >> 1, m_cDmm2DataSCModel.get(0, 0, 0) );
    562 
    563       UInt uiSign = (iOffset > 0) ? 0 : 1;
    564       m_pcBinIf->encodeBinEP( uiSign );
    565     }
    566   }
    567 }
    568 #endif
    569538
    570539Void TEncSbac::xCodeDmm3WedgeIdx( UInt uiIntraIdx, Int iNumBit )
     
    12401209      xCodeDmm1WedgeIdx( pcCU->getDmmWedgeTabIdx( dimType, absPartIdx ), g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );
    12411210    } break;
    1242 #if !SEC_DMM2_E0146_HHIFIX
    1243   case( DMM2_IDX ):
    1244     {
    1245       xCodeDmm2Offset( pcCU->getDmm2DeltaEnd( absPartIdx ) );
    1246     } break;
    1247 #endif
    12481211  case( DMM3_IDX ):
    12491212    {
     
    12941257Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )
    12951258{
    1296 #if ZJU_DEPTH_INTRA_MODE_E0204
    12971259    UInt codeWordTable[3][7] =    {{0, 0, 0, 2, 0,6, 7},{0, 0, 2, 7, 3, 6, 2},{0, 1, 0, 0, 0, 0, 0}};
    12981260    UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{1, 1, 2, 3, 2, 3, 2},{1, 1, 0, 0, 0, 0, 0}};
    1299 #else
    1300 #if LGE_SDC_REMOVE_DC_E0158
    1301 #if SEC_DMM2_E0146_HHIFIX
    1302   UInt codeWordTable[3][7] =    {{0, 0, 0, 2, 0,6, 7},{0, 2, 3, 4, 5, 6, 7},{0, 1, 0, 0, 0, 0, 0}};
    1303   UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{2, 3, 3, 3, 3, 3, 3},{1, 1, 0, 0, 0, 0, 0}};
    1304 #else
    1305   UInt codeWordTable[3][8] =    { { 0, 0, 0, 2, 0, 6, 0, 7 }, { 0, 2, 3, 4, 5, 6, 15, 14 }, { 0, 1, 0, 0, 0, 0, 0, 0 } };
    1306   UInt codeWordLenTable[3][8] = { { 0, 1, 0, 2, 0, 3, 0, 3 }, { 2, 3, 3, 3, 3, 3,  4,  4 }, { 1, 1, 0, 0, 0, 0, 0, 0 } };
    1307 #endif
    1308 #else
    1309 #if SEC_DMM2_E0146_HHIFIX
    1310   UInt codeWordTable[3][8] =    {{0, 0, 0, 2, 0,6, 0, 7},{0, 2, 3, 4, 5, 6, 14, 15},{0, 2, 0, 0, 0, 0, 3, 0}};
    1311   UInt codeWordLenTable[3][8] = {{0, 1, 0, 2, 0,3, 0, 3},{2, 3, 3, 3, 3, 3,  4,  4},{1, 2, 0, 0, 0, 0, 2, 0}};
    1312 #else
    1313   UInt codeWordTable[3][9] =    {{0, 0, 0, 2, 0,6, 0, 0, 7},{0, 2, 3, 4, 5, 6, 14, 31, 30},{0, 2, 0, 0, 0, 0, 3, 0, 0}};
    1314   UInt codeWordLenTable[3][9] = {{0, 1, 0, 2, 0,3, 0, 0, 3},{2, 3, 3, 3, 3, 3,  4,  5,  5},{1, 2, 0, 0, 0, 0, 2, 0, 0}};
    1315 #endif
    1316 #endif
    1317 #endif
    13181261  UInt dir = pcCU->getLumaIntraDir( absPartIdx );
    13191262  UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );
     
    13321275    case DMM3_IDX: codeIdx = 5; break;
    13331276#if LGE_SDC_REMOVE_DC_E0158
    1334 #if SEC_DMM2_E0146_HHIFIX
    13351277    case  RBC_IDX: codeIdx = 6; break;
    13361278#else
    1337     case DMM2_IDX: codeIdx = 6; break;
    13381279    case  RBC_IDX: codeIdx = 7; break;
    1339 #endif
    1340 #else
    1341 #if SEC_DMM2_E0146_HHIFIX
    1342     case  RBC_IDX: codeIdx = 7; break;
    1343 #else
    1344     case DMM2_IDX: codeIdx = 7; break;
    1345     case  RBC_IDX: codeIdx = 8; break;
    1346 #endif
    13471280#endif
    13481281    default:                    break;
     
    13631296  }
    13641297#endif
    1365 #if ZJU_DEPTH_INTRA_MODE_E0204
    13661298  if( puIdx==1 )
    13671299  {
     
    13751307      }
    13761308  }
    1377 #endif
    13781309  //mode coding
    13791310  for( UInt i = 0; i < codeWordLenTable[puIdx][codeIdx]; i++ )
     
    23042235}
    23052236
    2306 #if LGE_INTER_SDC_E0156
     2237#if H_3D_INTER_SDC
    23072238Void TEncSbac::codeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    23082239{
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSbac.h

    r622 r646  
    121121#if H_3D_DIM_DMM
    122122  Void  xCodeDmm1WedgeIdx    ( UInt uiTabIdx, Int iNumBit );
    123 #if !SEC_DMM2_E0146_HHIFIX
    124   Void  xCodeDmm2Offset      ( Int iOffset );
    125 #endif
    126123  Void  xCodeDmm3WedgeIdx    ( UInt uiIntraIdx, Int iNumBit );
    127124#endif
     
    160157  Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    161158#endif
    162 #if LGE_INTER_SDC_E0156
     159#if H_3D_INTER_SDC
    163160  Void codeInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    164161  Void codeInterSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
     
    256253#if H_3D_DIM_DMM
    257254  ContextModel3DBuffer m_cDmm1DataSCModel;
    258 #if !SEC_DMM2_E0146_HHIFIX
    259   ContextModel3DBuffer m_cDmm2DataSCModel;
    260 #endif
    261255  ContextModel3DBuffer m_cDmm3DataSCModel;
    262256#endif
     
    269263#endif
    270264#endif
    271 #if LGE_INTER_SDC_E0156
     265#if H_3D_INTER_SDC
    272266  ContextModel3DBuffer m_cInterSDCFlagSCModel;
    273267  ContextModel3DBuffer m_cInterSDCResidualSCModel;
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSearch.cpp

    r630 r646  
    4141#include "TEncSearch.h"
    4242#include <math.h>
    43 #if LGE_INTER_SDC_E0156
     43#if H_3D_INTER_SDC
    4444#include <memory.h>
    4545#endif
     
    323323  m_cDistParam.bUseIC = pcPatternKey->getICFlag();
    324324#endif
    325 #if LGE_INTER_SDC_E0156
     325#if H_3D_INTER_SDC
    326326  m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag();
    327327#endif
     
    755755    m_cDistParam.bUseIC = pcPatternKey->getICFlag();
    756756#endif
    757 #if LGE_INTER_SDC_E0156
     757#if H_3D_INTER_SDC
    758758    m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag();
    759759#endif
     
    19001900  // get DC prediction for each segment
    19011901  Pel apDCPredValues[2];
    1902 #if KWU_SDC_SIMPLE_DC_E0117
    19031902  analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode );
    1904 #else
    1905   analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride );
    1906 #endif
    19071903 
    19081904  // get original DC for each segment
    19091905  Pel apDCOrigValues[2];
    1910 #if KWU_SDC_SIMPLE_DC_E0117
    19111906  analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true );
    1912 #else
    1913   analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride );
    1914 #endif
    19151907 
    19161908  for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
     
    28842876              biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
    28852877            } break;
    2886 #if !SEC_DMM2_E0146_HHIFIX
    2887           case( DMM2_IDX ):
    2888             {
    2889               if( uiWidth > 4 )
    2890               {
    2891                 Int dmm2DeltaEnd = 0;
    2892                 xSearchDmm2Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx, dmm2DeltaEnd );
    2893                 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dmmType, uiPartOffset, uiDepth + uiInitTrDepth );
    2894                 pcCU->setDmm2DeltaEndSubParts( dmm2DeltaEnd, uiPartOffset, uiDepth + uiInitTrDepth );
    2895                 biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
    2896               }
    2897             } break;
    2898 #endif
    28992878          case( DMM3_IDX ):
    29002879            {
     
    35883567  cDistParam.bUseIC = false;
    35893568#endif
    3590 #if LGE_INTER_SDC_E0156
     3569#if H_3D_INTER_SDC
    35913570  cDistParam.bUseSDCMRSAD = false;
    35923571#endif
     
    47134692  pcPatternKey->setICFlag( bICFlag );
    47144693#endif
    4715 #if LGE_INTER_SDC_E0156
     4694#if H_3D_INTER_SDC
    47164695  if ( pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )
    47174696  {
     
    48694848      m_cDistParam.bUseIC = pcPatternKey->getICFlag();
    48704849#endif
    4871 #if LGE_INTER_SDC_E0156
     4850#if H_3D_INTER_SDC
    48724851      m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag();
    48734852#endif
     
    54785457}
    54795458
    5480 #if LGE_INTER_SDC_E0156
     5459#if H_3D_INTER_SDC
    54815460Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, const UInt uiDepth )
    54825461{
     
    68016780    m_pcEntropyCoder->encodeARPW( pcCU , 0 );
    68026781#endif
    6803 #if LGE_INTER_SDC_E0156
     6782#if H_3D_INTER_SDC
    68046783    m_pcEntropyCoder->encodeInterSDCFlag( pcCU, 0, true );
    68056784#endif
     
    73277306  return;
    73287307}
    7329 
    7330 #if !SEC_DMM2_E0146_HHIFIX
    7331 Void TEncSearch::xSearchDmm2Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd )
    7332 {
    7333   ruiTabIdx       = 0;
    7334   riWedgeDeltaEnd = 0;
    7335 
    7336   // local pred buffer
    7337   TComYuv cPredYuv;
    7338   cPredYuv.create( uiWidth, uiHeight );
    7339   cPredYuv.clear();
    7340 
    7341   UInt uiPredStride = cPredYuv.getStride();
    7342   Pel* piPred       = cPredYuv.getLumaAddr();
    7343 
    7344 
    7345   // regular wedge search
    7346   Dist uiBestDist    = RDO_DIST_MAX;
    7347   UInt uiBestTabIdx  = 0;
    7348   Int  iBestDeltaEnd = 0;
    7349 
    7350   UInt uiIdx = 0;
    7351   Pel refDC1 = 0; Pel refDC2 = 0;
    7352   for( Int iTestDeltaEnd = -DMM2_DELTAEND_MAX; iTestDeltaEnd <= DMM2_DELTAEND_MAX; iTestDeltaEnd++ )
    7353   {
    7354     uiIdx = xPredWedgeFromIntra( pcCU, uiAbsPtIdx, uiWidth, uiHeight, iTestDeltaEnd );
    7355     TComWedgelet* pcWedgelet = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiIdx]);
    7356     xCalcBiSegDCs  ( piRef,  uiRefStride,  pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
    7357     xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
    7358 
    7359     Dist uiActDist = RDO_DIST_MAX;
    7360 #if H_3D_VSO
    7361     if( m_pcRdCost->getUseVSO() )
    7362     {
    7363       if( m_pcRdCost->getUseEstimatedVSD() )
    7364       {
    7365         uiActDist = m_pcRdCost->getDistPartVSD( pcCU, uiAbsPtIdx, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false );
    7366       }
    7367       else
    7368       {
    7369         uiActDist = m_pcRdCost->getDistPartVSO( pcCU, uiAbsPtIdx, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false );
    7370       }
    7371     }
    7372     else
    7373 #endif
    7374     {
    7375       uiActDist = m_pcRdCost->getDistPart( g_bitDepthY, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, TEXT_LUMA, DF_SAD );
    7376     }
    7377 
    7378     if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
    7379     {
    7380       uiBestDist    = uiActDist;
    7381       uiBestTabIdx  = uiIdx;
    7382       iBestDeltaEnd = iTestDeltaEnd;
    7383     }
    7384     else if( uiIdx == uiBestTabIdx && abs(iTestDeltaEnd) < abs(iBestDeltaEnd) )
    7385     {
    7386       iBestDeltaEnd = iTestDeltaEnd;
    7387     }
    7388   }
    7389 
    7390   ruiTabIdx       = uiBestTabIdx;
    7391   riWedgeDeltaEnd = iBestDeltaEnd;
    7392 
    7393   cPredYuv.destroy();
    7394   return;
    7395 }
    7396 #endif
    73977308
    73987309#if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSearch.h

    r622 r646  
    213213                                  TComYuv*&   rpcYuvRec,
    214214                                  Bool        bSkipRes );
    215 #if LGE_INTER_SDC_E0156
     215#if H_3D_INTER_SDC
    216216  Void encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU,
    217217    TComYuv* pcOrg,
     
    352352  Void xSearchDmmDeltaDCs         ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piOrig, Pel* piPredic, UInt uiStride, Bool* biSegPattern, Int patternStride, UInt uiWidth, UInt uiHeight, Pel& rDeltaDC1, Pel& rDeltaDC2 );
    353353  Void xSearchDmm1Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx );
    354 #if !SEC_DMM2_E0146_HHIFIX
    355   Void xSearchDmm2Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd );
    356 #endif
    357354#if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX
    358355  Void xSearchDmm3Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx, UInt colTexIntraDir );
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp

    r637 r646  
    407407  if( picLastCoded )
    408408  {
    409 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
    410409    picLastCoded->compressMotion(1);
    411 #else
    412     picLastCoded->compressMotion();
    413 #endif
    414410  }
    415411#endif
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibRenderer/TRenTop.cpp

    r608 r646  
    10331033            for ( ; iInterPolPos <= xCeil (iShiftedPos ) -1 ; iInterPolPos++)
    10341034            {
    1035 #if H_3D_FIX_REN
    10361035              if ( ( iInterPolPos >= 0 ) && ( iInterPolPos < iOutputWidth ) )
    10371036              {
     
    10501049                }
    10511050              }
    1052 #else
    1053               for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++)
    1054               {
    1055                 if ( ( iInterPolPos >= 0 ) && ( iInterPolPos < iOutputWidth ) )
    1056                 {
    1057                   apcOutputData[uiCurPlane][iInterPolPos]  = apcInputData[uiCurPlane][iPosX];
    1058                 }
    1059               }
    1060 #endif
    10611051            }
    10621052          }
     
    13041294        else
    13051295        {
    1306 #if H_3D_FIX_REN
    13071296          pcAlphaData[iXPos] = pcFilledData[iXPos];
    1308 #else
    1309           pcAlphaData[iXPos] = REN_IS_FILLED;
    1310 #endif
    13111297        }
    13121298      }
Note: See TracChangeset for help on using the changeset viewer.