Changeset 773 in 3DVCSoftware for trunk/source/Lib/TLibCommon


Ignore:
Timestamp:
16 Jan 2014, 09:56:13 (11 years ago)
Author:
tech
Message:

Merged branch/9.2-dev0@722.

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

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/ContextTables.h

    r724 r773  
    109109#define NUM_DEPTH_INTRA_MODE_CTX      8       ///< number of context models for depth intra modes
    110110#define NUM_DDC_FLAG_CTX              2       ///< number of context models for deltaDC flag (DMM or RBC)
    111 #if QC_DIM_DELTADC_UNIFY_F0132
    112111#define NUM_DDC_DATA_CTX              1       ///< number of context models for deltaDC data (DMM or RBC)
    113 #else
    114 #define NUM_DDC_DATA_CTX              2       ///< number of context models for deltaDC data (DMM or RBC)
    115 #endif
    116112#if H_3D_DIM_DMM
    117113#define NUM_DMM1_DATA_CTX             1       ///< number of context models for DMM1 data
    118 #if !SEC_DMM3_RBC_F0147
    119 #define NUM_DMM3_DATA_CTX             1       ///< number of context models for DMM3 data
    120 #endif
    121 #endif
    122 #if H_3D_DIM_RBC
    123 #define NUM_RBC_DATA_CTX              1       ///< number of context models for RBC data
    124114#endif
    125115#endif
     
    377367INIT_ARPW[3][NUM_ARPW_CTX] =
    378368{
    379 #if LGE_ARP_CTX_F0161
    380369    { 162, 153, 154, 162 },
    381370    { 162, 153, 154, 162 },
    382371    { 162, 153, 154, 162 },
    383 #else
    384   { 154, 154, 154, 154 },
    385   { 154, 154, 154, 154 },
    386   { 154, 154, 154, 154 },
    387 #endif
    388372};
    389373#endif
     
    393377INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 
    394378{
    395 #if LGE_IC_CTX_F0160
    396379    { 154,  154,  154, },
    397380    { 154,  154,  154, },
    398381    { 154,  154,  154, },
    399 #else
    400   { CNU,  CNU,  CNU, },
    401   { 197,  185,  201, },
    402   { 197,  185,  201, },
    403 #endif
    404382};
    405383#endif
     
    423401INIT_DDC_DATA[3][NUM_DDC_DATA_CTX] =
    424402{
    425 #if QC_DIM_DELTADC_UNIFY_F0132
    426   { 154 },
    427   { 154 },
    428   { 154 },
    429 #else
    430   { CNU, CNU },
    431   { CNU, CNU },
    432   { CNU, CNU },
    433 #endif
     403  { 154 },
     404  { 154 },
     405  { 154 },
    434406};
    435407#if H_3D_DIM_DMM
     
    441413  { CNU },
    442414};
    443 #if !SEC_DMM3_RBC_F0147
    444 static const UChar
    445 INIT_DMM3_DATA[3][NUM_DMM3_DATA_CTX] =
    446 {
    447   { CNU },
    448   { CNU },
    449   { CNU },
    450 };
    451 #endif
    452 #endif
    453 #if H_3D_DIM_RBC
    454 static const UChar
    455 INIT_RBC_DATA[3][NUM_RBC_DATA_CTX] =
    456 {
    457   { CNU },
    458   { CNU },
    459   { CNU },
    460 };
    461415#endif
    462416#if H_3D_DIM_SDC
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r724 r773  
    120120    m_dmmWedgeTabIdx[i] = NULL;
    121121  }
    122 #if !SEC_DMM3_RBC_F0147
    123   m_dmm3IntraTabIdx = NULL;
    124 #endif
    125 #endif
    126 #if H_3D_DIM_RBC
    127   m_pucEdgeCode     = NULL;
    128   m_pucEdgeNumber   = NULL;
    129   m_pucEdgeStartPos = NULL;
    130   m_pbEdgeLeftFirst = NULL;
    131   m_pbEdgePartition = NULL;
    132122#endif
    133123#if H_3D_DIM_SDC
     
    146136  m_piVSPFlag            = NULL;
    147137#endif
    148 #if MTK_SPIVMP_F0110
     138#if H_3D_SPIVMP
    149139  m_pbSPIVMPFlag         = NULL;
    150140#endif
     
    200190    m_piVSPFlag          = (Char*  )xMalloc(Char,   uiNumPartition);
    201191#endif
    202 #if MTK_SPIVMP_F0110
     192#if H_3D_SPIVMP
    203193    m_pbSPIVMPFlag       = (Bool*  )xMalloc(Bool,   uiNumPartition);
    204194#endif
     
    279269      m_dmmWedgeTabIdx[i]    = (UInt*)xMalloc(UInt, uiNumPartition);
    280270    }
    281 #if !SEC_DMM3_RBC_F0147
    282     m_dmm3IntraTabIdx = (UInt*)xMalloc(UInt, uiNumPartition);
    283 #endif
    284 #endif
    285 #if H_3D_DIM_RBC
    286     m_pucEdgeCode     = (UChar*)xMalloc(UChar, uiNumPartition * RBC_MAX_EDGE_NUM_PER_4x4);
    287     m_pucEdgeNumber   = (UChar*)xMalloc(UChar, uiNumPartition);
    288     m_pucEdgeStartPos = (UChar*)xMalloc(UChar, uiNumPartition);
    289     m_pbEdgeLeftFirst = (Bool*)xMalloc(Bool, uiNumPartition);
    290     m_pbEdgePartition = (Bool*)xMalloc(Bool, uiNumPartition * 16);
    291271#endif
    292272#if H_3D_DIM_SDC
     
    362342    if ( m_piVSPFlag          ) { xFree(m_piVSPFlag);           m_piVSPFlag         = NULL; }
    363343#endif
    364 #if MTK_SPIVMP_F0110
     344#if H_3D_SPIVMP
    365345    if ( m_pbSPIVMPFlag       ) { xFree(m_pbSPIVMPFlag);           m_pbSPIVMPFlag         = NULL; }
    366346#endif
     
    417397      if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; }
    418398    }
    419 #if !SEC_DMM3_RBC_F0147
    420     if ( m_dmm3IntraTabIdx ) { xFree( m_dmm3IntraTabIdx ); m_dmm3IntraTabIdx = NULL; }
    421 #endif
    422 #endif
    423 #if H_3D_DIM_RBC
    424     if ( m_pbEdgeLeftFirst ) { xFree( m_pbEdgeLeftFirst ); m_pbEdgeLeftFirst = NULL; }
    425     if ( m_pucEdgeStartPos ) { xFree( m_pucEdgeStartPos ); m_pucEdgeStartPos = NULL; }
    426     if ( m_pucEdgeNumber   ) { xFree( m_pucEdgeNumber   ); m_pucEdgeNumber   = NULL; }
    427     if ( m_pucEdgeCode     ) { xFree( m_pucEdgeCode     ); m_pucEdgeCode     = NULL; }
    428     if ( m_pbEdgePartition ) { xFree( m_pbEdgePartition ); m_pbEdgePartition = NULL; }
    429399#endif
    430400#if H_3D_DIM_SDC
     
    571541    m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui];
    572542#endif
    573 #if MTK_SPIVMP_F0110
     543#if H_3D_SPIVMP
    574544    m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui];
    575545#endif
     
    616586    memset( m_piVSPFlag         + firstElement, 0,                        numElements * sizeof( *m_piVSPFlag ) );
    617587#endif
    618 #if MTK_SPIVMP_F0110
     588#if H_3D_SPIVMP
    619589    memset( m_pbSPIVMPFlag      + firstElement, 0,                        numElements * sizeof( *m_pbSPIVMPFlag ) );
    620590#endif
     
    643613      memset( m_dmmWedgeTabIdx[i] + firstElement, 0,                      numElements * sizeof( *m_dmmWedgeTabIdx[i] ) );
    644614    }
    645 #if !SEC_DMM3_RBC_F0147
    646     memset( m_dmm3IntraTabIdx   + firstElement, 0,                        numElements * sizeof( *m_dmm3IntraTabIdx ) );
    647 #endif
    648 #endif
    649 #if H_3D_DIM_RBC
    650     memset( m_pucEdgeCode       + firstElement, 0,                        numElements * sizeof( *m_pucEdgeCode     ) * RBC_MAX_EDGE_NUM_PER_4x4 );
    651     memset( m_pucEdgeNumber     + firstElement, 0,                        numElements * sizeof( *m_pucEdgeNumber   ) );
    652     memset( m_pucEdgeStartPos   + firstElement, 0,                        numElements * sizeof( *m_pucEdgeStartPos ) );
    653     memset( m_pbEdgeLeftFirst   + firstElement, false,                    numElements * sizeof( *m_pbEdgeLeftFirst ) );
    654     memset( m_pbEdgePartition   + firstElement, false,                    numElements * sizeof( *m_pbEdgePartition ) * 16 );
    655615#endif
    656616#if H_3D_DIM_SDC
     
    799759      m_piVSPFlag[ui] = 0;
    800760#endif
    801 #if MTK_SPIVMP_F0110
     761#if H_3D_SPIVMP
    802762      m_pbSPIVMPFlag[ui] = 0;
    803763#endif
     
    825785        m_dmmWedgeTabIdx[i] [ui] = 0;
    826786      }
    827 #if !SEC_DMM3_RBC_F0147
    828       m_dmm3IntraTabIdx [ui] = 0;
    829 #endif
    830787#endif
    831788#if H_3D_DIM_SDC
     
    902859  memset( m_piVSPFlag,          0, sizeof( Char  ) * m_uiNumPartition );
    903860#endif
    904 #if MTK_SPIVMP_F0110
     861#if H_3D_SPIVMP
    905862  memset( m_pbSPIVMPFlag,       0, sizeof( Bool  ) * m_uiNumPartition );
    906863#endif
     
    941898    memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition );
    942899  }
    943 #if !SEC_DMM3_RBC_F0147
    944   memset( m_dmm3IntraTabIdx, 0, sizeof(UInt) * m_uiNumPartition );
    945 #endif
    946 #endif
    947 #if H_3D_DIM_RBC
    948   memset( m_pucEdgeCode    , 0, iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );
    949   memset( m_pucEdgeNumber  , 0, iSizeInUchar );
    950   memset( m_pucEdgeStartPos, 0, iSizeInUchar );
    951   memset( m_pbEdgeLeftFirst, 0, iSizeInBool );
    952   memset( m_pbEdgePartition, 0, iSizeInBool * 16 );
    953900#endif
    954901#if H_3D_DIM_SDC
     
    1001948      m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
    1002949#endif
    1003 #if MTK_SPIVMP_F0110
     950#if H_3D_SPIVMP
    1004951      m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
    1005952#endif
     
    1028975        m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui];
    1029976      }
    1030 #if !SEC_DMM3_RBC_F0147
    1031       m_dmm3IntraTabIdx [ui] = pcCU->m_dmm3IntraTabIdx[uiPartOffset+ui];
    1032 #endif
    1033977#endif
    1034978#if H_3D_DIM_SDC
     
    11541098  m_piVSPFlag           = pcCU->getVSPFlag()          + uiPart;
    11551099#endif
    1156 #if MTK_SPIVMP_F0110
     1100#if H_3D_SPIVMP
    11571101  m_pbSPIVMPFlag        = pcCU->getSPIVMPFlag()          + uiPart;
    11581102#endif
     
    11871131    m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart;
    11881132  }
    1189 #if !SEC_DMM3_RBC_F0147
    1190   m_dmm3IntraTabIdx = pcCU->getDmm3IntraTabIdx() + uiPart;
    1191 #endif
    1192 #endif
    1193 #if H_3D_DIM_RBC
    1194   m_pucEdgeCode     = pcCU->getEdgeCode( uiPart );
    1195   m_pucEdgeNumber   = pcCU->getEdgeNumber()      + uiPart;
    1196   m_pucEdgeStartPos = pcCU->getEdgeStartPos()    + uiPart;
    1197   m_pbEdgeLeftFirst = pcCU->getEdgeLeftFirst()   + uiPart;
    1198   m_pbEdgePartition = pcCU->getEdgePartition( uiPart );
    11991133#endif
    12001134#if H_3D_DIM_SDC
     
    13131247  m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
    13141248#endif
    1315 #if MTK_SPIVMP_F0110
     1249#if H_3D_SPIVMP
    13161250  m_pbSPIVMPFlag       = pcCU->getSPIVMPFlag()               + uiAbsPartIdx;
    13171251#endif
     
    13651299
    13661300#endif
    1367 #if MTK_SPIVMP_F0110
     1301#if H_3D_SPIVMP
    13681302  memcpy( m_pbSPIVMPFlag        + uiOffset, pcCU->getSPIVMPFlag(),        sizeof( Bool ) * uiNumPartition );
    13691303#endif
     
    13911325    memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition );
    13921326  }
    1393 #if !SEC_DMM3_RBC_F0147
    1394   memcpy( m_dmm3IntraTabIdx + uiOffset, pcCU->getDmm3IntraTabIdx(), sizeof(UInt) * uiNumPartition );
    1395 #endif
    1396 #endif
    1397 #if H_3D_DIM_RBC
    1398   memcpy( getEdgeCode( uiOffset ),       pcCU->getEdgeCode(0),      iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );
    1399   memcpy( getEdgeNumber()    + uiOffset, pcCU->getEdgeNumber(),     iSizeInUchar );
    1400   memcpy( getEdgeStartPos()  + uiOffset, pcCU->getEdgeStartPos(),   iSizeInUchar );
    1401   memcpy( getEdgeLeftFirst() + uiOffset, pcCU->getEdgeLeftFirst(),  iSizeInBool );
    1402   memcpy( getEdgePartition( uiOffset ),  pcCU->getEdgePartition(0), iSizeInBool * 16 );
    14031327#endif
    14041328#if H_3D_DIM_SDC
     
    14971421  memcpy( rpcCU->getDvInfo()            + m_uiAbsIdxInLCU, m_pDvInfo,             sizeof( *m_pDvInfo ) * m_uiNumPartition );
    14981422#endif
    1499 #if MTK_SPIVMP_F0110
     1423#if H_3D_SPIVMP
    15001424  memcpy( rpcCU->getSPIVMPFlag()        + m_uiAbsIdxInLCU, m_pbSPIVMPFlag,        sizeof( Bool ) * m_uiNumPartition );
    15011425#endif
     
    15231447    memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition );
    15241448  }
    1525 #if !SEC_DMM3_RBC_F0147
    1526   memcpy( rpcCU->getDmm3IntraTabIdx() + m_uiAbsIdxInLCU, m_dmm3IntraTabIdx, sizeof(UInt) * m_uiNumPartition );
    1527 #endif
    1528 #endif
    1529 #if H_3D_DIM_RBC
    1530   memcpy( rpcCU->getEdgeCode( m_uiAbsIdxInLCU ),         m_pucEdgeCode,     iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );
    1531   memcpy( rpcCU->getEdgeNumber()      + m_uiAbsIdxInLCU, m_pucEdgeNumber,   iSizeInUchar );
    1532   memcpy( rpcCU->getEdgeStartPos()    + m_uiAbsIdxInLCU, m_pucEdgeStartPos, iSizeInUchar );
    1533   memcpy( rpcCU->getEdgeLeftFirst()   + m_uiAbsIdxInLCU, m_pbEdgeLeftFirst, iSizeInBool );
    1534   memcpy( rpcCU->getEdgePartition( m_uiAbsIdxInLCU ),    m_pbEdgePartition, iSizeInBool * 16 );
    15351449#endif
    15361450#if H_3D_DIM_SDC
     
    16161530  memcpy( rpcCU->getVSPFlag()           + uiPartOffset, m_piVSPFlag,           sizeof(Char) * uiQNumPart );
    16171531#endif
    1618 #if MTK_SPIVMP_F0110
     1532#if H_3D_SPIVMP
    16191533  memcpy( rpcCU->getSPIVMPFlag()        + uiPartOffset, m_pbSPIVMPFlag,        sizeof(Bool) * uiQNumPart );
    16201534#endif
     
    16411555    memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart );
    16421556  }
    1643 #if !SEC_DMM3_RBC_F0147
    1644   memcpy( rpcCU->getDmm3IntraTabIdx() + uiPartOffset, m_dmm3IntraTabIdx, sizeof(UInt) * uiQNumPart );
    1645 #endif
    1646 #endif
    1647 #if H_3D_DIM_RBC
    1648   memcpy( rpcCU->getEdgeCode( uiPartOffset ),         m_pucEdgeCode,     iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );
    1649   memcpy( rpcCU->getEdgeNumber()      + uiPartOffset, m_pucEdgeNumber,   iSizeInUchar );
    1650   memcpy( rpcCU->getEdgeStartPos()    + uiPartOffset, m_pucEdgeStartPos, iSizeInUchar );
    1651   memcpy( rpcCU->getEdgeLeftFirst()   + uiPartOffset, m_pbEdgeLeftFirst, iSizeInBool );
    1652   memcpy( rpcCU->getEdgePartition( uiPartOffset ),    m_pbEdgePartition, iSizeInBool * 16 );
    16531557#endif
    16541558#if H_3D_DIM_SDC
     
    23752279  UInt        uiCtx = 0;
    23762280
    2377 #if LGE_IC_CTX_F0160
    23782281  TComDataCU* pcTempCU = NULL;
    23792282  UInt        uiTempPartIdx = 0;
     
    23842287  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    23852288  uiCtx    += ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0;
    2386 #endif
    23872289
    23882290  return uiCtx;
     
    27452647}
    27462648
    2747 #if MTK_SPIVMP_F0110
     2649#if H_3D_SPIVMP
    27482650Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    27492651{
     
    33453247 *   false: otherwise
    33463248 */
    3347 #if ETRIKHU_MERGE_REUSE_F0093
    33483249inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,
    33493250  Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo*  inheritedVSPDisInfo  )
    3350 #else
    3351 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,
    3352                                      Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag )
    3353 #endif
    3354 {
     3251  {
    33553252  if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() )
    33563253  {
     
    33673264  }
    33683265
    3369 #if ETRIKHU_MERGE_REUSE_F0093
    33703266  rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);
    3371 #endif
    33723267 
    33733268  Bool  refViewAvailFlag = false;
     
    34543349
    34553350#if H_3D_IV_MERGE
    3456 #if ETRIKHU_MERGE_REUSE_F0093
    34573351inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,
    34583352  Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo*  inheritedVSPDisInfo  )
    3459 #else
    3460 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,
    3461                                        Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag )
    3462 #endif
    34633353{
    34643354  for(Int iLoop = 0; iLoop < 2; iLoop ++ )
     
    34793369        clipMv( cMv );
    34803370
    3481 #if ETRIKHU_MERGE_REUSE_F0093
    34823371        rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);
    3483 #endif
    34843372
    34853373        abCandIsInter        [ iCount ] = true;
     
    35023390    if(ivCandDir[iLoop + 2])
    35033391    {
    3504 #if ETRIKHU_MERGE_REUSE_F0093
    35053392      TComMvField tmpMV[2];
    35063393      UChar tmpDir = ivCandDir[iLoop + 2];
    3507 #else
    3508       abCandIsInter        [ iCount ] = true;
    3509       puhInterDirNeighbours[ iCount ] = ivCandDir[iLoop + 2];
    3510 #endif
    35113394      if( ( ivCandDir[iLoop + 2] & 1 ) == 1 )
    35123395      {
    3513 #if ETRIKHU_MERGE_REUSE_F0093
    35143396        tmpMV[0].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] );
    3515 #else
    3516         pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] );
    3517 #endif
    35183397      }
    35193398      if( ( ivCandDir[iLoop + 2] & 2 ) == 2 )
    35203399      {
    3521 #if ETRIKHU_MERGE_REUSE_F0093
    35223400        tmpMV[1].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] );
    3523 #else
    3524         pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] );
    3525 #endif
    35263401      }
    35273402     
     
    35303405      if( !iLoop && ivCandDir[0] > 0)
    35313406      {
    3532 #if ETRIKHU_MERGE_REUSE_F0093
    35333407        if(tmpDir == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0]==tmpMV[0] && pcMvFieldNeighbours[1]==tmpMV[1])
    3534 #else
    3535         if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0 ]== pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[1]==pcMvFieldNeighbours[(iCount<<1)+1])
    3536 #endif
    35373408        {
    35383409            bRemove                         = true;
    3539 #if !ETRIKHU_MERGE_REUSE_F0093
    3540             abCandIsInter        [ iCount ] = false; 
    3541             puhInterDirNeighbours[ iCount ] = 0;
    3542             TComMv  cZeroMv;
    3543             pcMvFieldNeighbours  [ iCount<<1   ].setMvField( cZeroMv, NOT_VALID );
    3544             pcMvFieldNeighbours  [(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    3545 #endif
    35463410        }
    35473411      }
    35483412      if(!bRemove)
    35493413      {
    3550 
    3551 #if ETRIKHU_MERGE_REUSE_F0093
    35523414        rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);
    35533415
     
    35623424          pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] );
    35633425        }
    3564 #endif
    3565 
    35663426#if H_3D_NBDV
    35673427        if(iLoop) // For IvMcShift candidate
     
    36033463#endif
    36043464
    3605 
    3606 
    3607 
    3608 
    3609 
    3610 
    3611 
    3612 
    3613 #if ETRIKHU_MERGE_REUSE_F0093
     3465#if H_3D
    36143466Void TComDataCU::rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo*  inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV)
    36153467{
     
    39993851 * \param numValidMergeCand
    40003852 */
    4001 #if ETRIKHU_MERGE_REUSE_F0093
     3853#if H_3D
    40023854Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    40033855#else
     
    40083860      , InheritedVSPDisInfo*  inheritedVSPDisInfo
    40093861#endif
    4010 #if MTK_SPIVMP_F0110
     3862#if H_3D_SPIVMP
    40113863      , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    40123864#endif
     
    40243876  Bool abCandIsInter[ MRG_MAX_NUM_CANDS ];
    40253877#endif
    4026 #if ETRIKHU_MERGE_REUSE_F0093
     3878#if H_3D
    40273879  TComMvField tmpMV[2];
    40283880  UChar tmpDir;
     
    40463898  {
    40473899    abCandIsInter[ui] = false;
    4048 #if H_3D_IV_MERGE
    4049     pcMvFieldNeighbours[ ( ui << 1 )     ].setMvField(cZeroMv, NOT_VALID);
    4050     pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID);
    4051 #else
    40523900    pcMvFieldNeighbours[ ( ui << 1 )     ].setRefIdx(NOT_VALID);
    40533901    pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID);
    4054 #endif
    40553902  }
    40563903#endif
     
    40693916
    40703917  UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB;
    4071 #if !ETRIKHU_MERGE_REUSE_F0093
     3918#if !H_3D
    40723919  PartSize cCurPS = getPartitionSize( uiAbsPartIdx );
    40733920#endif
    40743921  deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    40753922  deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
    4076 #if SEC_MPI_ENABLING_MERGE_F0150
     3923#if H_3D
    40773924  Bool bMPIFlag   = getSlice()->getVPS()->getMPIFlag( getSlice()->getLayerIdInVps() );
    4078 #endif
    4079 #if QC_DEPTH_IV_MRG_F0125
    40803925  Bool bIsDepth = getSlice()->getIsDepth();
    4081 #if !BUGFIX_F0093
    4082   Bool bDepthIPMCAvai = false;
    4083 #endif
    40843926#endif
    40853927
    4086 #if LGE_SHARP_VSP_INHERIT_F0104
    40873928#if H_3D_IC
    40883929  Bool bICFlag = getICFlag(uiAbsPartIdx);
     
    40913932  Bool bARPFlag = getARPW(uiAbsPartIdx)>0 ? true : false;
    40923933#endif
    4093 #endif
    4094 
    4095 #if ETRIKHU_MERGE_REUSE_F0093
     3934
     3935#if H_3D
    40963936  Int  iPosLeftAbove[2] = {-1, -1};
    40973937
     
    41183958#if H_3D_VSP
    41193959    if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1
    4120 #if LGE_SHARP_VSP_INHERIT_F0104
    41213960#if H_3D_IC
    41223961      && !bICFlag
     
    41253964      && !bARPFlag
    41263965#endif
    4127 #endif
    41283966      )
    41293967    {
    41303968      vspFlag[numA1B1B0] = 1;
    4131 #if !MTK_VSP_SIMPLIFICATION_F0111
    4132       xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo);
    4133 #endif
    41343969    }
    41353970#endif
     
    41453980    iPosLeftAbove[1] = numA1B1B0;
    41463981#if H_3D_VSP
    4147 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F0111
    41483982    if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1)
    4149 #else
    4150     if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1
    4151 #endif
    4152 #if LGE_SHARP_VSP_INHERIT_F0104
    41533983#if H_3D_IC
    41543984      && !bICFlag
     
    41573987      && !bARPFlag
    41583988#endif
    4159 #endif
    41603989      )
    41613990    {
    41623991      vspFlag[numA1B1B0] = 1;
    4163 #if !MTK_VSP_SIMPLIFICATION_F0111
    4164       xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo);
    4165 #endif
    41663992    }
    41673993#endif
     
    41774003  {
    41784004#if H_3D_VSP
    4179 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F0111
    41804005    if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)
    4181 #else
    4182     if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1
    4183 #endif
    4184 #if LGE_SHARP_VSP_INHERIT_F0104
    41854006#if H_3D_IC
    41864007      && !bICFlag
     
    41894010      && !bARPFlag
    41904011#endif
    4191 #endif
    41924012      )
    41934013    {
    41944014      vspFlag[numA1B1B0] = 1;
    4195 #if !MTK_VSP_SIMPLIFICATION_F0111
    4196       xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo);
    4197 #endif
    41984015    }
    41994016#endif
     
    42084025#if H_3D_VSP
    42094026    if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1
    4210 #if LGE_SHARP_VSP_INHERIT_F0104
    42114027#if H_3D_IC
    42124028      && !bICFlag
     
    42154031      && !bARPFlag
    42164032#endif
    4217 #endif
    42184033      )
    42194034    {
    42204035      vspFlag[numA1B1B0] = 1;
    4221 #if !MTK_VSP_SIMPLIFICATION_F0111
    4222       xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo);
    4223 #endif
    42244036    }
    42254037#endif
     
    42354047  {
    42364048#if H_3D_VSP
    4237 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F0111
    42384049    if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)
    4239 #else
    4240     if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1
    4241 #endif
    4242 #if LGE_SHARP_VSP_INHERIT_F0104
    42434050#if H_3D_IC
    42444051      && !bICFlag
     
    42474054      && !bARPFlag
    42484055#endif
    4249 #endif
    42504056      )
    42514057    {
    42524058      vspFlag[numA1B1B0+iCountHEVC] = 1;
    4253 #if !MTK_VSP_SIMPLIFICATION_F0111
    4254       xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);
    4255 #endif
    42564059    }
    42574060#endif
     
    42654068
    42664069#if H_3D_IV_MERGE
    4267  
     4070
    42684071  /////////////////////////////////////////////
    42694072  //////// TEXTURE MERGE CANDIDATE (T) ////////
    42704073  /////////////////////////////////////////////
    4271  
    4272 #if SEC_MPI_ENABLING_MERGE_F0150
     4074
    42734075  if( bMPIFlag)
    4274 #else
    4275   if( m_pcSlice->getIsDepth())
    4276 #endif
    42774076  {
    42784077    UInt uiPartIdxCenter;
    42794078    xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );   
    4280 
    4281 #if ETRIKHU_MERGE_REUSE_F0093
    42824079    tmpMV[0].setMvField( cZeroMv, NOT_VALID );
    42834080    tmpMV[1].setMvField( cZeroMv, NOT_VALID );
    42844081    Int tRef[2]={-1, -1};
    4285 #endif
    42864082
    42874083#if H_3D_FCO
     
    42894085    TComDataCU *pcTextureCU = 0;
    42904086    if ( pcTexturePic )
    4291         pcTextureCU = pcTexturePic->getCU( getAddr() );
     4087      pcTextureCU = pcTexturePic->getCU( getAddr() );
    42924088#else
    42934089    TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() );
    42944090#endif
    4295  
     4091
    42964092#if H_3D_FCO
    42974093    if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) )
     
    43004096#endif
    43014097    {
    4302 #if ETRIKHU_MERGE_REUSE_F0093
    43034098      pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, tmpMV[0] );
    43044099      tRef[0] = getPic()->isTextRefValid( REF_PIC_LIST_0, tmpMV[0].getRefIdx() );
     
    44144209        }
    44154210        iCount ++;
    4416 
    4417 #else
    4418       pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    4419       Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1].getRefIdx() );
    4420       if( (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) && ( iValidDepRef >= 0 ) )
    4421       {
    4422         TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv();
    4423         const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    4424         cMvPred+=cAdd;
    4425         cMvPred>>=2;
    4426         clipMv(cMvPred);
    4427         pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef);
    4428       }
    4429       if ( getSlice()->isInterB() )
    4430       {
    4431         pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    4432         iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx() );
    4433         if( (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) && ( iValidDepRef >= 0) )
    4434         {
    4435           TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv();
    4436           const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    4437           cMvPred+=cAdd;
    4438           cMvPred>>=2;
    4439           clipMv(cMvPred);
    4440           pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef);
    4441         }
    4442       }
    4443       puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0;
    4444       puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0;
    4445       if( puhInterDirNeighbours[iCount] != 0 )
    4446       {
    4447         abCandIsInter[iCount] = true;
    4448         if ( mrgCandIdx == iCount )
    4449         {
    4450           return;
    4451         }
    4452         iCount ++;
    4453       }
    4454 #endif
    4455       }
    4456     }
    4457   }
    4458 
    4459 
    4460 #if !ETRIKHU_MERGE_REUSE_F0093
    4461   //////////////////////////////////
    4462   //////// GET DISPARITIES  ////////
    4463   //////////////////////////////////
    4464 
    4465   DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    4466   for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++)
    4467   {
    4468     inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo;
    4469   }
    4470 #endif
     4211      }
     4212    }
     4213  }
    44714214
    44724215  /////////////////////////////////////////////////////////////////
     
    44754218
    44764219  Int  posIvDC          = -1;
    4477 #if !ETRIKHU_MERGE_REUSE_F0093
    4478   Bool bLeftAvai        = false;
    4479   Int  iPosLeftAbove[2] = {-1, -1};
    4480 #endif
    44814220
    44824221  // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; 
     
    44894228
    44904229  Bool ivMvPredFlag   = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() );
    4491  
     4230
    44924231  if ( ivMvPredFlag )
    44934232  {
    4494     getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir
    4495 #if QC_DEPTH_IV_MRG_F0125
    4496     , bIsDepth
    4497 #endif
    4498 #if MTK_SPIVMP_F0110
    4499     , pcMvFieldSP, puhInterDirSP
    4500 #endif
    4501     );
     4233    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP );
    45024234  } 
    4503  
     4235
    45044236  ///////////////////////////////////////////////
    45054237  //////// INTER VIEW MOTION COMP(IvMC) /////////
     
    45084240  if( ivCandDir[0] )
    45094241  {
    4510 #if ETRIKHU_MERGE_REUSE_F0093
    45114242    tmpMV[0].setMvField( cZeroMv, NOT_VALID );
    45124243    tmpMV[1].setMvField( cZeroMv, NOT_VALID );
     
    45254256    Int iCnloop=0;
    45264257
    4527 #if BUGFIX_F0093
    45284258    if (!bIsDepth)
    45294259    {
    4530 #endif
    45314260      for(Int i = 0; i < 2; i ++)
    45324261      {
     
    45424271        }     
    45434272      }
    4544 #if BUGFIX_F0093
    4545     }
    4546 #endif
    4547 #if QC_DEPTH_IV_MRG_F0125
    4548 #if BUGFIX_F0093
     4273    }
    45494274    if (bIsDepth)
    4550 #else
    4551     if ( bIsDepth && !bRemoveSpa)
    4552 #endif
    45534275    {
    45544276      iCnloop = iCount-1;
    45554277      for(; iCnloop >= 0; iCnloop --)
    45564278      {
    4557 #if BUGFIX_F0093
    45584279        if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==tmpMV[0] && pcMvFieldNeighbours[(iCnloop<<1)+1]==tmpMV[1])  // F0125 compatible with F0093
    4559 #else
    4560         if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
    4561 #endif
    45624280        {
    45634281          bRemoveSpa                      = true;
     
    45654283        }
    45664284      }
    4567 #if !BUGFIX_F0093
    4568       if(!bRemoveSpa)
    4569       {
    4570         bDepthIPMCAvai = true;
    4571       }
    4572 #endif
    4573     }
    4574 #endif
     4285    }
    45754286
    45764287    if (!bRemoveSpa)
     
    46284339    if (bIvMC)
    46294340    {
    4630 #if MTK_SPIVMP_F0110
    46314341      pbSPIVMPFlag[iCount] = true;
    4632 #endif
    46334342      if( ( ivCandDir[0] & 1 ) == 1 )
    46344343      {
     
    46424351      puhInterDirNeighbours[ iCount ] = ivCandDir[0];
    46434352
    4644 #if !BUGFIX_F0093
    4645 #if QC_DEPTH_IV_MRG_F0125
    4646       if ( bDepthIPMCAvai || !bIsDepth )
    4647       {
    4648 #endif
    4649 #endif
    4650         if ( mrgCandIdx == iCount )
    4651         {
    4652           return;
    4653         }
    4654         iCount ++;
    4655 #if !BUGFIX_F0093
    4656 #if QC_DEPTH_IV_MRG_F0125
    4657       }
    4658 #endif
    4659 #endif
    4660     }
    4661 #else
    4662     abCandIsInter        [ iCount ] = true;
    4663     puhInterDirNeighbours[ iCount ] = ivCandDir[0];   
    4664 
    4665     if( ( ivCandDir[0] & 1 ) == 1 )
    4666     {
    4667       pcMvFieldNeighbours[ iCount<<1    ].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] );
    4668     }
    4669     if( ( ivCandDir[0] & 2 ) == 2 )
    4670     {
    4671       pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] );
    4672     }
    4673 #if QC_DEPTH_IV_MRG_F0125
    4674     if ( bIsDepth )
    4675     {
    4676       Bool bRemoveSpa = false;
    4677       Int iCnloop = iCount-1;
    4678       for(; iCnloop >= 0; iCnloop --)
    4679       {
    4680         if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
    4681         {
    4682           bRemoveSpa                      = true;
    4683           abCandIsInter        [ iCount ] = false;
    4684 
    4685           puhInterDirNeighbours[iCount]   = 0;
    4686           pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
    4687           pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    4688           break;
    4689         }
    4690       }
    4691       if(!bRemoveSpa)
    4692       {
    4693         bDepthIPMCAvai = true;
    4694       }
    4695     }
    4696     if ( bDepthIPMCAvai || !bIsDepth )
    4697     {
    4698 #endif
    46994353      if ( mrgCandIdx == iCount )
    47004354      {
     
    47024356      }
    47034357      iCount ++;
    4704 #if QC_DEPTH_IV_MRG_F0125
    4705     }
    4706 #endif
    4707 
    4708 #endif
    4709 
     4358    }
    47104359  }
    47114360
     
    47174366#endif
    47184367
    4719 
    4720 
    4721 
    4722 
    4723 #if ETRIKHU_MERGE_REUSE_F0093
     4368#if H_3D
    47244369  iCount += numA1B1B0;
    47254370#else
    4726 #if H_3D
    4727   ////////////////////////////
    4728   //////// LEFT (A1) /////////
    4729   ////////////////////////////
    4730 #endif
    47314371  //left
    47324372  UInt uiLeftPartIdx = 0;
     
    47484388      pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    47494389    }
    4750 #if H_3D_IV_MERGE
    4751     Bool bRemoveSpa = false; //pruning to inter-view candidates
    4752 #if QC_DEPTH_IV_MRG_F0125
    4753     Int  iCnloop = bDepthIPMCAvai ? (iCount-2): (iCount-1);
    4754 #else
    4755     Int  iCnloop    = iCount - 1;
    4756 #endif
    4757     for(; iCnloop >= 0; iCnloop --)
    4758     {
    4759       if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
    4760       {
    4761         bRemoveSpa                      = true;
    4762         abCandIsInter        [ iCount ] = false;
    4763 
    4764         //reset to the default value for MC
    4765         puhInterDirNeighbours[iCount]   = 0;
    4766         pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
    4767         pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    4768         break;
    4769       }
    4770     }
    4771     if(!bRemoveSpa)
    4772     {
    4773       bLeftAvai = true;
    4774       iPosLeftAbove[0] = iCount;
    4775 #if H_3D_NBDV
    4776       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    4777       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    4778 #endif
    4779 #if H_3D_VSP
    4780       if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1
    4781 #if LGE_SHARP_VSP_INHERIT_F0104
    4782 #if H_3D_IC
    4783         && !bICFlag
    4784 #endif
    4785 #if H_3D_ARP
    4786         && !bARPFlag
    4787 #endif
    4788 #endif
    4789         )
    4790       {
    4791         vspFlag[iCount] = 1;
    4792 #if !MTK_VSP_SIMPLIFICATION_F0111
    4793         xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo);
    4794 #endif
    4795       }
    4796 #endif
    4797       if ( mrgCandIdx == iCount )
    4798       {
    4799         return;
    4800       }
    4801       iCount ++;
    4802     }
    4803 #else // H_3D_IV_MERGE
     4390
    48044391    if ( mrgCandIdx == iCount )
    48054392    {
     
    48074394    }
    48084395    iCount ++;
    4809 #endif // H_3D_IV_MERGE
    48104396  }
    48114397
     
    48154401    return;
    48164402  }
    4817 #if H_3D
    4818   ////////////////////////////
    4819   //////// ABOVE (B1) ////////
    4820   ////////////////////////////
    4821 #endif
     4403
    48224404  // above
    48234405  UInt uiAbovePartIdx = 0;
     
    48394421      pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    48404422    }
    4841 #if H_3D_IV_MERGE
    4842     Bool bRemoveSpa = false; //pruning to inter-view candidates
    4843 #if QC_DEPTH_IV_MRG_F0125
    4844     Int iCnloop;
    4845     if( bIsDepth )
    4846       iCnloop = (bLeftAvai && bDepthIPMCAvai) ? (iCount-3) : ((bLeftAvai || bDepthIPMCAvai)  ? (iCount-2): (iCount-1));
    4847     else
    4848       iCnloop = bLeftAvai? (iCount-2): (iCount-1);
    4849 #else
    4850     Int  iCnloop    = bLeftAvai? (iCount-2): (iCount-1);
    4851 #endif
    4852     for(; iCnloop >= 0; iCnloop --)
    4853     {
    4854       if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
    4855       {
    4856         bRemoveSpa                      = true;
    4857         abCandIsInter        [ iCount ] = false;
    4858 
    4859         //reset to the default value for MC
    4860         puhInterDirNeighbours[iCount]   = 0;
    4861 
    4862         pcMvFieldNeighbours[iCount<<1]    .setMvField( cZeroMv, NOT_VALID );
    4863         pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    4864         break;
    4865       }
    4866     }
    4867 
    4868     if(!bRemoveSpa)
    4869     {
    4870       iPosLeftAbove[1] = iCount;
    4871 #if H_3D_NBDV
    4872       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    4873       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    4874 #endif
    4875 #if H_3D_VSP
    4876 #if MTK_VSP_SIMPLIFICATION_F0111
    4877       if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1)
    4878 #if LGE_SHARP_VSP_INHERIT_F0104
    4879 #if H_3D_IC
    4880         && !bICFlag
    4881 #endif
    4882 #if H_3D_ARP
    4883         && !bARPFlag
    4884 #endif
    4885 #endif
    4886         )
    4887 #else
    4888       if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1
    4889 #if LGE_SHARP_VSP_INHERIT_F0104
    4890 #if H_3D_IC
    4891         && !bICFlag
    4892 #endif
    4893 #if H_3D_ARP
    4894         && !bARPFlag
    4895 #endif
    4896 #endif
    4897         )
    4898 #endif
    4899       {
    4900 
    4901         vspFlag[iCount] = 1;
    4902 #if !MTK_VSP_SIMPLIFICATION_F0111
    4903         xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo);
    4904 #endif
    4905       }
    4906 #endif
    4907       if ( mrgCandIdx == iCount )
    4908       {
    4909         return;
    4910       }
    4911       iCount ++;
    4912     }
    4913 #else // H_3D_IV_MERGE
     4423
    49144424    if ( mrgCandIdx == iCount )
    49154425    {
     
    49174427    }
    49184428    iCount ++;
    4919 #endif // H_3D_IV_MERGE
    49204429  }
    49214430  // early termination
     
    49244433    return;
    49254434  }
    4926 
    4927 #if H_3D
    4928   //////////////////////////////////
    4929   //////// ABOVE RIGHT (B0) ////////
    4930   //////////////////////////////////
    4931 #endif
    49324435
    49334436  // above right
     
    49494452      pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    49504453    }
    4951 #if H_3D_NBDV
    4952     pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    4953     pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    4954 #endif
    4955 #if H_3D_VSP
    4956 #if MTK_VSP_SIMPLIFICATION_F0111
    4957     if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)
    4958 #if LGE_SHARP_VSP_INHERIT_F0104
    4959 #if H_3D_IC
    4960       && !bICFlag
    4961 #endif
    4962 #if H_3D_ARP
    4963       && !bARPFlag
    4964 #endif
    4965 #endif
    4966       )
    4967 #else
    4968     if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1
    4969 #if LGE_SHARP_VSP_INHERIT_F0104
    4970 #if H_3D_IC
    4971       && !bICFlag
    4972 #endif
    4973 #if H_3D_ARP
    4974       && !bARPFlag
    4975 #endif
    4976 #endif
    4977       )
    4978 #endif
    4979     {
    4980       vspFlag[iCount] = 1;
    4981 #if !MTK_VSP_SIMPLIFICATION_F0111
    4982       xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo);
    4983 #endif
    4984     }
    4985 #endif
     4454
    49864455    if ( mrgCandIdx == iCount )
    49874456    {
     
    50034472  /////////////////////////////////////////////
    50044473
    5005 #if ETRIKHU_MERGE_REUSE_F0093
    50064474  if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand())
    5007 #else
    5008   if( ivCandDir[1] )
    5009 #endif
    50104475  {
    50114476    assert(iCount < getSlice()->getMaxNumMergeCand());
    50124477
    5013 #if ETRIKHU_MERGE_REUSE_F0093
    50144478    tmpMV[0].setMvField( cZeroMv, NOT_VALID );
    50154479    tmpMV[1].setMvField( cZeroMv, NOT_VALID );
     
    50224486      tmpMV[1].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );
    50234487    }
    5024 #else
    5025     abCandIsInter        [ iCount ] = true;
    5026     puhInterDirNeighbours[ iCount ] = ivCandDir[1];
    5027     if( ( ivCandDir[1] & 1 ) == 1 )
    5028     {
    5029       pcMvFieldNeighbours[ iCount<<1    ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] );
    5030     }
    5031     if( ( ivCandDir[1] & 2 ) == 2 )
    5032     {
    5033       pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );
    5034     }
    5035 #endif
    50364488
    50374489    Bool bRemoveSpa = false; //pruning to A1, B1
     
    50464498      {
    50474499        bRemoveSpa                      = true;
    5048 #if !ETRIKHU_MERGE_REUSE_F0093
    5049         abCandIsInter        [ iCount ] = false;
    5050         //reset to the default value for MC
    5051         puhInterDirNeighbours[iCount]   = 0;
    5052         pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
    5053         pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    5054 #endif
    50554500        break;
    50564501      }     
     
    50584503    if(!bRemoveSpa)
    50594504    {
    5060 #if ETRIKHU_MERGE_REUSE_F0093
    50614505      rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);
    50624506      puhInterDirNeighbours[ iCount ] = ivCandDir[1];
     
    50694513        pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );
    50704514      }
    5071 #endif
    50724515#if H_3D_NBDV
    50734516      pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
     
    50924535  //////// VIEW SYNTHESIS PREDICTION (VSP) ////////
    50934536  /////////////////////////////////////////////////
    5094 #if ETRIKHU_MERGE_REUSE_F0093
    50954537  if (iCount<getSlice()->getMaxNumMergeCand())
    50964538  {
    5097 #endif
    50984539
    50994540  if (
    5100 #if LGE_SHARP_VSP_INHERIT_F0104
    51014541#if H_3D_IC
    51024542      !bICFlag &&
     
    51054545      !bARPFlag &&
    51064546#endif
    5107 #endif
    5108 #if ETRIKHU_MERGE_REUSE_F0093
    51094547      xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, iCount3DV, inheritedVSPDisInfo ) )
    5110 #else
    5111       xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) )
    5112 #endif
    51134548  {
    51144549    return;
     
    51214556  }
    51224557#endif
    5123 #if ETRIKHU_MERGE_REUSE_F0093
    5124   }
    5125 #endif
    5126 
    5127 #if ETRIKHU_MERGE_REUSE_F0093
     4558#if H_3D
     4559  }
     4560#endif
     4561
     4562#if H_3D
    51284563  iCount += numA0B2;
    51294564#else
    5130 #if H_3D
    5131   ///////////////////////////////////
    5132   //////// LEFT BOTTOM (A0) ////////
    5133   ///////////////////////////////////
    5134 #endif
    5135 
    51364565  //left bottom
    51374566  UInt uiLeftBottomPartIdx = 0;
     
    51524581      pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    51534582    }
    5154 #if H_3D_NBDV
    5155     pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    5156     pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    5157 #endif
    5158 #if H_3D_VSP
    5159     if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1
    5160 #if LGE_SHARP_VSP_INHERIT_F0104
    5161 #if H_3D_IC
    5162         && !bICFlag
    5163 #endif
    5164 #if H_3D_ARP
    5165         && !bARPFlag
    5166 #endif
    5167 #endif
    5168         )
    5169     {
    5170       vspFlag[iCount] = 1;
    5171 #if !MTK_VSP_SIMPLIFICATION_F0111
    5172       xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo);
    5173 #endif
    5174     }
    5175 #endif
    51764583    if ( mrgCandIdx == iCount )
    51774584    {
     
    51854592    return;
    51864593  }
    5187 #if H_3D
    5188   ///////////////////////////////////
    5189   //////// LEFT ABOVE (B2) ////////
    5190   ///////////////////////////////////
    5191 #endif
    51924594
    51934595  // above left
     
    52124614        pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    52134615      }
    5214 #if H_3D_NBDV
    5215       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    5216       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    5217 #endif
    5218 #if H_3D_VSP
    5219 #if MTK_VSP_SIMPLIFICATION_F0111
    5220       if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)
    5221 #if LGE_SHARP_VSP_INHERIT_F0104
    5222 #if H_3D_IC
    5223           && !bICFlag
    5224 #endif
    5225 #if H_3D_ARP
    5226           && !bARPFlag
    5227 #endif
    5228 #endif
    5229           )
    5230 #else
    5231       if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1
    5232 #if LGE_SHARP_VSP_INHERIT_F0104
    5233 #if H_3D_IC
    5234           && !bICFlag
    5235 #endif
    5236 #if H_3D_ARP
    5237           && !bARPFlag
    5238 #endif
    5239 #endif
    5240           )
    5241 #endif
    5242       {
    5243         vspFlag[iCount] = 1;
    5244 #if !MTK_VSP_SIMPLIFICATION_F0111
    5245         xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);
    5246 #endif
    5247       }
    5248 #endif
    52494616      if ( mrgCandIdx == iCount )
    52504617      {
     
    52664633  //////// SHIFTED IV (IvMCShift + IvDCShift) ////////
    52674634  ////////////////////////////////////////////////////
    5268 #if ETRIKHU_MERGE_REUSE_F0093
    52694635  if(  ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() )
    52704636  {
    52714637    if(xAddIvMRGCand( mrgCandIdx,  iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) )
    5272 #else
    5273   if(  ivMvPredFlag  )
    5274   {
    5275     if(xAddIvMRGCand( mrgCandIdx,  iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag))
    5276 #endif
    52774638    {
    52784639      return;
     
    52864647#endif
    52874648
    5288 #if ETRIKHU_MERGE_REUSE_F0093
     4649#if H_3D
    52894650  if (iCountHEVC + iCount3DV > getSlice()->getMaxNumMergeCand())
    52904651  {
     
    52974658  numValidMergeCand = iCount;
    52984659#else
    5299 #if H_3D
    5300   /////////////////////////////////
    5301   //////// Collocate (COL) ////////
    5302   /////////////////////////////////
    5303 #endif
    53044660  if ( getSlice()->getEnableTMVPFlag())
    53054661  {
     
    53664722    if ( getSlice()->isInterB() )
    53674723    {
    5368 #if H_3D_TMVP
    5369       iRefIdx = 0;
    5370 #endif
    53714724      bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx);
    53724725      if( bExistMV == false )
     
    53854738      puhInterDirNeighbours[uiArrayAddr] = dir;
    53864739      abCandIsInter[uiArrayAddr] = true;
    5387 #if H_3D_NBDV
    5388       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    5389       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    5390 #endif
    53914740      if ( mrgCandIdx == iCount )
    53924741      {
     
    54064755  if ( getSlice()->isInterB())
    54074756  {
    5408 #if H_3D_IV_MERGE
    5409     UInt uiPriorityList0[20] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3,    0, 4, 1, 4, 2, 4, 3, 4 };
    5410     UInt uiPriorityList1[20] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2,    4, 0, 4, 1, 4, 2, 4, 3 };
    5411 #else
    54124757    UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3};
    54134758    UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2};
    5414 #endif
    54154759
    54164760    for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++)
    54174761    {
    54184762      Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx];
    5419 #if H_3D_VSP
    5420       Bool bValid = true;
    5421       if ( vspFlag[i] == 1 || vspFlag[j] == 1 )
    5422       {
    5423         bValid = false;
    5424       }
    5425       if( !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) )
    5426       {
    5427         assert(bValid == true);
    5428       }
    5429 #endif
    5430 #if H_3D_VSP
    5431       if (abCandIsInter[i] && abCandIsInter[j] && (puhInterDirNeighbours[i]&0x1) && (puhInterDirNeighbours[j]&0x2) && bValid)
    5432 #else
    54334763      if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2))
    5434 #endif
    54354764      {
    54364765        abCandIsInter[uiArrayAddr] = true;
     
    54884817#endif
    54894818}
    5490 
    5491 
    5492 
    5493 
    54944819#else
    54954820
     
    55034828 */
    55044829Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    5505 #if H_3D_VSP
    5506       , Int* vspFlag
    5507       , InheritedVSPDisInfo*  inheritedVSPDisInfo
    5508 #endif
    55094830      , Int& numValidMergeCand, Int mrgCandIdx
    55104831)
    55114832{
    55124833  UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx;
    5513 #if H_3D_IV_MERGE
    5514   ////////////////////////////
    5515   //////// INIT LISTS ////////
    5516   ////////////////////////////
    5517   TComMv cZeroMv;
    5518   Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];
    5519 #else
    55204834  Bool abCandIsInter[ MRG_MAX_NUM_CANDS ];
    5521 #endif
    55224835  for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui )
    55234836  {
    55244837    abCandIsInter[ui] = false;
    5525 #if H_3D_IV_MERGE
    5526     pcMvFieldNeighbours[ ( ui << 1 )     ].setMvField(cZeroMv, NOT_VALID);
    5527     pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID);
    5528 #else
    55294838    pcMvFieldNeighbours[ ( ui << 1 )     ].setRefIdx(NOT_VALID);
    55304839    pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID);
    5531 #endif
    55324840  }
    55334841  numValidMergeCand = getSlice()->getMaxNumMergeCand();
    5534 #if H_3D
    5535   //////////////////////////////////
    5536   //////// DERIVE LOCATIONS ////////
    5537   //////////////////////////////////
    5538 #endif
    55394842  // compute the location of the current PU
    55404843  Int xP, yP, nPSW, nPSH;
     
    55474850  deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    55484851  deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
    5549 #if SEC_MPI_ENABLING_MERGE_F0150
    5550   Bool bMPIFlag   = getSlice()->getVPS()->getMPIFlag( getSlice()->getLayerIdInVps() );
    5551 #endif
    5552 #if QC_DEPTH_IV_MRG_F0125
    5553   Bool bIsDepth = getSlice()->getIsDepth();
    5554   Bool bDepthIPMCAvai = false;
    5555 #endif
    5556 
    5557 #if LGE_SHARP_VSP_INHERIT_F0104
    5558 #if H_3D_IC
    5559   Bool bICFlag = getICFlag(uiAbsPartIdx);
    5560 #endif
    5561 #if H_3D_ARP
    5562   Bool bARPFlag = getARPW(uiAbsPartIdx)>0 ? true : false;
    5563 #endif
    5564 #endif
    5565 
    5566 #if H_3D_IV_MERGE
    5567  
    5568   /////////////////////////////////////////////
    5569   //////// TEXTURE MERGE CANDIDATE (T) ////////
    5570   /////////////////////////////////////////////
    5571 
    5572 #if SEC_MPI_ENABLING_MERGE_F0150
    5573   if( bMPIFlag)
    5574 #else
    5575   if( m_pcSlice->getIsDepth())
    5576 #endif
    5577   {
    5578     UInt uiPartIdxCenter;
    5579     xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );   
    5580 #if H_3D_FCO
    5581     TComPic * pcTexturePic = m_pcSlice->getTexturePic();
    5582     TComDataCU *pcTextureCU = 0;
    5583     if ( pcTexturePic )
    5584         pcTextureCU = pcTexturePic->getCU( getAddr() );
    5585 #else
    5586     TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() );
    5587 #endif
    5588  
    5589 #if H_3D_FCO
    5590     if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) )
    5591 #else
    5592     if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) )
    5593 #endif
    5594     {
    5595       pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    5596       Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1].getRefIdx() );
    5597       if( (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) && ( iValidDepRef >= 0 ) )
    5598       {
    5599         TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv();
    5600         const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    5601         cMvPred+=cAdd;
    5602         cMvPred>>=2;
    5603         clipMv(cMvPred);
    5604         pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef);
    5605       }
    5606 
    5607       if ( getSlice()->isInterB() )
    5608       {
    5609         pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    5610         iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx() );
    5611         if( (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) && ( iValidDepRef >= 0) )
    5612         {
    5613           TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv();
    5614           const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    5615           cMvPred+=cAdd;
    5616           cMvPred>>=2;
    5617           clipMv(cMvPred);
    5618           pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef);
    5619         }
    5620       }
    5621 
    5622       puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0;
    5623       puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0;
    5624 
    5625       if( puhInterDirNeighbours[iCount] != 0 )
    5626       {
    5627         abCandIsInter[iCount] = true;
    5628         if ( mrgCandIdx == iCount )
    5629         {
    5630           return;
    5631         }
    5632         iCount ++;
    5633       }
    5634     }
    5635   }
    5636 
    5637   //////////////////////////////////
    5638   //////// GET DISPARITIES  ////////
    5639   //////////////////////////////////
    5640 
    5641   DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    5642 
    5643   for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++)
    5644   {
    5645     inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo;
    5646   }
    5647 
    5648   /////////////////////////////////////////////////////////////////
    5649   //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC  Candidates /////
    5650   /////////////////////////////////////////////////////////////////
    5651 
    5652   Int  posIvDC          = -1;
    5653   Bool bLeftAvai        = false;
    5654   Int  iPosLeftAbove[2] = {-1, -1};
    5655 
    5656 
    5657   // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; 
    5658   // An enumerator would be appropriate here!
    5659   TComMv ivCandMv    [8];
    5660   Int    ivCandRefIdx[8] = {-1, -1, -1, -1, -1, -1, -1, -1};
    5661 
    5662   // { IvMC, IvDC, IvMCShift, IvDCShift }; 
    5663   Int    ivCandDir   [4] = {0, 0, 0, 0};
    5664 
    5665   Bool ivMvPredFlag   = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() );
    5666  
    5667   if ( ivMvPredFlag )
    5668   {
    5669     getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir
    5670 #if QC_DEPTH_IV_MRG_F0125
    5671     , bIsDepth
    5672 #endif
    5673     );
    5674   } 
    5675  
    5676   ///////////////////////////////////////////////
    5677   //////// INTER VIEW MOTION COMP(IvMC) /////////
    5678   ///////////////////////////////////////////////
    5679 
    5680   if( ivCandDir[0] )
    5681   {
    5682     abCandIsInter        [ iCount ] = true;
    5683     puhInterDirNeighbours[ iCount ] = ivCandDir[0];   
    5684 
    5685     if( ( ivCandDir[0] & 1 ) == 1 )
    5686     {
    5687       pcMvFieldNeighbours[ iCount<<1    ].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] );
    5688     }
    5689     if( ( ivCandDir[0] & 2 ) == 2 )
    5690     {
    5691       pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] );
    5692     }
    5693 
    5694 #if QC_DEPTH_IV_MRG_F0125
    5695     if ( bIsDepth )
    5696     {
    5697       Bool bRemoveSpa = false;
    5698       Int iCnloop = iCount-1;
    5699       for(; iCnloop >= 0; iCnloop --)
    5700       {
    5701         if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
    5702         {
    5703           bRemoveSpa                      = true;
    5704           abCandIsInter        [ iCount ] = false;
    5705 
    5706           puhInterDirNeighbours[iCount]   = 0;
    5707           pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
    5708           pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    5709           break;
    5710         }
    5711       }
    5712       if(!bRemoveSpa)
    5713       {
    5714         bDepthIPMCAvai = true;
    5715       }
    5716     }
    5717     if ( bDepthIPMCAvai || !bIsDepth )
    5718     {
    5719 #endif
    5720     if ( mrgCandIdx == iCount )
    5721     {
    5722       return;
    5723     }
    5724     iCount ++;
    5725 #if QC_DEPTH_IV_MRG_F0125
    5726     }
    5727 #endif
    5728   }
    5729 
    5730   // early termination
    5731   if (iCount == getSlice()->getMaxNumMergeCand())
    5732   {
    5733     return;
    5734   }
    5735 #endif
    5736 
    5737 #if H_3D
    5738   ////////////////////////////
    5739   //////// LEFT (A1) /////////
    5740   ////////////////////////////
    5741 #endif
     4852
    57424853  //left
    57434854  UInt uiLeftPartIdx = 0;
     
    57594870      pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    57604871    }
    5761 #if H_3D_IV_MERGE
    5762     Bool bRemoveSpa = false; //pruning to inter-view candidates
    5763 #if QC_DEPTH_IV_MRG_F0125
    5764     Int  iCnloop = bDepthIPMCAvai ? (iCount-2): (iCount-1);
    5765 #else
    5766     Int  iCnloop    = iCount - 1;
    5767 #endif
    5768     for(; iCnloop >= 0; iCnloop --)
    5769     {
    5770       if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
    5771       {
    5772         bRemoveSpa                      = true;
    5773         abCandIsInter        [ iCount ] = false;
    5774 
    5775         //reset to the default value for MC
    5776         puhInterDirNeighbours[iCount]   = 0;
    5777         pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
    5778         pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    5779         break;
    5780       }
    5781     }
    5782     if(!bRemoveSpa)
    5783     {
    5784       bLeftAvai = true;
    5785       iPosLeftAbove[0] = iCount;
    5786 #if H_3D_NBDV
    5787       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    5788       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    5789 #endif
    5790 #if H_3D_VSP
    5791       if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1
    5792 #if LGE_SHARP_VSP_INHERIT_F0104
    5793 #if H_3D_IC
    5794           && !bICFlag
    5795 #endif
    5796 #if H_3D_ARP
    5797           && !bARPFlag
    5798 #endif
    5799 #endif
    5800           )
    5801       {
    5802         vspFlag[iCount] = 1;
    5803 #if !MTK_VSP_SIMPLIFICATION_F0111
    5804         xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo);
    5805 #endif
    5806       }
    5807 #endif
    5808       if ( mrgCandIdx == iCount )
    5809       {
    5810         return;
    5811       }
    5812       iCount ++;
    5813     }
    5814 #else // H_3D_IV_MERGE
    58154872    if ( mrgCandIdx == iCount )
    58164873    {
     
    58184875    }
    58194876    iCount ++;
    5820 #endif // H_3D_IV_MERGE
    58214877  }
    58224878 
     
    58264882    return;
    58274883  }
    5828 #if H_3D
    5829   ////////////////////////////
    5830   //////// ABOVE (B1) ////////
    5831   ////////////////////////////
    5832 #endif
     4884
    58334885  // above
    58344886  UInt uiAbovePartIdx = 0;
     
    58504902      pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    58514903    }
    5852 #if H_3D_IV_MERGE
    5853     Bool bRemoveSpa = false; //pruning to inter-view candidates
    5854 #if QC_DEPTH_IV_MRG_F0125
    5855     Int iCnloop;
    5856     if( bIsDepth )
    5857       iCnloop = (bLeftAvai && bDepthIPMCAvai) ? (iCount-3) : ((bLeftAvai || bDepthIPMCAvai)  ? (iCount-2): (iCount-1));
    5858     else
    5859       iCnloop = bLeftAvai? (iCount-2): (iCount-1);
    5860 #else
    5861     Int  iCnloop    = bLeftAvai? (iCount-2): (iCount-1);
    5862 #endif
    5863     for(; iCnloop >= 0; iCnloop --)
    5864     {
    5865       if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
    5866       {
    5867         bRemoveSpa                      = true;
    5868         abCandIsInter        [ iCount ] = false;
    5869 
    5870         //reset to the default value for MC
    5871         puhInterDirNeighbours[iCount]   = 0;
    5872 
    5873         pcMvFieldNeighbours[iCount<<1]    .setMvField( cZeroMv, NOT_VALID );
    5874         pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    5875         break;
    5876       }
    5877     }
    5878 
    5879     if(!bRemoveSpa)
    5880     {
    5881       iPosLeftAbove[1] = iCount;
    5882 #if H_3D_NBDV
    5883       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    5884       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    5885 #endif
    5886 #if H_3D_VSP
    5887 #if MTK_VSP_SIMPLIFICATION_F0111
    5888       if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1)
    5889 #if LGE_SHARP_VSP_INHERIT_F0104
    5890 #if H_3D_IC
    5891           && !bICFlag
    5892 #endif
    5893 #if H_3D_ARP
    5894           && !bARPFlag
    5895 #endif
    5896 #endif
    5897           )
    5898 #else
    5899       if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1
    5900 #if LGE_SHARP_VSP_INHERIT_F0104
    5901 #if H_3D_IC
    5902           && !bICFlag
    5903 #endif
    5904 #if H_3D_ARP
    5905           && !bARPFlag
    5906 #endif
    5907 #endif
    5908           )
    5909 #endif
    5910       {
    5911 
    5912         vspFlag[iCount] = 1;
    5913 #if !MTK_VSP_SIMPLIFICATION_F0111
    5914         xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo);
    5915 #endif
    5916       }
    5917 #endif
    5918       if ( mrgCandIdx == iCount )
    5919       {
    5920         return;
    5921       }
    5922       iCount ++;
    5923     }
    5924 #else // H_3D_IV_MERGE
     4904
    59254905    if ( mrgCandIdx == iCount )
    59264906    {
     
    59284908    }
    59294909    iCount ++;
    5930 #endif // H_3D_IV_MERGE
    59314910  }
    59324911  // early termination
     
    59364915  }
    59374916
    5938 #if H_3D
    5939   //////////////////////////////////
    5940   //////// ABOVE RIGHT (B0) ////////
    5941   //////////////////////////////////
    5942 #endif
    59434917
    59444918  // above right
     
    59604934      pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    59614935    }
    5962 #if H_3D_NBDV
    5963     pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    5964     pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    5965 #endif
    5966 #if H_3D_VSP
    5967 #if MTK_VSP_SIMPLIFICATION_F0111
    5968     if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)
    5969 #if LGE_SHARP_VSP_INHERIT_F0104
    5970 #if H_3D_IC
    5971         && !bICFlag
    5972 #endif
    5973 #if H_3D_ARP
    5974         && !bARPFlag
    5975 #endif
    5976 #endif
    5977         )
    5978 #else
    5979     if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1
    5980 #if LGE_SHARP_VSP_INHERIT_F0104
    5981 #if H_3D_IC
    5982         && !bICFlag
    5983 #endif
    5984 #if H_3D_ARP
    5985         && !bARPFlag
    5986 #endif
    5987 #endif
    5988         )
    5989 #endif
    5990     {
    5991       vspFlag[iCount] = 1;
    5992 #if !MTK_VSP_SIMPLIFICATION_F0111
    5993       xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo);
    5994 #endif
    5995     }
    5996 #endif
    59974936    if ( mrgCandIdx == iCount )
    59984937    {
     
    60064945    return;
    60074946  }
    6008 
    6009 #if H_3D_IV_MERGE
    6010   /////////////////////////////////////////////
    6011   //////// INTER VIEW DISP COMP (IvDC) ////////
    6012   /////////////////////////////////////////////
    6013 
    6014   if( ivCandDir[1] )
    6015   {
    6016     assert(iCount < getSlice()->getMaxNumMergeCand());
    6017     abCandIsInter        [ iCount ] = true;
    6018     puhInterDirNeighbours[ iCount ] = ivCandDir[1];
    6019     if( ( ivCandDir[1] & 1 ) == 1 )
    6020     {
    6021       pcMvFieldNeighbours[ iCount<<1    ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] );
    6022     }
    6023     if( ( ivCandDir[1] & 2 ) == 2 )
    6024     {
    6025       pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );
    6026     }
    6027 
    6028     Bool bRemoveSpa = false; //pruning to A1, B1
    6029     for(Int i = 0; i < 2; i ++)
    6030     {
    6031       Int iCnloop = iPosLeftAbove[i];
    6032       if ( iCnloop == -1 )
    6033       {
    6034         continue;
    6035       }
    6036       if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
    6037       {
    6038         bRemoveSpa                      = true;
    6039         abCandIsInter        [ iCount ] = false;
    6040         //reset to the default value for MC
    6041         puhInterDirNeighbours[iCount]   = 0;
    6042         pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
    6043         pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
    6044         break;
    6045       }     
    6046     }
    6047     if(!bRemoveSpa)
    6048     {
    6049 #if H_3D_NBDV
    6050       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    6051       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    6052 #endif
    6053       posIvDC  = iCount;
    6054       if ( mrgCandIdx == iCount )
    6055         return;
    6056       iCount ++;
    6057 
    6058       // early termination
    6059       if (iCount == getSlice()->getMaxNumMergeCand())
    6060       {
    6061         return;
    6062       }
    6063     }
    6064   }
    6065 #endif // H_3D_IV_MERGE
    6066 
    6067 #if H_3D_VSP
    6068   /////////////////////////////////////////////////
    6069   //////// VIEW SYNTHESIS PREDICTION (VSP) ////////
    6070   /////////////////////////////////////////////////
    6071 
    6072   if (
    6073 #if LGE_SHARP_VSP_INHERIT_F0104
    6074 #if H_3D_IC
    6075       !bICFlag &&
    6076 #endif
    6077 #if H_3D_ARP
    6078       !bARPFlag &&
    6079 #endif
    6080 #endif
    6081       xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) )
    6082   {
    6083     return;
    6084   }
    6085 
    6086   // early termination
    6087   if (iCount == getSlice()->getMaxNumMergeCand())
    6088   {
    6089     return;
    6090   }
    6091 #endif
    6092 #if H_3D
    6093   ///////////////////////////////////
    6094   //////// LEFT BOTTOM (A0) ////////
    6095   ///////////////////////////////////
    6096 #endif
    60974947
    60984948  //left bottom
     
    61144964      pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    61154965    }
    6116 #if H_3D_NBDV
    6117     pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    6118     pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    6119 #endif
    6120 #if H_3D_VSP
    6121     if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1
    6122 #if LGE_SHARP_VSP_INHERIT_F0104
    6123 #if H_3D_IC
    6124         && !bICFlag
    6125 #endif
    6126 #if H_3D_ARP
    6127         && !bARPFlag
    6128 #endif
    6129 #endif
    6130         )
    6131     {
    6132       vspFlag[iCount] = 1;
    6133 #if !MTK_VSP_SIMPLIFICATION_F0111
    6134       xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo);
    6135 #endif
    6136     }
    6137 #endif
     4966
    61384967    if ( mrgCandIdx == iCount )
    61394968    {
     
    61474976    return;
    61484977  }
    6149 #if H_3D
    6150   ///////////////////////////////////
    6151   //////// LEFT ABOVE (B2) ////////
    6152   ///////////////////////////////////
    6153 #endif
    61544978
    61554979  // above left
     
    61744998        pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    61754999      }
    6176 #if H_3D_NBDV
    6177       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    6178       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    6179 #endif
    6180 #if H_3D_VSP
    6181 #if MTK_VSP_SIMPLIFICATION_F0111
    6182       if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)
    6183 #if LGE_SHARP_VSP_INHERIT_F0104
    6184 #if H_3D_IC
    6185           && !bICFlag
    6186 #endif
    6187 #if H_3D_ARP
    6188           && !bARPFlag
    6189 #endif
    6190 #endif
    6191           )
    6192 #else
    6193       if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1
    6194 #if LGE_SHARP_VSP_INHERIT_F0104
    6195 #if H_3D_IC
    6196           && !bICFlag
    6197 #endif
    6198 #if H_3D_ARP
    6199           && !bARPFlag
    6200 #endif
    6201 #endif
    6202           )
    6203 #endif
    6204       {
    6205         vspFlag[iCount] = 1;
    6206 #if !MTK_VSP_SIMPLIFICATION_F0111
    6207         xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);
    6208 #endif
    6209       }
    6210 #endif
    62115000      if ( mrgCandIdx == iCount )
    62125001      {
     
    62215010    return;
    62225011  }
    6223 #if H_3D_IV_MERGE
    6224   ////////////////////////////////////////////////////
    6225   //////// SHIFTED IV (IvMCShift + IvDCShift) ////////
    6226   ////////////////////////////////////////////////////
    6227 
    6228   if(  ivMvPredFlag  )
    6229   {
    6230     if(xAddIvMRGCand( mrgCandIdx,  iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag))
    6231     {
    6232       return;
    6233     }
    6234     //early termination
    6235     if (iCount == getSlice()->getMaxNumMergeCand())
    6236     {
    6237       return;
    6238     }
    6239   }
    6240 #endif
    6241 #if H_3D
    6242   /////////////////////////////////
    6243   //////// Collocate (COL) ////////
    6244   /////////////////////////////////
    6245 #endif
     5012
    62465013  if ( getSlice()->getEnableTMVPFlag())
    62475014  {
     
    63085075    if ( getSlice()->isInterB() )
    63095076    {
    6310 #if H_3D_TMVP
    6311       iRefIdx = 0;
    6312 #endif
    63135077      bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx);
    63145078      if( bExistMV == false )
     
    63275091      puhInterDirNeighbours[uiArrayAddr] = dir;
    63285092      abCandIsInter[uiArrayAddr] = true;
    6329 #if H_3D_NBDV
    6330       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    6331       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    6332 #endif
    63335093      if ( mrgCandIdx == iCount )
    63345094      {
     
    63485108  if ( getSlice()->isInterB())
    63495109  {
    6350 #if H_3D_IV_MERGE
    6351     UInt uiPriorityList0[20] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3,    0, 4, 1, 4, 2, 4, 3, 4 };
    6352     UInt uiPriorityList1[20] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2,    4, 0, 4, 1, 4, 2, 4, 3 };
    6353 #else
    63545110    UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3};
    63555111    UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2};
    6356 #endif
    63575112
    63585113    for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++)
    63595114    {
    63605115      Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx];
    6361 #if H_3D_VSP
    6362       Bool bValid = true;
    6363       if ( vspFlag[i] == 1 || vspFlag[j] == 1 )
    6364       {
    6365         bValid = false;
    6366       }
    6367       if( !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) )
    6368       {
    6369         assert(bValid == true);
    6370       }
    6371 #endif
    6372 #if H_3D_VSP
    6373       if (abCandIsInter[i] && abCandIsInter[j] && (puhInterDirNeighbours[i]&0x1) && (puhInterDirNeighbours[j]&0x2) && bValid)
    6374 #else
    63755116      if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2))
    6376 #endif
    63775117      {
    63785118        abCandIsInter[uiArrayAddr] = true;
     
    64295169  numValidMergeCand = uiArrayAddr;
    64305170}
    6431 
    6432 
    64335171#endif
    64345172
     
    67705508}
    67715509
    6772 #if LGE_IC_CTX_F0160
     5510#if H_3D_IC
    67735511Bool TComDataCU::isIC( UInt uiPartIdx )
    67745512{
     
    76236361}
    76246362#endif
    7625 #if QC_DEPTH_IV_MRG_F0125
     6363#if H_3D_IV_MERGE
    76266364Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
    76276365{
     
    82036941#endif
    82046942
    8205 #if MTK_SPIVMP_F0110
     6943#if H_3D_SPIVMP
    82066944Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight)
    82076945{
     
    82556993#if H_3D_IV_MERGE
    82566994Bool
    8257 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc
    8258 #if QC_DEPTH_IV_MRG_F0125
    8259 , Bool bIsDepth           
    8260 #endif
    8261 #if MTK_SPIVMP_F0110
     6995TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth           
     6996#if H_3D_SPIVMP
    82626997, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    82636998#endif
     
    82687003 
    82697004  //--- get base CU/PU and check prediction mode ---
    8270 #if QC_DEPTH_IV_MRG_F0125
    82717005  TComPic*    pcBasePic   = pcSlice->getIvPic( bIsDepth, iViewIndex );
    8272 #else
    8273   TComPic*    pcBasePic   = pcSlice->getIvPic( false, iViewIndex );
    8274 #endif
    82757006  TComPicYuv* pcBaseRec   = pcBasePic->getPicYuvRec   ();
    82767007
     
    82837014  pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
    82847015
    8285 #if !MTK_SPIVMP_F0110
    8286 #if QC_DEPTH_IV_MRG_F0125
     7016#if !H_3D_SPIVMP
    82877017  iCurrPosX  += ( iWidth  >> 1 );
    82887018  iCurrPosY  += ( iHeight >> 1 );
    8289 #else
    8290   iCurrPosX  += ( ( iWidth  - 1 ) >> 1 );
    8291   iCurrPosY  += ( ( iHeight - 1 ) >> 1 );
    8292 #endif
    82937019#endif
    82947020
     
    83087034#endif
    83097035
    8310 #if MTK_SPIVMP_F0110
     7036#if H_3D_SPIVMP
    83117037  ////////////////////////////////
    83127038  //////////sub-PU IvMC///////////
     
    84387164  ////////////////////////////////
    84397165
    8440 #if MTK_SPIVMP_F0110
     7166#if H_3D_SPIVMP
    84417167  for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)
    84427168#else
     
    84477173    // iLoopCan == 1 --> IvMCShift
    84487174
    8449 #if !MTK_SPIVMP_F0110
     7175#if !H_3D_SPIVMP
    84507176    Int         iBaseCUAddr;
    84517177    Int         iBaseAbsPartIdx;
     
    84557181    Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 );
    84567182
    8457 #if MTK_SPIVMP_F0110
     7183#if H_3D_SPIVMP
    84587184    iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
    84597185    iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );
     
    84647190    pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
    84657191
    8466 #if MTK_SPIVMP_F0110
     7192#if H_3D_SPIVMP
    84677193    pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
    84687194#else
     
    84967222                  TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
    84977223#if H_3D_NBDV
    8498 #if QC_DEPTH_IV_MRG_F0125
     7224#if H_3D_IV_MERGE
    84997225                  if( !bIsDepth )
    85007226                  {
     
    85047230                    cMv.setIDVVer    (cDv.getVer()); 
    85057231                    cMv.setIDVVId    (iViewIndex);
    8506 #if QC_DEPTH_IV_MRG_F0125
     7232#if H_3D_IV_MERGE
    85077233                  }
    85087234#endif
     
    85217247    }
    85227248  }
    8523 #if MTK_SPIVMP_F0110
     7249#if H_3D_SPIVMP
    85247250  for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)
    85257251#else
     
    85527278#endif
    85537279          cMv.setHor( cMv.getHor() + ioffsetDV );
    8554 #if QC_DEPTH_IV_MRG_F0125
     7280#if H_3D_IV_MERGE
    85557281          if( bIsDepth )
    85567282            cMv.setHor((cMv.getHor()+2)>>2);
     
    86397365  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; }
    86407366}
    8641 #if !SEC_DMM3_RBC_F0147
    8642 Void  TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
    8643 {
    8644   UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
    8645   for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm3IntraTabIdx[uiAbsPartIdx+ui] = uiTIdx; }
    8646 }
    8647 #endif
    8648 #endif
    8649 #if H_3D_DIM_RBC
    8650 Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion )
    8651 {
    8652   Int iWidth;
    8653   Int iHeight;
    8654   if( uiDepth == 0 )
    8655   {
    8656     iWidth = 64;
    8657     iHeight = 64;
    8658   }
    8659   else if( uiDepth == 1 )
    8660   {
    8661     iWidth = 32;
    8662     iHeight = 32;
    8663   }
    8664   else if( uiDepth == 2 )
    8665   {
    8666     iWidth = 16;
    8667     iHeight = 16;
    8668   }
    8669   else if( uiDepth == 3 )
    8670   {
    8671     iWidth = 8;
    8672     iHeight = 8;
    8673   }
    8674   else // uiDepth == 4
    8675   {
    8676     iWidth = 4;
    8677     iHeight = 4;
    8678   }
    8679 
    8680   Int iPtr = 0;
    8681   Int iX, iY;
    8682   Int iDir = -1;
    8683   Int iDiffX = 0, iDiffY = 0;
    8684 
    8685   // 1. Edge Code -> Vert & Horz Edges
    8686   Bool*  pbEdge = (Bool*) xMalloc( Bool, 4 * iWidth * iHeight );
    8687 
    8688   for( UInt ui = 0; ui < 4 * iWidth * iHeight; ui++ )
    8689     pbEdge  [ ui ] = false;
    8690 
    8691   // Direction : left(0), right(1), top(2), bottom(3), left-top(4), right-top(5), left-bottom(6), right-bottom(7)
    8692   // Code      : 0deg(0), 45deg(1), -45deg(2), 90deg(3), -90deg(4), 135deg(5), -135deg(6)
    8693   const UChar tableDir[8][7] = { { 0, 6, 4, 3, 2, 7, 5 },
    8694   { 1, 5, 7, 2, 3, 4, 6 },
    8695   { 2, 4, 5, 0, 1, 6, 7 },
    8696   { 3, 7, 6, 1, 0, 5, 4 },
    8697   { 4, 0, 2, 6, 5, 3, 1 },
    8698   { 5, 2, 1, 4, 7, 0, 3 },
    8699   { 6, 3, 0, 7, 4, 1, 2 },
    8700   { 7, 1, 3, 5, 6, 2, 0 }};
    8701 
    8702   UChar ucCode = pucEdgeCode[iPtr++];
    8703 
    8704   if( !bLeft )
    8705   {
    8706     iX = ucStartPos;
    8707     iY = 0;
    8708 
    8709     switch(ucCode)
    8710     {
    8711     case 0: // bottom
    8712       iDir = 3;
    8713       if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8714       break;
    8715     case 2: // left-bottom
    8716       iDir = 6;
    8717       if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8718       break;
    8719     case 1: // right-bottom
    8720       iDir = 7;
    8721       if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8722       if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8723       break;
    8724     case 4: // left
    8725       iDir = 0;
    8726       assert(false);
    8727       break;
    8728     case 3: // right
    8729       iDir = 1;
    8730       if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8731       if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8732       break;
    8733     }
    8734   }
    8735   else
    8736   {
    8737     iX = 0;
    8738     iY = ucStartPos;
    8739 
    8740     switch(ucCode)
    8741     {
    8742     case 0: // right
    8743       iDir = 1;
    8744       if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8745       break;
    8746     case 1: // right-top
    8747       iDir = 5;
    8748       if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8749       if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8750       break;
    8751     case 2: // right-bottom
    8752       iDir = 7;
    8753       if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8754       break;
    8755     case 3: // top
    8756       iDir = 2;
    8757       if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8758       if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8759       break;
    8760     case 4: // bottom
    8761       iDir = 3;
    8762       assert(false);
    8763       break;
    8764     }
    8765   }
    8766 
    8767   switch( iDir )
    8768   {
    8769   case 0: // left
    8770     iDiffX = -1;
    8771     iDiffY = 0;
    8772     break;
    8773   case 1: // right
    8774     iDiffX = +1;
    8775     iDiffY = 0;
    8776     break;
    8777   case 2: // top
    8778     iDiffX = 0;
    8779     iDiffY = -1;
    8780     break;
    8781   case 3: // bottom
    8782     iDiffX = 0;
    8783     iDiffY = +1;
    8784     break;
    8785   case 4: // left-top
    8786     iDiffX = -1;
    8787     iDiffY = -1;
    8788     break;
    8789   case 5: // right-top
    8790     iDiffX = +1;
    8791     iDiffY = -1;
    8792     break;
    8793   case 6: // left-bottom
    8794     iDiffX = -1;
    8795     iDiffY = +1;
    8796     break;
    8797   case 7: // right-bottom
    8798     iDiffX = +1;
    8799     iDiffY = +1;
    8800     break;
    8801   }
    8802 
    8803   iX += iDiffX;
    8804   iY += iDiffY;
    8805 
    8806   while( iPtr < ucNumEdge )
    8807   {
    8808     ucCode = pucEdgeCode[iPtr++];
    8809 
    8810     Int iNewDir = tableDir[iDir][ucCode];
    8811 
    8812     switch( iNewDir )
    8813     {
    8814     case 0: // left
    8815       iDiffX = -1;
    8816       iDiffY = 0;
    8817       break;
    8818     case 1: // right
    8819       iDiffX = +1;
    8820       iDiffY = 0;
    8821       break;
    8822     case 2: // top
    8823       iDiffX = 0;
    8824       iDiffY = -1;
    8825       break;
    8826     case 3: // bottom
    8827       iDiffX = 0;
    8828       iDiffY = +1;
    8829       break;
    8830     case 4: // left-top
    8831       iDiffX = -1;
    8832       iDiffY = -1;
    8833       break;
    8834     case 5: // right-top
    8835       iDiffX = +1;
    8836       iDiffY = -1;
    8837       break;
    8838     case 6: // left-bottom
    8839       iDiffX = -1;
    8840       iDiffY = +1;
    8841       break;
    8842     case 7: // right-bottom
    8843       iDiffX = +1;
    8844       iDiffY = +1;
    8845       break;
    8846     }
    8847 
    8848     switch( iDir )
    8849     {
    8850     case 0: // left
    8851       switch( ucCode )
    8852       {
    8853       case 0:
    8854       case 2:
    8855         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8856         break;
    8857       case 1:
    8858       case 3:
    8859         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8860         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8861         break;
    8862       case 4:
    8863       case 6:
    8864         // no
    8865         break;
    8866       case 5:
    8867         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8868         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8869         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8870         break;
    8871       }
    8872       break;
    8873     case 1: // right
    8874       switch( ucCode )
    8875       {
    8876       case 0:
    8877       case 2:
    8878         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8879         break;
    8880       case 1:
    8881       case 3:
    8882         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8883         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8884         break;
    8885       case 4:
    8886       case 6:
    8887         // no
    8888         break;
    8889       case 5:
    8890         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8891         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8892         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8893         break;
    8894       }
    8895       break;
    8896     case 2: // top
    8897       switch( ucCode )
    8898       {
    8899       case 0:
    8900       case 2:
    8901         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8902         break;
    8903       case 1:
    8904       case 3:
    8905         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8906         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8907         break;
    8908       case 4:
    8909       case 6:
    8910         // no
    8911         break;
    8912       case 5:
    8913         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8914         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8915         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8916         break;
    8917       }
    8918       break;
    8919     case 3: // bottom
    8920       switch( ucCode )
    8921       {
    8922       case 0:
    8923       case 2:
    8924         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8925         break;
    8926       case 1:
    8927       case 3:
    8928         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8929         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8930         break;
    8931       case 4:
    8932       case 6:
    8933         // no
    8934         break;
    8935       case 5:
    8936         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8937         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8938         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8939         break;
    8940       }
    8941       break;
    8942     case 4: // left-top
    8943       switch( ucCode )
    8944       {
    8945       case 0:
    8946       case 1:
    8947         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8948         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8949         break;
    8950       case 2:
    8951       case 4:
    8952         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8953         break;
    8954       case 3:
    8955       case 5:
    8956         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8957         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8958         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8959         break;
    8960       case 6:
    8961         // no
    8962         break;
    8963       }
    8964       break;
    8965     case 5: // right-top
    8966       switch( ucCode )
    8967       {
    8968       case 0:
    8969       case 1:
    8970         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8971         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8972         break;
    8973       case 2:
    8974       case 4:
    8975         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8976         break;
    8977       case 3:
    8978       case 5:
    8979         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8980         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    8981         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    8982         break;
    8983       case 6:
    8984         // no
    8985         break;
    8986       }
    8987       break;
    8988     case 6: // left-bottom
    8989       switch( ucCode )
    8990       {
    8991       case 0:
    8992       case 1:
    8993         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8994         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    8995         break;
    8996       case 2:
    8997       case 4:
    8998         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    8999         break;
    9000       case 3:
    9001       case 5:
    9002         if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;
    9003         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    9004         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    9005         break;
    9006       case 6:
    9007         // no
    9008         break;
    9009       }
    9010       break;
    9011     case 7: // right-bottom
    9012       switch( ucCode )
    9013       {
    9014       case 0:
    9015       case 1:
    9016         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    9017         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    9018         break;
    9019       case 2:
    9020       case 4:
    9021         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    9022         break;
    9023       case 3:
    9024       case 5:
    9025         if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;
    9026         if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;
    9027         if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;
    9028         break;
    9029       case 6:
    9030         // no
    9031         break;
    9032       }
    9033       break;
    9034     }
    9035 
    9036     assert( iX >= 0 && iX <= iWidth );
    9037     assert( iY >= 0 && iY <= iHeight );
    9038 
    9039     iX += iDiffX;
    9040     iY += iDiffY;
    9041     iDir = iNewDir;
    9042   }
    9043 
    9044   // finalize edge chain
    9045   if( iX == iWidth-1 )
    9046   {
    9047     if( iY == 0 )
    9048     {
    9049       if( iDir == 1 )
    9050       {
    9051         pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
    9052       }
    9053       else if( iDir == 5 )
    9054       {
    9055         pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
    9056       }
    9057       else
    9058       {
    9059         assert(false);
    9060       }
    9061     }
    9062     else if( iY == iHeight-1 )
    9063     {
    9064       if( iDir == 3 )
    9065       {
    9066         pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
    9067       }
    9068       else if( iDir == 7 )
    9069       {
    9070         pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
    9071       }
    9072       else
    9073       {
    9074         assert(false);
    9075       }
    9076     }
    9077     else
    9078     {
    9079       if( iDir == 1 )
    9080       {
    9081         pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
    9082       }
    9083       else if( iDir == 3 )
    9084       {
    9085         pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
    9086         pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
    9087       }
    9088       else if( iDir == 5 )
    9089       {
    9090         pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
    9091       }
    9092       else if( iDir == 7 )
    9093       {
    9094         pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
    9095         pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
    9096       }
    9097       else
    9098       {
    9099         assert(false);
    9100       }
    9101     }
    9102   }
    9103   else if( iX == 0 )
    9104   {
    9105     if( iY == 0 )
    9106     {
    9107       if( iDir == 2 )
    9108       {
    9109         pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
    9110       }
    9111       else if( iDir == 4 )
    9112       {
    9113         pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
    9114       }
    9115       else
    9116       {
    9117         assert(false);
    9118       }
    9119     }
    9120     else if( iY == iHeight-1 )
    9121     {
    9122       if( iDir == 0 )
    9123       {
    9124         pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
    9125       }
    9126       else if( iDir == 6 )
    9127       {
    9128         pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
    9129       }
    9130       else
    9131       {
    9132         assert(false);
    9133       }
    9134     }
    9135     else
    9136     {
    9137       if( iDir == 0 )
    9138       {
    9139         pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
    9140       }
    9141       else if( iDir == 2 )
    9142       {
    9143         pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
    9144         pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
    9145       }
    9146       else if( iDir == 4 )
    9147       {
    9148         pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
    9149         pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
    9150       }
    9151       else if( iDir == 6 )
    9152       {
    9153         pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
    9154       }
    9155       else
    9156       {
    9157         assert(false);
    9158       }
    9159     }
    9160   }
    9161   else if( iY == 0 )
    9162   {
    9163     if( iDir == 1 )
    9164     {
    9165       pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
    9166       pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
    9167     }
    9168     else if( iDir == 2 )
    9169     {
    9170       pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
    9171     }
    9172     else if( iDir == 4 )
    9173     {
    9174       pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
    9175     }
    9176     else if( iDir == 5 )
    9177     {
    9178       pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;
    9179       pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;
    9180     }
    9181     else
    9182     {
    9183       assert(false);
    9184     }
    9185   }
    9186   else if( iY == iHeight-1 )
    9187   {
    9188     if( iDir == 0 )
    9189     {
    9190       pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
    9191       pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
    9192     }
    9193     else if( iDir == 3 )
    9194     {
    9195       pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
    9196     }
    9197     else if( iDir == 6 )
    9198     {
    9199       pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;
    9200       pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
    9201     }
    9202     else if( iDir == 7 )
    9203     {
    9204       pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;
    9205     }
    9206     else
    9207     {
    9208       assert(false);
    9209     }
    9210   }
    9211   else
    9212   {
    9213     printf("reconPartiton: wrong termination\n");
    9214     assert(false);
    9215   }
    9216 
    9217   // Reconstruct Region from Chain Code
    9218   Bool* pbVisit  = (Bool*) xMalloc( Bool, iWidth * iHeight );
    9219   Int*  piStack  = (Int* ) xMalloc( Int,  iWidth * iHeight );
    9220 
    9221   for( UInt ui = 0; ui < iWidth * iHeight; ui++ )
    9222   {
    9223     pbRegion[ ui ] = true; // fill it as region 1 (we'll discover region 0 next)
    9224     pbVisit [ ui ] = false;
    9225   }
    9226 
    9227   iPtr = 0;
    9228   piStack[iPtr++] = (0 << 8) | (0);
    9229   pbRegion[ 0 ] = false;
    9230 
    9231   while(iPtr > 0)
    9232   {
    9233     Int iTmp = piStack[--iPtr];
    9234     Int iX1, iY1;
    9235     iX1 = iTmp & 0xff;
    9236     iY1 = (iTmp >> 8) & 0xff;
    9237 
    9238     pbVisit[ iX1 + iY1 * iWidth ] = true;
    9239 
    9240     assert( iX1 >= 0 && iX1 < iWidth );
    9241     assert( iY1 >= 0 && iY1 < iHeight );
    9242 
    9243     if( iX1 > 0 && !pbEdge[ 2 * iX1 - 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 - 1 + iY1 * iWidth ] )
    9244     {
    9245       piStack[iPtr++] = (iY1 << 8) | (iX1 - 1);
    9246       pbRegion[ iX1 - 1 + iY1 * iWidth ] = false;
    9247     }
    9248     if( iX1 < iWidth - 1 && !pbEdge[ 2 * iX1 + 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 + 1 + iY1 * iWidth ] )
    9249     {
    9250       piStack[iPtr++] = (iY1 << 8) | (iX1 + 1);
    9251       pbRegion[ iX1 + 1 + iY1 * iWidth ] = false;
    9252     }
    9253     if( iY1 > 0 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 - 1) * iWidth ] && !pbVisit[ iX1 + (iY1 - 1) * iWidth ] )
    9254     {
    9255       piStack[iPtr++] = ((iY1 - 1) << 8) | iX1;
    9256       pbRegion[ iX1 + (iY1 - 1) * iWidth ] = false;
    9257     }
    9258     if( iY1 < iHeight - 1 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 + 1) * iWidth ] && !pbVisit[ iX1 + (iY1 + 1) * iWidth ] )
    9259     {
    9260       piStack[iPtr++] = ((iY1 + 1) << 8) | iX1;
    9261       pbRegion[ iX1 + (iY1 + 1) * iWidth ] = false;
    9262     }
    9263   }
    9264 
    9265   xFree( pbEdge );
    9266   xFree( pbVisit );
    9267   xFree( piStack );
    9268 }
    92697367#endif
    92707368
  • trunk/source/Lib/TLibCommon/TComDataCU.h

    r724 r773  
    198198                                      ///< 0: non-VSP; 1: VSP
    199199#endif
    200 #if MTK_SPIVMP_F0110
     200#if H_3D_SPIVMP
    201201  Bool*         m_pbSPIVMPFlag;       ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP
    202202                                      ///< 0: non-SPIVMP; 1: SPIVMP
     
    212212#if H_3D_DIM_DMM
    213213  UInt*         m_dmmWedgeTabIdx[DMM_NUM_TYPE];
    214 #if !SEC_DMM3_RBC_F0147
    215   UInt*         m_dmm3IntraTabIdx;
    216 #endif
    217 #endif
    218 #if H_3D_DIM_RBC
    219   UChar*        m_pucEdgeCode;          ///< array of edge code
    220   UChar*        m_pucEdgeNumber;        ///< total number of edge
    221   UChar*        m_pucEdgeStartPos;      ///< starting point position
    222   Bool*         m_pbEdgeLeftFirst;      ///< true if edge should be checked in left boundary first
    223   Bool*         m_pbEdgePartition;      ///< true if it belongs to region 1, otherwise, region 0
    224214#endif
    225215#if H_3D_DIM_SDC
     
    233223  UChar*        m_pucInterSDCMask;
    234224#endif
    235 #if ETRIKHU_MERGE_REUSE_F0093
     225#if H_3D
    236226  Bool          m_bAvailableFlagA1;    ///< A1 available flag
    237227  Bool          m_bAvailableFlagB1;    ///< B1 available flag
     
    256246  UInt*         m_sliceSegmentStartCU; ///< Start CU address of current slice
    257247  Char          m_codedQP;
    258 #if ETRIKHU_MERGE_REUSE_F0093
     248#if H_3D
    259249  DisInfo       m_cDefaultDisInfo;    ///< Default disparity information for initializing
    260250#endif
     
    266256  Bool          xAddMVPCandOrder      ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
    267257#if H_3D_VSP
    268 #if ETRIKHU_MERGE_REUSE_F0093
    269258  Bool          xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,
    270259                             Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo*  inheritedVSPDisInfo);
    271 #else
    272   Bool          xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,
    273                              Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag );
    274 #endif
    275260#endif
    276261#if H_3D_IV_MERGE
    277 #if ETRIKHU_MERGE_REUSE_F0093
    278262  Bool          xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int*   ivCandDir, TComMv* ivCandMv,
    279263                               Int* ivCandRefIdx, Int posIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo*  inheritedVSPDisInfo   );
    280 #else
    281   Bool          xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int*   ivCandDir, TComMv* ivCandMv,
    282                                Int* ivCandRefIdx, Int posIvDC, Int* vspFlag );
    283 #endif
    284264  Bool          xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int*  ivCandDir, Int posIvDC, Int* vspFlag, Int& iFirDispCand );
    285265#endif
     
    519499   );
    520500   
    521 #if ETRIKHU_MERGE_REUSE_F0093
     501#if H_3D
    522502  Void          rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo*  inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV);
    523 #endif
    524 #if QC_DEPTH_IV_MRG_F0125
    525503  Bool          getDispNeighBlocks  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
    526504  Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
     
    535513  Void          getIVNStatus       ( UInt uiPartIdx,  DisInfo* pDInfo, Bool& bIVFMerge,  Int& iIVFMaxD);
    536514#endif
    537 #if MTK_SPIVMP_F0110
     515#if H_3D_SPIVMP
    538516  Void          getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight);
    539517  Void          getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr );
     
    541519#endif
    542520#if H_3D_IV_MERGE
    543   Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc
    544 #if QC_DEPTH_IV_MRG_F0125
    545     , Bool bIsDepth           
    546 #endif
    547 #if MTK_SPIVMP_F0110
     521  Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth           
     522
     523#if H_3D_SPIVMP
    548524    , TComMvField* pcMFieldSP, UChar* puhInterDirSP
    549525#endif
     
    584560  Void  setDmmWedgeTabIdxSubParts     ( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth );
    585561
    586 #if !SEC_DMM3_RBC_F0147
    587   UInt* getDmm3IntraTabIdx            ()                      { return m_dmm3IntraTabIdx;        }
    588   UInt  getDmm3IntraTabIdx            ( UInt uiIdx )          { return m_dmm3IntraTabIdx[uiIdx]; }
    589   Void  setDmm3IntraTabIdx            ( UInt uiIdx, UInt uh ) { m_dmm3IntraTabIdx[uiIdx] = uh;   }
    590   Void  setDmm3IntraTabIdxSubParts    ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth );
    591 #endif
    592 #endif
    593 #if H_3D_DIM_RBC
    594   UChar* getEdgeCode( UInt uiIdx )                 { return &m_pucEdgeCode[uiIdx * RBC_MAX_EDGE_NUM_PER_4x4]; }
    595 
    596   UChar* getEdgeNumber( )                          { return m_pucEdgeNumber;           }
    597   UChar  getEdgeNumber( UInt uiIdx )               { return m_pucEdgeNumber[uiIdx];    }
    598   Void   setEdgeNumber( UInt uiIdx, UChar val )    { m_pucEdgeNumber[uiIdx] = val;     }
    599 
    600   UChar* getEdgeStartPos( )                        { return m_pucEdgeStartPos;         }
    601   UChar  getEdgeStartPos( UInt uiIdx )             { return m_pucEdgeStartPos[uiIdx];  }
    602   Void   setEdgeStartPos( UInt uiIdx, UChar val )  { m_pucEdgeStartPos[uiIdx] = val;   }
    603 
    604   Bool*  getEdgeLeftFirst( )                       { return m_pbEdgeLeftFirst;         }
    605   Bool   getEdgeLeftFirst( UInt uiIdx )            { return m_pbEdgeLeftFirst[uiIdx];  }
    606   Void   setEdgeLeftFirst( UInt uiIdx, Bool val )  { m_pbEdgeLeftFirst[uiIdx] = val;   }
    607 
    608   Bool*  getEdgePartition( UInt uiIdx )            { return &m_pbEdgePartition[uiIdx * 16]; }
    609 
    610   Void   reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion );
    611562#endif
    612563#if H_3D_DIM_SDC
     
    704655  Bool          hasEqualMotion              ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx );
    705656
    706 #if ETRIKHU_MERGE_REUSE_F0093
     657#if H_3D
    707658  Bool          getAvailableFlagA1() { return m_bAvailableFlagA1;}
    708659  Bool          getAvailableFlagB1() { return m_bAvailableFlagB1;}
     
    720671                                            , InheritedVSPDisInfo*  inheritedVSPDisInfo
    721672#endif
    722 #if MTK_SPIVMP_F0110
     673#if H_3D_SPIVMP
    723674                                            , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    724675#endif
     
    729680  inline Void   xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount,  InheritedVSPDisInfo*  inheritedVSPDisInfo);
    730681
    731 #if MTK_SPIVMP_F0110
     682#if H_3D_SPIVMP
    732683  Bool*         getSPIVMPFlag        ()                        { return m_pbSPIVMPFlag;          }
    733684  Bool          getSPIVMPFlag        ( UInt uiIdx )            { return m_pbSPIVMPFlag[uiIdx];   }
     
    753704  Bool          isBipredRestriction( UInt puIdx );
    754705
    755 #if LGE_IC_CTX_F0160
     706#if H_3D_IC
    756707  Bool          isIC      ( UInt uiPartIdx );
    757708#endif
  • trunk/source/Lib/TLibCommon/TComMotionInfo.cpp

    r724 r773  
    4040#include "assert.h"
    4141#include <stdlib.h>
    42 #if MTK_SPIVMP_F0110
     42#if H_3D_SPIVMP
    4343#include "TComDataCU.h"
    4444#include "TComPic.h"
     
    328328}
    329329
    330 #if MTK_SPIVMP_F0110
     330#if H_3D_SPIVMP
    331331Void TComCUMvField::setMvFieldSP( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  )
    332332{
  • trunk/source/Lib/TLibCommon/TComMotionInfo.h

    r724 r773  
    5050// ====================================================================================================================
    5151
    52 #if MTK_SPIVMP_F0110
     52#if H_3D_SPIVMP
    5353class TComDataCU;
    5454#endif
     
    173173  Void    setAllRefIdx ( Int iRefIdx,                 PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 );
    174174  Void    setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 );
    175 #if MTK_SPIVMP_F0110
     175#if H_3D_SPIVMP
    176176  Void    setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  );
    177177#endif
  • trunk/source/Lib/TLibCommon/TComPrediction.cpp

    r758 r773  
    425425  Bool dimDeltaDC = isDimDeltaDC( uiIntraMode );   
    426426  Bool isDmmMode  = (dimType <  DMM_NUM_TYPE);
    427 #if !SEC_DMM3_RBC_F0147
    428   Bool isRbcMode  = (dimType == RBC_IDX);
    429 #endif
    430427
    431428  Bool* biSegPattern  = NULL;
     
    443440        dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
    444441      } break;
    445 #if !SEC_DMM3_RBC_F0147
    446     case( DMM3_IDX ):
    447       {
    448         UInt uiTabIdx = 0;
    449         if( bFastEnc ) { uiTabIdx = pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ); }
    450         else
    451         {
    452           uiTabIdx = xPredWedgeFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, pcCU->getDmm3IntraTabIdx( uiAbsPartIdx ) );
    453           pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, uiAbsPartIdx, (pcCU->getDepth(0) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1)) );
    454         }
    455         dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ uiTabIdx ]);
    456       } break;
    457 #endif
    458442    case( DMM4_IDX ):
    459443      {
     
    468452  }
    469453#endif
    470 #if H_3D_DIM_RBC
    471   if( isRbcMode )
    472   {
    473     biSegPattern  = pcCU->getEdgePartition( uiAbsPartIdx );
    474     patternStride = iWidth;
    475   }
    476 #endif
    477454
    478455  // get predicted partition values
    479456  assert( biSegPattern );
    480457  Int* piMask = NULL;
    481 #if QC_DIM_DELTADC_UNIFY_F0132 || HHI_DIM_PREDSAMP_FIX_F0171
    482458  piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering
    483 #else
    484   if( isDmmMode ) piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering for DMM
    485   else            piMask = pcCU->getPattern()->getPredictorPtr( 0, g_aucConvertToBit[ iWidth ] + 2, m_piYuvExt );
    486 #endif
    487459  assert( piMask );
    488460  Int maskStride = 2*iWidth + 1; 
     
    499471    Pel deltaDC2 = pcCU->getDimDeltaDC( dimType, 1, uiAbsPartIdx );
    500472#if H_3D_DIM_DMM
    501 #if QC_DIM_DELTADC_UNIFY_F0132 && !SEC_DMM3_RBC_F0147
    502     if( isDmmMode || isRbcMode)
    503 #else
    504473    if( isDmmMode )
    505 #endif
    506474    {
    507475#if H_3D_DIM_DLT
    508 #if DLT_DIFF_CODING_IN_PPS
    509476      segDC1 = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 );
    510477      segDC2 = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 );
    511478#else
    512       segDC1 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 );
    513       segDC2 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 );
    514 #endif
    515 #else
    516479      segDC1 = ClipY( predDC1 + deltaDC1 );
    517480      segDC2 = ClipY( predDC2 + deltaDC2 );
    518481#endif
    519     }
    520 #endif
    521 #if H_3D_DIM_RBC && !QC_DIM_DELTADC_UNIFY_F0132
    522     if( isRbcMode )
    523     {
    524       xDeltaDCQuantScaleUp( pcCU, deltaDC1 );
    525       xDeltaDCQuantScaleUp( pcCU, deltaDC2 );
    526       segDC1 = ClipY( predDC1 + deltaDC1 );
    527       segDC2 = ClipY( predDC2 + deltaDC2 );
    528482    }
    529483#endif
     
    566520}
    567521
    568 #if MTK_SPIVMP_F0110
     522#if H_3D_SPIVMP
    569523Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr )
    570524{
     
    677631      else
    678632      {
    679 #if MTK_SPIVMP_F0110
     633#if H_3D_SPIVMP
    680634        if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
    681635        {
     
    717671            xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    718672          }
    719 #if MTK_SPIVMP_F0110
     673#if H_3D_SPIVMP
    720674        }
    721675#endif
     
    763717      else
    764718      {
    765 #if MTK_SPIVMP_F0110
     719#if H_3D_SPIVMP
    766720       if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
    767721      {
     
    802756          xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    803757        }
    804 #if MTK_SPIVMP_F0110
     758#if H_3D_SPIVMP
    805759       }
    806760#endif
     
    830784  pcCU->clipMv(cMv);
    831785#if H_3D_ARP
    832 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
    833786  if(pcCU->getARPW( uiPartAddr ) > 0  && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC())
    834787  {
    835       xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi );
     788    xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi );
    836789  }
    837790  else
    838 #endif
    839   if(  pcCU->getARPW( uiPartAddr ) > 0
    840     && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N
    841     && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC()
    842     )
    843   {
    844     xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );
    845   }
    846   else
    847   {
     791  {
     792    if(  pcCU->getARPW( uiPartAddr ) > 0
     793      && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N
     794      && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC()
     795      )
     796    {
     797      xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );
     798    }
     799    else
     800    {
    848801#endif
    849802#if H_3D_IC
    850     Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() );
    851     xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
     803      Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() );
     804      xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
    852805#if H_3D_ARP
    853       , false
    854 #endif
    855       , bICFlag );
    856     bICFlag = bICFlag && (iWidth > 8);
    857     xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
     806        , false
     807#endif
     808        , bICFlag );
     809      bICFlag = bICFlag && (iWidth > 8);
     810      xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
    858811#if H_3D_ARP
    859       , false
    860 #endif
    861       , bICFlag );
     812        , false
     813#endif
     814        , bICFlag );
    862815#else
    863   xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
    864   xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
     816      xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
     817      xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
    865818#endif
    866819#if H_3D_ARP
     820    }
    867821  }
    868822#endif
     
    918872  pcBaseViewDepthPicYuv->extendPicBorder();
    919873
    920 #if MTK_F0109_LG_F0120_VSP_BLOCK
    921874  Int vspSize=0;
    922875  xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize );
     
    924877  xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
    925878  xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
    926 #else
    927   xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp );
    928   // sub-PU based compensation
    929   xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    930   xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    931 #endif
    932879}
    933880#endif
     
    959906  if( cDistparity.bDV )
    960907  {
    961 #if SHARP_ARP_REF_CHECK_F0105
    962908    Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList);
    963909    if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() )
    964 #else
    965     if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC() )
    966 #endif
    967910    {
    968911      bTobeScaled = true;
     
    971914    pcPicYuvBaseCol =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(),                              cDistparity.m_aVIdxCan );
    972915
    973 #if SHARP_ARP_REF_CHECK_F0105
    974916    pcPicYuvBaseRef =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan );
    975917
    976918    if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan))
    977 #else
    978     pcPicYuvBaseRef =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC(), cDistparity.m_aVIdxCan );
    979    
    980     if( ( !pcPicYuvBaseCol || pcPicYuvBaseCol->getPOC() != pcCU->getSlice()->getPOC() ) || ( !pcPicYuvBaseRef || pcPicYuvBaseRef->getPOC() != pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ) )
    981 #endif
    982919    {
    983920      dW = 0;
     
    986923    else
    987924    {
    988 #if SHARP_ARP_REF_CHECK_F0105
    989925      assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() );
    990 #else
    991       assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() );
    992 #endif
    993926    }
    994927
     
    1039972  }
    1040973}
    1041 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
    1042974Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
    1043975{
     
    1061993
    1062994  assert(dW > 0);
    1063 #if SHARP_ARP_REF_CHECK_F0105
    1064995  if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex()))
    1065996  {
    1066997    dW = 0;
    1067998  }
    1068 #endif
    1069999  Int uiLCUAddr,uiAbsPartAddr;
    10701000  Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2  + ((cDMv.getHor() + 2)>>2);
     
    11441074  }
    11451075}
    1146 #endif
    11471076
    11481077#endif
     
    18041733#if H_3D_VSP
    18051734// not fully support iRatioTxtPerDepth* != 1
    1806 #if MTK_F0109_LG_F0120_VSP_BLOCK
    18071735Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
    1808 #else
    1809 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
    1810 #endif
    18111736{
    18121737  Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
     
    18361761  Pel *depth = yuvDepth->getLumaAddr();
    18371762
    1838 #if !SHARP_VSP_BLOCK_IN_AMP_F0102
    1839   if( width<8 || height<8 )
    1840   { // no split
    1841     Int rightOffset = width - 1;
    1842     Int depStrideBlock = depStride * nTxtPerDepthY;
    1843     Pel *refDepthTop = refDepth;
    1844     Pel *refDepthBot = refDepthTop + (height-1)*refDepStride;
    1845 
    1846     Pel maxDepth = refDepthTop[0] > refDepthBot[0] ? refDepthTop[0] : refDepthBot[0];
    1847     if( maxDepth < refDepthTop[rightOffset] ) { maxDepth = refDepthTop[rightOffset]; }
    1848     if( maxDepth < refDepthBot[rightOffset] ) { maxDepth = refDepthBot[rightOffset]; }
    1849 
    1850     for( Int sY=0; sY<height; sY+=nTxtPerDepthY )
    1851     {
    1852       for( Int sX=0; sX<width; sX+=nTxtPerDepthX )
    1853       {
    1854         depth[sX] = maxDepth;
    1855       }
    1856       depth += depStrideBlock;
    1857     }
    1858 #if MTK_F0109_LG_F0120_VSP_BLOCK
    1859   if(width==4)
    1860     vspSize=0;
    1861   else
    1862     vspSize=1;
    1863 #endif
    1864   }
    1865   else
    1866   { // split to 4x8, or 8x4
    1867     Int blocksize    = 8;
    1868     Int subblocksize = 4;
    1869     Int depStrideBlock = depStride * blocksize;
    1870     Pel *depthTmp = NULL;
    1871     Int depStrideTmp = depStride * nTxtPerDepthY;
    1872     Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };
    1873     Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };
    1874     Pel repDepth4x8[2] = {0, 0};
    1875     Pel repDepth8x4[2] = {0, 0};
    1876 #endif
    1877 
    1878 #if !MTK_F0109_LG_F0120_VSP_BLOCK
    1879 #if SHARP_VSP_BLOCK_IN_AMP_F0102
    1880     Int blocksize    = 8;
    1881     Int subblocksize = 4;
    1882     Int depStrideBlock = depStride * blocksize;
    1883     Pel *depthTmp = NULL;
    1884     Int depStrideTmp = depStride * nTxtPerDepthY;
    1885     Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };
    1886     Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };
    1887 #endif
    1888     Int refDepStrideBlock    = refDepStride * blocksize;
    1889     Int refDepStrideSubBlock = refDepStride * subblocksize;
    1890 
    1891     refDepthTmp[0] = refDepth;
    1892     refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;
    1893     refDepthTmp[1] = refDepthTmp[2] - refDepStride;
    1894     refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;
    1895 
    1896 #if SHARP_VSP_BLOCK_IN_AMP_F0102
    1897     Int subBlockW, subBlockH;
    1898     Int blockW, blockH;
    1899     subBlockW = subBlockH = 8;
    1900     if (height % 8)
    1901     {
    1902       subBlockW = 8;
    1903       subBlockH = 4;
    1904       blockW = width;  // no further split
    1905       blockH = height; // no further split
    1906     }
    1907     else if (width % 8)
    1908     {
    1909       subBlockW = 4;
    1910       subBlockH = 8;
    1911       blockW = width;  // no further split
    1912       blockH = height; // no further split
    1913     }
    1914     else
    1915     {
    1916       blockW = blockH = 8;
    1917     }
    1918     for( Int y=0; y<height; y+=blockH )
    1919     {
    1920       for( Int x=0; x<width; x+=blockW )
    1921       {
    1922         if (blockW == 8 && blockH == 8)
    1923         {
    1924           Bool ULvsBR = false, URvsBL = false;
    1925           ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];
    1926           URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];
    1927           if( ULvsBR ^ URvsBL )
    1928           { // 4x8
    1929             subBlockW = 4;
    1930             subBlockH = 8;
    1931           }
    1932           else
    1933           {
    1934             subBlockW = 8;
    1935             subBlockH = 4;
    1936           }
    1937         }
    1938         for( Int yy=0; yy<blockH; yy+=subBlockH )
    1939         {
    1940           for( Int xx=0; xx<blockW; xx+=subBlockW )
    1941           {
    1942             Pel  maxDepthVal = 0;
    1943             Int xP0, xP1, yP0, yP1;
    1944             xP0 = x+xx;
    1945             xP1 = x+xx+subBlockW-1;
    1946             yP0 = yy;
    1947             yP1 = yy+subBlockH-1;
    1948             maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP0*refDepStride]);
    1949             maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP0*refDepStride]);
    1950             maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP1*refDepStride]);
    1951             maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP1*refDepStride]);
    1952             depthTmp = &depth[x+xx+yy*depStride];
    1953             for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY )
    1954             {
    1955               for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX )
    1956               {
    1957                 depthTmp[sX] = maxDepthVal;
    1958               }
    1959               depthTmp += depStrideTmp;
    1960             }
    1961           }
    1962         }
    1963       }
    1964       refDepthTmp[0] += refDepStrideBlock;
    1965       depth       += depStrideBlock;
    1966     }
    1967 #else // SHARP_VSP_BLOCK_IN_AMP_F0102
    1968     for( Int y=0; y<height; y+=blocksize )
    1969     {
    1970       for( Int x=0; x<width; x+=blocksize )
    1971       {
    1972         Bool ULvsBR = false, URvsBL = false;
    1973 
    1974         ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];
    1975         URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];
    1976 
    1977         if( ULvsBR ^ URvsBL )
    1978         { // 4x8
    1979           repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]];
    1980           if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] )
    1981           {
    1982             repDepth4x8[0] = refDepthTmp[3][x+offset[0]];
    1983           }
    1984           if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] )
    1985           {
    1986             repDepth4x8[0] = refDepthTmp[3][x+offset[1]];
    1987           }
    1988           repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]];
    1989           if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] )
    1990           {
    1991             repDepth4x8[1] = refDepthTmp[3][x+offset[2]];
    1992           }
    1993           if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] )
    1994           {
    1995             repDepth4x8[1] = refDepthTmp[3][x+offset[3]];
    1996           }
    1997 
    1998           depthTmp = &depth[x];
    1999           for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
    2000           {
    2001             for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
    2002             {
    2003               depthTmp[sX] = repDepth4x8[0];
    2004             }
    2005             depthTmp += depStrideTmp;
    2006           }
    2007           depthTmp = &depth[x+subblocksize];
    2008           for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
    2009           {
    2010             for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
    2011             {
    2012               depthTmp[sX] = repDepth4x8[1];
    2013             }
    2014             depthTmp += depStrideTmp;
    2015           }
    2016         }
    2017         else
    2018         { // 8x4
    2019           repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]];
    2020           if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] )
    2021           {
    2022             repDepth8x4[0] = refDepthTmp[1][x+offset[0]];
    2023           }
    2024           if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] )
    2025           {
    2026             repDepth8x4[0] = refDepthTmp[1][x+offset[3]];
    2027           }
    2028           repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]];
    2029           if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] )
    2030           {
    2031             repDepth8x4[1] = refDepthTmp[3][x+offset[0]];
    2032           }
    2033           if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] )
    2034           {
    2035             repDepth8x4[1] = refDepthTmp[3][x+offset[3]];
    2036           }
    2037          
    2038           depthTmp = &depth[x];
    2039           for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
    2040           {
    2041             for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
    2042             {
    2043               depthTmp[sX] = repDepth8x4[0];
    2044             }
    2045             depthTmp += depStrideTmp;
    2046           }
    2047           for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
    2048           {
    2049             for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
    2050             {
    2051               depthTmp[sX] = repDepth8x4[1];
    2052             }
    2053             depthTmp += depStrideTmp;
    2054           }
    2055         }
    2056       }
    2057       refDepthTmp[0] += refDepStrideBlock;
    2058       refDepthTmp[1] += refDepStrideBlock;
    2059       refDepthTmp[2] += refDepStrideBlock;
    2060       refDepthTmp[3] += refDepStrideBlock;
    2061       depth       += depStrideBlock;
    2062     }
    2063 #endif // SHARP_VSP_BLOCK_IN_AMP_F0102
    2064 #else
    2065 #if SHARP_VSP_BLOCK_IN_AMP_F0102
    20661763  if ((height % 8))
    20671764  {
     
    21151812      }
    21161813    }
    2117   }
    2118 #else // SHARP_VSP_BLOCK_IN_AMP_F0102
    2119     Int refDepStrideBlock    = refDepStride * height;
    2120     Int refDepStrideSubBlock = refDepStride * height/2;
    2121     refDepthTmp[0] = refDepth;
    2122     refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;
    2123     refDepthTmp[1] = refDepthTmp[2] - refDepStride;
    2124     refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;
    2125     offset[3] = width-1;
    2126     Bool ULvsBR = false, URvsBL = false;
    2127     ULvsBR = refDepthTmp[0][0+offset[0]] < refDepthTmp[3][0+offset[3]];
    2128     URvsBL = refDepthTmp[0][0+offset[3]] < refDepthTmp[3][0+offset[0]];
    2129     refDepStrideBlock    = refDepStride * blocksize;
    2130     refDepStrideSubBlock = refDepStride * subblocksize;
    2131     refDepthTmp[0] = refDepth;
    2132     refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;
    2133     refDepthTmp[1] = refDepthTmp[2] - refDepStride;
    2134     refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;
    2135     offset[3] = blocksize-1;
    2136     if( ULvsBR ^ URvsBL )
    2137     {
    2138     vspSize = 0;//4x8
    2139     for( Int y=0; y<height; y+=blocksize )
    2140     {
    2141       for( Int x=0; x<width; x+=blocksize )
    2142       {
    2143         { // 4x8
    2144           repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]];
    2145           if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] )
    2146           {
    2147             repDepth4x8[0] = refDepthTmp[3][x+offset[0]];
    2148           }
    2149           if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] )
    2150           {
    2151             repDepth4x8[0] = refDepthTmp[3][x+offset[1]];
    2152           }
    2153           repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]];
    2154           if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] )
    2155           {
    2156             repDepth4x8[1] = refDepthTmp[3][x+offset[2]];
    2157           }
    2158           if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] )
    2159           {
    2160             repDepth4x8[1] = refDepthTmp[3][x+offset[3]];
    2161   }
    2162 
    2163           depthTmp = &depth[x];
    2164           for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
    2165           {
    2166             for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
    2167             {
    2168               depthTmp[sX] = repDepth4x8[0];
    2169             }
    2170             depthTmp += depStrideTmp;
    2171           }
    2172           depthTmp = &depth[x+subblocksize];
    2173           for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
    2174           {
    2175             for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
    2176             {
    2177               depthTmp[sX] = repDepth4x8[1];
    2178             }
    2179             depthTmp += depStrideTmp;
    2180           }
    2181         }
    2182       }
    2183       refDepthTmp[0] += refDepStrideBlock;
    2184       refDepthTmp[1] += refDepStrideBlock;
    2185       refDepthTmp[2] += refDepStrideBlock;
    2186       refDepthTmp[3] += refDepStrideBlock;
    2187       depth       += depStrideBlock;
    2188     }
    2189   }
    2190   else
    2191   { // 8x4
    2192     vspSize = 1;
    2193     for( Int y=0; y<height; y+=blocksize )
    2194     {
    2195       for( Int x=0; x<width; x+=blocksize )
    2196       {
    2197         repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]];
    2198         if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] )
    2199         {
    2200           repDepth8x4[0] = refDepthTmp[1][x+offset[0]];
    2201         }
    2202         if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] )
    2203         {
    2204           repDepth8x4[0] = refDepthTmp[1][x+offset[3]];
    2205         }
    2206         repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]];
    2207         if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] )
    2208         {
    2209           repDepth8x4[1] = refDepthTmp[3][x+offset[0]];
    2210         }
    2211         if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] )
    2212         {
    2213           repDepth8x4[1] = refDepthTmp[3][x+offset[3]];
    2214         }
    2215 
    2216         depthTmp = &depth[x];
    2217         for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
    2218         {
    2219           for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
    2220           {
    2221             depthTmp[sX] = repDepth8x4[0];
    2222           }
    2223           depthTmp += depStrideTmp;
    2224         }
    2225         for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
    2226         {
    2227           for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
    2228           {
    2229             depthTmp[sX] = repDepth8x4[1];
    2230           }
    2231           depthTmp += depStrideTmp;
    2232 }
    2233       }
    2234       refDepthTmp[0] += refDepStrideBlock;
    2235       refDepthTmp[1] += refDepStrideBlock;
    2236       refDepthTmp[2] += refDepStrideBlock;
    2237       refDepthTmp[3] += refDepStrideBlock;
    2238       depth       += depStrideBlock;
    2239     }
    2240   }
    2241 #endif   
    2242 #endif
    2243 #if !SHARP_VSP_BLOCK_IN_AMP_F0102
    2244   }
    2245 #endif
    2246 
    2247 
    2248 }
    2249 #if MTK_F0109_LG_F0120_VSP_BLOCK
     1814  }   
     1815}
     1816
    22501817Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize)
    2251 #else
    2252 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )
    2253 #endif
    22541818{
    22551819  Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
    22561820  Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE;
    22571821 
    2258 #if MTK_F0109_LG_F0120_VSP_BLOCK
    22591822  nTxtPerDepthX = nTxtPerDepthX << vspSize;
    22601823  nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
    2261 #endif
     1824
    22621825  Int refStride = picRef->getStride();
    22631826  Int dstStride = yuvDst->getStride();
     
    23651928}
    23661929
    2367 #if MTK_F0109_LG_F0120_VSP_BLOCK
    23681930Void TComPrediction::xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize)
    2369 #else
    2370 Void TComPrediction::xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )
    2371 #endif
    23721931{
    23731932#if (H_3D_VSP_BLOCKSIZE==1)
     
    23791938#endif
    23801939
    2381 #if MTK_F0109_LG_F0120_VSP_BLOCK
    23821940  nTxtPerDepthX = nTxtPerDepthX << vspSize;
    23831941  nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
    2384 #endif
     1942
    23851943  Int refStride = picRef->getCStride();
    23861944  Int dstStride = yuvDst->getCStride();
     
    25642122
    25652123#if H_3D_DIM_DMM
    2566 #if !SEC_DMM3_RBC_F0147
    2567 UInt TComPrediction::xPredWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx )
    2568 {
    2569   TComPic*      pcPicTex = pcCU->getSlice()->getTexturePic();
    2570   assert( pcPicTex != NULL );
    2571   TComDataCU*   pcColTexCU = pcPicTex->getCU(pcCU->getAddr());
    2572   UInt          uiTexPartIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    2573   Int           uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255;
    2574 
    2575   assert( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 );
    2576   return g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]][uiColTexIntraDir-2].at(intraTabIdx);
    2577 }
    2578 #endif
    25792124
    25802125Void TComPrediction::xPredContourFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge )
     
    26282173#endif
    26292174
    2630 #if H_3D_DIM_RBC
    2631 Void TComPrediction::xDeltaDCQuantScaleUp( TComDataCU* pcCU, Pel& rDeltaDC )
    2632 {
    2633   Int  iSign  = rDeltaDC < 0 ? -1 : 1;
    2634   UInt uiAbs  = abs( rDeltaDC );
    2635 
    2636   Int iQp = pcCU->getQP(0);
    2637   Double dMax = (Double)( 1<<( g_bitDepthY - 1 ) );
    2638   Double dStepSize = Clip3( 1.0, dMax, pow( 2.0, iQp/10.0 - 2.0 ) );
    2639 
    2640   rDeltaDC = iSign * roftoi( uiAbs * dStepSize );
    2641   return;
    2642 }
    2643 
    2644 Void TComPrediction::xDeltaDCQuantScaleDown( TComDataCU*  pcCU, Pel& rDeltaDC )
    2645 {
    2646   Int  iSign  = rDeltaDC < 0 ? -1 : 1;
    2647   UInt uiAbs  = abs( rDeltaDC );
    2648 
    2649   Int iQp = pcCU->getQP(0);
    2650   Double dMax = (Double)( 1<<( g_bitDepthY - 1 ) );
    2651   Double dStepSize = Clip3( 1.0, dMax, pow( 2.0, iQp/10.0 - 2.0 ) );
    2652 
    2653   rDeltaDC = iSign * roftoi( uiAbs / dStepSize );
    2654   return;
    2655 }
    2656 #endif
     2175
    26572176#if H_3D_DIM_SDC
    26582177Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride
  • trunk/source/Lib/TLibCommon/TComPrediction.h

    r724 r773  
    9393#if H_3D_ARP
    9494  Void xPredInterUniARP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL );
    95 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
    9695  Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL );
    97 #endif
    9896#endif
    9997  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false          );
     
    123121
    124122#if H_3D_VSP
    125 #if MTK_F0109_LG_F0120_VSP_BLOCK
    126123  Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 );
    127124  Void xPredInterLumaBlkFromDM    ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);
    128125  Void xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);
    129 #else
    130   Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int txtPerDepthX=1, Int txtPerDepthY=1 );
    131   Void xPredInterLumaBlkFromDM    ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );
    132   Void xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );
    133 #endif
    134126#endif
    135127
     
    142134  Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight );
    143135  Bool xCheckIdenticalMotion    ( TComDataCU* pcCU, UInt PartAddr);
    144 #if MTK_SPIVMP_F0110
     136#if H_3D_SPIVMP
    145137  Bool xCheckTwoSPMotion ( TComDataCU* pcCU, UInt PartAddr0, UInt PartAddr1 );
    146138  Void xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr );
     
    154146  Void xPredContourFromTex      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge );
    155147  Void xCopyTextureLumaBlock    ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piDestBlockY, UInt uiWidth, UInt uiHeight );
    156 #endif
    157 #if H_3D_DIM_RBC
    158   Void xDeltaDCQuantScaleUp     ( TComDataCU* pcCU, Pel& rDeltaDC );
    159   Void xDeltaDCQuantScaleDown   ( TComDataCU* pcCU, Pel& rDeltaDC );
    160148#endif
    161149#endif
  • trunk/source/Lib/TLibCommon/TComRom.cpp

    r738 r773  
    573573#if H_MV_ENC_DEC_TRAC
    574574#if ENC_DEC_TRACE
    575 #if H_MV_FIX_TRACE_FILE
    576575Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt )
    577 #else
    578 Void writeToTraceFile( Char* symbolName, Int val, Bool doIt )
    579 #endif
    580576{
    581577  if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt  )
     
    592588}
    593589
    594 #if H_MV_FIX_TRACE_FILE
    595590Void writeToTraceFile( const Char* symbolName, Bool doIt )
    596 #else
    597 Void writeToTraceFile( Char* symbolName, Bool doIt )
    598 #endif
    599591{
    600592  if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt  )
     
    612604std::vector< std::vector<TComWedgeRef>  > g_dmmWedgeRefLists;
    613605std::vector< std::vector<TComWedgeNode> > g_dmmWedgeNodeLists;
    614 #if !SEC_DMM3_RBC_F0147
    615 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3;
    616 #endif
    617606
    618607Void initWedgeLists( Bool initNodeList )
     
    733722  }
    734723
    735 #if !SEC_DMM3_RBC_F0147
    736   UInt uiThrSz = DMM3_SIMPLIFY_TR;
    737   std::vector< std::vector<UInt> > auiWdgListSz;
    738   for( Int idxM=2; idxM<=34 ; idxM++)
    739   {
    740     std::vector<UInt> auiWdgList;
    741     for( Int idxW=0; idxW<racWedgeList.size(); idxW++)
    742     {
    743       UInt uiAbsDiff = abs(idxM-(Int)racWedgeList[idxW].getAng());
    744       if( uiAbsDiff <= uiThrSz )
    745       {
    746         auiWdgList.push_back(idxW);
    747       }
    748     }
    749     auiWdgListSz.push_back(auiWdgList);
    750   }
    751   g_aauiWdgLstM3.push_back(auiWdgListSz);
    752 #endif
     724
    753725}
    754726
  • trunk/source/Lib/TLibCommon/TComRom.h

    r738 r773  
    172172extern       std::vector< std::vector<TComWedgeRef> >        g_dmmWedgeRefLists;
    173173extern       std::vector< std::vector<TComWedgeNode> >       g_dmmWedgeNodeLists;
    174 #if !SEC_DMM3_RBC_F0147
    175 extern       std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3;
    176 #endif
    177174
    178175Void initWedgeLists( Bool initNodeList = false );
     
    236233
    237234
    238 #if H_MV_FIX_TRACE_FILE
    239235 Void           writeToTraceFile( const Char* symbolName, Int val, Bool doIt );
    240236 Void           writeToTraceFile( const Char* symbolName, Bool doIt );
    241 #else
    242  Void           writeToTraceFile( Char* symbolName, Int val, Bool doIt );
    243  Void           writeToTraceFile( Char* symbolName, Bool doIt );
    244 #endif
    245237#endif
    246238#else
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r758 r773  
    110110#endif
    111111, m_pocResetFlag                  (false)
    112 #if H_MV_6_RALS_O0149_11
     112#if H_MV
    113113, m_crossLayerBlaFlag             (false)
    114114#endif
     
    753753  {       
    754754    if ( this->getNumRefIdx( RefPicList( uiRefListIdx ) ) == 0)
     755    {
    755756        continue;
    756 #if !SHARP_ARP_REF_CHECK_F0105
    757 // move the following to setARPStepNum() to define ARP related thing in ARP function.
    758 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
    759      for(Int i = 0; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ )
    760        {
    761        if ( this->getRefPic(RefPicList(uiRefListIdx), i)->getPOC() != getPOC() )
    762        {
    763          this->setFirstTRefIdx (RefPicList(uiRefListIdx), i);
    764          break;
    765        }
    766      }
    767 #endif
    768 #endif
     757    }
    769758    Bool bZeroIdxLtFlag = this->getRefPic(RefPicList(uiRefListIdx), 0)->getIsLongTerm();
    770759    for(Int i = 1; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ )
     
    782771Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset )
    783772
    784 #if CAM_HLS_F0136_F0045_F0082
    785773  if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) )
    786 #else
    787   if( m_pcSPS->hasCamParInSliceHeader() )
    788 #endif
    789774  {   
    790775    for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < m_viewIndex; uiBaseViewIndex++ )
     
    17161701, m_hrdOpSetIdx               (NULL)
    17171702, m_cprmsPresentFlag          (NULL)
    1718 #if H_MV_6_HRD_O0217_13
     1703#if H_MV
    17191704, m_dpbSize                   (NULL)
    1720 #endif
    1721 #if H_MV
    17221705, m_vpsVUI                 (  NULL )
    17231706#endif
     
    17341717    for( Int layerId = 0; layerId < MAX_VPS_NUH_LAYER_ID_PLUS1; layerId++ )
    17351718    {
    1736 #if H_MV_6_HRD_O0217_13
    17371719      m_layerIdIncludedFlag[lsIdx][layerId] = (( lsIdx == 0 ) && ( layerId == 0 )) ;
    1738 #else
    1739       m_layerIdIncludedFlag[lsIdx][layerId] = false;
    1740 #endif
    17411720    }
    17421721  }
     
    17521731  m_moreOutputLayerSetsThanDefaultFlag = false;   
    17531732  m_numAddOutputLayerSetsMinus1        = -1;   
    1754 #if H_MV_6_PS_0109_25
    17551733  m_defaultOneTargetOutputLayerIdc     = 0;
    1756 #else
    1757   m_defaultOneTargetOutputLayerFlag    = false;
    1758 #endif
    17591734 
    17601735  for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++)
     
    17671742    }
    17681743  }
    1769 #if H_MV_6_GEN_0153_28
    17701744  m_altOutputLayerFlag       = false;
    1771 #endif
    17721745  m_maxOneActiveRefLayerFlag = false;
    17731746  m_directDepTypeLenMinus2   = 0;         
     
    18061779    m_layerIdInNuh      [i] = ( i == 0 ) ? 0 : -1;
    18071780    m_numDirectRefLayers[i] = 0;
    1808 #if !H_MV_6_ILDDS_O0225_30
    1809     m_maxTidIlRefPicPlus1[i] = 7;
    1810 #endif
    18111781    m_vpsRepFormatIdx    [i] = 0;
    1812 #if H_MV_6_MISC_O0062_31
    18131782    m_pocLsbNotPresentFlag[i] = 0;
    1814 #endif
    18151783    m_repFormat          [i] = NULL;
    18161784    m_viewIdVal          [i] = 0;
     
    18191787    m_viewIndex         [i] = -1;
    18201788    m_vpsDepthModesFlag [i] = false;
    1821 #if H_3D_DIM_DLT
    1822 #if !DLT_DIFF_CODING_IN_PPS
    1823     m_bUseDLTFlag         [i] = false;
    1824    
    1825     // allocate some memory and initialize with default mapping
    1826     m_iNumDepthmapValues[i] = ((1 << g_bitDepthY)-1)+1;
    1827     m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]);
    1828    
    1829     m_iDepthValue2Idx[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
    1830     m_iIdx2DepthValue[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
    1831    
    1832     //default mapping
    1833     for (Int d=0; d<m_iNumDepthmapValues[i]; d++)
    1834     {
    1835       m_iDepthValue2Idx[i][d] = d;
    1836       m_iIdx2DepthValue[i][d] = d;
    1837     }
    1838 #endif
    1839 #endif
    1840 #if H_3D
    18411789    m_ivMvScalingFlag = true;
    1842 #endif
    18431790#endif
    18441791
     
    18481795      m_directDependencyType[i][j] = -1;
    18491796      m_refLayerId[i][j]           = -1;
    1850 #if H_MV_6_ILDDS_O0225_30     
    18511797      m_maxTidIlRefPicsPlus1[i][j]  = 7;
    1852 #endif
    18531798    }
    18541799
     
    18631808  }
    18641809  m_vpsVUI = new TComVPSVUI;
    1865 #if H_MV_6_HRD_O0217_13
    18661810  m_dpbSize = new TComDpbSize;
    1867 #endif
    1868 #
     1811
    18691812#if H_3D
    18701813  for( Int i = 0; i < MAX_NUM_LAYERS; i++ )
     
    18721815#if H_3D_IV_MERGE
    18731816    m_ivMvPredFlag         [ i ] = false;
    1874 #if MTK_SPIVMP_F0110
     1817#if H_3D_SPIVMP
    18751818    m_iSubPULog2Size       [ i ] = 0;
    18761819#endif
     
    18851828    m_bInterSDCFlag        [ i ] = false;
    18861829#endif
    1887 #if SEC_MPI_ENABLING_MERGE_F0150
     1830#if H_3D_IV_MERGE
    18881831    m_bMPIFlag             [ i ] = false;
    18891832#endif
     
    18951838TComVPS::~TComVPS()
    18961839{
    1897 if( m_hrdParameters    != NULL )     delete[] m_hrdParameters;
     1840  if( m_hrdParameters    != NULL )     delete[] m_hrdParameters;
    18981841  if( m_hrdOpSetIdx      != NULL )     delete[] m_hrdOpSetIdx;
    18991842  if( m_cprmsPresentFlag != NULL )     delete[] m_cprmsPresentFlag;
    19001843#if H_MV
    19011844  if ( m_vpsVUI          != NULL )     delete m_vpsVUI;
    1902 #if H_MV_6_HRD_O0217_13
    19031845  if ( m_dpbSize         != NULL )     delete m_dpbSize;
    1904 #endif
    19051846
    19061847  for( Int i = 0; i < MAX_NUM_LAYERS; i++ )
    19071848  {
    19081849    if (m_repFormat[ i ] != NULL )      delete m_repFormat[ i ];   
    1909 #if H_3D_DIM_DLT
    1910 #if !DLT_DIFF_CODING_IN_PPS
    1911     if ( m_iDepthValue2Idx[i] != 0 )
    1912     {
    1913        xFree( m_iDepthValue2Idx[i] );
    1914        m_iDepthValue2Idx[i] = 0;
    1915     }
    1916 
    1917     if ( m_iIdx2DepthValue[i] != 0 )
    1918     {
    1919       xFree( m_iIdx2DepthValue[i] );
    1920       m_iIdx2DepthValue[i] = 0;
    1921     }
    1922 #endif
    1923 #endif
    1924   }
    1925 #endif
    1926 #if CAM_HLS_F0136_F0045_F0082
     1850  }
     1851#endif
     1852#if H_3D
    19271853  deleteCamPars();
    19281854#endif
    19291855}
    1930 
    1931 #if H_3D_DIM_DLT
    1932 #if !DLT_DIFF_CODING_IN_PPS
    1933   Void TComVPS::setDepthLUTs(Int layerIdInVps, Int* idxToDepthValueTable, Int iNumDepthValues)
    1934   {
    1935     if( idxToDepthValueTable == NULL || iNumDepthValues == 0 ) // default mapping only
    1936       return;
    1937    
    1938     // copy idx2DepthValue to internal array
    1939     memcpy(m_iIdx2DepthValue[layerIdInVps], idxToDepthValueTable, iNumDepthValues*sizeof(UInt));
    1940    
    1941     UInt uiMaxDepthValue = ((1 << g_bitDepthY)-1);
    1942     for(Int p=0; p<=uiMaxDepthValue; p++)
    1943     {
    1944       Int iIdxDown    = 0;
    1945       Int iIdxUp      = iNumDepthValues-1;
    1946       Bool bFound     = false;
    1947      
    1948       // iterate over indices to find lower closest depth
    1949       Int i = 1;
    1950       while(!bFound && i<iNumDepthValues)
    1951       {
    1952         if( m_iIdx2DepthValue[layerIdInVps][i] > p )
    1953         {
    1954           iIdxDown  = i-1;
    1955           bFound    = true;
    1956         }
    1957        
    1958         i++;
    1959       }
    1960       // iterate over indices to find upper closest depth
    1961       i = iNumDepthValues-2;
    1962       bFound = false;
    1963       while(!bFound && i>=0)
    1964       {
    1965         if( m_iIdx2DepthValue[layerIdInVps][i] < p )
    1966         {
    1967           iIdxUp  = i+1;
    1968           bFound    = true;
    1969         }
    1970        
    1971         i--;
    1972       }
    1973      
    1974       // assert monotony
    1975       assert(iIdxDown<=iIdxUp);
    1976      
    1977       // assign closer depth value/idx
    1978       if( abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxDown]) < abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxUp]) )
    1979       {
    1980         m_iDepthValue2Idx[layerIdInVps][p] = iIdxDown;
    1981       }
    1982       else
    1983       {
    1984         m_iDepthValue2Idx[layerIdInVps][p] = iIdxUp;
    1985       }
    1986      
    1987     }
    1988    
    1989     // update DLT variables
    1990     m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues;
    1991     m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);
    1992   }
    1993 #endif
    1994 #endif
    19951856
    19961857#if H_MV
     
    20791940  return foundLayerIdinNuh;
    20801941}
    2081 #if CAM_HLS_F0136_F0045_F0082
     1942
    20821943Void TComVPS::createCamPars(Int iNumViews)
    20831944{
     
    21682029  }
    21692030}
    2170 #endif // CAM_HLS_F0136_F0045_F0082
    21712031
    21722032#endif // H_3D
     
    22042064  assert( lsIdx >= 0 );
    22052065  assert( lsIdx <= getVpsNumLayerSetsMinus1() );
    2206 #if H_MV_6_HRD_O0217_13
    22072066  return (Int) m_layerSetLayerIdList[ lsIdx ].size();
    2208 #else
    2209   Int numLayersInIdList = 0;
    2210   for (Int layerId = 0; layerId < getVpsMaxLayerId(); layerId++ )
    2211   {
    2212     numLayersInIdList += ( getLayerIdIncludedFlag( lsIdx, layerId ) );
    2213   }
    2214   return numLayersInIdList;
    2215 #endif
    2216 }
    2217 
    2218 #if H_MV_6_HRD_O0217_13
     2067}
     2068
    22192069Int    TComVPS::getNumOutputLayerSets()
    22202070{
     
    22262076  return numOutputLayerSets;
    22272077}
    2228 #endif
    22292078
    22302079Int TComVPS::getNumViews()
     
    22582107}
    22592108
    2260 #if H_MV_6_HRD_O0217_13
    22612109Void TComVPS::deriveLayerSetLayerIdList()
    22622110{
     
    22942142  }
    22952143}
    2296 #endif
    22972144#endif // H_MV
    22982145
     
    23492196, m_spsScalingListRefLayerId  ( 0 )
    23502197
    2351 #if !H_MV_6_PS_REP_FORM_18_19_20
    2352 , m_updateRepFormatFlag       ( true )
    2353 #else
    23542198, m_updateRepFormatFlag       ( false )
    23552199, m_spsRepFormatIdx           ( 0 )
    2356 #endif
    23572200, m_interViewMvVertConstraintFlag (false)
    23582201#endif
     
    23702213  ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps));
    23712214  ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag));
    2372 #if H_MV_6_PSEM_O0142_3
     2215#if H_MV
    23732216  m_spsExtensionFlag = false;
    23742217  for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )
     
    23762219    m_spsExtensionTypeFlag[ i ] = false;
    23772220  }
    2378 #endif
    2379 #if H_MV_6_SHVC_O0098_36
    23802221  m_numScaledRefLayerOffsets = 0;
    23812222
     
    25482389, m_ppsInferScalingListFlag(false)
    25492390, m_ppsScalingListRefLayerId(0)
    2550 #if DLT_DIFF_CODING_IN_PPS
     2391#if H_3D
    25512392, m_pcDLT(NULL)
    25522393#endif
     
    25712412}
    25722413
    2573 #if DLT_DIFF_CODING_IN_PPS
     2414#if H_3D
    25742415TComDLT::TComDLT()
    25752416: m_bDltPresentFlag(false)
     
    27532594  if ( layerIdCurr > 0 )
    27542595  {
    2755 #if H_MV_6_PS_REP_FORM_18_19_20
    27562596    Int            repFormatIdx = getUpdateRepFormatFlag() ?  getSpsRepFormatIdx() : vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ;
    27572597    TComRepFormat* repFormat    = vps->getRepFormat( repFormatIdx );
    2758 #else
    2759     TComRepFormat* repFormat = vps->getRepFormat( vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) );
    2760     if ( !getUpdateRepFormatFlag() )
    2761     {       
    2762 #endif
    27632598      setChromaFormatIdc( repFormat->getChromaFormatVpsIdc() );         
    27642599      //// ToDo: add when supported:
     
    27732608      setBitDepthC             ( repFormat->getBitDepthVpsChromaMinus8() + 8 );
    27742609      setQpBDOffsetC           ( (Int) (6* ( getBitDepthC() -8 ) ) );
    2775 #if !H_MV_6_PS_REP_FORM_18_19_20
    2776     }
    2777     else
    2778 #else
    27792610    if ( getLayerId() > 0 && getUpdateRepFormatFlag() )
    2780 #endif
    27812611    {
    27822612      assert( getChromaFormatIdc()      <=  repFormat->getChromaFormatVpsIdc()         );
     
    28082638}
    28092639#endif
    2810 #if H_3D
    2811 #if !CAM_HLS_F0136_F0045_F0082
    2812 Void
    2813 TComSPS::initCamParaSPS( UInt uiViewIndex, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
    2814 {
    2815   AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 
    2816  
    2817   m_uiCamParPrecision     = ( uiViewIndex ? uiCamParPrecision : 0 );
    2818   m_bCamParInSliceHeader  = ( uiViewIndex ? bCamParSlice  : false );
    2819   ::memset( m_aaiCodedScale,  0x00, sizeof( m_aaiCodedScale  ) );
    2820   ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) );
    2821 
    2822   if( !m_bCamParInSliceHeader )
    2823   {
    2824     for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
    2825     {
    2826       m_aaiCodedScale [ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][     uiViewIndex ];
    2827       m_aaiCodedScale [ 1 ][ uiBaseViewIndex ] = aaiScale [     uiViewIndex ][ uiBaseViewIndex ];
    2828       m_aaiCodedOffset[ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][     uiViewIndex ];
    2829       m_aaiCodedOffset[ 1 ][ uiBaseViewIndex ] = aaiOffset[     uiViewIndex ][ uiBaseViewIndex ];
    2830     }
    2831   }
    2832 }
    2833 #endif
    2834 #endif
     2640
    28352641TComReferencePictureSet::TComReferencePictureSet()
    28362642: m_numberOfPictures (0)
     
    31502956    {
    31512957      TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc );
    3152 #if H_MV_LAYER_WISE_STARTUP
    31532958      if ( pcPic )
    31542959      {
    3155 #endif
    31562960      if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() )
    31572961      {
     
    31762980      }
    31772981    }
    3178 #if H_MV_LAYER_WISE_STARTUP
    3179       }
    3180 #endif
     2982      }
    31812983  }
    31822984}
     
    32363038
    32373039
    3238 #if H_MV_6_ILDDS_ILREFPICS_27_34
    32393040Int  TComSlice::getRefLayerPicFlag( Int i )
    32403041{
     
    32793080  return numRefLayerPics;
    32803081}
    3281 #endif
    32823082
    32833083
     
    32933093  else if (getVPS()->getAllRefLayersActiveFlag() )
    32943094  {
    3295 #if H_MV_6_ILDDS_ILREFPICS_27_34
    32963095    numActiveRefLayerPics = getNumRefLayerPics();
    3297 #else
    3298     numActiveRefLayerPics = getVPS()->getNumDirectRefLayers( getLayerId() );
    3299 #endif
    33003096  }
    33013097  else if ( !getInterLayerPredEnabledFlag() )
     
    33053101  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
    33063102  {
    3307 #if H_MV_6_ILDDS_ILREFPICS_27_34
    33083103    numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0;
    3309 #else
    3310     numActiveRefLayerPics = 1;
    3311 #endif
    33123104  }
    33133105  else
     
    33243116
    33253117#if H_3D_ARP
    3326 #if SHARP_ARP_REF_CHECK_F0105
    33273118Void TComSlice::setARPStepNum( TComPicLists*ivPicLists )
    3328 #else
    3329 Void TComSlice::setARPStepNum()                                 
    3330 #endif
    3331 {
    3332 #if SHARP_ARP_REF_CHECK_F0105
     3119{
    33333120  Bool tempRefPicInListsFlag = false;
    3334 #else
    3335   Bool bAllIvRef = true;
    3336 #endif
    3337 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
    33383121  if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP())
    3339 #else
    3340   if(!getVPS()->getUseAdvRP(getLayerId()))
    3341 #endif
    33423122  {
    33433123    m_nARPStepNum = 0;
     
    33453125  else
    33463126  {
    3347 #if SHARP_ARP_REF_CHECK_F0105
    33483127    setFirstTRefIdx (REF_PIC_LIST_0, -1);
    33493128    setFirstTRefIdx (REF_PIC_LIST_1, -1);
     
    33613140    tempRefPicInListsFlag = getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0;
    33623141    m_nARPStepNum = tempRefPicInListsFlag ? getVPS()->getARPStepNum(getLayerId()) : 0;
    3363 #else
    3364     for( Int iRefListId = 0; iRefListId < 2; iRefListId++ )
    3365     {
    3366       RefPicList  eRefPicList = RefPicList( iRefListId );
    3367       Int iNumRefIdx = getNumRefIdx(eRefPicList);
    3368      
    3369       if( iNumRefIdx <= 0 )
    3370       {
    3371         continue;
    3372       }
    3373 
    3374       for ( Int i = 0; i < iNumRefIdx; i++ )
    3375       {
    3376         if( getRefPic( eRefPicList, i)->getPOC() != getPOC() )
    3377         {
    3378           bAllIvRef = false;
    3379           break;
    3380         }
    3381       }
    3382 
    3383       if( bAllIvRef == false ) { break; }
    3384     }
    3385     m_nARPStepNum = !bAllIvRef ? getVPS()->getARPStepNum(getLayerId()) : 0;
    3386 #endif
    3387   }
    3388 #if SHARP_ARP_REF_CHECK_F0105
     3142  }
     3143
    33893144  if (tempRefPicInListsFlag)
    33903145  {
     
    34073162        }
    34083163      }
    3409   }
    3410 }
    3411 #endif
     3164    }
     3165  }
    34123166}
    34133167#endif
     
    35143268#endif
    35153269
    3516 #if QC_DEPTH_IV_MRG_F0125
     3270#if H_3D_IV_MERGE
    35173271  setupLUT = setupLUT || ( getVPS()->getIvMvPredFlag(layerIdInVPS ) && getIsDepth() );
    35183272#endif
     
    35433297  assert( m_depthToDisparityF != NULL );
    35443298
    3545 #if CAM_HLS_F0136_F0045_F0082
    35463299  TComVPS* vps = getVPS();
    3547 #else
    3548   TComSPS* sps = getSPS();
    3549 #endif
    3550 
    3551 #if CAM_HLS_F0136_F0045_F0082
     3300
    35523301  Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision();
    35533302  Int viewIndex = getViewIndex();
     
    35593308  Int* invCodScale  = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( viewIndex );
    35603309  Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( viewIndex );
    3561 #else
    3562   Int log2Div = g_bitDepthY - 1 + sps->getCamParPrecision();
    3563 
    3564   Bool camParaSH = m_pcSPS->hasCamParInSliceHeader();
    3565 
    3566   Int* codScale     = camParaSH ? m_aaiCodedScale [ 0 ] : sps->getCodedScale    ();
    3567   Int* codOffset    = camParaSH ? m_aaiCodedOffset[ 0 ] : sps->getCodedOffset   ();
    3568   Int* invCodScale  = camParaSH ? m_aaiCodedScale [ 1 ] : sps->getInvCodedScale ();
    3569   Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : sps->getInvCodedOffset();
    3570 #endif
    35713310
    35723311  for (Int i = 0; i <= ( getViewIndex() - 1); i++)
     
    39253664TComVPSVUI::TComVPSVUI()
    39263665{
    3927 #if H_MV_6_PS_O0223_29
    39283666  m_crossLayerIrapAlignedFlag = true;
    3929 #endif
    39303667  m_bitRatePresentVpsFlag = false;
    39313668  m_picRatePresentVpsFlag = false;
     
    39553692    }
    39563693  }
    3957 #if H_MV_6_PS_O0118_33 
    39583694  for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ )
    39593695  {
    39603696    m_videoSignalInfo          [i] = NULL;     
    39613697  }
    3962 #endif
    3963 
    3964 #if H_MV_6_HRD_O0164_15
     3698
    39653699  m_vpsVuiBspHrdPresentFlag = false;
    39663700  m_vpsVuiBspHrdParameters  = new TComVpsVuiBspHrdParameters();
    3967 #endif
    3968 }
    3969 
    3970 #if H_MV_6_PS_O0118_33
     3701}
     3702
    39713703TComVPSVUI::~TComVPSVUI()
    39723704{
     
    39773709  }
    39783710
    3979 #if H_MV_6_HRD_O0164_15
    39803711  if ( m_vpsVuiBspHrdParameters ) delete m_vpsVuiBspHrdParameters;
    39813712  m_vpsVuiBspHrdParameters = NULL;
    3982 #endif
    3983 }
    3984 #endif
    3985 
    3986 #if H_MV_6_PS_REP_FORM_18_19_20
     3713}
     3714
    39873715Void TComRepFormat::inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag )
    39883716{
     
    40023730}
    40033731}
    4004 #endif
    4005 
    4006 #if H_MV_6_HRD_O0164_15
     3732
    40073733Void TComVpsVuiBspHrdParameters::checkLayerInBspFlag( TComVPS* vps, Int h )
    40083734{
     
    40313757  }
    40323758}
    4033 #endif
    4034 #endif
     3759
     3760Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr )
     3761{
     3762  if ( layerIdCurr == 0 || !vps->getVpsVuiPresentFlag() )
     3763  {
     3764    return;
     3765  }
     3766
     3767  TComVPSVUI* vpsVUI = vps->getVPSVUI();
     3768  assert( vpsVUI != NULL ); 
     3769
     3770  TComVideoSignalInfo* videoSignalInfo = vpsVUI->getVideoSignalInfo( vpsVUI->getVpsVideoSignalInfoIdx( vps->getLayerIdInVps( layerIdCurr ) ) );
     3771  assert( videoSignalInfo != NULL );
     3772
     3773  setVideoFormat            ( videoSignalInfo->getVideoVpsFormat            () );
     3774  setVideoFullRangeFlag     ( videoSignalInfo->getVideoFullRangeVpsFlag     () );
     3775  setColourPrimaries        ( videoSignalInfo->getColourPrimariesVps        () );
     3776  setTransferCharacteristics( videoSignalInfo->getTransferCharacteristicsVps() );
     3777  setMatrixCoefficients     ( videoSignalInfo->getMatrixCoeffsVps           () );
     3778}
     3779#endif
  • trunk/source/Lib/TLibCommon/TComSlice.h

    r758 r773  
    5353#if H_MV
    5454class TComPicLists;
     55class TComVPS;
    5556#endif
    5657// ====================================================================================================================
     
    6263// ====================================================================================================================
    6364
    64 #if H_MV_6_HRD_O0164_15
    65 class TComVPS;
    66 #endif
    6765/// Reference Picture Set class
    6866class TComReferencePictureSet
     
    407405#if H_MV
    408406
    409 #if H_MV_6_PS_O0118_33
    410407class TComVideoSignalInfo
    411408{
     
    432429  Int  getMatrixCoeffsVps(  ) { return m_matrixCoeffsVps; }
    433430};
    434 #endif
    435 #if H_MV_6_HRD_O0164_15
    436431class TComVpsVuiBspHrdParameters
    437432{
     
    473468};
    474469
    475 #endif
    476470class TComVPSVUI
    477471{
    478472private:
    479 #if H_MV_6_PS_O0223_29
    480473  Bool m_crossLayerPicTypeAlignedFlag;
    481474  Bool m_crossLayerIrapAlignedFlag;
    482 #endif
    483475  Bool m_bitRatePresentVpsFlag;
    484476  Bool m_picRatePresentVpsFlag;
     
    489481  Int  m_constantPicRateIdc          [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER];
    490482  Int  m_avgPicRate                  [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER];
    491 #if H_MV_6_O0226_37
    492483  Bool m_tilesNotInUseFlag;
    493484  Bool m_tilesInUseFlag              [MAX_NUM_LAYERS];
    494485  Bool m_loopFilterNotAcrossTilesFlag[MAX_NUM_LAYERS];
    495 #endif 
    496486  Bool m_tileBoundariesAlignedFlag   [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    497 #if H_MV_6_O0226_37
    498487  Bool m_wppNotInUseFlag;
    499488  Bool m_wppInUseFlag                [MAX_NUM_LAYERS];
    500 #endif
    501489  Bool m_ilpRestrictedRefLayersFlag;
    502490  Int  m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    503491  Bool m_ctuBasedOffsetEnabledFlag   [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    504492  Int  m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    505 #if H_MV_6_PS_O0118_33
    506493  Bool m_videoSignalInfoIdxPresentFlag;
    507494  Int  m_vpsNumVideoSignalInfoMinus1;
    508495  TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO];   
    509496  Int  m_vpsVideoSignalInfoIdx       [MAX_NUM_VIDEO_SIGNAL_INFO];
    510 #endif
    511 #if H_MV_6_HRD_O0164_15
    512497  Bool m_vpsVuiBspHrdPresentFlag;
    513498  TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters;
    514 #endif
    515499
    516500public:
    517501  TComVPSVUI();
    518502  ~TComVPSVUI();
    519 #if H_MV_6_PS_O0223_29
    520503  Void setCrossLayerPicTypeAlignedFlag( Bool flag ) { m_crossLayerPicTypeAlignedFlag = flag; }
    521504  Bool getCrossLayerPicTypeAlignedFlag(  ) { return m_crossLayerPicTypeAlignedFlag; }
     
    523506  Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; }
    524507  Bool getCrossLayerIrapAlignedFlag(  ) { return m_crossLayerIrapAlignedFlag; }
    525 #endif
    526508
    527509  Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; }
     
    549531  Int  getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; }
    550532
    551 #if H_MV_6_O0226_37
    552533  Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; }
    553534  Bool getTilesNotInUseFlag(  ) { return m_tilesNotInUseFlag; }
     
    558539  Void setLoopFilterNotAcrossTilesFlag( Int i, Int  val ) { m_loopFilterNotAcrossTilesFlag[i] = val; }
    559540  Bool getLoopFilterNotAcrossTilesFlag( Int i ) { return m_loopFilterNotAcrossTilesFlag[i]; }
    560 #endif
    561541
    562542  Void setTileBoundariesAlignedFlag( Int i, Int j, Bool flag ) { m_tileBoundariesAlignedFlag[i][j] = flag; }
    563543  Bool getTileBoundariesAlignedFlag( Int i, Int j ) { return m_tileBoundariesAlignedFlag[i][j]; }
    564544
    565 #if H_MV_6_O0226_37
    566545  Void setWppNotInUseFlag( Bool flag ) { m_wppNotInUseFlag = flag; }
    567546  Bool getWppNotInUseFlag(  ) { return m_wppNotInUseFlag; }
     
    569548  Void setWppInUseFlag( Int i, Bool flag ) { m_wppInUseFlag[i] = flag; }
    570549  Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; }
    571 #endif
    572550
    573551  Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; }
     
    583561  Int  getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; }
    584562
    585 #if H_MV_6_PS_O0118_33
    586563  Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; }
    587564  Bool getVideoSignalInfoIdxPresentFlag(  ) { return m_videoSignalInfoIdxPresentFlag; }
     
    595572  Void setVpsVideoSignalInfoIdx( Int i, Int  val ) { m_vpsVideoSignalInfoIdx[i] = val; }
    596573  Int  getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; }
    597 #endif
    598 
    599 #if H_MV_6_HRD_O0164_15
     574
    600575  Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; }
    601576  Bool getVpsVuiBspHrdPresentFlag(  ) { return m_vpsVuiBspHrdPresentFlag; }
     
    603578  Void setVpsVuiBspHrdParameters( TComVpsVuiBspHrdParameters* val) {  m_vpsVuiBspHrdParameters = val; }
    604579  TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters(  ) { return m_vpsVuiBspHrdParameters; }
    605 #endif
    606580};
    607581
     
    609583{
    610584private:
    611 #if H_MV_6_PS_REP_FORM_18_19_20
    612585  Bool m_chromaAndBitDepthVpsPresentFlag;
    613 #endif
    614586  Int  m_chromaFormatVpsIdc;
    615587  Bool m_separateColourPlaneVpsFlag;
     
    622594  TComRepFormat() { }; 
    623595
    624 #if H_MV_6_PS_REP_FORM_18_19_20
    625596  Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; }
    626597  Bool getChromaAndBitDepthVpsPresentFlag(  ) { return m_chromaAndBitDepthVpsPresentFlag; }
    627598  Void checkChromaAndBitDepthVpsPresentFlag( Int i ) { assert( i != 0 || m_chromaAndBitDepthVpsPresentFlag ); } // The value of chroma_and_bit_depth_vps_present_flag of the first rep_format( ) syntax structure in the VPS shall be equal to 1. 
    628599  Void inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag );
    629 #endif
    630600
    631601  Void setChromaFormatVpsIdc( Int  val ) { m_chromaFormatVpsIdc = val; }
     
    647617  Int  getBitDepthVpsChromaMinus8(  ) { return m_bitDepthVpsChromaMinus8; }
    648618};
    649 #endif
    650 
    651 #if H_MV_6_HRD_O0217_13
     619
     620
    652621class TComDpbSize
    653622{
     
    696665};
    697666#endif
    698 
    699667class TComVPS
    700668{
     
    748716  Int         m_dimensionId              [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 
    749717
    750 #if H_MV_6_PS_O0109_22
    751718  Int         m_viewIdLen;
    752 #else
    753   Int         m_viewIdLenMinus1;
    754 #endif
    755719  Int         m_viewIdVal                [MAX_NUM_LAYERS];
    756720  Bool        m_directDependencyFlag     [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];
    757 #if H_MV_6_ILDSD_O0120_26
    758721  Bool        m_vpsSubLayersMaxMinus1PresentFlag;
    759722  Int         m_subLayersVpsMaxMinus1    [MAX_NUM_LAYERS];
    760 #endif
    761723  Bool        m_maxTidRefPresentFlag;
    762 #if H_MV_6_ILDDS_O0225_30
    763724  Int         m_maxTidIlRefPicsPlus1     [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    764 #else
    765   Int         m_maxTidIlRefPicPlus1      [MAX_NUM_LAYERS];
    766 #endif
    767725  Bool        m_allRefLayersActiveFlag;
    768726  Int         m_vpsNumberLayerSetsMinus1;
     
    772730  Bool        m_moreOutputLayerSetsThanDefaultFlag;
    773731  Int         m_numAddOutputLayerSetsMinus1;   
    774 #if H_MV_6_PS_0109_25
    775732  Int         m_defaultOneTargetOutputLayerIdc;
    776 #else
    777   Bool        m_defaultOneTargetOutputLayerFlag;
    778 #endif
    779733  Int         m_outputLayerSetIdxMinus1  [MAX_VPS_OUTPUTLAYER_SETS]; 
    780734  Bool        m_outputLayerFlag          [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1];
    781735  Int         m_profileLevelTierIdx      [MAX_VPS_OUTPUTLAYER_SETS ];
    782 #if H_MV_6_GEN_0153_28
    783736  Bool        m_altOutputLayerFlag;
    784 #endif
    785737  Bool        m_repFormatIdxPresentFlag;
    786738  Int         m_vpsNumRepFormatsMinus1;
     
    788740  TComRepFormat* m_repFormat             [MAX_NUM_LAYERS];
    789741  Bool        m_maxOneActiveRefLayerFlag;       
    790 #if H_MV_6_MISC_O0062_31
    791742  Bool        m_pocLsbNotPresentFlag     [MAX_NUM_LAYERS];
    792 #endif
    793 
    794 #if H_MV_6_HRD_O0217_13
     743
    795744  TComDpbSize* m_dpbSize;
    796 #endif
    797 #if !H_MV_6_PS_O0223_29       
    798   Bool        m_crossLayerIrapAlignedFlag;
    799 #endif
    800745  Int         m_directDepTypeLenMinus2;         
    801 #if H_MV_6_PS_O0096_21
    802746  Bool        m_defaultDirectDependencyFlag;
    803747  Int         m_defaultDirectDependencyType;
    804 #endif
    805748  Bool        m_vpsVuiPresentFlag;
    806749  TComVPSVUI* m_vpsVUI;
     
    822765  Int         m_viewIndex                [MAX_NUM_LAYERS   ];
    823766 
    824 #if H_MV_6_HRD_O0217_13
    825767  std::vector< std::vector< Int> >       m_targetDecLayerIdLists;   //[TargetOptLayerSetIdx][i]
    826768  std::vector< std::vector< Int> >       m_targetOptLayerIdLists;
    827769  std::vector< std::vector< Int> >       m_layerSetLayerIdList;
    828 #endif
    829770
    830771
     
    838779#if H_3D_IV_MERGE
    839780  Bool        m_ivMvPredFlag             [ MAX_NUM_LAYERS ];
    840 #if MTK_SPIVMP_F0110
     781#if H_3D_SPIVMP
    841782  Int         m_iSubPULog2Size           [MAX_NUM_LAYERS   ];
    842783#endif
     
    850791  Bool        m_vpsDepthModesFlag        [MAX_NUM_LAYERS   ];
    851792
    852 #if H_3D_DIM_DLT
    853 #if !DLT_DIFF_CODING_IN_PPS
    854   Bool        m_bUseDLTFlag              [MAX_NUM_LAYERS   ];
    855  
    856   Int         m_iBitsPerDepthValue       [MAX_NUM_LAYERS   ];
    857   Int         m_iNumDepthmapValues       [MAX_NUM_LAYERS   ];
    858   Int*        m_iDepthValue2Idx          [MAX_NUM_LAYERS   ];
    859   Int*        m_iIdx2DepthValue          [MAX_NUM_LAYERS   ];
    860 #endif
    861 #endif
    862 
    863793#if H_3D
    864 #if CAM_HLS_F0136_F0045_F0082
    865794  UInt        m_uiCamParPrecision;
    866795  Bool*       m_bCamParInSliceHeader;
     
    868797  Int         ***m_aaaiCodedScale ;
    869798  Int         ***m_aaaiCodedOffset;
    870 #endif
    871799  Bool        m_ivMvScalingFlag;
    872800#endif
     
    874802  Bool        m_bInterSDCFlag[MAX_NUM_LAYERS   ];
    875803#endif
    876 #if SEC_MPI_ENABLING_MERGE_F0150
     804#if H_3D_IV_MERGE
    877805  Bool        m_bMPIFlag[MAX_NUM_LAYERS   ];
    878806#endif
     
    901829  UInt    getMaxTLayers  ()                   { return m_uiMaxTLayers;   }
    902830  Void    setMaxTLayers  (UInt t)             { m_uiMaxTLayers = t; }
    903 #if H_MV_6_HRD_O0164_15
     831
     832#if H_MV   
    904833  UInt    getMaxSubLayersMinus1()             { return m_uiMaxTLayers - 1;  }  // For consistency with draft spec
    905 #endif
    906 #if H_MV   
    907834  UInt    getMaxLayersMinus1()                { return m_uiMaxLayersMinus1;  };
    908835  Void    setMaxLayersMinus1(UInt l)          { m_uiMaxLayersMinus1 = l; }
     
    978905  Int     getDimensionId( Int layerIdInVps, Int scalIdx )                  { return m_dimensionId[layerIdInVps][scalIdx]; }
    979906
    980 #if H_MV_6_PS_O0109_22
    981907  Void    setViewIdLen( Int  val )                                         { m_viewIdLen = val; }
    982908  Int     getViewIdLen(  )                                                 { return m_viewIdLen; }
    983 #else
    984   Void    setViewIdLenMinus1( Int  val )                                   { m_viewIdLenMinus1 = val; }
    985   Int     getViewIdLenMinus1(  )                                           { return m_viewIdLenMinus1; }
    986 #endif
    987909
    988910  Void    setViewIdVal( Int viewOrderIndex, Int  val )                     { m_viewIdVal[viewOrderIndex] = val; }
     
    990912  Void    setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val;  }
    991913  Bool    getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps )           { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; }
    992 #if H_MV_6_ILDSD_O0120_26
    993914  Void    setVpsSubLayersMaxMinus1PresentFlag( Bool flag )                 { m_vpsSubLayersMaxMinus1PresentFlag = flag; }
    994915  Bool    getVpsSubLayersMaxMinus1PresentFlag(  )                          { return m_vpsSubLayersMaxMinus1PresentFlag; }
     
    996917  Int     getSubLayersVpsMaxMinus1( Int i )                                { return m_subLayersVpsMaxMinus1[i]; }
    997918  Void    checkSubLayersVpsMaxMinus1( Int i )                              { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); }
    998 #endif
    999919  Void    setMaxTidRefPresentFlag( Bool flag )                             { m_maxTidRefPresentFlag = flag; }
    1000920  Bool    getMaxTidRefPresentFlag(  )                                      { return m_maxTidRefPresentFlag; }
    1001 #if H_MV_6_ILDDS_O0225_30
    1002921  Void    setMaxTidIlRefPicsPlus1( Int i, Int j, Int  val )                { m_maxTidIlRefPicsPlus1[i][j] = val; }
    1003922  Int     getMaxTidIlRefPicsPlus1( Int i, Int j )                          { return m_maxTidIlRefPicsPlus1[i][j]; }
    1004 #else
    1005   Void    setMaxTidIlRefPicPlus1( Int layerIdInVps, Int val )              { m_maxTidIlRefPicPlus1[ layerIdInVps ] = val;  }
    1006   Int     getMaxTidIlRefPicPlus1( Int layerIdInVps )                       { return m_maxTidIlRefPicPlus1[ layerIdInVps ]; }
    1007 #endif
    1008923  Void    setAllRefLayersActiveFlag( Bool flag )                           { m_allRefLayersActiveFlag = flag; }
    1009924  Bool    getAllRefLayersActiveFlag(  )                                    { return m_allRefLayersActiveFlag; }
     
    1019934  Void    setProfileRefMinus1( Int profileTierLevelIdx, Int val )          { m_profileRefMinus1[ profileTierLevelIdx ] = val;  }
    1020935  Int     getProfileRefMinus1( Int profileTierLevelIdx )                   { return m_profileRefMinus1[ profileTierLevelIdx ]; }
    1021 #if H_MV_6_PS_O0109_23
    1022936  Void    checkProfileRefMinus1( Int i )                                   { assert( getProfileRefMinus1( i ) + 1 <= i ); };  //  The value of profile_ref_minus1[ i ] + 1 shall be less than or equal to i.
    1023 #endif
    1024937  Void    setMoreOutputLayerSetsThanDefaultFlag( Bool flag )               { m_moreOutputLayerSetsThanDefaultFlag = flag; }
    1025938  Bool    getMoreOutputLayerSetsThanDefaultFlag()                          { return m_moreOutputLayerSetsThanDefaultFlag; }
     
    1028941  Int     getNumAddOutputLayerSetsMinus1( )                                { return m_numAddOutputLayerSetsMinus1; }
    1029942 
    1030 #if H_MV_6_PS_0109_25 
    1031943  Void    setDefaultOneTargetOutputLayerIdc( Int  val )                    { m_defaultOneTargetOutputLayerIdc = val; }
    1032944  Int     getDefaultOneTargetOutputLayerIdc(  )                            { return m_defaultOneTargetOutputLayerIdc; }
    1033945  Void    checkDefaultOneTargetOutputLayerIdc( )                           { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); }
    1034 #else
    1035   Void    setDefaultOneTargetOutputLayerFlag( Bool flag )                  { m_defaultOneTargetOutputLayerFlag = flag; }
    1036   Bool    getDefaultOneTargetOutputLayerFlag( )                            { return m_defaultOneTargetOutputLayerFlag; }
    1037 #endif
    1038946 
    1039947  Void    setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val )        { m_outputLayerSetIdxMinus1[ outLayerSetIdx ]  = val; }
     
    1042950  Void    setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag )       { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; }
    1043951  Bool    getOutputLayerFlag( Int outLayerSetIdx, Int i )                  { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; }
    1044 #if H_MV_6_HRD_O0217_13
    1045952  Bool    inferOutputLayerFlag( Int layerSetIdx, Int i )                   { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1  ) ));  }
    1046 #endif
    1047953
    1048954  Void    setProfileLevelTierIdx( Int outLayerSetIdx, Int val )            { m_profileLevelTierIdx[ outLayerSetIdx  = val ]; }
    1049955  Int     getProfileLevelTierIdx( Int outLayerSetIdx )                     { return m_profileLevelTierIdx[ outLayerSetIdx ]; }
    1050 #if H_MV_6_GEN_0153_28
    1051956  Void    setAltOutputLayerFlag( Bool flag )                               { m_altOutputLayerFlag = flag; }
    1052957  Bool    getAltOutputLayerFlag(  )                                        { return m_altOutputLayerFlag; }
    1053 #endif
    1054958
    1055959  Void    setRepFormatIdxPresentFlag( Bool flag )                          { m_repFormatIdxPresentFlag = flag; }
     
    1067971  Bool    getMaxOneActiveRefLayerFlag( )                                   { return m_maxOneActiveRefLayerFlag; }
    1068972
    1069 #if H_MV_6_HRD_O0217_13
    1070973  Void    setDpbSize( TComDpbSize* val )                                   { assert( m_dpbSize != 0 ); m_dpbSize = val; }
    1071974  TComDpbSize* getDpbSize( )                                               { return m_dpbSize;}
    1072 #endif
    1073 
    1074 #if H_MV_6_MISC_O0062_31
     975
    1075976  Void    setPocLsbNotPresentFlag( Int i, Bool flag )                      { m_pocLsbNotPresentFlag[i] = flag; }
    1076977  Bool    getPocLsbNotPresentFlag( Int i )                                 { return m_pocLsbNotPresentFlag[i]; }
    1077 #endif
    1078 #if !H_MV_6_PS_O0223_29 
    1079   Void    setCrossLayerIrapAlignedFlag( Bool flag )                        { m_crossLayerIrapAlignedFlag = flag; }
    1080   Bool    getCrossLayerIrapAlignedFlag(  )                                 { return m_crossLayerIrapAlignedFlag; }
    1081 #endif
    1082978  Void    setDirectDepTypeLenMinus2( Int val)                              { m_directDepTypeLenMinus2 = val; }
    1083979  Int     getDirectDepTypeLenMinus2( )                                     { return m_directDepTypeLenMinus2; }
    1084980
    1085 #if H_MV_6_PS_O0096_21
    1086981  Void    setDefaultDirectDependencyFlag( Bool flag )                      { m_defaultDirectDependencyFlag = flag; }
    1087982  Bool    getDefaultDirectDependencyFlag(  )                               { return m_defaultDirectDependencyFlag; }
     
    1089984  Void    setDefaultDirectDependencyType( Int  val )                       { m_defaultDirectDependencyType = val; }
    1090985  Int     getDefaultDirectDependencyType(  )                               { return m_defaultDirectDependencyType; }
    1091 #endif
    1092986  Void    setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; }
    1093987  Int     getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps)   { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; }
     
    1096990
    1097991  TComVPSVUI* getVPSVUI(  )                                                { return m_vpsVUI;  }
    1098   // VPS EXTENSION SEMANTICS VARIABLES
     992 
     993 // VPS EXTENSION SEMANTICS VARIABLES
    1099994  Void    setLayerIdInVps( Int layerIdInNuh, Int val )                     { m_layerIdInVps[layerIdInNuh] = val;  }
    1100995  Int     getLayerIdInVps( Int layerIdInNuh )                              { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; }
    1101996
    1102997  Int     getScalabilityId ( Int layerIdInVps, ScalabilityType scalType );
    1103 #if H_MV_6_FIX_GET_VIEW_ID
    1104998  Int     getViewId        ( Int layerIdInNuh )                            { return m_viewIdVal[ getViewIndex( layerIdInNuh )]; }
    1105 #else
    1106   Int     getViewId        ( Int layerIdInNuh )                            { return m_viewIdVal[ getViewIndex( getLayerIdInVps( layerIdInNuh) )]; }
    1107 #endif
    1108999  Void    setRefLayers();
    11091000
     
    11201011  Int     getNumLayersInIdList ( Int lsIdx );
    11211012
    1122 #if H_MV_6_HRD_O0217_13
    11231013  Int     getNumOutputLayerSets() ;   
    11241014  Int     getNumSubDpbs( Int i )                                           { return getNumLayersInIdList( i ); }; 
    11251015  Bool    isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh );   
    1126 #if H_MV_6_HRD_O0217_13
    11271016  Void    deriveLayerSetLayerIdList();
    11281017  Void    deriveTargetLayerIdLists();
    11291018  std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx )     { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; };
    11301019  std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx )     { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; };
    1131 #endif
    1132 #endif
    11331020
    11341021
     
    11501037  Void    setARPStepNum( Int layerIdInVps, UInt val )                      { m_uiARPStepNum[layerIdInVps]    = val;     }
    11511038#endif
    1152 #if CAM_HLS_F0136_F0045_F0082
     1039
    11531040  Void createCamPars(Int iNumViews);
    11541041  Void deleteCamPars();
     
    11621049  Int* getInvCodedScale      ( Int viewIndex )  { return m_aaaiCodedScale [viewIndex][1]; }
    11631050  Int* getInvCodedOffset     ( Int viewIndex )  { return m_aaaiCodedOffset[viewIndex][1]; }
    1164 #endif
    11651051
    11661052#if H_3D_IV_MERGE
    11671053  Void    setIvMvPredFlag     ( Int layerIdInVps, Bool val )  { m_ivMvPredFlag[ layerIdInVps ] = val; }
    11681054  Bool    getIvMvPredFlag     ( Int layerIdInVps )            { return m_ivMvPredFlag[ layerIdInVps ]; };
    1169 #if MTK_SPIVMP_F0110
     1055#if H_3D_SPIVMP
    11701056  Int     getSubPULog2Size(Int layerIdInVps)           { return m_iSubPULog2Size[layerIdInVps]; }
    11711057  Void    setSubPULog2Size(Int layerIdInVps, Int u)    { m_iSubPULog2Size[layerIdInVps] = u;}
     
    11821068  Void    setVpsDepthModesFlag( Int layerIdInVps, Bool val )               { m_vpsDepthModesFlag[ layerIdInVps ] = val; }
    11831069  Bool    getVpsDepthModesFlag( Int layerIdInVps )                         { return m_vpsDepthModesFlag[ layerIdInVps ]; }
    1184 
    1185 #if H_3D_DIM_DLT
    1186 #if !DLT_DIFF_CODING_IN_PPS
    1187   Bool    getUseDLTFlag      ( Int layerIdInVps )                         { return m_bUseDLTFlag[ layerIdInVps ]; }
    1188   Void    setUseDLTFlag      ( Int layerIdInVps, Bool b ) { m_bUseDLTFlag[ layerIdInVps ]  = b;          }
    1189  
    1190   Int     getBitsPerDepthValue( Int layerIdInVps )        { return getUseDLTFlag(layerIdInVps)?m_iBitsPerDepthValue[layerIdInVps]:g_bitDepthY; }
    1191   Int     getNumDepthValues( Int layerIdInVps )           { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); }
    1192   Int     depthValue2idx( Int layerIdInVps, Pel value )   { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; }
    1193   Pel     idx2DepthValue( Int layerIdInVps, UInt uiIdx )  { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][uiIdx]:uiIdx; }
    1194   Void    setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 );
    1195 #endif
    1196 #endif
    11971070
    11981071  Bool    getIvMvScalingFlag   (  )                       { return m_ivMvScalingFlag; }
     
    12021075  Void    setInterSDCFlag      ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; }
    12031076#endif
    1204 #if SEC_MPI_ENABLING_MERGE_F0150
     1077#if H_3D_IV_MERGE
    12051078  Bool    getMPIFlag      ( Int layerIdInVps )           { return m_bMPIFlag[layerIdInVps]; }
    12061079  Void    setMPIFlag      ( Int layerIdInVps, Bool bval ){ m_bMPIFlag[layerIdInVps] = bval; }
     
    12101083};
    12111084
    1212 #if DLT_DIFF_CODING_IN_PPS
     1085#if H_3D
    12131086class TComDLT
    12141087{
     
    14811354  TComHRD* getHrdParameters                 ()             { return &m_hrdParameters; }
    14821355  TimingInfo* getTimingInfo() { return &m_timingInfo; }
    1483 
    1484 #if H_MV_6_PS_O0118_33
    1485   Void inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr )
    1486   {
    1487     if ( layerIdCurr == 0 || !vps->getVpsVuiPresentFlag() )
    1488     {
    1489       return;
    1490     }
    1491 
    1492     TComVPSVUI* vpsVUI = vps->getVPSVUI();
    1493     assert( vpsVUI != NULL ); 
    1494 
    1495     TComVideoSignalInfo* videoSignalInfo = vpsVUI->getVideoSignalInfo( vpsVUI->getVpsVideoSignalInfoIdx( vps->getLayerIdInVps( layerIdCurr ) ) );
    1496     assert( videoSignalInfo != NULL );
    1497 
    1498     setVideoFormat            ( videoSignalInfo->getVideoVpsFormat            () );
    1499     setVideoFullRangeFlag     ( videoSignalInfo->getVideoFullRangeVpsFlag     () );
    1500     setColourPrimaries        ( videoSignalInfo->getColourPrimariesVps        () );
    1501     setTransferCharacteristics( videoSignalInfo->getTransferCharacteristicsVps() );
    1502     setMatrixCoefficients     ( videoSignalInfo->getMatrixCoeffsVps           () );     
    1503   }
     1356#if H_MV
     1357  Void inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr );
    15041358#endif
    15051359};
     
    15881442  TComVPS*    m_pcVPS;
    15891443  // SPS
    1590 #if H_MV_6_PSEM_O0142_3
    15911444  Bool        m_spsExtensionFlag;
    15921445  Bool        m_spsExtensionTypeFlag[PS_EX_T_MAX_NUM];
    1593 #endif
    15941446  Bool        m_spsInferScalingListFlag;
    15951447  Int         m_spsScalingListRefLayerId;
    15961448  Bool        m_updateRepFormatFlag;
    1597 #if H_MV_6_PS_REP_FORM_18_19_20 
    15981449  Int         m_spsRepFormatIdx;
    1599 #endif
    16001450  // SPS Extension
    16011451  Bool        m_interViewMvVertConstraintFlag;
    1602 #if H_MV_6_SHVC_O0098_36
    16031452  Int         m_numScaledRefLayerOffsets;
    16041453  Int         m_scaledRefLayerId          [MAX_NUM_SCALED_REF_LAYERS];
     
    16071456  Int         m_scaledRefLayerRightOffset [MAX_NUM_LAYERS];
    16081457  Int         m_scaledRefLayerBottomOffset[MAX_NUM_LAYERS];
    1609 #endif
    16101458#endif
    16111459#if H_3D
     
    17441592  TComPTL* getPTL()     { return &m_pcPTL; }
    17451593#if H_MV
    1746 #if H_MV_6_PSEM_O0142_3
    17471594  Void setSpsExtensionFlag( Bool flag ) { m_spsExtensionFlag = flag; }
    17481595  Bool getSpsExtensionFlag( )  { return m_spsExtensionFlag; }
     
    17501597  Void setSpsExtensionTypeFlag( Int i, Bool flag ) { m_spsExtensionTypeFlag[i] = flag; }
    17511598  Bool getSpsExtensionTypeFlag( Int i ) { return m_spsExtensionTypeFlag[i]; }
    1752 #endif
    17531599  Void      setVPS          ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; }
    17541600  TComVPS*  getVPS          () { return m_pcVPS; }
     
    17621608  Void setUpdateRepFormatFlag( Bool flag )     { m_updateRepFormatFlag = flag; }
    17631609  Bool getUpdateRepFormatFlag(  )              { return m_updateRepFormatFlag; }
    1764 #if H_MV_6_PS_REP_FORM_18_19_20
    17651610  Void setSpsRepFormatIdx( Int  val )          { m_spsRepFormatIdx = val; }
    17661611  Int  getSpsRepFormatIdx(  )                  { return m_spsRepFormatIdx; }
    1767 #endif
    17681612  // SPS Extension
    17691613  Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; }
    17701614  Bool getInterViewMvVertConstraintFlag()         { return m_interViewMvVertConstraintFlag;}
    17711615
    1772 #if H_MV_6_SHVC_O0098_36
    17731616  Void setNumScaledRefLayerOffsets( Int  val )    { m_numScaledRefLayerOffsets = val; }
    17741617  Int  getNumScaledRefLayerOffsets(  )            { return m_numScaledRefLayerOffsets; }
     
    17881631  Void setScaledRefLayerBottomOffset( Int j, Int  val ) { m_scaledRefLayerBottomOffset[j] = val; }
    17891632  Int  getScaledRefLayerBottomOffset( Int j )           { return m_scaledRefLayerBottomOffset[j]; }
    1790 #endif
    17911633  // Inference
    17921634  Void inferRepFormat( TComVPS* vps, Int layerIdCurr );
     
    17991641  Void setUsePC ( Bool b ) { m_bUsePC  = b;    }
    18001642  Bool getUsePC ()         { return m_bUsePC;  }
    1801 #endif
    1802 #if H_3D
    1803 #if !CAM_HLS_F0136_F0045_F0082
    1804   Void initCamParaSPS      (  UInt uiViewIndex, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 );
    1805   UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
    1806   Bool hasCamParInSliceHeader()  { return m_bCamParInSliceHeader; }
    1807 #if QC_DEPTH_IV_MRG_F0125
    1808   Void setHasCamParInSliceHeader( Bool b )  { m_bCamParInSliceHeader = b; }
    1809 #endif
    1810   Int* getCodedScale         ()  { return m_aaiCodedScale [0]; }
    1811   Int* getCodedOffset        ()  { return m_aaiCodedOffset[0]; }
    1812   Int* getInvCodedScale      ()  { return m_aaiCodedScale [1]; }
    1813   Int* getInvCodedOffset     ()  { return m_aaiCodedOffset[1]; }
    1814 #endif
    18151643#endif
    18161644#if H_MV
     
    19191747#endif
    19201748
    1921 #if DLT_DIFF_CODING_IN_PPS
     1749#if H_3D
    19221750  TComDLT*  m_pcDLT;
    19231751#endif
     
    19481776  UInt      getMinCuDQPSize     ()         { return m_uiMinCuDQPSize; }
    19491777
    1950 #if DLT_DIFF_CODING_IN_PPS
     1778#if H_3D
    19511779  Void      setDLT              ( TComDLT* pcDLT ) { m_pcDLT = pcDLT; }
    19521780  TComDLT*  getDLT              ()                 { return m_pcDLT; }
     
    22012029// Additional slice header syntax elements
    22022030  Bool       m_pocResetFlag;
    2203 #if H_MV_6_RALS_O0149_11
    22042031  Bool       m_crossLayerBlaFlag;
    2205 #endif
    22062032  Bool       m_discardableFlag;
    22072033  Bool       m_interLayerPredEnabledFlag;
     
    22142040#endif
    22152041#if H_3D_ARP
    2216 #if SHARP_ARP_REF_CHECK_F0105
    22172042  Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS];
    2218 #endif
    22192043  TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS];
    22202044  UInt                 m_nARPStepNum;
    2221 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
    22222045  Int         m_aiFirstTRefIdx    [2];
    2223 #endif
    22242046#endif
    22252047#if H_3D_IC
     
    23082130#if H_3D_ARP
    23092131  Void      setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx )      { m_pBaseViewRefPicList[iViewIdx] = pListPic;                   }
    2310 #if SHARP_ARP_REF_CHECK_F0105
    23112132  Void      setARPStepNum( TComPicLists*ivPicLists );
    2312 #else
    2313   Void      setARPStepNum();                                 
    2314 #endif
    23152133  TComPic*  getBaseViewRefPic    ( UInt uiPOC , Int iViewIdx )                       { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); }
    23162134  UInt      getARPStepNum( )                                                         { return m_nARPStepNum;                                         } 
     
    25132331  Int       getAlterRefIdx          ( RefPicList e )        { return  m_aiAlterRefIdx[e];     }
    25142332#endif
    2515 #if QC_MTK_INTERVIEW_ARP_F0123_F0108
     2333#if H_3D_ARP
    25162334  Int       getFirstTRefIdx        ( RefPicList e )                { return  m_aiFirstTRefIdx[e];     }
    25172335  Void      setFirstTRefIdx        ( RefPicList e, Int i )         { m_aiFirstTRefIdx[e]    = i;      }
    2518 #endif
    2519 #if SHARP_ARP_REF_CHECK_F0105
    25202336  Bool      getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; }
    25212337#endif
     
    25412357// Additional slice header syntax elements
    25422358
    2543 #if H_MV_6_RALS_O0149_11
    25442359  Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; }
    25452360  Bool getCrossLayerBlaFlag(  ) { return m_crossLayerBlaFlag; }
     
    25522367    }
    25532368  }
    2554 #endif
    25552369
    25562370  Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; }
    25572371  Bool getPocResetFlag(  ) { return m_pocResetFlag; }
    25582372
    2559 Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; }
    2560 Bool getDiscardableFlag(  ) { return m_discardableFlag; }
    2561 
    2562 Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; }
    2563 Bool getInterLayerPredEnabledFlag(  ) { return m_interLayerPredEnabledFlag; }
    2564 
    2565 Void setNumInterLayerRefPicsMinus1( Int  val ) { m_numInterLayerRefPicsMinus1 = val; }
    2566 Int  getNumInterLayerRefPicsMinus1(  ) { return m_numInterLayerRefPicsMinus1; }
    2567 
    2568 Void setInterLayerPredLayerIdc( Int i, Int  val ) { m_interLayerPredLayerIdc[i] = val; }
    2569 Int  getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; }
     2373  Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; }
     2374  Bool getDiscardableFlag(  ) { return m_discardableFlag; }
     2375
     2376  Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; }
     2377  Bool getInterLayerPredEnabledFlag(  ) { return m_interLayerPredEnabledFlag; }
     2378
     2379  Void setNumInterLayerRefPicsMinus1( Int  val ) { m_numInterLayerRefPicsMinus1 = val; }
     2380  Int  getNumInterLayerRefPicsMinus1(  ) { return m_numInterLayerRefPicsMinus1; }
     2381
     2382  Void setInterLayerPredLayerIdc( Int i, Int  val ) { m_interLayerPredLayerIdc[i] = val; }
     2383  Int  getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; }
    25702384
    25712385  // Additional variables derived in slice header semantics
     
    25732387  Int  getInterLayerPredLayerIdcLen    ( ) { return gCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerId() )); }
    25742388
    2575 #if H_MV_6_ILDDS_ILREFPICS_27_34
    25762389  Int  getRefLayerPicFlag( Int i );
    25772390  Int  getRefLayerPicIdc ( Int j );
    25782391  Int  getNumRefLayerPics( );
    2579 #endif
    25802392
    25812393  Int  getNumActiveRefLayerPics( );
  • trunk/source/Lib/TLibCommon/TComWedgelet.h

    r724 r773  
    5050enum DIM_IDX
    5151{
    52 #if SEC_DMM3_RBC_F0147
    5352  DMM1_IDX = 0,
    5453  DMM4_IDX = 1,
    55 #else
    56   DMM1_IDX = 0,
    57   DMM3_IDX = 1,
    58   DMM4_IDX = 2,
    59   RBC_IDX  = 3
    60 #endif
    6154};
    6255
    63 #if SEC_DMM3_RBC_F0147
    6456#define DMM_NUM_TYPE   2
    6557#define DIM_NUM_TYPE   (DMM_NUM_TYPE)
    66 #else
    67 #define DMM_NUM_TYPE   3
    68 #define RBC_NUM_TYPE   1
    69 #define DIM_NUM_TYPE   (DMM_NUM_TYPE+RBC_NUM_TYPE)
    70 #endif
    7158#define DIM_NO_IDX     MAX_UINT
    7259
     
    7663#endif
    7764
    78 #if H_3D_DIM_RBC
    79 #define RBC_THRESHOLD              20
    80 #define RBC_MAX_EDGE_NUM_PER_4x4   8
    81 #define RBC_MAX_DISTANCE           255
    82 #endif
    83 
    8465#if H_3D_DIM_DMM
    8566#define DMM_NO_WEDGEINDEX       MAX_UINT
    8667#define DMM_NUM_WEDGE_REFINES   8
    87 #if !SEC_DMM3_RBC_F0147
    88 #define DMM3_SIMPLIFY_TR        1
    89 #endif
    9068
    9169enum WedgeResolution
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r758 r773  
    6969///////////////////////////////////   MAJOR DEFINES   /////////////////////////////////// 
    7070/////////////////////////////////////////////////////////////////////////////////////////
     71
    7172#if H_MV
    7273#define H_MV_ENC_DEC_TRAC                 1  //< CU/PU level tracking
     
    9899                                              // MTK_TEXTURE_MRGCAND_BUGFIX_E0182  Bug fix for TEXTURE MERGING CANDIDATE     , JCT3V-E0182
    99100#define H_3D_ARP                          1   // Advanced residual prediction (ARP), JCT3V-D0177
     101                                              // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108
     102                                              // SHARP_ARP_REF_CHECK_F0105        ARP reference picture selection and DPB check
     103                                              // LGE_ARP_CTX_F0161                JCT3V-F0161
    100104#define H_3D_IC                           1   // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060
    101105                                              // Unifying rounding offset, for IC part, JCT3V-D0135
     
    103107                                              // SHARP_ILLUCOMP_REFINE_E0046
    104108                                              // MTK_CLIPPING_ALIGN_IC_E0168       // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168
     109                                              // LGE_IC_CTX_F0160 //JCT3V-F0160
     110                                              // SEC_ONLY_TEXTURE_IC_F0151
    105111
    106112#if H_3D_NBDV
     
    111117                                              // NBDV_DEFAULT_VIEWIDX_BUGFIX Bug fix for invalid default view index for NBDV
    112118                                              // NTT_DoNBDV_VECTOR_CLIP_E0141 disparity vector clipping in DoNBDV, JCT3V-E0141 and JCT3V-E0209
    113 
    114119#endif
    115120
     
    124129                                              // NTT_VSP_DC_BUGFIX_E0208 bugfix for sub-PU based DC in VSP, JCT3V-E0208
    125130                                              // NTT_VSP_COMMON_E0207_E0208 common part of JCT3V-E0207 and JCT3V-E0208
     131                                              // MTK_F0109_LG_F0120_VSP_BLOCK MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120 
     132                                              // SHARP_VSP_BLOCK_IN_AMP_F0102 VSP partitioning for AMP
     133                                              // MTK_VSP_SIMPLIFICATION_F0111 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss
     134                                              // LGE_SHARP_VSP_INHERIT_F0104
     135
    126136#define H_3D_IV_MERGE                     1   // Inter-view motion merge candidate
    127137                                              // HHI_INTER_VIEW_MOTION_PRED
     
    133143                                              // TEXTURE MERGING CANDIDATE     , JCT3V-C0137
    134144                                              // QC_INRIA_MTK_MRG_E0126
    135 
    136 
     145                                              // ETRIKHU_MERGE_REUSE_F0093 QC_DEPTH_IV_MRG_F0125, JCT3V-F0125: Depth oriented Inter-view MV candidate
     146                                              // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode
    137147#define H_3D_TMVP                         1   // QC_TMVP_C0047
    138148                                              // Sony_M23639
     
    159169                                              // LGE_SDC_REMOVE_DC_E0158 Removal of DC mode from SDC
    160170                                              // LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 1   Removal of overlap between DMM3 and DMM1
     171                                              // LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 JCT3V-F0159
     172                                              // HHI_DIM_PREDSAMP_FIX_F0171
     173                                              // SEC_DMM3_RBC_F0147 Removal of DMM3 and RBC from DMMs
     174                                              // QC_DIM_DELTADC_UNIFY_F0132 Unify delta DC coding in depth intra modes
    161175
    162176#define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
    163177                                              // LGE_INTER_SDC_E0156  Enable inter SDC for depth coding
     178#define H_3D_SPIVMP                       1   // H_3D_SPIVMP    // JCT3V-F0110: Sub-PU level inter-view motion prediction
    164179#define H_3D_FCO                          0   // Flexible coding order for 3D
     180
    165181
    166182
     
    175191#endif
    176192
    177 #define CAM_HLS_F0136_F0045_F0082         1   // JCT3V-F0136/F0045: view order index based camera parameter signaling
    178                                               // JCT3V-F0082: the cp_in_slice_segment_layer_flag to be view specific and used as a condition of the presence of slice header level camera parameters
    179 #define CAM_HLS_F0044                     1   // JCT3V-F0044: move camera parameter from slice header extension to slice header
    180 
    181 
    182193// Rate Control
    183194#define KWU_FIX_URQ                       1
     
    203214#endif
    204215
    205 ////   ****** neighbouring block-based disparity vector  *********
     216////   ****** NEIGHBOURING BLOCK-BASED DISPARITY VECTOR  *********
    206217#if H_3D_NBDV
    207218#define DVFROM_LEFT                       0
     
    222233
    223234#if H_3D_DIM_DLT
    224 #define DLT_DIFF_CODING_IN_PPS            1   // moving DLT syntax elements from VPS to PPS and differential coding of DLT values
    225                                               // JCT3V-F0131, JCT3V-F0139
    226 #if DLT_DIFF_CODING_IN_PPS
    227 #define Log2( n ) ( log((double)n) / log(2.0) )
    228 #endif
    229235#define H_3D_DELTA_DLT                    1
    230236#endif
     
    258264#endif
    259265
    260 /////////////////////////////////////////////////////////////////////////////////////////
    261 ///////////////////////////////////   HTM-9.2 Integrations //////////////////////////////
    262 /////////////////////////////////////////////////////////////////////////////////////////
    263 
    264 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
    265 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
    266 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
    267 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
    268 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
    269 
    270 /////////////////////////////////////////////////////////////////////////////////////////
    271 ///////////////////////////////////   HTM-9.1 Integrations //////////////////////////////
    272 /////////////////////////////////////////////////////////////////////////////////////////
    273 
    274 #define H_MV_FIX_TRACE_FILE                     1  // Fix linux compilation error related const char conversion
    275 
    276 #define H_MV_LAYER_WISE_STARTUP                 1  // Basic version of layer wise startup.
    277 #define H_MV_FIX_SKIP_PICTURES                  1  // Fix related to skipping pictures.
    278 #define H_MV_6_HRD_O0164_15                     1  // (HRD/O0164/Multilayer HRD) #15 Decision: Adopt, modified as follows: It was suggested to constrain the stalling based on the relative cpb removal times, which must be in decoding order. The "du_based_bpb_sync_flag" is not needed, in view of this. SEI in the highest layer of the layer set or (inclusive "or") VPS VUI is used to carry the parameters (at encoder discretion). SEI in higher layer and SEI in VUI do not need to repeat information available in some lower layer. Shall be after APS SEI and buffering period SEI and before all other SEI of all layers except other HRD related SEI.
    279 #define H_MV_6_HRD_O0217_13                     1  // (HRD/O0217/Sub-DPB based DPB operations) #13 Decision: Adopt ?Specify a separate DPB capacity for each layer ?no sharing of capacity across layers ?each layer has its own parameters (max pictures, max latency, max reordering). This proposal would specify distinct parameters for each "output layer set" and to change the definition of an operation point to be specific to an output layer set instead of a 'layer set". Decision: Adopted this aspect as well.
    280 #define H_MV_6_SHVC_O0098_36                    1  // (SHVC/O0098/Scaled ref layer offset) #36 Modify signalling of scaled reference layer offsets to allow signalling of any lower layer, rather than just a direct reference layer, in order to enable alignment of auxiliary pictures. In further JCT-VC and JCT-3V discussion, it was also agreed to use the same offset signalling for MV-HEVC as well as SHVC
    281 #define H_MV_6_GEN_0153_28                      1  //(Gen/O0153/output highest layer) #28 Add a flag in the VPS to indicate if startup process should output the highest available layer if the target output layer is not available.
    282 #define H_MV_6_PS_0109_25                       1  //XXX(PS/O0109/default_one_target_output_layer_idc) #25 To change default_one_target_output_layer_flag to a two-bit default_one_target_output_layer_idc, and reserve the values 2 and 3
    283 #define H_MV_6_O0226_37                         1  //(VUI/O0226/Mod tile WPP) #37 Modifications to the VUI indicators of tile and WPP alignment related syntax elements, from the r1.
    284 #define H_MV_6_RALS_O0149_11                    1  //XXX (RALS/O0149/Prop2): #11 Proposal: A new slice_reserved_flag is taken into use to indicate if a base-layer IDR picture initiates the layer-wise start-up process. Decision: Adopt (the bit should not be required to be present; if present should be the bit after the discardable_flag, and discardable_flag should be the first one of the three, and the poc reset flag is not required to be present).
    285 #define H_MV_6_PSEM_O0142_3                     1  // (PSEM/O0142/Conditional extension syntax) #3 Adopt JCTVC-O0142 (as a structure to be used to switch whatever extensions we define in SPS, not necessarily committing to having these extensions be separate for each extension, but the current plan unless decided otherwise is to use one flag for range extensions syntax presence and one flag for SHVC+MV-HEVC extension syntax presence)
    286 #define H_MV_6_FIX_GET_VIEW_ID                  1  // Fix get view id
    287 #define H_MV_6_LAYER_ID_32                      1  // (Gen/O0137,O0200,O0223,Layer id) #32 Add (editorial equivalent of) "The value of nuh_layer_id shall be in the range of 0 to 62. The value of 63 for nuh_layer_id is reserved for future use by ITU-T | ISO/IEC. Decoders shall ignore all data that follow the value 63 for nuh_layer_id in a NAL unit." and specify that vps_max_layers_minus1 shall not be equal to 63, but decoders shall allow that value to appear in the bitstream. Specify that the value 63 is interpreted the same as the value 62 (e.g., MaxLayersMinus1 = Min( 62, vps_max_layers_minus1) and subsequently refer to MaxLayersMinus1 instead of vps_max_layers_minus1)
    288 #define H_MV_6_PS_O0118_33                      1  // (PS/O0118/visual signal info in vui per layer) #33 Add visual signal information (video_format, video_full_range_flag, colour_primaries, transfer_characteristics, matrix_coeffs) per layer to the VPS VUI, from v2 version of JCTVC-O0118.
    289 #define H_MV_6_POC_31_35_38                     1  //XXX  Various related to POC
    290                                                    // (Misc/O0062/POC LSB present) (SH changes)
    291                                                    // (POC/O0117/Modify PicOrderCntVal of prevTid0Pic) #35 Modification of the PicOrderCntVal of prevTid0Pic and modification to the decoding process for reference picture set, to address problems found for cross-layer POC alignment.
    292                                                    // (POC/O0211/Fix ambiguity) #38 Modify POC derivation to correct an ambiguity in the spec.
    293 #define H_MV_6_MISC_O0062_31                    1  // (Misc/O0062/POC LSB present) (without SH changes ) #31 The proposal's "option 3" is to add a flag in the VPS for each EL to control whether these LSBs are present or not (for IDR pictures), and when not present, the LSBs are inferred to be equal to 0. Decision: Adopted (as described herein).
    294 #define H_MV_6_ILDDS_ILREFPICS_27_34            1  // Various inter layer reference picture derivation
    295                                                    // (ILDSD/O0225/max_tid_il_ref_pics RPL const.) #27 Change derivation of NumActiveRefLayerPics to consider max_tid_il_ref_pics.
    296                                                    // (ILDSD/O0120/sub_layers_vps_max_minus1 RPL const) #34 Modify inter-layer reference picture list default construction to incorporate max temporal sub-layers per layer syntax elements in VPS extension, from r2 version of JCTVC-O0120
    297 #define H_MV_6_ILDDS_O0225_30                   1  // (ILDSD/O0225/signal max_tid_il_ref_pics per layer ) #30 2nd proposal of JCTVC-O0225 regarding signalling of max_tid_il_ref_pics per layer, based upon relation to SCE2 on single loop decoding. Decision: Adopted.
    298 #define H_MV_6_ILDSD_O0120_26                   1  // (ILDSD/O0120/sub_layers_vps_max_minus1) #26 Add syntax elements to signal max temporal sub-layers for each layer in the VPS, with a gating flag, from JCTVC- option 2.
    299 #define H_MV_6_PS_O0223_29                      1  // (PS/O0223/Cross layer alignment type) #29 Add a flag in VPS VUI to indicate cross layer pic type alignment.  Move cross_layer_irap_aligned_flag to VPS VUI and make presence condition on added flag
    300 #define H_MV_6_PS_0092_17                       1  // (PS/O0092/Sharing SPS PPS) #17 Restrict sharing of SPS and PPS across layers to avoid creating problems during sub-bitstream extraction, based on modification of proposals in JCTVC-O0059 and JCTVC-O0092, reflected in the v2 version of O0092.
    301 #define H_MV_6_PS_REP_FORM_18_19_20             1  //  Various Rep format
    302                                                    // (PS/O0096/rep format syntax element length ) #20 Modification of length to 8 bit as decided later in trac.
    303                                                    // (PS/O0179/Rep. Format) #18 Add flag in rep_format( ) syntax structure to control sending of chroma and bit depth related parameters, as proposed in the v2 version of JCTVC-O0179.
    304                                                    // (PS/O0096/rep format) #20 Modify the SPS syntax for layers with nuh_layer_id > 0 to signal a reference to a rep_format index in the VPS, rather than signalling explicit representation format data in the SPS, from the v2 version of JCTVC-O0096.
    305                                                    // (PS/FIX/N0092/Rep. Format) #19 Inferences.
    306 #define H_MV_6_PS_O0096_21                      1  // (PS/O0096/direct_dependency_type gating flag) #21 Add a gating flag in VPS extension to condition the presence of direct dependency type, with a default type signalled, from JCTVC-O0096
    307 #define H_MV_6_PS_O0109_22                      1  // (PS/O0109/view_id_len) #22 Modify the VPS extension syntax and semantics to replace view_id_len_minus1 with view_id_len, always signal that syntax element, add a constraint that (1<<view_id_len) >= NumViews, and modify view_id_val semantics to infer value of 0 when not present, from discussion of JCTVC-O0109
    308 #define H_MV_6_PS_O0109_23                      1  // (PS/O0109/profile_ref_minus1 constraint) #23 Modify the semantics of profile_ref_minus1[ i ] to replace “shall be less than i?with “shall be less than or equal to i? from discussion of JCTVC-O0109
    309 #define H_MV_6_PS_O0109_24                      1  // (PS/O0109/vps_vui_present_flag move) #24 Move the vps_vui_present_flag to precede vps_vui_offset, and make vps_vui_offset conditional on that flag, from JCTVC-O0109
    310 /////////////////////////////////////////////////////////////////////////////////////////
    311 ///////////////////////////////////   HTM-9.0 Integrations //////////////////////////////
    312 /////////////////////////////////////////////////////////////////////////////////////////
    313 
    314266#if H_3D
    315 
    316 #define FIX_MISSING_MACRO_R690                  1 // Missing macro in integration to revision 690
    317 
    318 #define SEC_MPI_ENABLING_MERGE_F0150            1 // MPI flag in VPS and enabling in Merge mode
    319 #define ETRIKHU_MERGE_REUSE_F0093               1 // Reuse HEVC merge candidate list construction for base candidates, JCT3V-F0093
    320 
    321 #if H_3D_ARP
    322 #define QC_MTK_INTERVIEW_ARP_F0123_F0108        1 //JCT3V-F0123; JCT3V-F0108
    323 #define SHARP_ARP_REF_CHECK_F0105               1 // ARP reference picture selection and DPB check
    324 #define LGE_ARP_CTX_F0161                       1 //JCT3V-F0161
    325 #endif
    326 
    327 #if H_3D_IV_MERGE
    328 #define QC_DEPTH_IV_MRG_F0125                   1 // JCT3V-F0125: Depth oriented Inter-view MV candidate
    329 #define MTK_SPIVMP_F0110                        1 // JCT3V-F0110: Sub-PU level inter-view motion prediction
    330 #define MTK_F0110_FIX                           1 // Disable Sub-PU IVMP in Depth, fix some delete problems
    331 #define BUGFIX_F0093                            1 // bug fix for F0093 for depth IvMC pruning
    332 #define BUGFIX_2_F0093                          1 // bug fix for VSP inheritance
    333 #endif
    334 
    335 #if H_3D_VSP
    336 #define MTK_F0109_LG_F0120_VSP_BLOCK            1 // MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120 
    337 #define SHARP_VSP_BLOCK_IN_AMP_F0102            1 // VSP partitioning for AMP
    338 #define MTK_VSP_SIMPLIFICATION_F0111            1 // 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss
    339 #define LGE_SHARP_VSP_INHERIT_F0104             1
    340 #endif
    341 
    342 #define LGE_BUGFIX_F0158                        1 //JCT3V-F0158
    343 #define LGE_IC_CTX_F0160                        1 //JCT3V-F0160
    344 #define SEC_ONLY_TEXTURE_IC_F0151               1
    345 
    346 #if H_3D_DIM
    347 #define SEC_DMM3_RBC_F0147                      1 // Removal of DMM3 and RBC from DMMs
    348 #if !SEC_DMM3_RBC_F0147
    349 #define H_3D_DIM_RBC                            1 // Region Boundary Chain mode
    350 #endif
    351 #define QC_DIM_DELTADC_UNIFY_F0132              1 // Unify delta DC coding in depth intra modes
    352 #define HHI_DIM_PREDSAMP_FIX_F0171              1
    353 #define LGE_PRED_RES_CODING_DLT_DOMAIN_F0159    1 //JCT3V-F0159
    354 #endif
    355 #endif
    356 
     267#define PPS_FIX_DEPTH                           1
     268#endif
     269
     270
     271/////////////////////////////////////////////////////////////////////////////////////////
     272///////////////////////////////////   HTM-10.0 Integrations //////////////////////////////
     273/////////////////////////////////////////////////////////////////////////////////////////
     274
     275// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     276// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     277// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     278// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     279// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     280// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     281// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     282// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     283// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
     284// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
    357285
    358286/////////////////////////////////////////////////////////////////////////////////////////
     
    370298#define MAX_VPS_OP_SETS_PLUS1                     1024
    371299#if H_MV
    372 #if H_MV_6_LAYER_ID_32
    373300#define MAX_VPS_NUH_LAYER_ID_PLUS1  63
    374 #else
    375 #define MAX_VPS_NUH_LAYER_ID_PLUS1  64
    376 #endif
    377301#define MAX_NUM_SCALABILITY_TYPES   16
    378302#define ENC_CFG_CONSOUT_SPACE       29           
     
    398322#define MAX_CPB_CNT                     32  ///< Upper bound of (cpb_cnt_minus1 + 1)
    399323#if H_MV
    400 #if H_MV_6_LAYER_ID_32
    401324#define MAX_NUM_LAYER_IDS               63
    402325#define MAX_NUM_LAYERS                  63
    403 #else
    404 #define MAX_NUM_LAYER_IDS               64
    405 #define MAX_NUM_LAYERS                  64
    406 #endif
    407326#define MAX_VPS_PROFILE_TIER_LEVEL      64
    408327#define MAX_VPS_ADD_OUTPUT_LAYER_SETS   1024
    409328#define MAX_VPS_OUTPUTLAYER_SETS        ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 )
    410 #if H_MV_6_PS_O0118_33
    411329#define  MAX_NUM_VIDEO_SIGNAL_INFO      16
    412 #endif
    413 #if H_MV_6_SHVC_O0098_36
    414330#define MAX_NUM_SCALED_REF_LAYERS       MAX_NUM_LAYERS-1
    415 #endif
    416 #if H_MV_6_HRD_O0164_15
    417331#define MAX_NUM_BSP_HRD_PARAMETERS      100 ///< Maximum value is actually not specified
    418332#define MAX_NUM_BITSTREAM_PARTITIONS    100 ///< Maximum value is actually not specified
    419333#define MAX_NUM_BSP_SCHED_COMBINATION   100 ///< Maximum value is actually not specified
    420 #endif
     334#else
     335#define MAX_NUM_LAYER_IDS                64
    421336#endif
    422337
     
    896811#if H_MV
    897812
    898 #if H_MV_6_PSEM_O0142_3
    899813  enum PsExtensionTypes
    900814  {
     
    906820    PS_EX_T_MAX_NUM = 8
    907821  };
    908 #endif
    909822
    910823/// scalability types
     
    937850  };
    938851
    939 
    940 #endif
    941 #endif
     852#define Log2( n ) ( log((double)n) / log(2.0) ) // Ed.(GT): This is very very bad and should be fixed to used integer arithmetics ( see gCeilLog2 ) moreover it should not be defined in the tool macro section!
     853#endif
     854#endif
Note: See TracChangeset for help on using the changeset viewer.