Changeset 884 in 3DVCSoftware


Ignore:
Timestamp:
29 Mar 2014, 18:55:16 (11 years ago)
Author:
tech
Message:

Merged HTM-10.1-dev0@883. (MV-HEVC 7 HLS)

Location:
trunk/source
Files:
43 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r872 r884  
    140140    AOF( m_pScaleOffsetFile );
    141141  }
    142 #if !FIX_CAM_PARS_COLLECTOR
    143   m_cCamParsCollector.init( m_pScaleOffsetFile );
    144 #endif
    145142#endif
    146143  InputByteStream bytestream(bitstreamFile);
     
    209206      read(nalu, nalUnit);
    210207#if H_MV     
    211 #if H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO
    212208      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer)
    213209          || !isNaluWithinTargetDecLayerIdSet(&nalu)
    214210          || nalu.m_layerId > MAX_NUM_LAYER_IDS-1
    215211          || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0)           
    216 #if H_MV_HLS_7_MISC_P0130_EOS
    217212          || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0)           
    218 #endif
    219213         )
    220 #else
    221       if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 )
    222 #endif
    223214      {
    224215        bNewPicture = false;
     
    248239          }
    249240
    250 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    251241          if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() )
    252242          {
     
    254244            exit(EXIT_FAILURE);
    255245          }
    256 #endif
    257246          m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx );
    258247        }
    259248
    260 #if FIX_CAM_PARS_COLLECTOR
    261249#if H_3D
    262250        if (nalu.m_nalUnitType == NAL_UNIT_VPS )
    263         {       
    264          
     251        {                 
    265252          m_cCamParsCollector.init( m_pScaleOffsetFile, m_tDecTop[decIdx]->getPrefetchedVPS() );
    266253        }       
    267 #endif
    268254#endif
    269255        bNewPicture       = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag;
  • trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r872 r884  
    388388  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
    389389  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
    390 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    391390  ("DefaultTargetOutputLayerIdc"     , m_defaultTargetOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
    392 #else
    393   ("DefaultOneTargetOutputLayerFlag"  , m_defaultOneTargetOutputLayerIdc  , 0, "Output highest layer of layer sets by default")
    394 #endif
    395391  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 
    396392
    397 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    398393  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 
    399394  ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 
    400 #else
    401   ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 
    402 #endif
    403395  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
    404396 
     
    521513#if H_3D_SPIVMP
    522514  ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n")
    523 #endif
    524 #if QC_SPIVMP_MPI_G0119
    525515  ("SubPUMPILog2Size", m_iSubPUMPILog2Size, (Int)3, "Sub-PU MPI size index: 2^n")
    526516#endif
     
    613603#if H_MV
    614604
    615   // DBP Size
    616 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE
    617   ("SubLayerFlagInfoPresentFlag",  m_subLayerFlagInfoPresentFlag , false                                           , "SubLayerFlagInfoPresentFlag")
    618 #endif
    619605  // VPS VUI
    620606  ("VpsVuiPresentFlag"           , m_vpsVuiPresentFlag           , false                                           , "VpsVuiPresentFlag           ")
    621607  ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false                                           , "CrossLayerPicTypeAlignedFlag")  // Could actually be derived by the encoder
    622608  ("CrossLayerIrapAlignedFlag"   , m_crossLayerIrapAlignedFlag   , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
    623 #if H_MV_HLS_7_MISC_P0068_21
    624609  ("AllLayersIdrAlignedFlag"     , m_allLayersIdrAlignedFlag     , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
    625 #endif
    626610  ("BitRatePresentVpsFlag"       , m_bitRatePresentVpsFlag       , false                                           , "BitRatePresentVpsFlag       ")
    627611  ("PicRatePresentVpsFlag"       , m_picRatePresentVpsFlag       , false                                           , "PicRatePresentVpsFlag       ")
     
    737721  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
    738722  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
    739 #if H_MV_HLS_7_SEI_P0204_26
    740723  ("SubBitstreamPropSEIEnabled",              m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
    741724  ("SEISubBitstreamNumAdditionalSubStreams",  m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled")
     
    745728  ("SEISubBitstreamAvgBitRate",               m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
    746729  ("SEISubBitstreamMaxBitRate",               m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
    747 #endif
    748730#if H_3D
    749731  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
     
    14321414  }
    14331415
    1434 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14351416  xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 
    14361417
     
    14631444    }
    14641445  }
    1465 #else
    1466   xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" );
    1467 #endif
     1446
    14681447  xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
    14691448
     
    15521531#endif
    15531532#if H_3D_SPIVMP
    1554 #if SEC_SPIVMP_MCP_SIZE_G0077
    15551533  xConfirmPara( m_iSubPULog2Size < 3,                                        "SubPULog2Size must be 3 or greater.");
    1556 #else
    1557   xConfirmPara( m_iSubPULog2Size < 2,                                        "SubPULog2Size must be 2 or greater.");
    1558 #endif
    15591534  xConfirmPara( m_iSubPULog2Size > 6,                                        "SubPULog2Size must be 6 or smaller.");
    15601535  xConfirmPara( (1<<m_iSubPULog2Size) > m_uiMaxCUWidth,                      "SubPULog2Size must be log2(maxCUSize) or smaller.");
    1561 #endif
    1562 #if QC_SPIVMP_MPI_G0119
     1536 
    15631537  xConfirmPara( m_iSubPUMPILog2Size < 3,                                        "SubPUMPILog2Size must be 3 or greater.");
    15641538  xConfirmPara( m_iSubPUMPILog2Size > 6,                                        "SubPUMPILog2Size must be 6 or smaller.");
     
    22522226  }
    22532227  }
    2254 #endif
    2255 #if H_MV_HLS_7_SEI_P0204_26
    22562228  // Check input parameters for Sub-bitstream property SEI message
    22572229  if( m_subBistreamPropSEIEnabled )
     
    24992471#if H_3D_SPIVMP
    25002472  printf(" SubPULog2Size:%d  " , m_iSubPULog2Size  );
    2501 #endif
    2502 #endif
    2503 #if QC_SPIVMP_MPI_G0119
    25042473  printf(" SubPUMPILog2Size:%d  " , m_iSubPUMPILog2Size  );
     2474#endif
    25052475#endif
    25062476#if H_3D_ARP
  • trunk/source/App/TAppEncoder/TAppEncCfg.h

    r872 r884  
    8989  Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
    9090  std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set
    91 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    9291  Int                    m_defaultTargetOutputLayerIdc;       ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
    93 #else
    94   Int                    m_defaultOneTargetOutputLayerIdc;    ///< Output highest layer of layer sets by default when equal to 1
    95 #endif
    9692  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
    9793  std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
    98 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    9994  std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
    100 #endif
    10195  std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
    10296 
     
    10498  std::vector< std::vector<Int> > m_directRefLayers;          ///< LayerIds of direct reference layers
    10599  std::vector< std::vector<Int> > m_dependencyTypes;          ///< Dependency types of direct reference layers
    106 
    107   // DBP Size
    108 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE
    109   Bool m_subLayerFlagInfoPresentFlag;
    110 #endif
    111100
    112101  // VPS VUI
     
    114103  Bool m_crossLayerPicTypeAlignedFlag;
    115104  Bool m_crossLayerIrapAlignedFlag;
    116 #if H_MV_HLS_7_MISC_P0068_21
    117105  Bool m_allLayersIdrAlignedFlag;
    118 #endif
    119106  Bool m_bitRatePresentVpsFlag;
    120107  Bool m_picRatePresentVpsFlag;
     
    141128#if H_3D_SPIVMP
    142129  Int                    m_iSubPULog2Size;                   
    143 #endif
    144 #endif
    145 #if QC_SPIVMP_MPI_G0119
    146130  Int                    m_iSubPUMPILog2Size;                   
     131#endif
    147132#endif
    148133#if H_3D_ARP                                                  /// < flag and number of weighting factors in ARP
     
    440425  Int       m_log2MaxMvLengthHorizontal;                      ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units
    441426  Int       m_log2MaxMvLengthVertical;                        ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
    442 #if H_MV_HLS_7_SEI_P0204_26
     427#if H_MV
    443428  Bool              m_subBistreamPropSEIEnabled;
    444429  Int               m_sbPropNumAdditionalSubStreams;
  • trunk/source/App/TAppEncoder/TAppEncTop.cpp

    r872 r884  
    127127  xSetRepFormat            ( vps );
    128128  xSetLayerSets            ( vps );
    129 #if H_MV_HLS_7_FIX_SET_DPB_SIZE
    130129  xSetDpbSize              ( vps );
    131 #endif
    132130  xSetVPSVUI               ( vps );
    133131#if H_3D
     
    187185#if H_3D_SPIVMP
    188186    m_cTEncTop.setSubPULog2Size                 (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size   );
    189 #endif
    190 #if QC_SPIVMP_MPI_G0119
    191187    m_cTEncTop.setSubPUMPILog2Size              ( !isDepth ? 0 : m_iSubPUMPILog2Size   );
    192188#endif
     
    429425  m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
    430426  m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
    431 #if H_MV_HLS_7_SEI_P0204_26
     427#if H_MV
    432428  m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled );
    433429  if( m_subBistreamPropSEIEnabled )
     
    826822#endif
    827823
    828 #if MTK_DDD_G0063
     824#if H_3D_DDD
    829825          m_acTEncTopList[ layer ]->getSliceEncoder()->setDDDPar( m_cCameraData.getCodedScale()[0][ m_acTEncTopList[layer]->getViewIndex() ],
    830826              m_cCameraData.getCodedOffset()[0][ m_acTEncTopList[layer]->getViewIndex() ],
     
    15061502}
    15071503
    1508 #if H_MV_HLS_7_FIX_SET_DPB_SIZE
    15091504Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
    15101505{
     
    15201515    Bool subLayerFlagInfoPresentFlag = false;
    15211516
    1522 #if H_MV_HLS_7_HRD_P0156_7
    15231517    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1524 #else
    1525     for( Int j = 0; j  <=  vps.getMaxTLayers() - 1 ; j++ )
    1526 #endif
    15271518    {   
    15281519      Bool subLayerDpbInfoPresentFlag = false;
    1529 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    15301520      assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() );
    15311521      for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ )   
    1532 #else
    1533       assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );
    1534       for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
    1535 #endif
    15361522      {
    15371523        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
     
    15761562  } 
    15771563}
    1578 #else
    1579 Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
    1580 {
    1581   // These settings need to be verified
    1582 
    1583   TComDpbSize* dpbSize = vps.getDpbSize();
    1584 
    1585   assert ( dpbSize != 0 );
    1586 
    1587   for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
    1588   { 
    1589     std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    1590     dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag );
    1591     if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) )
    1592     {
    1593       for( Int j = 0; j  <=  vps.getMaxTLayers() - 1 ; j++ )
    1594       {   
    1595         Int maxNumReorderPics  = MIN_INT;
    1596         Int maxDecPicBuffering = MIN_INT;
    1597         Int maxLatencyIncrease = MIN_INT;
    1598 
    1599         Int prevMaxNumReorderPics  = MIN_INT;
    1600         Int prevMaxDecPicBuffering = MIN_INT;
    1601         Int prevMaxLatencyIncrease = MIN_INT;
    1602 
    1603         assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );
    1604         for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
    1605         {
    1606           Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
    1607           dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );
    1608         }       
    1609 
    1610         for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ )
    1611         {
    1612           Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] );
    1613           maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] );
    1614         }
    1615         assert( maxNumReorderPics != MIN_INT );
    1616         dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics );
    1617 
    1618         // To Be Done !
    1619         // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode );
    1620 
    1621         if( j > 0 ) 
    1622         {
    1623           dpbSize->setSubLayerDpbInfoPresentFlag( i, j, prevMaxDecPicBuffering == maxDecPicBuffering && prevMaxLatencyIncrease == maxLatencyIncrease && prevMaxNumReorderPics == maxNumReorderPics );
    1624         }       
    1625 
    1626         prevMaxNumReorderPics   = maxNumReorderPics;
    1627         prevMaxDecPicBuffering  = maxDecPicBuffering;
    1628         prevMaxLatencyIncrease  = maxLatencyIncrease;
    1629       } 
    1630     } 
    1631   } 
    1632 }
    1633 #endif
     1564
    16341565
    16351566Void TAppEncTop::xSetLayerSets( TComVPS& vps )
     
    16371568  // Layer sets
    16381569  vps.setVpsNumLayerSetsMinus1   ( m_vpsNumLayerSets - 1 );
    1639 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1640   vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );
    1641 #endif
    16421570   
    16431571  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     
    16561584  Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size();
    16571585  // Additional output layer sets + profileLevelTierIdx
    1658 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    16591586  vps.setDefaultTargetOutputLayerIdc      ( m_defaultTargetOutputLayerIdc );   
    16601587  vps.setNumAddOutputLayerSets            ( numAddOuputLayerSets          );
    16611588  vps.initTargetLayerIdLists();
    1662 #else
    1663   vps.setDefaultOneTargetOutputLayerIdc   ( m_defaultOneTargetOutputLayerIdc );
    1664   vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
    1665   vps.setNumAddOutputLayerSetsMinus1       ( numAddOuputLayerSets - 1        );
    1666 #endif
    1667 
    1668 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1589
    16691590  for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++)
    16701591  {
     
    17161637    vps.setAltOutputLayerFlag( olsIdx , false);     
    17171638  }
    1718 #else
    1719   for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
    1720   {
    1721     if ( lsIdx > 0 )
    1722     {
    1723       vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] );
    1724     } 
    1725 
    1726     vps.setOutputLayerSetIdxMinus1( lsIdx, lsIdx - 1 );
    1727 
    1728     for (Int i = 0; i < m_layerIdsInSets[ lsIdx ].size(); i++ )
    1729     {
    1730       vps.setOutputLayerFlag( lsIdx, i, vps.inferOutputLayerFlag( lsIdx, i ));       
    1731     }
    1732   }
    1733 
    1734   for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ )
    1735   {
    1736     vps.setProfileLevelTierIdx( m_vpsNumLayerSets + addOutLs, m_profileLevelTierIdx[ addOutLs ] );
    1737 
    1738     Int refLayerSetIdx = m_outputLayerSetIdx[ addOutLs ];     
    1739     vps.setOutputLayerSetIdxMinus1( m_vpsNumLayerSets + addOutLs, refLayerSetIdx - 1 );
    1740 
    1741     for (Int i = 0; i < m_layerIdsInSets[ refLayerSetIdx].size(); i++ )
    1742     {
    1743       Bool outputLayerFlag = false;
    1744       for (Int j = 0; j < m_layerIdsInAddOutputLayerSet[ addOutLs ].size(); j++ )
    1745       {
    1746         if (  m_layerIdsInAddOutputLayerSet[addOutLs][ j ] == m_layerIdsInSets[ refLayerSetIdx][ i ] )
    1747         {
    1748           outputLayerFlag = true;
    1749           break;
    1750         }
    1751       }
    1752       vps.setOutputLayerFlag( m_vpsNumLayerSets + addOutLs, i, outputLayerFlag );       
    1753     }
    1754   }
    1755   vps.deriveTargetLayerIdLists();
    1756 #endif
     1639
    17571640}
    17581641
     
    17611644  vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag );
    17621645
    1763 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    17641646  TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
    17651647  assert( pcVPSVUI );
    1766 #endif
    17671648
    17681649  if ( m_vpsVuiPresentFlag )
    17691650  {
    1770 #if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    1771     TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
    1772 
    1773     assert( pcVPSVUI );
    1774 #endif
    1775 
    17761651    // All this stuff could actually be derived by the encoder,
    17771652    // however preliminary setting it from input parameters
     
    17791654    pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag );
    17801655    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( m_crossLayerIrapAlignedFlag    );
    1781 #if H_MV_HLS_7_MISC_P0068_21
    17821656    pcVPSVUI->setAllLayersIdrAlignedFlag     ( m_allLayersIdrAlignedFlag      );
    1783 #endif
    17841657    pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag );
    17851658    pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag );
     
    17871660    if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    17881661    {
    1789 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    17901662      for( Int i = 0; i  <=  vps.getVpsNumLayerSetsMinus1(); i++ )
    1791 #else
    1792       for( Int i = 0; i  <=  vps.getVpsNumberLayerSetsMinus1(); i++ )
    1793 #endif
    17941663      {
    17951664        for( Int j = 0; j  <=  vps.getMaxTLayers(); j++ )
     
    19091778    pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD
    19101779  }
    1911 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    19121780  else
    19131781  {
    19141782    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( false   );
    19151783  }
    1916 #endif
    19171784}
    19181785#endif
     
    19701837#endif
    19711838  } 
    1972 #if QC_SPIVMP_MPI_G0119
     1839#if H_3D_SPIVMP
    19731840  vps.setSubPUMPILog2Size( m_iSubPUMPILog2Size );
    19741841#endif
  • trunk/source/Lib/TLibCommon/ContextTables.h

    r872 r884  
    9494
    9595#if H_3D_ARP
    96 #if MTK_ARP_FLAG_CABAC_SIMP_G0061
    9796#define NUM_ARPW_CTX                  3       ///< number of context models for weighting factor index used by advanced residual prediction
    98 #else
    99 #define NUM_ARPW_CTX                  4       ///< number of context models for weighting factor index used by advanced residual prediction
    100 #endif
    10197#endif
    10298
    10399#if H_3D_IC
    104 #if MTK_IC_FLAG_CABAC_SIMP_G0061
    105100#define NUM_IC_FLAG_CTX               1       ///< number of context models for illumination compensation flag
    106 #else
    107 #define NUM_IC_FLAG_CTX               3       ///< number of context models for illumination compensation flag
    108 #endif
    109101#endif
    110102
     
    112104
    113105#if H_3D_DIM
    114 #if QC_GENERIC_SDC_G0122
    115106#define NUM_DEPTH_INTRA_MODE_CTX      1       ///< number of context models for depth intra modes
    116 #else
    117 #define NUM_DEPTH_INTRA_MODE_CTX      8       ///< number of context models for depth intra modes
    118 #endif
    119107#define NUM_DDC_FLAG_CTX              2       ///< number of context models for deltaDC flag (DMM or RBC)
    120108#define NUM_DDC_DATA_CTX              1       ///< number of context models for deltaDC data (DMM or RBC)
     
    122110#define NUM_DMM1_DATA_CTX             1       ///< number of context models for DMM1 data
    123111#endif
    124 #if QC_GENERIC_SDC_G0122
    125112#define NUM_ANGLE_FLAG_CTX            3
    126 #if !QC_SDC_UNIFY_G0130
    127 #define NUM_INTRASDC_FLAG_CTX         3
    128 #endif
    129 #endif
    130113#endif
    131114
    132115#if H_3D_DIM_SDC
    133 #define SDC_NUM_RESIDUAL_FLAG_CTX        1
    134 #define SDC_NUM_RESIDUAL_CTX             1
    135 #endif
    136 
    137 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    138 #define NUM_INTER_SDC_FLAG_CTX        1      ///< number of context models for inter SDC flag
    139 #define NUM_INTER_SDC_SIGN_FLAG_CTX   1      ///< number of context models for sign of inter SDC residual
    140 #define NUM_INTER_SDC_RESIDUAL_CTX    1      ///< number of context models for abs of inter SDC residual
    141 #endif
    142 
    143 #if QC_SDC_UNIFY_G0130
     116#define SDC_NUM_RESIDUAL_FLAG_CTX     1
     117#define SDC_NUM_RESIDUAL_CTX          1
    144118#define NUM_SDC_FLAG_CTX              1      ///< number of context
    145119#endif
     
    366340
    367341#if H_3D_ARP
    368 #if MTK_ARP_FLAG_CABAC_SIMP_G0061
    369342static const UChar
    370343INIT_ARPW[3][NUM_ARPW_CTX] =
     
    374347    { 162, 153, 162 },
    375348};
    376 #else
    377 static const UChar
    378 INIT_ARPW[3][NUM_ARPW_CTX] =
    379 {
    380     { 162, 153, 154, 162 },
    381     { 162, 153, 154, 162 },
    382     { 162, 153, 154, 162 },
    383 };
    384 #endif
     349
    385350#endif
    386351#if H_3D_IC
    387 #if MTK_IC_FLAG_CABAC_SIMP_G0061
    388352static const UChar
    389353INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 
     
    393357    { 154 },
    394358};
    395 #else
    396 static const UChar
    397 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 
    398 {
    399     { 154,  154,  154, },
    400     { 154,  154,  154, },
    401     { 154,  154,  154, },
    402 };
    403 #endif
     359
    404360#endif
    405361#if H_3D_DIM
    406 #if QC_GENERIC_SDC_G0122
    407362static const UChar
    408363INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] =
     
    412367  { 154, }
    413368};
    414 #else
    415 static const UChar
    416 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] =
    417 {
    418     {0,  0,  64, 168, 168, 124, CNU, 0},
    419     {0, 64,   0, 183, CNU, 108,   0, 0},
    420     {64, 0, CNU, CNU, 168, 109,   0, 0}
    421 };
    422 #endif
    423 
    424 #if QC_GENERIC_SDC_G0122
     369
    425370static const UChar
    426371INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] =
     
    430375  { 155, 170, 157 },
    431376};
    432 #if !QC_SDC_UNIFY_G0130
    433 static const UChar
    434 INIT_INTRASDC_FLAG[3][NUM_INTRASDC_FLAG_CTX] =
    435 {
    436   { 214, 229, 230 },
    437   { 215, 202, 174 },
    438   { 213, 201, 246 },
    439 };
    440 #endif
    441 #endif
    442377
    443378static const UChar
     
    482417#endif
    483418
    484 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    485 static const UChar
    486 INIT_INTER_SDC_FLAG[3][NUM_INTER_SDC_FLAG_CTX] =
    487 {
    488   { CNU }, 
    489   { 154 },
    490   { 154 },
    491 };
    492 
    493 static const UChar
    494 INIT_INTER_SDC_SIGN_FLAG[3][NUM_INTER_SDC_SIGN_FLAG_CTX] =
    495 {
    496   { CNU }, 
    497   { 154 },
    498   { 154 },
    499 };
    500 
    501 static const UChar
    502 INIT_INTER_SDC_RESIDUAL[3][NUM_INTER_SDC_RESIDUAL_CTX] =
    503 {
    504   { CNU }, 
    505   { 154 },
    506   { 154 },
    507 };
    508 #endif
     419
    509420//! \}
    510 #if QC_SDC_UNIFY_G0130
     421#if H_3D_DIM_SDC
    511422static const UChar
    512423INIT_SDC_FLAG[3][NUM_SDC_FLAG_CTX] =
  • trunk/source/Lib/TLibCommon/SEI.h

    r872 r884  
    7272    SCALABLE_NESTING                     = 133,
    7373    REGION_REFRESH_INFO                  = 134,
    74 #if H_MV_HLS_7_SEI_P0204_26
     74#if H_MV
    7575    SUB_BITSTREAM_PROPERTY               = 139,    // Final PayloadType to be defined after finalization
    7676#endif
     
    366366};
    367367
    368 #if H_MV_HLS_7_SEI_P0204_26
     368#if H_MV
    369369class SEISubBitstreamProperty : public SEI
    370370{
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r872 r884  
    123123#if H_3D_DIM_SDC
    124124  m_pbSDCFlag             = NULL;
    125 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    126   for( Int i = 0; i < 4; i++ )
    127   {
    128     m_apSegmentDCOffset[i]  = NULL;
    129   }
    130 #else
    131125  m_apSegmentDCOffset[0]  = NULL;
    132126  m_apSegmentDCOffset[1]  = NULL;
    133 #endif
    134127#endif
    135128#endif
     
    153146#endif
    154147#if H_3D_INTER_SDC
    155 #if !QC_SDC_UNIFY_G0130
    156   m_pbInterSDCFlag       = NULL;
    157   for( Int i = 0; i < 4; i++ )
    158   {
    159     m_apSegmentInterDCOffset[i] = NULL;
    160   }
    161 #endif
    162 #if !SEC_INTER_SDC_G0101
    163   m_pucInterSDCMask       = NULL;
    164 #endif
    165148#endif
    166149#if H_3D_DBBP
     
    168151#endif
    169152
    170 #if MTK_DDD_G0063
     153#if H_3D_DDD
    171154  m_pucDisparityDerivedDepth = NULL;
    172155  m_pbUseDDD = NULL;
     
    291274#if H_3D_DIM_SDC
    292275    m_pbSDCFlag             = (Bool*)xMalloc(Bool, uiNumPartition);
    293 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    294     for( Int i = 0; i < 4; i++ )
    295     {
    296       m_apSegmentDCOffset[i]  = (Pel*)xMalloc(Pel, uiNumPartition);
    297     }
    298 #else
    299276    m_apSegmentDCOffset[0]  = (Pel*)xMalloc(Pel, uiNumPartition);
    300277    m_apSegmentDCOffset[1]  = (Pel*)xMalloc(Pel, uiNumPartition);
    301278#endif
    302279#endif
    303 #endif
    304 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    305     m_pbInterSDCFlag     = (Bool*  )xMalloc(Bool,   uiNumPartition);
    306     for( Int i = 0; i < 4; i++ )
    307     {
    308       m_apSegmentInterDCOffset[i] = (Int*)xMalloc(Int, uiNumPartition);
    309     }
    310 #endif
    311280#if H_3D_DBBP
    312281    m_pbDBBPFlag         = (Bool*  )xMalloc(Bool,   uiNumPartition);
     
    318287    m_acCUMvField[1].setNumPartition(uiNumPartition );
    319288  }
    320 #if !SEC_INTER_SDC_G0101
    321 #if H_3D_INTER_SDC
    322   m_pucInterSDCMask     = (UChar*  )xMalloc(UChar,    g_uiMaxCUHeight*g_uiMaxCUWidth);
    323 #endif
    324 #endif
    325289  m_sliceStartCU        = (UInt*  )xMalloc(UInt, uiNumPartition);
    326290  m_sliceSegmentStartCU = (UInt*  )xMalloc(UInt, uiNumPartition);
     
    329293  m_pcPattern            = (TComPattern*)xMalloc(TComPattern, 1);
    330294 
    331 #if MTK_DDD_G0063
     295#if H_3D_DDD
    332296  m_pucDisparityDerivedDepth         = (UChar*  )xMalloc( UChar,  uiNumPartition);
    333297  m_pbUseDDD                         = (Bool*  ) xMalloc( Bool,   uiNumPartition);
     
    413377#endif
    414378
    415 #if MTK_DDD_G0063
     379#if H_3D_DDD
    416380    if ( m_pucDisparityDerivedDepth ) { xFree(m_pucDisparityDerivedDepth);          m_pucDisparityDerivedDepth        = NULL; }
    417381    if ( m_pbUseDDD                 ) { xFree(m_pbUseDDD);                          m_pbUseDDD                        = NULL; }
     
    441405#if H_3D_DIM_SDC
    442406    if ( m_pbSDCFlag            ) { xFree(m_pbSDCFlag);             m_pbSDCFlag             = NULL; }
    443 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    444     for( Int i = 0; i < 4; i++ )
    445     {
    446       if ( m_apSegmentDCOffset[i] ) { xFree(m_apSegmentDCOffset[i]);  m_apSegmentDCOffset[i]  = NULL; }
    447     }
    448 #else
    449407    if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]);  m_apSegmentDCOffset[0]  = NULL; }
    450408    if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]);  m_apSegmentDCOffset[1]  = NULL; }
    451 #endif
    452409#endif   
    453410#endif   
    454 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    455     if ( m_pbInterSDCFlag     ) { xFree(m_pbInterSDCFlag);      m_pbInterSDCFlag    = NULL; }
    456     for(Int i = 0; i < 4; i++ )
    457     {
    458       if ( m_apSegmentInterDCOffset[i] ) { xFree( m_apSegmentInterDCOffset[i] ); m_apSegmentInterDCOffset[i] = NULL; }
    459   }
    460 #endif
    461411#if H_3D_DBBP
    462412    if ( m_pbDBBPFlag         ) { xFree(m_pbDBBPFlag);          m_pbDBBPFlag        = NULL; }
    463413#endif
    464414  }
    465 #if !SEC_INTER_SDC_G0101
    466 #if H_3D_INTER_SDC
    467   if ( m_pucInterSDCMask     ) { xFree(m_pucInterSDCMask);      m_pucInterSDCMask    = NULL; }
    468 #endif
    469 #endif
    470415  m_pcCUAboveLeft       = NULL;
    471416  m_pcCUAboveRight      = NULL;
     
    560505#endif
    561506
    562 #if MTK_DDD_G0063
     507#if H_3D_DDD
    563508    m_pucDisparityDerivedDepth[ui] = pcFrom->m_pucDisparityDerivedDepth[ui];
    564509    m_pbUseDDD[ui] = pcFrom->m_pbUseDDD[ui];
     
    593538#if H_3D_DIM_SDC
    594539    m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui];
    595 #endif
    596 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    597     m_pbInterSDCFlag[ui] = pcFrom->m_pbInterSDCFlag[ui];
    598540#endif
    599541#if H_3D_DBBP
     
    646588#endif
    647589
    648 #if MTK_DDD_G0063
     590#if H_3D_DDD
    649591    memset( m_pucDisparityDerivedDepth        + firstElement, 0,           numElements * sizeof( *m_pucDisparityDerivedDepth ) );
    650592    memset( m_pbUseDDD                        + firstElement, 0,           numElements * sizeof( *m_pbUseDDD ) );
     
    665607#if H_3D_DIM_SDC
    666608    memset( m_pbSDCFlag             + firstElement,     0,                numElements * sizeof( *m_pbSDCFlag            ) );
    667 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    668     for( Int i = 0; i < 4; i++ )
    669     {
    670       memset( m_apSegmentDCOffset[i]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[i] ) );
    671     }
    672 #else
    673609    memset( m_apSegmentDCOffset[0]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[0] ) );
    674610    memset( m_apSegmentDCOffset[1]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[1] ) );
    675611#endif
    676 #endif
    677 #endif
    678 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    679     memset( m_pbInterSDCFlag   + firstElement,     0,                    numElements * sizeof( *m_pbInterSDCFlag ) );
    680     for( Int i = 0; i < 4; i++ )
    681     {
    682       memset( m_apSegmentInterDCOffset[i] + firstElement,     0,         numElements * sizeof( *m_apSegmentInterDCOffset[i] ) );
    683     }
    684612#endif
    685613#if H_3D_DBBP
     
    834762#endif
    835763
    836 #if MTK_DDD_G0063
     764#if H_3D_DDD
    837765      m_pucDisparityDerivedDepth[ui] = 0;
    838766      m_pbUseDDD[ui] = 0;
     
    853781#if H_3D_DIM_SDC
    854782      m_pbSDCFlag           [ui] = false;
    855 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    856       for( Int i = 0; i < 4; i++ )
    857       {
    858         m_apSegmentDCOffset[i][ui] = 0;
    859       }
    860 #else
    861783      m_apSegmentDCOffset[0][ui] = 0;
    862784      m_apSegmentDCOffset[1][ui] = 0;
    863785#endif
    864 #endif
    865 #endif
    866 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    867       m_pbInterSDCFlag[ui] = false;
    868       for( Int i = 0; i < 4; i++ )
    869       {
    870         m_apSegmentInterDCOffset[i][ui] = 0;
    871       }
    872786#endif
    873787#if H_3D_DBBP
     
    955869#endif
    956870
    957 #if MTK_DDD_G0063
     871#if H_3D_DDD
    958872  memset( m_pucDisparityDerivedDepth,         0, iSizeInUchar );
    959873  memset( m_pbUseDDD,                         0, iSizeInBool );
     
    982896#if H_3D_DIM_SDC
    983897  memset( m_pbSDCFlag,            0, sizeof(Bool) * m_uiNumPartition  );
    984 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    985   for( Int i = 0; i < 4; i++ )
    986   {
    987     memset( m_apSegmentDCOffset[i], 0, sizeof(Pel) * m_uiNumPartition   );
    988   }
    989 #else
    990898  memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition   );
    991899  memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition   );
    992900#endif
    993 #endif
    994 #endif
    995 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    996   memset( m_pbInterSDCFlag,           0, sizeof( Bool ) * m_uiNumPartition );
    997   for( Int i = 0; i < 4; i++ )
    998   {
    999     memset( m_apSegmentInterDCOffset[i], 0, sizeof( Int ) * m_uiNumPartition );
    1000   }
    1001901#endif
    1002902#if H_3D_DBBP
     
    1056956#endif
    1057957
    1058 #if MTK_DDD_G0063
     958#if H_3D_DDD
    1059959      m_pucDisparityDerivedDepth[ui] = pcCU->m_pucDisparityDerivedDepth[uiPartOffset+ui];
    1060960      m_pbUseDDD[ui]                 = pcCU->m_pbUseDDD[uiPartOffset+ui];
     
    1075975#if H_3D_DIM_SDC
    1076976      m_pbSDCFlag           [ui] = pcCU->m_pbSDCFlag            [ uiPartOffset + ui ];
    1077 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    1078       for( Int i = 0; i < 4; i++ )
    1079       {
    1080         m_apSegmentDCOffset[i][ui] = pcCU->m_apSegmentDCOffset[i] [ uiPartOffset + ui ];
    1081       }
    1082 #else
    1083977      m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0] [ uiPartOffset + ui ];
    1084978      m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ];
    1085979#endif
    1086 #endif
    1087 #endif
    1088 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    1089       m_pbInterSDCFlag      [ui] = pcCU->m_pbInterSDCFlag    [ uiPartOffset + ui ];
    1090       for( Int i = 0; i < 4; i++ )
    1091       {
    1092         m_apSegmentInterDCOffset[i][ui] = pcCU->m_apSegmentInterDCOffset[i][ uiPartOffset + ui ];
    1093       }
    1094980#endif
    1095981#if H_3D_DBBP
     
    12161102#endif
    12171103
    1218 #if MTK_DDD_G0063
     1104#if H_3D_DDD
    12191105  m_pucDisparityDerivedDepth          = pcCU->getDDDepth()        + uiPart;
    12201106  m_pbUseDDD                          = pcCU->getUseDDD()         + uiPart;
     
    12461132#if H_3D_DIM_SDC
    12471133  m_pbSDCFlag               = pcCU->getSDCFlag()              + uiPart;
    1248 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    1249   for( Int i = 0; i < 4; i++ )
    1250   {
    1251     m_apSegmentDCOffset[i]    = pcCU->getSDCSegmentDCOffset(i)  + uiPart;
    1252   }
    1253 #else
    12541134  m_apSegmentDCOffset[0]    = pcCU->getSDCSegmentDCOffset(0)  + uiPart;
    12551135  m_apSegmentDCOffset[1]    = pcCU->getSDCSegmentDCOffset(1)  + uiPart;
    1256 #endif
    12571136#endif 
    12581137#endif 
    1259 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    1260   m_pbInterSDCFlag          = pcCU->getInterSDCFlag()       + uiPart;
    1261   for( Int i = 0; i < 4; i++ )
    1262   {
    1263     m_apSegmentInterDCOffset[i] = pcCU->getInterSDCSegmentDCOffset( i ) + uiPart;
    1264   }
    1265 #endif
    12661138#if H_3D_DBBP
    12671139  m_pbDBBPFlag              = pcCU->getDBBPFlag()         + uiPart;
     
    13801252#endif
    13811253
    1382 #if MTK_DDD_G0063
     1254#if H_3D_DDD
    13831255  m_pucDisparityDerivedDepth         = pcCU->getDDDepth()              + uiAbsPartIdx;
    13841256  m_pbUseDDD                         = pcCU->getUseDDD()              + uiAbsPartIdx;
     
    14451317  memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar );
    14461318 
    1447 #if MTK_DDD_G0063
     1319#if H_3D_DDD
    14481320  memcpy( m_pucDisparityDerivedDepth          + uiOffset, pcCU->getDDDepth(),         iSizeInUchar );
    14491321  memcpy( m_pbUseDDD                          + uiOffset, pcCU->getUseDDD(),          iSizeInBool );
     
    14651337#if H_3D_DIM_SDC
    14661338  memcpy( m_pbSDCFlag             + uiOffset, pcCU->getSDCFlag(),             iSizeInBool  );
    1467 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    1468   for( Int i = 0; i < 4; i++ )
    1469   {
    1470     memcpy( m_apSegmentDCOffset[i]  + uiOffset, pcCU->getSDCSegmentDCOffset(i), sizeof( Pel ) * uiNumPartition);
    1471   }
    1472 #else
    14731339  memcpy( m_apSegmentDCOffset[0]  + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition);
    14741340  memcpy( m_apSegmentDCOffset[1]  + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition);
    14751341#endif
    1476 #endif
    1477 #endif
    1478 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    1479   memcpy( m_pbInterSDCFlag  + uiOffset, pcCU->getInterSDCFlag(),      iSizeInBool  );
    1480   for( Int i = 0; i < 4; i++ )
    1481   {
    1482     memcpy( m_apSegmentInterDCOffset[i] + uiOffset, pcCU->getInterSDCSegmentDCOffset( i ), sizeof( Int ) * uiNumPartition);
    1483   }
    14841342#endif
    14851343#if H_3D_DBBP
     
    15591417#endif
    15601418
    1561 #if MTK_DDD_G0063
     1419#if H_3D_DDD
    15621420  memcpy( rpcCU->getDDDepth()          + m_uiAbsIdxInLCU, m_pucDisparityDerivedDepth,         iSizeInUchar  );
    15631421  memcpy( rpcCU->getUseDDD()           + m_uiAbsIdxInLCU, m_pbUseDDD,                         iSizeInBool  );
     
    16021460#if H_3D_DIM_SDC
    16031461  memcpy( rpcCU->getSDCFlag()             + m_uiAbsIdxInLCU, m_pbSDCFlag,      iSizeInBool  );
    1604 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    1605   for( Int i = 0; i < 4; i++ )
    1606   {
    1607     memcpy( rpcCU->getSDCSegmentDCOffset(i) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[i], sizeof( Pel ) * m_uiNumPartition);
    1608   }
    1609 #else
    16101462  memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition);
    16111463  memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition);
    16121464#endif
    1613 #endif
    1614 #endif
    1615 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    1616   memcpy( rpcCU->getInterSDCFlag() + m_uiAbsIdxInLCU, m_pbInterSDCFlag,      iSizeInBool  );
    1617   for( Int i = 0;i < 4; i++ )
    1618   {
    1619     memcpy( rpcCU->getInterSDCSegmentDCOffset( i ) + m_uiAbsIdxInLCU, m_apSegmentInterDCOffset[i], sizeof( Int ) * m_uiNumPartition);
    1620   }
    16211465#endif
    16221466#if H_3D_DBBP
     
    17071551  memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar );
    17081552 
    1709 #if MTK_DDD_G0063
     1553#if H_3D_DDD
    17101554  memcpy( rpcCU->getDDDepth()          + uiPartOffset, m_pucDisparityDerivedDepth,         iSizeInUchar );
    17111555  memcpy( rpcCU->getUseDDD()           + uiPartOffset, m_pbUseDDD,                         iSizeInBool );
     
    17261570#if H_3D_DIM_SDC
    17271571  memcpy( rpcCU->getSDCFlag()             + uiPartOffset, m_pbSDCFlag,      iSizeInBool  );
    1728 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    1729   for( Int i = 0; i < 4; i++ )
    1730   {
    1731     memcpy( rpcCU->getSDCSegmentDCOffset(i) + uiPartOffset, m_apSegmentDCOffset[i], sizeof( Pel ) * uiQNumPart);
    1732   }
    1733 #else
    17341572  memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart);
    17351573  memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart);
    17361574#endif
    1737 #endif
    1738 #endif
    1739 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    1740   memcpy( rpcCU->getInterSDCFlag() + uiPartOffset, m_pbInterSDCFlag,      iSizeInBool  );
    1741   for( Int i = 0; i < 4; i++ )
    1742   {
    1743     memcpy( rpcCU->getInterSDCSegmentDCOffset( i ) + uiPartOffset, m_apSegmentInterDCOffset[i], sizeof( Int ) * uiQNumPart);
    1744   }
    17451575#endif
    17461576#if H_3D_DBBP
     
    17911621}
    17921622
    1793 #if MTK_DDD_G0063
     1623#if H_3D_DDD
    17941624Void TComDataCU::setDDDepthSubParts ( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    17951625{
     
    24632293  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    24642294  uiCtx    = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0;
    2465  
    2466 #if !MTK_ARP_FLAG_CABAC_SIMP_G0061       
    2467   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    2468   uiCtx   += ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1): 0;
    2469 #endif
    2470   return uiCtx;
    2471 }
    2472 #endif
    2473 #if !MTK_IC_FLAG_CABAC_SIMP_G0061
    2474 #if H_3D_IC
    2475 UInt TComDataCU::getCtxICFlag( UInt uiAbsPartIdx )
    2476 {
    2477   UInt        uiCtx = 0;
    2478 
    2479   TComDataCU* pcTempCU = NULL;
    2480   UInt        uiTempPartIdx = 0;
    2481 
    2482   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    2483   uiCtx    = ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0;
    2484 
    2485   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    2486   uiCtx    += ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0;
    2487 
    2488   return uiCtx;
    2489 }
    2490 #endif
     2295    return uiCtx;
     2296}
    24912297#endif
    24922298#if H_3D_DBBP
     
    25692375#endif
    25702376
    2571 #if H_3D_INTER_SDC
    2572 #if !QC_SDC_UNIFY_G0130
    2573 Void TComDataCU::setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    2574 {
    2575   setSubPart( bInterSDCFlag, m_pbInterSDCFlag, uiAbsPartIdx, uiDepth, uiPartIdx );
    2576 }
    2577 
    2578 UInt TComDataCU::getCtxInterSDCFlag( UInt uiAbsPartIdx )
     2377#if H_3D_DIM_SDC
     2378UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx )
    25792379{
    25802380  return 0;
    2581 }
    2582 #endif
    2583 
    2584 #if !SEC_INTER_SDC_G0101
    2585 Void TComDataCU::xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask )
    2586 {
    2587   UInt  uiWidth      = pcCU->getWidth ( 0 );
    2588   UInt  uiHeight     = pcCU->getHeight( 0 );
    2589   UInt  uiPartitionSize = pcCU->getPartitionSize( 0 );
    2590   UInt  uiXOffset = 0, uiYOffset = 0;
    2591 
    2592   switch( uiPartitionSize )
    2593   {
    2594   case SIZE_2NxN:
    2595     uiXOffset = uiWidth;      uiYOffset = uiHeight >> 1;   break;
    2596   case SIZE_2NxnU:
    2597     uiXOffset = uiWidth;      uiYOffset = uiHeight >> 2;   break;
    2598   case SIZE_2NxnD:
    2599     uiXOffset = uiWidth;      uiYOffset = ( uiHeight >> 1 ) + ( uiHeight >> 2 );   break;
    2600   case SIZE_Nx2N:
    2601     uiXOffset = uiWidth >> 1; uiYOffset = uiHeight; break;
    2602   case SIZE_nLx2N:
    2603     uiXOffset = uiWidth >> 2; uiYOffset = uiHeight; break;
    2604   case SIZE_nRx2N:
    2605     uiXOffset = ( uiWidth >> 1 ) + ( uiWidth >> 2 ); uiYOffset = uiHeight; break;
    2606   case SIZE_NxN:
    2607     uiXOffset = uiWidth >> 1; uiYOffset = uiHeight >> 1;  break;
    2608   default:
    2609     assert( uiPartitionSize == SIZE_2Nx2N );
    2610     uiXOffset = uiWidth;     uiYOffset = uiHeight;    break;
    2611   }
    2612 
    2613   UInt uiPelX, uiPelY;
    2614 
    2615   memset( pMask, 0, uiWidth*uiHeight );
    2616 
    2617   //mask
    2618   if( uiPartitionSize == SIZE_2NxN || uiPartitionSize == SIZE_2NxnD || uiPartitionSize == SIZE_2NxnU )
    2619   {
    2620     for( uiPelY = 0; uiPelY < uiYOffset; uiPelY++ )
    2621     {
    2622       for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
    2623       {
    2624         pMask[uiPelX + uiPelY*uiWidth] = 0;
    2625       }
    2626     }
    2627 
    2628     for( ; uiPelY < uiHeight; uiPelY++ )
    2629     {
    2630       for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
    2631       {
    2632         pMask[uiPelX + uiPelY*uiWidth] = 1;
    2633       }
    2634     }
    2635   }
    2636   else if( uiPartitionSize == SIZE_Nx2N || uiPartitionSize == SIZE_nLx2N || uiPartitionSize == SIZE_nRx2N )
    2637   {
    2638     for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ )
    2639     {
    2640       for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ )
    2641       {
    2642         pMask[uiPelX + uiPelY*uiWidth] = 0;
    2643       }
    2644 
    2645       for( ; uiPelX < uiWidth; uiPelX++ )
    2646       {
    2647         pMask[uiPelX + uiPelY*uiWidth] = 1;
    2648       }
    2649     }
    2650   }
    2651   else if( uiPartitionSize == SIZE_NxN )
    2652   {
    2653     for( uiPelY = 0; uiPelY < uiYOffset; uiPelY++ )
    2654     {
    2655       for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ )
    2656       {
    2657         pMask[uiPelX + uiPelY*uiWidth] = 0;
    2658       }
    2659 
    2660       for( ; uiPelX < uiWidth; uiPelX++ )
    2661       {
    2662         pMask[uiPelX + uiPelY*uiWidth] = 1;
    2663       }
    2664     }
    2665 
    2666     for( ; uiPelY < uiHeight; uiPelY++ )
    2667     {
    2668       for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ )
    2669       {
    2670         pMask[uiPelX + uiPelY*uiWidth] = 2;
    2671       }
    2672 
    2673       for( ; uiPelX < uiWidth; uiPelX++ )
    2674       {
    2675         pMask[uiPelX + uiPelY*uiWidth] = 3;
    2676       }
    2677     }
    2678   }
    2679 
    2680 }
    2681 #endif
    2682 #endif
    2683 
    2684 #if QC_GENERIC_SDC_G0122
    2685 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx )
    2686 {
    2687 #if QC_SDC_UNIFY_G0130
    2688   return 0;
    2689 #else
    2690   TComDataCU* pcTempCU;
    2691   UInt        uiTempPartIdx;
    2692   UInt        uiCtx = 0;
    2693 
    2694   // Get BCBP of left PU
    2695   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    2696   uiCtx    = ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0;
    2697 
    2698   // Get BCBP of above PU
    2699   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    2700   uiCtx   += ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0;
    2701 
    2702   return uiCtx;
    2703 #endif
    27042381}
    27052382
     
    29472624  // check general CU information
    29482625  if( !getSlice()->getIsDepth() || !isIntra(uiAbsPartIdx) || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N )
     2626  {
    29492627    return false;
    2950 #if QC_GENERIC_SDC_G0122
     2628  }
     2629
    29512630  if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) && !isDimDeltaDC( getLumaIntraDir( uiAbsPartIdx ) ) )
    29522631  {
     
    29602639
    29612640  return false;
    2962 #endif
    29632641  // check prediction mode
    29642642  UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 
     
    35823260inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,
    35833261  Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo*  inheritedVSPDisInfo  )
    3584   {
    3585 #if MTK_NBDV_IVREF_FIX_G0067
     3262{
    35863263  if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1)
    3587 #else
    3588   if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() )
    3589 #endif
    35903264  {
    35913265    return false;
     
    35943268  Int refViewIdx = pDInfo->m_aVIdxCan;
    35953269  TComPic* picDepth = getSlice()->getIvPic( true, refViewIdx );
    3596  
     3270
    35973271  if( picDepth == NULL ) // No depth reference avail
    35983272  {
     
    36023276
    36033277  rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);
    3604  
     3278
    36053279  Bool  refViewAvailFlag = false;
    36063280  UChar predFlag[2]      = {0, 0};
    3607 #if !MTK_RBIP_VSP_G0069
    3608   Int   refListIdY       = 0;   
    3609   Int   viewIdInRefListX = -1;
    3610 #endif
    3611  
     3281
    36123282  for( Int iRefListIdX = 0; iRefListIdX < 2 && !refViewAvailFlag; iRefListIdX++ )
    36133283  {
     
    36203290        refViewAvailFlag      = true;
    36213291        predFlag[iRefListIdX] = 1;
    3622 #if !MTK_RBIP_VSP_G0069
    3623         viewIdInRefListX      = m_pcSlice->getRefPic(eRefPicListX, i)->getViewId();
    3624         refListIdY            = 1 - iRefListIdX;
    3625 #endif
    36263292        pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i );
    36273293#if H_3D_NBDV
     
    36313297    }
    36323298  }
    3633 
    3634 #if !MTK_RBIP_VSP_G0069
    3635   if (m_pcSlice->isInterB() && refViewAvailFlag)
    3636   {
    3637     RefPicList eRefPicListY = RefPicList( refListIdY );
    3638     refViewAvailFlag = false;
    3639     for ( Int i = 0; i < m_pcSlice->getNumRefIdx(eRefPicListY) && !refViewAvailFlag; i++ )
    3640     {
    3641       Int viewIdxRefInListY = m_pcSlice->getRefPic(eRefPicListY, i)->getViewIndex();
    3642       if ( viewIdxRefInListY != refViewIdx && viewIdxRefInListY != m_pcSlice->getViewIndex() )
    3643       {
    3644         refViewAvailFlag = true;
    3645         predFlag[refListIdY] = 1;
    3646         TComMv  cMv = pDInfo->m_acNBDV;
    3647        
    3648         Int viewIdInRefListY = m_pcSlice->getRefPic( eRefPicListY, i)->getViewId();
    3649         Int currViewId       = m_pcSlice->getViewId();
    3650        
    3651         //// Following might be added here when MV-HEVC 5 HLS is included (and derivations above removed):
    3652         // Int viewIdInRefListX = m_pcSlice->getVPS()->getViewIdVal( refViewIdx  );
    3653        
    3654         Int iScale      = xGetDistScaleFactor( currViewId, viewIdInRefListY, currViewId, viewIdInRefListX );
    3655        
    3656         // Can iScale == 4096 happen?, I guess not since viewIdInRefListY is always unequal to viewIdInRefListX.
    3657         if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag() )
    3658         {
    3659           cMv = cMv.scaleMv( iScale );
    3660         }
    3661         else
    3662         {
    3663 
    3664           cMv = cMv;
    3665         }
    3666         clipMv( cMv );
    3667         pcMvFieldNeighbours[(iCount<<1)+refListIdY].setMvField( cMv, i );
    3668 #if H_3D_NBDV
    3669         pcMvFieldNeighbours[(iCount<<1)+refListIdY].getMv().setIDVFlag (false);
    3670 #endif
    3671       }
    3672     }
    3673   }
    3674 #endif
    36753299
    36763300  // Set values to be returned
     
    37913415  for ( Int currListPos = (ivCandDir[0] ? 1 : 0); currListPos < iCount; currListPos++ )
    37923416  {
    3793 #if NTT_STORE_SPDV_VSP_G0148
    37943417    if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] != 0 ) )
    3795 #else
    3796     if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] == 1 ) )
    3797 #endif
    37983418    {
    37993419      continue;
     
    42273847  UChar tmpDir;
    42283848
    4229 #if MTK_DDD_G0063
     3849#if H_3D_DDD
    42303850  m_iUseDDDCandIdx = -1;
    42313851#endif
     
    43113931    iPosLeftAbove[0] = numA1B1B0;
    43123932#if H_3D_VSP
    4313 #if NTT_STORE_SPDV_VSP_G0148
    43143933    if (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0
    4315 #else
    4316     if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1
    4317 #endif
    43183934#if H_3D_IC
    43193935      && !bICFlag
     
    43383954    iPosLeftAbove[1] = numA1B1B0;
    43393955#if H_3D_VSP
    4340 #if NTT_STORE_SPDV_VSP_G0148
    43413956    if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0)
    4342 #else
    4343     if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1)
    4344 #endif
    43453957#if H_3D_IC
    43463958      && !bICFlag
     
    43653977  {
    43663978#if H_3D_VSP
    4367 #if NTT_STORE_SPDV_VSP_G0148
    43683979    if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0)
    4369 #else
    4370     if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)
    4371 #endif
    43723980#if H_3D_IC
    43733981      && !bICFlag
     
    43903998  {
    43913999#if H_3D_VSP
    4392 #if NTT_STORE_SPDV_VSP_G0148
    43934000    if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 0
    4394 #else
    4395     if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1
    4396 #endif
    43974001#if H_3D_IC
    43984002      && !bICFlag
     
    44174021  {
    44184022#if H_3D_VSP
    4419 #if NTT_STORE_SPDV_VSP_G0148
    44204023    if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0)
    4421 #else
    4422     if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)
    4423 #endif
    44244024#if H_3D_IC
    44254025      && !bICFlag
     
    44494049  if( bMPIFlag)
    44504050  {
    4451 #if QC_SPIVMP_MPI_G0119
    44524051    tmpMV[0].setMvField( cZeroMv, NOT_VALID );
    44534052    tmpMV[1].setMvField( cZeroMv, NOT_VALID );
     
    45564155    }
    45574156#endif
    4558 #else
    4559     UInt uiPartIdxCenter;
    4560     xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );   
    4561     tmpMV[0].setMvField( cZeroMv, NOT_VALID );
    4562     tmpMV[1].setMvField( cZeroMv, NOT_VALID );
    4563     Int tRef[2]={-1, -1};
    4564 
    4565 #if H_3D_FCO
    4566     TComPic * pcTexturePic = m_pcSlice->getTexturePic();
    4567     TComDataCU *pcTextureCU = 0;
    4568     if ( pcTexturePic )
    4569       pcTextureCU = pcTexturePic->getCU( getAddr() );
    4570 #else
    4571     TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() );
    4572 #endif
    4573 
    4574 #if H_3D_FCO
    4575     if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) )
    4576 #else
    4577     if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) )
    4578 #endif
    4579     {
    4580       pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, tmpMV[0] );
    4581       tRef[0] = getPic()->isTextRefValid( REF_PIC_LIST_0, tmpMV[0].getRefIdx() );
    4582       if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) )
    4583       {
    4584         TComMv cMvPred = tmpMV[0].getMv();
    4585         const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    4586         cMvPred+=cAdd;
    4587         cMvPred>>=2;
    4588         clipMv(cMvPred);
    4589         tmpMV[0].setMvField(cMvPred,tRef[0]);
    4590       }
    4591       if ( getSlice()->isInterB() )
    4592       {
    4593         pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, tmpMV[1] );
    4594         tRef[1] = getPic()->isTextRefValid( REF_PIC_LIST_1, tmpMV[1].getRefIdx() );
    4595         if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) )
     4157    if( tmpDir != 0 )
     4158    {
     4159      Int iCnloop = 0;
     4160      Bool bRemoveSpa = false; //pruning
     4161
     4162      for(Int i = 0; i < 2; i ++)
     4163      {
     4164        iCnloop = iPosLeftAbove[i];
     4165        if ( iCnloop == -1 )
    45964166        {
    4597           TComMv cMvPred = tmpMV[1].getMv();
    4598           const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    4599           cMvPred+=cAdd;
    4600           cMvPred>>=2;
    4601           clipMv(cMvPred);
    4602           tmpMV[1].setMvField(cMvPred,tRef[1]);
     4167          continue;
    46034168        }
    4604       }
    4605 
    4606       tmpDir = 0;
    4607       if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) )
    4608       {
    4609         tmpDir += ((tmpMV[0].getRefIdx()>=0)?1:0);
    4610       }
    4611       if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) )
    4612       {
    4613         tmpDir += ((tmpMV[1].getRefIdx()>=0)?2:0);
    4614       }
    4615 #endif
    4616       if( tmpDir != 0 )
    4617       {
    4618         Int iCnloop = 0;
    4619         Bool bRemoveSpa = false; //pruning
    4620 
    4621         for(Int i = 0; i < 2; i ++)
     4169        if(tmpDir == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1])
    46224170        {
    4623           iCnloop = iPosLeftAbove[i];
    4624           if ( iCnloop == -1 )
     4171          bRemoveSpa                      = true;
     4172          break;
     4173        }     
     4174      }
     4175
     4176      if (!bRemoveSpa)
     4177      {
     4178        rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);
     4179      }
     4180      else
     4181      {
     4182        rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV);
     4183        if (iCnloop<numA1B1B0)
     4184        {
     4185          numA1B1B0--;
     4186        }
     4187        iCountHEVC--;
     4188
     4189        if (iPosLeftAbove[0] != -1)
     4190        {
     4191          if (iCnloop == iPosLeftAbove[0])
    46254192          {
    4626             continue;
     4193            iPosLeftAbove[0] = -1;
    46274194          }
    4628           if(tmpDir == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1])
     4195          else
    46294196          {
    4630             bRemoveSpa                      = true;
    4631             break;
    4632           }     
     4197            iPosLeftAbove[0]++;
     4198          }
    46334199        }
    4634 
    4635         if (!bRemoveSpa)
     4200        if (iPosLeftAbove[1] != -1)
    46364201        {
    4637           rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);
    4638         }
    4639         else
    4640         {
    4641           rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV);
    4642           if (iCnloop<numA1B1B0)
     4202          if (iCnloop == iPosLeftAbove[1])
    46434203          {
    4644             numA1B1B0--;
     4204            iPosLeftAbove[1] = -1;
    46454205          }
    4646           iCountHEVC--;
    4647 
    4648           if (iPosLeftAbove[0] != -1)
     4206          else
    46494207          {
    4650             if (iCnloop == iPosLeftAbove[0])
     4208            if (iCnloop > iPosLeftAbove[1])
    46514209            {
    4652               iPosLeftAbove[0] = -1;
    4653             }
    4654             else
    4655             {
    4656               iPosLeftAbove[0]++;
    4657             }
    4658           }
    4659           if (iPosLeftAbove[1] != -1)
    4660           {
    4661             if (iCnloop == iPosLeftAbove[1])
    4662             {
    4663               iPosLeftAbove[1] = -1;
    4664             }
    4665             else
    4666             {
    4667               if (iCnloop > iPosLeftAbove[1])
    4668               {
    4669                 iPosLeftAbove[1]++;
    4670               }
     4210              iPosLeftAbove[1]++;
    46714211            }
    46724212          }
    46734213        }
    4674 #if QC_SPIVMP_MPI_G0119
    4675         pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx());
    4676         pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx());
    4677 #else
    4678         if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) )
     4214      }
     4215      pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx());
     4216      pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx());
     4217
     4218      puhInterDirNeighbours[iCount] = tmpDir;
     4219
     4220      if ( mrgCandIdx == iCount )
     4221      {
     4222        return;
     4223      }
     4224      iCount ++;
     4225    }
     4226  }
     4227#if H_3D_DDD
     4228  if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0  && bMPIFlag )
     4229  {
     4230    UInt uiPartIdx;
     4231    TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() );
     4232    TComSlice *pcTextureSlice = pcTextureCU->getSlice(); 
     4233
     4234
     4235    tmpMV[0].setMvField( cZeroMv, NOT_VALID );
     4236    tmpMV[1].setMvField( cZeroMv, NOT_VALID );
     4237    tmpDir = 0;
     4238
     4239    xDeriveCenterIdx( uiPUIdx, uiPartIdx);
     4240
     4241    if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) )
     4242    {
     4243
     4244      TComMvField cMVField;
     4245      Int iDV = 0;
     4246      Int iViewIdx = 0;
     4247      pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField );
     4248      if( cMVField.getRefIdx() >= 0 )
     4249      {
     4250        if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() )
    46794251        {
    4680           pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tRef[0]);
    4681         }
    4682         if ( getSlice()->isInterB())
    4683         {
    4684           if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) )
     4252          iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex();
     4253          iDV = cMVField.getHor();
     4254
     4255
     4256          Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() );
     4257
     4258          if( iValidDepRef >= 0 )
    46854259          {
    4686             pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tRef[1]);
     4260            const TComMv cAdd( 2, 2 );
     4261            cMVField.getMv() += cAdd;
     4262            cMVField.getMv() >>= 2;
     4263            clipMv( cMVField.getMv() );
     4264            tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef );
     4265            tmpDir = 1;
    46874266          }
    46884267        }
    4689 #endif
    4690         puhInterDirNeighbours[iCount] = tmpDir;
     4268      }
     4269
     4270      pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField );
     4271
     4272      if( !tmpDir && cMVField.getRefIdx() >= 0 )
     4273      {
     4274        if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() )
     4275        {
     4276          iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex();
     4277          iDV = cMVField.getHor();
     4278
     4279          Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() );
     4280
     4281          if( iValidDepRef >= 0 )
     4282          {
     4283            const TComMv cAdd( 2, 2 );
     4284            cMVField.getMv() += cAdd;
     4285            cMVField.getMv() >>= 2;
     4286            clipMv( cMVField.getMv() );
     4287            tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef );
     4288            tmpDir = 2;
     4289          }
     4290        }
     4291      }
     4292      if( tmpDir != 0 )
     4293      {
     4294        rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);
     4295        m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV,  iViewIdx );
     4296        m_iUseDDDCandIdx = iCount;
     4297
     4298        if( tmpDir == 1 )
     4299        {
     4300          pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ];
     4301        }
     4302        else if( tmpDir == 2  )
     4303        {
     4304          pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ];
     4305        }
     4306
     4307        abCandIsInter        [ iCount ] = true;
     4308        puhInterDirNeighbours[ iCount ] = tmpDir;
    46914309
    46924310        if ( mrgCandIdx == iCount )
     
    46954313        }
    46964314        iCount ++;
    4697       }
    4698 #if !QC_SPIVMP_MPI_G0119
    4699     }
    4700 #endif
    4701   }
    4702 #if MTK_DDD_G0063
    4703   if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0  && bMPIFlag )
    4704   {
    4705       UInt uiPartIdx;
    4706       TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() );
    4707       TComSlice *pcTextureSlice = pcTextureCU->getSlice(); 
    4708 
    4709 
    4710       tmpMV[0].setMvField( cZeroMv, NOT_VALID );
    4711       tmpMV[1].setMvField( cZeroMv, NOT_VALID );
    4712       tmpDir = 0;
    4713 
    4714       xDeriveCenterIdx( uiPUIdx, uiPartIdx);
    4715 
    4716       if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) )
    4717       {
    4718 
    4719           TComMvField cMVField;
    4720 #if !HTM10RC1_FIX
    4721           UChar ucInterDir = pcTextureCU->getInterDir( uiPartIdx );
    4722 #endif
    4723           Int iDV = 0;
    4724           Int iViewIdx = 0;
    4725 #if !HTM10RC1_FIX
    4726           if( ucInterDir & 1 )
    4727           {
    4728 #endif
    4729               pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField );
    4730 #if HTM10RC1_FIX
    4731               if( cMVField.getRefIdx() >= 0 )
    4732               {
    4733 #endif
    4734               if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() )
    4735               {
    4736                   iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex();
    4737                   iDV = cMVField.getHor();
    4738 
    4739 
    4740                   Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() );
    4741 
    4742                   if( iValidDepRef >= 0 )
    4743                   {
    4744                       const TComMv cAdd( 2, 2 );
    4745                       cMVField.getMv() += cAdd;
    4746                       cMVField.getMv() >>= 2;
    4747                       clipMv( cMVField.getMv() );
    4748                       tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef );
    4749                       tmpDir = 1;
    4750                   }
    4751               }
    4752           }
    4753 
    4754 #if !HTM10RC1_FIX
    4755           if( !tmpDir && ( ucInterDir & 2 ))
    4756           {
    4757 #endif
    4758               pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField );
    4759 
    4760 #if HTM10RC1_FIX
    4761               if( !tmpDir && cMVField.getRefIdx() >= 0 )
    4762               {
    4763 #endif
    4764               if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() )
    4765               {
    4766                   iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex();
    4767                   iDV = cMVField.getHor();
    4768 
    4769                   Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() );
    4770 
    4771                   if( iValidDepRef >= 0 )
    4772                   {
    4773                       const TComMv cAdd( 2, 2 );
    4774                       cMVField.getMv() += cAdd;
    4775                       cMVField.getMv() >>= 2;
    4776                       clipMv( cMVField.getMv() );
    4777                       tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef );
    4778                       tmpDir = 2;
    4779                   }
    4780               }
    4781           }
    4782           if( tmpDir != 0 )
    4783           {
    4784               rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);
    4785               m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV,  iViewIdx );
    4786               m_iUseDDDCandIdx = iCount;
    4787 
    4788               if( tmpDir == 1 )
    4789               {
    4790                   pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ];
    4791               }
    4792               else if( tmpDir == 2  )
    4793               {
    4794                   pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ];
    4795               }
    4796 
    4797               abCandIsInter        [ iCount ] = true;
    4798               puhInterDirNeighbours[ iCount ] = tmpDir;
    4799 
    4800               if ( mrgCandIdx == iCount )
    4801               {
    4802                   return;
    4803               }
    4804               iCount ++;
    4805 
    4806               Int iLeftAboveAvail = 0;
    4807               if( iPosLeftAbove[ 0 ] != -1 )
    4808               {
    4809                   iPosLeftAbove[ 0 ] = iCount;
    4810                   iLeftAboveAvail = 1;
    4811               }
    4812               if( iPosLeftAbove[ 1 ] != -1 )
    4813               {
    4814                   iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail;
    4815               }
    4816 
    4817           }
    4818       }     
    4819 
     4315
     4316        Int iLeftAboveAvail = 0;
     4317        if( iPosLeftAbove[ 0 ] != -1 )
     4318        {
     4319          iPosLeftAbove[ 0 ] = iCount;
     4320          iLeftAboveAvail = 1;
     4321        }
     4322        if( iPosLeftAbove[ 1 ] != -1 )
     4323        {
     4324          iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail;
     4325        }
     4326      }
     4327    }
    48204328  }
    48214329#endif
     
    48364344  Bool ivMvPredFlag   = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() );
    48374345
    4838 #if MTK_NBDV_IVREF_FIX_G0067
    48394346  if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1)
    4840 #else
    4841   if ( ivMvPredFlag )
    4842 #endif
    48434347  {
    48444348    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP );
     
    48484352  //////// INTER VIEW MOTION COMP(IvMC) /////////
    48494353  ///////////////////////////////////////////////
    4850 #if QC_DEPTH_MERGE_SIMP_G0127
    48514354  if( getSlice()->getIsDepth() )
    48524355  {
    48534356    ivCandDir[1] = ivCandDir[2] = ivCandDir[3] = 0;
    48544357  }
    4855 #endif
     4358
    48564359  if( ivCandDir[0] )
    48574360  {
     
    48934396      for(; iCnloop >= 0; iCnloop --)
    48944397      {
    4895 #if MTK_DDD_G0063
     4398#if H_3D_DDD
    48964399          if( iCnloop == m_iUseDDDCandIdx )
    48974400          {
     
    49614464    if (bIvMC)
    49624465    {
    4963 #if QC_SPIVMP_MPI_G0119
    4964       if(!m_pcSlice->getIsDepth())
    4965 #endif
    4966 #if SEC_SPIVMP_MCP_SIZE_G0077
    4967         if(getPartitionSize(0) == SIZE_2Nx2N)
     4466      if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N )
     4467      {
    49684468          pbSPIVMPFlag[iCount] = true;
    4969 #else
    4970       pbSPIVMPFlag[iCount] = true;
    4971 #endif
     4469      }
    49724470#if H_3D_DBBP
    49734471      pbSPIVMPFlag[iCount] &= !bDBBPFlag;
     
    50994597#endif
    51004598
    5101 #if MTK_DDD_G0063
     4599#if H_3D_DDD
    51024600  // early termination
    51034601  if ( iCount >= getSlice()->getMaxNumMergeCand())
     
    51114609  //////// INTER VIEW DISP COMP (IvDC) ////////
    51124610  /////////////////////////////////////////////
    5113 #if QC_DEPTH_MERGE_SIMP_G0127
    51144611  if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() )
    5115 #else
    5116   if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand())
    5117 #endif
    51184612  {
    51194613    assert(iCount < getSlice()->getMaxNumMergeCand());
     
    52764770  //////// SHIFTED IV (IvMCShift + IvDCShift) ////////
    52774771  ////////////////////////////////////////////////////
    5278 #if QC_DEPTH_MERGE_SIMP_G0127
    52794772  if(  ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() )
    5280 #else
    5281   if(  ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() )
    5282 #endif
    52834773  {
    52844774    if(xAddIvMRGCand( mrgCandIdx,  iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) )
     
    66456135#endif
    66466136#if H_3D_IV_MERGE
    6647 #if SEC_DEPTH_DV_DERIVAITON_G0074
    66486137Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
    6649 #else
    6650 Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
    6651 #endif
    6652 {
    6653 #if SEC_DEPTH_DV_DERIVAITON_G0074
     6138{
     6139
    66546140  assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N);
    66556141
     
    66626148
    66636149  return true;
    6664 #else
    6665   Pel pDepPos[3] = {0, 0, 0};
    6666   assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N);
    6667   Bool bDepAvail = false;
    6668   Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
    6669   Int iDepStride =  this->getPic()->getPicYuvRec()->getStride();
    6670   TComMv cMv;
    6671 
    6672   Int xP, yP, nPSW, nPSH;
    6673   this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);
    6674 
    6675   if(xP != 0 && yP != 0)
    6676   {
    6677     pDepPos[0] = pDepth[ (yP-1) * iDepStride + (xP-1) ];
    6678     bDepAvail = true;
    6679   }
    6680 
    6681   if(xP != 0)
    6682   {
    6683     pDepPos[1] = pDepth[ (yP+nPSH-1) * iDepStride + (xP-1) ];
    6684     bDepAvail = true;
    6685   }
    6686 
    6687   if(yP != 0)
    6688   {
    6689     pDepPos[2] = pDepth[ (yP-1) * iDepStride + (xP+nPSW-1) ];
    6690     bDepAvail = true;
    6691   }
    6692 
    6693   if (bDepAvail)
    6694   {
    6695     Pel pAvgDepth = (xP != 0 && yP != 0) ? ((5*pDepPos[0] + 5*pDepPos[1] + 6*pDepPos[2] + 8)>>4) : (xP == 0) ? pDepPos[2] : pDepPos[1];
    6696     Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ pAvgDepth ];
    6697     cMv.setHor(iDisp);
    6698     cMv.setVer(0);
    6699     pDisp->m_acNBDV = cMv;
    6700     pDisp->m_aVIdxCan = 0;
    6701     return true;
    6702   }
    6703   else
    6704   { 
    6705     cMv.setZero();
    6706     pDisp->m_acNBDV = cMv;
    6707     pDisp->m_aVIdxCan = 0;
    6708     return false;
    6709   }
    6710 #endif
    67116150}
    67126151#endif
     
    67256164  // Init disparity struct for results
    67266165  pDInfo->bDV = false;   
    6727 #if MTK_NBDV_IVREF_FIX_G0067
    67286166  pDInfo->m_aVIdxCan = -1;
    6729 #endif
     6167
    67306168  // Init struct for disparities from MCP neighboring blocks
    67316169  IDVInfo cIDVInfo;
     
    72486686{
    72496687  Int iSubPUSize = 1<<getSlice()->getVPS()->getSubPULog2Size(getSlice()->getLayerId());
    7250 #if QC_SPIVMP_MPI_G0119
    72516688  if( getSlice()->getIsDepth() )
    72526689  {
    72536690    iSubPUSize = 1 << getSlice()->getVPS()->getSubPUMPILog2Size();
    72546691  }
    7255 #endif
     6692
    72566693  iNumSPInOneLine = iPUWidth/iSubPUSize;
    72576694  iNumSPInOneLine = iNumSPInOneLine < 1 ? 1: iNumSPInOneLine;
     
    73106747  TComSlice*    pcSlice = getSlice (); 
    73116748  Int iViewIndex        = pDInfo->m_aVIdxCan;
    7312  
     6749
    73136750  //--- get base CU/PU and check prediction mode ---
    73146751  TComPic*    pcBasePic   = pcSlice->getIvPic( bIsDepth, iViewIndex );
     
    73346771
    73356772  TComMv      cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
    7336  
     6773
    73376774  Bool abPdmAvailable[8] =  {false, false, false, false, false, false, false, false};
    73386775#if H_3D_NBDV
     
    73476784  //////////sub-PU IvMC///////////
    73486785  ////////////////////////////////
    7349 #if QC_SPIVMP_MPI_G0119
    73506786  if(!m_pcSlice->getIsDepth())
    73516787  {
    7352 #endif 
    7353 #if SEC_SPIVMP_MCP_SIZE_G0077
    7354   if( getPartitionSize(0) == SIZE_2Nx2N )
    7355   {
    7356 #endif
    7357   Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
    7358   getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
    7359 
    7360   for (Int i=0; i<iNumSP; i++)
    7361   {
    7362     puhInterDirSP[i] = 0;
    7363     pcMvFieldSP[2*i].getMv().set(0, 0);
    7364     pcMvFieldSP[2*i+1].getMv().set(0,0);
    7365     pcMvFieldSP[2*i].setRefIdx(-1);
    7366     pcMvFieldSP[2*i+1].setRefIdx(-1);
    7367   }
    7368 
    7369   Int         iBaseCUAddr;
    7370   Int         iBaseAbsPartIdx;
    7371   TComDataCU* pcBaseCU;
    7372   Int iPartition = 0;
    7373 #if !KHU_SIMP_SPIVMP_G0147
    7374   Int iInterDirLast = 0;
    7375   TComMvField cMvFieldLast[2];
    7376 #endif
    7377 
    7378   Int iDelX = iSPWidth/2;
    7379   Int iDelY = iSPHeight/2;
    7380 
    7381 #if KHU_SIMP_SPIVMP_G0147
    7382   Int         iCenterPosX = iCurrPosX + ( ( iWidth /  iSPWidth ) >> 1 )  * iSPWidth + ( iSPWidth >> 1 );
    7383   Int         iCenterPosY = iCurrPosY + ( ( iHeight /  iSPHeight ) >> 1 )  * iSPHeight + (iSPHeight >> 1);
    7384   Int         iRefCenterCUAddr, iRefCenterAbsPartIdx;
    7385 
    7386   if(iWidth == iSPWidth && iHeight == iSPHeight)
    7387   {
    7388     iCenterPosX = iCurrPosX + (iWidth >> 1);
    7389     iCenterPosY = iCurrPosY + (iHeight >> 1);
    7390   }
    7391 
    7392   Int iRefCenterPosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
    7393   Int iRefCenterPosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) );
    7394 
    7395   pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx );
    7396   TComDataCU* pcDefaultCU    = pcBasePic->getCU( iRefCenterCUAddr );
    7397   if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA ))
    7398   {
    7399     for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ )       
    7400     {
    7401       RefPicList  eCurrRefPicList = RefPicList( uiCurrRefListId );
    7402       Bool stopLoop = false;
    7403       for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop)
    7404       {
    7405         RefPicList eDefaultRefPicList = (iLoop ==1)? RefPicList( 1 -  uiCurrRefListId ) : RefPicList( uiCurrRefListId );
    7406         TComMvField cDefaultMvField;
    7407         pcDefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField );
    7408         Int         iDefaultRefIdx     = cDefaultMvField.getRefIdx();
    7409         if (iDefaultRefIdx >= 0)
    7410         {
    7411           Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx);
    7412           if (iDefaultRefPOC != pcSlice->getPOC())   
    7413           {
    7414             for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++)
    7415             {
    7416               if (iDefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx))
    7417               {
    7418                 abPdmAvailable[ uiCurrRefListId ] = true;
    7419                 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer());
    7420 #if H_3D_NBDV
    7421 #if H_3D_IV_MERGE
    7422                 if( !bIsDepth )
    7423                 {
    7424 #endif
    7425                   cMv.setIDVFlag   (true);
    7426                   cMv.setIDVHor    (cDv.getHor());                 
    7427                   cMv.setIDVVer    (cDv.getVer()); 
    7428                   cMv.setIDVVId    (iViewIndex);
    7429 #if H_3D_IV_MERGE
    7430                 }
    7431 #endif
    7432 #endif
    7433                 clipMv( cMv );
    7434                 paiPdmRefIdx  [ uiCurrRefListId ] = iPdmRefIdx;
    7435                 pacPdmMv      [ uiCurrRefListId ] = cMv;
    7436                 stopLoop = true;
    7437                 break;
    7438               }
    7439             }
    7440           }
    7441         }
    7442       }
    7443     }
    7444   }
    7445   availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0);
    7446 
    7447   if(availableMcDc[0])
    7448   {
    7449 #endif
    7450   Int         iBasePosX, iBasePosY;
    7451   for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight)
    7452   {
    7453     for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth)
    7454     {
    7455       iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 ));
    7456       iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 ));
    7457 
    7458       pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx );
    7459       pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
    7460       if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA ))
    7461       {
    7462         for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ )
     6788    if( getPartitionSize(0) == SIZE_2Nx2N )
     6789    {
     6790      Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     6791      getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
     6792
     6793      for (Int i=0; i<iNumSP; i++)
     6794      {
     6795        puhInterDirSP[i] = 0;
     6796        pcMvFieldSP[2*i].getMv().set(0, 0);
     6797        pcMvFieldSP[2*i+1].getMv().set(0,0);
     6798        pcMvFieldSP[2*i].setRefIdx(-1);
     6799        pcMvFieldSP[2*i+1].setRefIdx(-1);
     6800      }
     6801
     6802      Int         iBaseCUAddr;
     6803      Int         iBaseAbsPartIdx;
     6804      TComDataCU* pcBaseCU;
     6805      Int iPartition = 0;
     6806
     6807      Int iDelX = iSPWidth/2;
     6808      Int iDelY = iSPHeight/2;
     6809
     6810      Int         iCenterPosX = iCurrPosX + ( ( iWidth /  iSPWidth ) >> 1 )  * iSPWidth + ( iSPWidth >> 1 );
     6811      Int         iCenterPosY = iCurrPosY + ( ( iHeight /  iSPHeight ) >> 1 )  * iSPHeight + (iSPHeight >> 1);
     6812      Int         iRefCenterCUAddr, iRefCenterAbsPartIdx;
     6813
     6814      if(iWidth == iSPWidth && iHeight == iSPHeight)
     6815      {
     6816        iCenterPosX = iCurrPosX + (iWidth >> 1);
     6817        iCenterPosY = iCurrPosY + (iHeight >> 1);
     6818      }
     6819
     6820      Int iRefCenterPosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
     6821      Int iRefCenterPosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) );
     6822
     6823      pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx );
     6824      TComDataCU* pcDefaultCU    = pcBasePic->getCU( iRefCenterCUAddr );
     6825      if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA ))
     6826      {
     6827        for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ )       
    74636828        {
    74646829          RefPicList  eCurrRefPicList = RefPicList( uiCurrRefListId );
    7465           Bool bLoop_stop = false;
    7466           for(Int iLoop = 0; iLoop < 2 && !bLoop_stop; ++iLoop)
     6830          Bool stopLoop = false;
     6831          for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop)
    74676832          {
    7468             RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 -  uiCurrRefListId ) : RefPicList( uiCurrRefListId );
    7469             TComMvField cBaseMvField;
    7470             pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );
    7471             Int         iBaseRefIdx     = cBaseMvField.getRefIdx();
    7472             if (iBaseRefIdx >= 0)
     6833            RefPicList eDefaultRefPicList = (iLoop ==1)? RefPicList( 1 -  uiCurrRefListId ) : RefPicList( uiCurrRefListId );
     6834            TComMvField cDefaultMvField;
     6835            pcDefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField );
     6836            Int         iDefaultRefIdx     = cDefaultMvField.getRefIdx();
     6837            if (iDefaultRefIdx >= 0)
    74736838            {
    7474               Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx);
    7475               if (iBaseRefPOC != pcSlice->getPOC())   
     6839              Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx);
     6840              if (iDefaultRefPOC != pcSlice->getPOC())   
    74766841              {
    74776842                for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++)
    74786843                {
    7479                   if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx))
     6844                  if (iDefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx))
    74806845                  {
    74816846                    abPdmAvailable[ uiCurrRefListId ] = true;
    7482                     TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
    7483 
     6847                    TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer());
     6848#if H_3D_NBDV
     6849#if H_3D_IV_MERGE
    74846850                    if( !bIsDepth )
    74856851                    {
     6852#endif
    74866853                      cMv.setIDVFlag   (true);
    74876854                      cMv.setIDVHor    (cDv.getHor());                 
    74886855                      cMv.setIDVVer    (cDv.getVer()); 
    74896856                      cMv.setIDVVId    (iViewIndex);
     6857#if H_3D_IV_MERGE
    74906858                    }
    7491 
     6859#endif
     6860#endif
    74926861                    clipMv( cMv );
    7493                     bLoop_stop = true;
    7494 
    7495                     pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx);
     6862                    paiPdmRefIdx  [ uiCurrRefListId ] = iPdmRefIdx;
     6863                    pacPdmMv      [ uiCurrRefListId ] = cMv;
     6864                    stopLoop = true;
    74966865                    break;
    74976866                  }
     
    75026871        }
    75036872      }
    7504 
    7505       puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0);
    7506       if (puhInterDirSP[iPartition] == 0)
    7507       {
    7508 #if KHU_SIMP_SPIVMP_G0147
    7509         puhInterDirSP[iPartition] = availableMcDc[0];
    7510         pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]);
    7511         pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]);
    7512 #else
    7513         if (iInterDirLast != 0)
     6873      availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0);
     6874
     6875      if(availableMcDc[0])
     6876      {
     6877
     6878        Int         iBasePosX, iBasePosY;
     6879        for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight)
    75146880        {
    7515           puhInterDirSP[iPartition] = iInterDirLast;
    7516           pcMvFieldSP[2*iPartition] = cMvFieldLast[0];
    7517           pcMvFieldSP[2*iPartition + 1] = cMvFieldLast[1];
    7518         }
    7519 #endif
    7520       }
    7521 #if !KHU_SIMP_SPIVMP_G0147
    7522       else
    7523       {
    7524         if (iInterDirLast ==0)
    7525         {
    7526           availableMcDc[0] = puhInterDirSP[iPartition];
    7527           paiPdmRefIdx  [ 0 ] = pcMvFieldSP[2*iPartition].getRefIdx();
    7528           pacPdmMv      [ 0 ] = pcMvFieldSP[2*iPartition].getMv();
    7529           paiPdmRefIdx  [ 1 ] = pcMvFieldSP[2*iPartition+1].getRefIdx();
    7530           pacPdmMv      [ 1 ] = pcMvFieldSP[2*iPartition+1].getMv();
    7531 
    7532           if (iPartition != 0)
     6881          for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth)
    75336882          {
    7534             for (Int iPart = iPartition-1; iPart >= 0; iPart--)
     6883            iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 ));
     6884            iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 ));
     6885
     6886            pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx );
     6887            pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
     6888            if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA ))
    75356889            {
    7536               puhInterDirSP[iPart] = puhInterDirSP[iPartition];
    7537               pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition];
    7538               pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1];
     6890              for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ )
     6891              {
     6892                RefPicList  eCurrRefPicList = RefPicList( uiCurrRefListId );
     6893                Bool bLoop_stop = false;
     6894                for(Int iLoop = 0; iLoop < 2 && !bLoop_stop; ++iLoop)
     6895                {
     6896                  RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 -  uiCurrRefListId ) : RefPicList( uiCurrRefListId );
     6897                  TComMvField cBaseMvField;
     6898                  pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );
     6899                  Int         iBaseRefIdx     = cBaseMvField.getRefIdx();
     6900                  if (iBaseRefIdx >= 0)
     6901                  {
     6902                    Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx);
     6903                    if (iBaseRefPOC != pcSlice->getPOC())   
     6904                    {
     6905                      for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++)
     6906                      {
     6907                        if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx))
     6908                        {
     6909                          abPdmAvailable[ uiCurrRefListId ] = true;
     6910                          TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
     6911
     6912                          if( !bIsDepth )
     6913                          {
     6914                            cMv.setIDVFlag   (true);
     6915                            cMv.setIDVHor    (cDv.getHor());                 
     6916                            cMv.setIDVVer    (cDv.getVer()); 
     6917                            cMv.setIDVVId    (iViewIndex);
     6918                          }
     6919
     6920                          clipMv( cMv );
     6921                          bLoop_stop = true;
     6922
     6923                          pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx);
     6924                          break;
     6925                        }
     6926                      }
     6927                    }
     6928                  }
     6929                }
     6930              }
    75396931            }
     6932
     6933            puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0);
     6934            if (puhInterDirSP[iPartition] == 0)
     6935            {
     6936              puhInterDirSP[iPartition] = availableMcDc[0];
     6937              pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]);
     6938              pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]);
     6939
     6940            }
     6941            iPartition ++;
    75406942          }
    75416943        }
    7542         iInterDirLast = puhInterDirSP[iPartition];
    7543         cMvFieldLast[0] = pcMvFieldSP[2*iPartition];
    7544         cMvFieldLast[1] = pcMvFieldSP[2*iPartition + 1];
    7545       }
    7546 #endif
    7547       iPartition ++;
    7548 
    7549     }
    7550   }
    7551 #if KHU_SIMP_SPIVMP_G0147
    7552   }
    7553 #endif
    7554 #if SEC_SPIVMP_MCP_SIZE_G0077
    7555   }
    7556 #endif
    7557 
    7558   iCurrPosX  += ( iWidth  >> 1 );
    7559   iCurrPosY  += ( iHeight >> 1 );
    7560 #if QC_SPIVMP_MPI_G0119
    7561  }
    7562 #endif
     6944      }
     6945    }
     6946
     6947    iCurrPosX  += ( iWidth  >> 1 );
     6948    iCurrPosY  += ( iHeight >> 1 );
     6949  }
    75636950#endif
    75646951
     
    75686955
    75696956#if H_3D_SPIVMP
    7570 #if QC_SPIVMP_MPI_G0119
    7571  if(m_pcSlice->getIsDepth())
    7572  {
    7573    iCurrPosX  += ( iWidth  >> 1 );
    7574    iCurrPosY  += ( iHeight >> 1 );
    7575  }
    7576 #if QC_DEPTH_MERGE_SIMP_G0127
    7577 #if SEC_SPIVMP_MCP_SIZE_G0077
     6957  if(m_pcSlice->getIsDepth())
     6958  {
     6959    iCurrPosX  += ( iWidth  >> 1 );
     6960    iCurrPosY  += ( iHeight >> 1 );
     6961  }
    75786962  for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    75796963#else
    7580  for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    7581 #endif
    7582 #else
    7583 #if SEC_SPIVMP_MCP_SIZE_G0077
    7584  for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < 2; iLoopCan ++)
    7585 #else
    7586  for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++)
    7587 #endif
    7588 #endif
    7589 #else
    7590 #if SEC_SPIVMP_MCP_SIZE_G0077
    7591  for(Int iLoopCan = (getPartitionSize(uiPartAddr) == SIZE_2Nx2N ? 1 : 0); iLoopCan < 2; iLoopCan ++)
    7592 #else
    7593   for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)
    7594 #endif
    7595 #endif
    7596 #else
    75976964  for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
    75986965#endif
     
    76016968    // iLoopCan == 1 --> IvMCShift
    76026969
    7603 #if !H_3D_SPIVMP || QC_SPIVMP_MPI_G0119
    76046970    Int         iBaseCUAddr;
    76056971    Int         iBaseAbsPartIdx;
    7606 #endif
    76076972
    76086973    Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 );
    76096974    Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 );
    76106975
    7611 #if H_3D_SPIVMP && !QC_SPIVMP_MPI_G0119
    7612     iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
    7613     iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );
    7614 #else
    76156976    Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
    76166977    Int         iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );
    7617 #endif
    76186978    pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
    76196979
    7620 #if H_3D_SPIVMP && !QC_SPIVMP_MPI_G0119
    7621     pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
    7622 #else
    76236980    TComDataCU* pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
    7624 #endif
    76256981    if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA ))
    76266982    {
     
    76767032  }
    76777033#if H_3D_SPIVMP
    7678 #if QC_SPIVMP_MPI_G0119
    7679 #if QC_DEPTH_MERGE_SIMP_G0127
    76807034  for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    76817035#else
    7682   for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++)
    7683 #endif
    7684 #else
    7685   for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)
    7686 #endif
    7687 #else
    76887036  for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
    76897037#endif
     
    76917039    availableMcDc[(iLoopCan << 1)] = ( abPdmAvailable[(iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[1 + (iLoopCan<<2)] ? 2 : 0);
    76927040  }
    7693  
    7694  
     7041
     7042
    76957043  ////////////////////////////////
    76967044  /////// IvDC + IvDCShift ///////
    76977045  ////////////////////////////////
    7698 #if QC_DEPTH_MERGE_SIMP_G0127
     7046
    76997047  if( !getSlice()->getIsDepth() )
    77007048  {
    7701 #endif
    7702   for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ )
    7703   {
    7704     RefPicList  eRefPicListDMV       = RefPicList( iRefListId );
    7705     Int         iNumRefPics       = pcSlice->getNumRefIdx( eRefPicListDMV );
    7706     for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ )
    7707     {
    7708       if(( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) && (pcSlice->getRefPic( eRefPicListDMV, iPdmRefIdx )->getViewIndex() == pDInfo->m_aVIdxCan))
    7709       {
    7710         for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
     7049    for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ )
     7050    {
     7051      RefPicList  eRefPicListDMV       = RefPicList( iRefListId );
     7052      Int         iNumRefPics       = pcSlice->getNumRefIdx( eRefPicListDMV );
     7053      for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ )
     7054      {
     7055        if(( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) && (pcSlice->getRefPic( eRefPicListDMV, iPdmRefIdx )->getViewIndex() == pDInfo->m_aVIdxCan))
    77117056        {
    7712           Int ioffsetDV = (iLoopCan == 0) ? 0 : 4;
    7713           abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true;
    7714           paiPdmRefIdx  [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx;
     7057          for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
     7058          {
     7059            Int ioffsetDV = (iLoopCan == 0) ? 0 : 4;
     7060            abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true;
     7061            paiPdmRefIdx  [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx;
    77157062#if H_3D_NBDV_REF
    7716           TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
    7717 #endif
    7718           cMv.setHor( cMv.getHor() + ioffsetDV );
     7063            TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
     7064#endif
     7065            cMv.setHor( cMv.getHor() + ioffsetDV );
    77197066#if H_3D_IV_MERGE
    7720           if( bIsDepth )
    7721             cMv.setHor((cMv.getHor()+2)>>2);
    7722 #endif
    7723           cMv.setVer( 0 );
    7724           clipMv( cMv );
    7725           pacPdmMv      [iRefListId + 2 + (iLoopCan<<2)] = cMv;
     7067            if( bIsDepth )
     7068            {
     7069              cMv.setHor((cMv.getHor()+2)>>2);
     7070            }
     7071#endif
     7072            cMv.setVer( 0 );
     7073            clipMv( cMv );
     7074            pacPdmMv      [iRefListId + 2 + (iLoopCan<<2)] = cMv;
     7075          }
     7076          break;
    77267077        }
    7727         break;
    7728       }
    7729     }
    7730   }
    7731   for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
    7732   {
    7733     availableMcDc[1 + (iLoopCan << 1)] = ( abPdmAvailable[2 + (iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[3 + (iLoopCan<<2)] ? 2 : 0 );
    7734   }
    7735 #if QC_DEPTH_MERGE_SIMP_G0127
    7736   }
    7737 #endif
     7078      }
     7079    }
     7080    for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
     7081    {
     7082      availableMcDc[1 + (iLoopCan << 1)] = ( abPdmAvailable[2 + (iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[3 + (iLoopCan<<2)] ? 2 : 0 );
     7083    }
     7084  }
    77387085  return false;
    77397086}
     
    78097156#endif
    78107157
    7811 #if NTT_STORE_SPDV_VSP_G0148
     7158#if H_3D_VSP
    78127159Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize )
    78137160{
     
    79437290
    79447291}
    7945 #endif // NTT_STORE_SPDV_VSP_G0148
     7292#endif
    79467293
    79477294//! \}
  • trunk/source/Lib/TLibCommon/TComDataCU.h

    r872 r884  
    192192#if H_3D_DIM_SDC
    193193  Bool*         m_pbSDCFlag;
    194 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101
    195   Pel*          m_apSegmentDCOffset[4];
    196 #else
    197194  Pel*          m_apSegmentDCOffset[2];
    198 #endif
    199 #endif
    200 #endif
    201 #if H_3D_INTER_SDC
    202 #if !QC_SDC_UNIFY_G0130
    203   Bool*         m_pbInterSDCFlag;
    204   Int*          m_apSegmentInterDCOffset[4];
    205 #endif
    206 #if !SEC_INTER_SDC_G0101
    207   UChar*        m_pucInterSDCMask;
    208195#endif
    209196#endif
     
    239226#endif
    240227
    241 #if MTK_DDD_G0063
     228#if H_3D_DDD
    242229  UChar*        m_pucDisparityDerivedDepth;
    243230  Bool*         m_pbUseDDD;
     
    280267  Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter );
    281268
    282 #if NTT_STORE_SPDV_VSP_G0148
     269#if H_3D_VSP
    283270  Void xSetMvFieldForVSP  ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize );
    284271#endif
     
    499486#if H_3D
    500487  Void          rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo*  inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV);
    501 #if SEC_DEPTH_DV_DERIVAITON_G0074
    502488  Bool          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
    503 #else
    504   Bool          getDispNeighBlocks  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
    505 #endif
    506489  Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
    507490#endif
     
    573556  Pel           getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; }
    574557  Void          setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; }
    575 #if QC_GENERIC_SDC_G0122
    576558  UInt          getCtxSDCFlag          ( UInt   uiAbsPartIdx );
    577559  UInt          getCtxAngleFlag        ( UInt   uiAbsPartIdx );
    578 #endif
    579 #endif
    580 #endif
    581 #if H_3D_INTER_SDC
    582 #if !QC_SDC_UNIFY_G0130
    583   Bool*         getInterSDCFlag     ()                        { return m_pbInterSDCFlag;               }
    584   Bool          getInterSDCFlag     ( UInt uiIdx )            { return m_pbInterSDCFlag[uiIdx];        }
    585   Void          setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
    586   UInt          getCtxInterSDCFlag  ( UInt uiAbsPartIdx );
    587   Int*          getInterSDCSegmentDCOffset( UInt uiSeg ) { return m_apSegmentInterDCOffset[uiSeg]; }
    588   Int           getInterSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentInterDCOffset[uiSeg][uiPartIdx]; }
    589   Void          setInterSDCSegmentDCOffset( Int pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentInterDCOffset[uiSeg][uiPartIdx] = pOffset; }
    590 
    591 #endif
    592 #if !SEC_INTER_SDC_G0101
    593   Void          xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask );
    594 
    595   UChar*        getInterSDCMask     ()                        { return m_pucInterSDCMask;              }
    596560#endif
    597561#endif
     
    701665  Void          setVSPFlag        ( UInt uiIdx, Int n )     { m_piVSPFlag[uiIdx] = n;      }
    702666  Void          setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
    703 #if NTT_STORE_SPDV_VSP_G0148
    704667  Void          setMvFieldPUForVSP    ( TComDataCU* cu, UInt partAddr, Int width, Int height, RefPicList refPicList, Int refIdx, Int &vspSize );
    705 #endif
    706668#endif
    707669  Void          deriveLeftRightTopIdxGeneral  ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT );
     
    743705  UInt          getCTXARPWFlag                  ( UInt   uiAbsPartIdx                                 );
    744706#endif 
    745 #if !MTK_IC_FLAG_CABAC_SIMP_G0061
    746 #if H_3D_IC
    747   UInt          getCtxICFlag                    ( UInt   uiAbsPartIdx                                 );
    748 #endif
    749 #endif
    750707  UInt          getSliceStartCU         ( UInt pos )                  { return m_sliceStartCU[pos-m_uiAbsIdxInLCU];                                                                                          }
    751708  UInt          getSliceSegmentStartCU  ( UInt pos )                  { return m_sliceSegmentStartCU[pos-m_uiAbsIdxInLCU];                                                                                   }
     
    766723  UInt          getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra);
    767724
    768 #if MTK_DDD_G0063
     725#if H_3D_DDD
    769726  UChar*       getDDDepth        ()                        { return m_pucDisparityDerivedDepth;        }
    770727  UChar        getDDDepth        ( UInt uiIdx )            { return m_pucDisparityDerivedDepth[uiIdx]; }
  • trunk/source/Lib/TLibCommon/TComMotionInfo.h

    r872 r884  
    176176  Void    setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  );
    177177#endif
    178 #if NTT_STORE_SPDV_VSP_G0148
     178#if H_3D_VSP
    179179  Void    setMv         ( Int iIdx, TComMv const & rcMv ) { m_pcMv[iIdx] = rcMv; }
    180180  Void    setRefIdx     ( Int iIdx, Int iRefIdx )         { m_piRefIdx[iIdx] = iRefIdx; }
  • trunk/source/Lib/TLibCommon/TComPrediction.cpp

    r872 r884  
    416416
    417417#if H_3D_DIM
    418 Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc
    419 #if QC_GENERIC_SDC_G0122
    420   , TComWedgelet* dmm4Segmentation
    421 #endif
    422   )
     418Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc, TComWedgelet* dmm4Segmentation  )
    423419{
    424420  assert( iWidth == iHeight  );
     
    446442    case( DMM4_IDX ):
    447443      {
    448 #if QC_GENERIC_SDC_G0122
    449444        if( dmm4Segmentation == NULL )
    450445        {
     
    457452          dmmSegmentation = dmm4Segmentation;
    458453        }
    459 #else
    460         dmmSegmentation = new TComWedgelet( iWidth, iHeight );
    461         xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmmSegmentation );
    462 #endif
    463454      } break;
    464455    default: assert(0);
     
    511502
    512503#if H_3D_DIM_DMM
    513 #if QC_GENERIC_SDC_G0122
    514504  if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) { dmmSegmentation->destroy(); delete dmmSegmentation; }
    515 #else
    516   if( dimType == DMM4_IDX ) { dmmSegmentation->destroy(); delete dmmSegmentation; }
    517 #endif
    518505#endif
    519506}
     
    11031090  pcCU->clipMv(cMv);
    11041091
    1105 #if MTK_DDD_G0063
     1092#if H_3D_DDD
    11061093  if( pcCU->getUseDDD( uiPartAddr ) )
    11071094  {
     
    11821169Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi )
    11831170{
    1184 #if NTT_STORE_SPDV_VSP_G0148
    11851171  Int vspSize = pcCU->getVSPFlag( uiPartAddr ) >> 1;
    11861172
     
    11971183  }
    11981184  xPredInterUniSubPU( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi, widthSubPU, heightSubPU );
    1199 
    1200 #else // NTT_STORE_SPDV_VSP_G0148
    1201   // Get depth reference
    1202   Int       depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;
    1203 #if H_3D_FCO_VSP_DONBDV_E0163
    1204   TComPic* pRefPicBaseDepth = 0;
    1205   Bool     bIsCurrDepthCoded = false;
    1206   pRefPicBaseDepth  = pcCU->getSlice()->getIvPic( true, pcCU->getSlice()->getViewIndex() );
    1207   if ( pRefPicBaseDepth->getPicYuvRec() != NULL  )
    1208   {
    1209     bIsCurrDepthCoded = true;
    1210   }
    1211   else
    1212   {
    1213     pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx );
    1214   }
    1215 #else
    1216   TComPic* pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx );
    1217 #endif
    1218   assert(pRefPicBaseDepth != NULL);
    1219   TComPicYuv* pcBaseViewDepthPicYuv = pRefPicBaseDepth->getPicYuvRec();
    1220   assert(pcBaseViewDepthPicYuv != NULL);
    1221 
    1222   // Get texture reference
    1223   Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );
    1224   assert(iRefIdx >= 0);
    1225   TComPic* pRefPicBaseTxt = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx );
    1226   TComPicYuv* pcBaseViewTxtPicYuv = pRefPicBaseTxt->getPicYuvRec();
    1227   assert(pcBaseViewTxtPicYuv != NULL);
    1228 
    1229   // Initialize LUT according to the reference viewIdx
    1230   Int txtRefViewIdx = pRefPicBaseTxt->getViewIndex();
    1231   Int* pShiftLUT    = pcCU->getSlice()->getDepthToDisparityB( txtRefViewIdx );
    1232   assert( txtRefViewIdx < pcCU->getSlice()->getViewIndex() );
    1233 
    1234   // Do compensation
    1235   TComMv cDv  = pcCU->getDvInfo(uiPartAddr).m_acNBDV;
    1236   pcCU->clipMv(cDv);
    1237 
    1238 #if H_3D_FCO_VSP_DONBDV_E0163
    1239   if ( bIsCurrDepthCoded )
    1240   {
    1241       cDv.setZero();
    1242   }
    1243 #endif
    1244   // fetch virtual depth map
    1245   pcBaseViewDepthPicYuv->extendPicBorder();
    1246 
    1247   Int vspSize=0;
    1248   xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize );
    1249   // sub-PU based compensation
    1250   xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
    1251   xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
    1252 #endif // NTT_STORE_SPDV_VSP_G0148
    1253 }
    1254 
    1255 #if NTT_STORE_SPDV_VSP_G0148
     1185}
     1186
    12561187Void TComPrediction::xPredInterUniSubPU( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU, Int heightSubPU )
    12571188{
     
    12781209  }
    12791210}
    1280 #endif // NTT_STORE_SPDV_VSP_G0148
    12811211
    12821212#endif
     
    21332063#endif
    21342064
    2135 #if H_3D_VSP
    2136 #if !(NTT_STORE_SPDV_VSP_G0148)
    2137 // not fully support iRatioTxtPerDepth* != 1
    2138 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
    2139 {
    2140   Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
    2141   Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE;
    2142 
    2143   Int refDepStride = picRefDepth->getStride();
    2144 
    2145   Int refDepOffset  = ( (mv->getHor()+2) >> 2 ) + ( (mv->getVer()+2) >> 2 ) * refDepStride;
    2146   Pel *refDepth     = picRefDepth->getLumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr );
    2147 
    2148   if( ratioTxtPerDepthX!=1 || ratioTxtPerDepthY!=1 )
    2149   {
    2150     Int posX, posY;
    2151     refDepth    = picRefDepth->getLumaAddr( );
    2152     cu->getPic()->getPicYuvRec()->getTopLeftSamplePos( cu->getAddr(), cu->getZorderIdxInCU() + partAddr, posX, posY ); // top-left position in texture
    2153     posX /= ratioTxtPerDepthX; // texture position -> depth postion
    2154     posY /= ratioTxtPerDepthY;
    2155     refDepOffset += posX + posY * refDepStride;
    2156 
    2157     width  /= ratioTxtPerDepthX; // texture size -> depth size
    2158     height /= ratioTxtPerDepthY;
    2159   }
    2160 
    2161   refDepth += refDepOffset;
    2162 
    2163   Int depStride = yuvDepth->getStride();
    2164   Pel *depth = yuvDepth->getLumaAddr();
    2165 
    2166   if ((height % 8))
    2167   {
    2168     vspSize = 1; // 8x4
    2169   }
    2170   else if ((width % 8))
    2171   {
    2172     vspSize = 0; // 4x8
    2173   }
    2174   else
    2175   {
    2176     Bool ULvsBR, URvsBL;
    2177     ULvsBR = refDepth[0]       < refDepth[refDepStride * (height-1) + width-1];
    2178     URvsBL = refDepth[width-1] < refDepth[refDepStride * (height-1)];
    2179     vspSize = ( ULvsBR ^ URvsBL ) ? 0 : 1;
    2180   }
    2181   Int subBlockW, subBlockH;
    2182   Int depStrideTmp = depStride * nTxtPerDepthY;
    2183   if (vspSize)
    2184   {
    2185     subBlockW = 8;
    2186     subBlockH = 4;
    2187   }
    2188   else
    2189   {
    2190     subBlockW = 4;
    2191     subBlockH = 8;
    2192   }
    2193   for( Int y=0; y<height; y+=subBlockH )
    2194   {
    2195     Pel *refDepthTmp[4];
    2196     refDepthTmp[0] = refDepth + refDepStride * y;
    2197     refDepthTmp[1] = refDepthTmp[0] + subBlockW - 1;
    2198     refDepthTmp[2] = refDepthTmp[0] + refDepStride * (subBlockH - 1);
    2199     refDepthTmp[3] = refDepthTmp[2] + subBlockW - 1;
    2200     for( Int x=0; x<width; x+=subBlockW )
    2201     {
    2202       Pel  maxDepthVal;
    2203       maxDepthVal = refDepthTmp[0][x];
    2204       maxDepthVal = std::max( maxDepthVal, refDepthTmp[1][x]);
    2205       maxDepthVal = std::max( maxDepthVal, refDepthTmp[2][x]);
    2206       maxDepthVal = std::max( maxDepthVal, refDepthTmp[3][x]);
    2207       Pel *depthTmp = &depth[x+y*depStride];
    2208       for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY )
    2209       {
    2210         for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX )
    2211         {
    2212           depthTmp[sX] = maxDepthVal;
    2213         }
    2214         depthTmp += depStrideTmp;
    2215       }
    2216     }
    2217   }   
    2218 }
    2219 
    2220 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, Int vspSize)
    2221 {
    2222   Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
    2223   Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE;
    2224  
    2225   nTxtPerDepthX = nTxtPerDepthX << vspSize;
    2226   nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
    2227 
    2228   Int refStride = picRef->getStride();
    2229   Int dstStride = yuvDst->getStride();
    2230   Int depStride = yuvDepth->getStride();
    2231   Int refStrideBlock = refStride  * nTxtPerDepthY;
    2232   Int dstStrideBlock = dstStride * nTxtPerDepthY;
    2233   Int depStrideBlock = depStride * nTxtPerDepthY;
    2234 
    2235   Pel *ref    = picRef->getLumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr );
    2236   Pel *dst    = yuvDst->getLumaAddr(partAddr);
    2237   Pel *depth  = yuvDepth->getLumaAddr();
    2238 
    2239 #if H_3D_VSP_BLOCKSIZE == 1
    2240 #if H_3D_VSP_CONSTRAINED
    2241   //get LUT based horizontal reference range
    2242   Int range = xGetConstrainedSize(width, height);
    2243 
    2244   // The minimum depth value
    2245   Int minRelativePos = MAX_INT;
    2246   Int maxRelativePos = MIN_INT;
    2247 
    2248   Pel* depthTemp, *depthInitial=depth;
    2249   for (Int yTxt = 0; yTxt < height; yTxt++)
    2250   {
    2251     for (Int xTxt = 0; xTxt < width; xTxt++)
    2252     {
    2253       if (depthPosX+xTxt < widthDepth)
    2254       {
    2255         depthTemp = depthInitial + xTxt;
    2256       }
    2257       else
    2258       {
    2259         depthTemp = depthInitial + (widthDepth - depthPosX - 1);
    2260       }
    2261 
    2262       Int disparity = shiftLUT[ *depthTemp ]; // << iShiftPrec;
    2263       Int disparityInt = disparity >> 2;
    2264 
    2265       if( disparity <= 0)
    2266       {
    2267         if (minRelativePos > disparityInt+xTxt)
    2268         {
    2269           minRelativePos = disparityInt+xTxt;
    2270         }
    2271       }
    2272       else
    2273       {
    2274         if (maxRelativePos < disparityInt+xTxt)
    2275         {
    2276           maxRelativePos = disparityInt+xTxt;
    2277         }
    2278       }
    2279     }
    2280     if (depthPosY+yTxt < heightDepth)
    2281     {
    2282       depthInitial = depthInitial + depStride;
    2283     }
    2284   }
    2285 
    2286   Int disparity_tmp = shiftLUT[ *depth ]; // << iShiftPrec;
    2287   if (disparity_tmp <= 0)
    2288   {
    2289     maxRelativePos = minRelativePos + range -1 ;
    2290   }
    2291   else
    2292   {
    2293     minRelativePos = maxRelativePos - range +1 ;
    2294   }
    2295 #endif
    2296 #endif // H_3D_VSP_BLOCKSIZE == 1
    2297 
    2298   TComMv dv(0, 0);
    2299 
    2300   for ( Int yTxt = 0; yTxt < height; yTxt += nTxtPerDepthY )
    2301   {
    2302     for ( Int xTxt = 0; xTxt < width; xTxt += nTxtPerDepthX )
    2303     {
    2304       Pel repDepth = depth[ xTxt ];
    2305       assert( repDepth >= 0 && repDepth <= 255 );
    2306 
    2307       Int disparity = shiftLUT[ repDepth ]; // remove << iShiftPrec ??
    2308       Int xFrac = disparity & 0x3;
    2309 
    2310       dv.setHor( disparity );
    2311       cu->clipMv( dv );
    2312 
    2313       Int refOffset = xTxt + (dv.getHor() >> 2);
    2314      
    2315 #if H_3D_VSP_CONSTRAINED
    2316       if(refOffset<minRelativePos || refOffset>maxRelativePos)
    2317       {
    2318         xFrac = 0;
    2319       }
    2320       refOffset = Clip3(minRelativePos, maxRelativePos, refOffset);
    2321 #endif
    2322 
    2323       assert( ref[refOffset] >= 0 && ref[refOffset]<= 255 );
    2324       m_if.filterHorLuma( &ref[refOffset], refStride, &dst[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );
    2325     }
    2326     ref   += refStrideBlock;
    2327     dst   += dstStrideBlock;
    2328     depth += depStrideBlock;
    2329   }
    2330 
    2331 }
    2332 
    2333 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, Int vspSize)
    2334 {
    2335 #if (H_3D_VSP_BLOCKSIZE==1)
    2336   Int nTxtPerDepthX = 1;
    2337   Int nTxtPerDepthY = 1;
    2338 #else
    2339   Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE >> 1;
    2340   Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE >> 1;
    2341 #endif
    2342 
    2343   nTxtPerDepthX = nTxtPerDepthX << vspSize;
    2344   nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
    2345 
    2346   Int refStride = picRef->getCStride();
    2347   Int dstStride = yuvDst->getCStride();
    2348   Int depStride = yuvDepth->getStride();
    2349   Int refStrideBlock = refStride * nTxtPerDepthY;
    2350   Int dstStrideBlock = dstStride * nTxtPerDepthY;
    2351   Int depStrideBlock = depStride * (nTxtPerDepthY<<1);
    2352 
    2353   Pel *refCb  = picRef->getCbAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr );
    2354   Pel *refCr  = picRef->getCrAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr );
    2355   Pel *dstCb  = yuvDst->getCbAddr(partAddr);
    2356   Pel *dstCr  = yuvDst->getCrAddr(partAddr);
    2357   Pel *depth  = yuvDepth->getLumaAddr();
    2358 
    2359 #if H_3D_VSP_BLOCKSIZE == 1
    2360 #if H_3D_VSP_CONSTRAINED
    2361   //get LUT based horizontal reference range
    2362   Int range = xGetConstrainedSize(width, height, false);
    2363 
    2364   // The minimum depth value
    2365   Int minRelativePos = MAX_INT;
    2366   Int maxRelativePos = MIN_INT;
    2367 
    2368   Int depthTmp;
    2369   for (Int yTxt=0; yTxt<height; yTxt++)
    2370   {
    2371     for (Int xTxt=0; xTxt<width; xTxt++)
    2372     {
    2373       depthTmp = m_pDepthBlock[xTxt+yTxt*width];
    2374       Int disparity = shiftLUT[ depthTmp ]; // << iShiftPrec;
    2375       Int disparityInt = disparity >> 3;//in chroma resolution
    2376 
    2377       if (disparityInt < 0)
    2378       {
    2379         if (minRelativePos > disparityInt+xTxt)
    2380         {
    2381           minRelativePos = disparityInt+xTxt;
    2382         }
    2383       }
    2384       else
    2385       {
    2386         if (maxRelativePos < disparityInt+xTxt)
    2387         {
    2388           maxRelativePos = disparityInt+xTxt;
    2389         }
    2390       }
    2391     }
    2392   }
    2393 
    2394   depthTmp = m_pDepthBlock[0];
    2395   Int disparity_tmp = shiftLUT[ depthTmp ]; // << iShiftPrec;
    2396   if ( disparity_tmp < 0 )
    2397   {
    2398     maxRelativePos = minRelativePos + range - 1;
    2399   }
    2400   else
    2401   {
    2402     minRelativePos = maxRelativePos - range + 1;
    2403   }
    2404 
    2405 #endif // H_3D_VSP_CONSTRAINED
    2406 #endif // H_3D_VSP_BLOCKSIZE == 1
    2407 
    2408   TComMv dv(0, 0);
    2409   // luma size -> chroma size
    2410   height >>= 1;
    2411   width  >>= 1;
    2412 
    2413   for ( Int yTxt = 0; yTxt < height; yTxt += nTxtPerDepthY )
    2414   {
    2415     for ( Int xTxt = 0; xTxt < width; xTxt += nTxtPerDepthX )
    2416     {
    2417       Pel repDepth = depth[ xTxt<<1 ];
    2418       assert( repDepth >= 0 && repDepth <= 255 );
    2419 
    2420       Int disparity = shiftLUT[ repDepth ]; // remove << iShiftPrec;
    2421       Int xFrac = disparity & 0x7;
    2422      
    2423       dv.setHor( disparity );
    2424       cu->clipMv( dv );
    2425 
    2426       Int refOffset = xTxt + (dv.getHor() >> 3);
    2427 
    2428 #if H_3D_VSP_CONSTRAINED
    2429       if(refOffset<minRelativePos || refOffset>maxRelativePos)
    2430       {
    2431         xFrac = 0;
    2432       }
    2433       refOffset = Clip3(minRelativePos, maxRelativePos, refOffset);
    2434 #endif
    2435 
    2436       assert( refCb[refOffset] >= 0 && refCb[refOffset]<= 255 );
    2437       assert( refCr[refOffset] >= 0 && refCr[refOffset]<= 255 );
    2438 
    2439       m_if.filterHorChroma( &refCb[refOffset], refStride, &dstCb[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );
    2440       m_if.filterHorChroma( &refCr[refOffset], refStride, &dstCr[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );
    2441     }
    2442     refCb += refStrideBlock;
    2443     refCr += refStrideBlock;
    2444     dstCb += dstStrideBlock;
    2445     dstCr += dstStrideBlock;
    2446     depth += depStrideBlock;
    2447   }
    2448 }
    2449 #endif
    2450 
    2451 #if H_3D_VSP_CONSTRAINED
    2452 Int TComPrediction::xGetConstrainedSize(Int nPbW, Int nPbH, Bool bLuma)
    2453 {
    2454   Int iSize = 0;
    2455   if (bLuma)
    2456   {
    2457     Int iArea = (nPbW+7) * (nPbH+7);
    2458     Int iAlpha = iArea / nPbH - nPbW - 7;
    2459     iSize = iAlpha + nPbW;
    2460   }
    2461   else // chroma
    2462   {
    2463     Int iArea = (nPbW+2) * (nPbH+2);
    2464     Int iAlpha = iArea / nPbH - nPbW - 4;
    2465     iSize = iAlpha + nPbW;
    2466   }
    2467   return iSize;
    2468 }
    2469 #endif // H_3D_VSP_CONSTRAINED
    2470 
    2471 #endif // H_3D_VSP
    2472 
    24732065#if H_3D_DIM
    24742066Void TComPrediction::xPredBiSegDCs( Int* ptrSrc, UInt srcStride, Bool* biSegPattern, Int patternStride, Pel& predDC1, Pel& predDC2 )
     
    24852077  if( bL == bT )
    24862078  {
    2487 #if SCU_HS_DEPTH_DC_PRED_G0143
    24882079    const Int  iTRR = ( patternStride * 2 - 1  ) - srcStride;
    24892080    const Int  iLBB = ( patternStride * 2 - 1  ) * srcStride - 1;
    24902081    refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : (abs(ptrSrc[iTRR] - ptrSrc[-(Int)srcStride]) > abs(ptrSrc[iLBB] - ptrSrc[ -1]) ? ptrSrc[iTRR] : ptrSrc[iLBB]);
    2491 #else
    2492     refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : 1<<( g_bitDepthY - 1 );
    2493 #endif
    24942082    refDC2 =      ( ptrSrc[ -1] + ptrSrc[-(Int)srcStride] )>>1;
    24952083  }
     
    25932181  Int iSumPix[2];
    25942182  memset(iSumPix, 0, sizeof(Int)*2);
    2595 #if QC_GENERIC_SDC_G0122
    25962183  for( Int i = 0; i < uiNumSegments; i++ )
    25972184  {
    25982185    rpSegMeans[i] = 0;
    25992186  }
    2600 #endif
    26012187  if (orgDC == false)
    26022188  {
     
    26132199      rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ];
    26142200    }
    2615 #if QC_GENERIC_SDC_G0122
    26162201    else if( getDimType( uiIntraMode ) == DMM4_IDX )
    26172202    {
     
    26472232    }
    26482233    else
    2649 #else
    2650     else if (uiIntraMode == PLANAR_IDX)
    2651 #endif
    26522234    {
    26532235      Pel* pLeftTop = pOrig;
  • trunk/source/Lib/TLibCommon/TComPrediction.h

    r872 r884  
    8080
    8181#if H_3D_VSP
    82   Int*   m_pDepthBlock;         ///< Store a depth block, local variable, to prevent memory allocation every time
    83 #if H_3D_VSP_CONSTRAINED
    84   Int  xGetConstrainedSize(Int nPbW, Int nPbH, Bool bLuma = true);
    85 #endif
    86   TComYuv   m_cYuvDepthOnVsp;
     82  Int*    m_pDepthBlock;         ///< Store a depth block, local variable, to prevent memory allocation every time
     83  TComYuv m_cYuvDepthOnVsp;
    8784#endif
    8885
     
    121118
    122119#if H_3D_VSP
    123 #if NTT_STORE_SPDV_VSP_G0148
    124120  Void xPredInterUniSubPU        ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 );
    125 #else
    126   Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 );
    127   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);
    128   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 #endif
    130121#endif
    131122
     
    172163  // Depth intra
    173164  Void predIntraLumaDepth         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false
    174 #if QC_GENERIC_SDC_G0122
    175165    , TComWedgelet* dmm4Segmentation = NULL
    176 #endif
    177166    );
    178167#if H_3D_DIM_SDC
  • trunk/source/Lib/TLibCommon/TComRdCost.cpp

    r872 r884  
    599599  cDtParam.uiComp       = 255;    // just for assert: to be sure it was set before use, since only values 0,1 or 2 are allowed.
    600600
    601 #if SCU_HS_VSD_BUGFIX_IMPROV_G0163
    602601  cDtParam.bitDepth   = g_bitDepthY;
    603 #endif
     602
    604603  Dist dist = cDtParam.DistFunc( &cDtParam );
    605604
     
    29852984  dD = ( (Double) ( dDM >> DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) ) ) * m_dDisparityCoeff;
    29862985
    2987 #if SCU_HS_VSD_BUGFIX_IMPROV_G0163
    29882986  Double dDepthWeight = ( pOrg[x] >=  ( (1<<(g_bitDepthY - 3)) + (1<<(g_bitDepthY - 2)) ) ? 4 : pOrg[x] > ((1<<g_bitDepthY) >> 4) ? (Float)(pOrg[x] - ((1<<g_bitDepthY) >> 4))/(Float)((1<<g_bitDepthY) >> 3) + 1 : 1.0 );
    29892987  Double dTemp = ( 0.5 * fabs(dD) * dDepthWeight * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) );
    2990 #else
    2991   Double dTemp = ( 0.5 * fabs(dD) * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) );
    2992 #endif 
    29932988  iTemp = (Int) (((dTemp) < 0)? (Int)((dTemp) - 0.5) : (Int)((dTemp) + 0.5));
    29942989
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r872 r884  
    112112, m_interLayerPredEnabledFlag     (false)
    113113, m_numInterLayerRefPicsMinus1    (0)
    114 #if H_MV_HLS_7_POC_P0041
     114#if H_MV
    115115, m_sliceSegmentHeaderExtensionLength (0)
    116116, m_pocResetIdc                       (0)
     
    12841284
    12851285
    1286 
    12871286/** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet.
    12881287*/
     
    13401339
    13411340    }
    1342 #if H_MV_HLS_7_MISC_P0130_20
     1341#if H_MV
    13431342    if( isReference ) // Current picture is in the temporal RPS
    13441343    {
     
    17271726    }
    17281727  }
    1729 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1730   m_vpsNumberLayerSetsMinus1     = -1;
    1731 #endif
    17321728  m_vpsNumProfileTierLevelMinus1 = -1;
    17331729   
    1734 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1735   for ( Int i = 0; i < MAX_VPS_PROFILE_TIER_LEVEL; i++)
    1736   {
    1737 #if !H_MV_HLS_7_VPS_P0048_14
    1738     m_profileRefMinus1[ i ] = -1;
    1739 #endif
    1740   }
    1741    
    1742   m_moreOutputLayerSetsThanDefaultFlag = false;   
    1743   m_numAddOutputLayerSetsMinus1        = -1;   
    1744   m_defaultOneTargetOutputLayerIdc     = 0;
    1745 #else
    17461730  m_numAddOutputLayerSets              = -1;   
    17471731  m_defaultTargetOutputLayerIdc     = 0;
    1748 #endif
    17491732 
    17501733  for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++)
     
    17561739      m_outputLayerFlag[i][j] = false;
    17571740    }
    1758 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    17591741    m_altOutputLayerFlag[ i ]       = false;
    1760 #endif
    1761   }
    1762 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1763   m_altOutputLayerFlag       = false;
    1764 #endif
     1742  }
    17651743  m_maxOneActiveRefLayerFlag = false;
    17661744  m_directDepTypeLenMinus2   = 0;         
     
    17681746
    17691747  m_avcBaseLayerFlag = false;
    1770 #if H_MV_HLS_7_VPS_P0307_23
    17711748  m_vpsNonVuiExtensionLength = 0;
    1772 #else
    1773   m_vpsVuiOffset     = 0;
    1774 #endif
    17751749  m_splittingFlag    = false;
    17761750 
     
    17861760  {
    17871761    m_vpsProfilePresentFlag   [i] = false;
    1788 #if !H_MV_HLS_7_VPS_P0048_14
    1789     m_profileRefMinus1[i] = 0;
    1790 #endif
    17911762    m_outputLayerSetIdxMinus1       [i] = 0;
    17921763    for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ )
     
    20992070Int    TComVPS::getNumOutputLayerSets()
    21002071{
    2101 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    21022072  return getNumAddOutputLayerSets() + getVpsNumLayerSetsMinus1() + 1;
    2103 #else
    2104   Int numOutputLayerSets = getVpsNumberLayerSetsMinus1( ) + 1;
    2105   if ( getMoreOutputLayerSetsThanDefaultFlag( ) )
    2106   {     
    2107     numOutputLayerSets += (getNumAddOutputLayerSetsMinus1( ) + 1);
    2108 }
    2109   return numOutputLayerSets;
    2110 #endif
    21112073}
    21122074
     
    21562118}
    21572119
    2158 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    21592120Void TComVPS::initTargetLayerIdLists()
    21602121{
     
    21762137  } 
    21772138}
    2178 #else
    2179 Void TComVPS::deriveTargetLayerIdLists()
    2180 {
    2181   m_targetDecLayerIdLists.resize( getNumOutputLayerSets() );
    2182   m_targetOptLayerIdLists.resize( getNumOutputLayerSets() );
    2183 
    2184   for (Int targetOptLayerSetIdx = 0; targetOptLayerSetIdx < getNumOutputLayerSets(); targetOptLayerSetIdx++ )
    2185   {
    2186     Int targetDecLayerSetIdx = getOutputLayerSetIdxMinus1( targetOptLayerSetIdx ) + 1;     
    2187     Int lsIdx                = targetDecLayerSetIdx;
    2188 
    2189     for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ )
    2190     {
    2191       m_targetDecLayerIdLists[targetOptLayerSetIdx].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] );
    2192       if( getOutputLayerFlag( targetOptLayerSetIdx, j  )) // This seems to be wrong in draft text
    2193       {
    2194         m_targetOptLayerIdLists[targetOptLayerSetIdx].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] );
    2195       }
    2196     } 
    2197   }
    2198 }
    2199 #endif
     2139
     2140Bool TComVPS::inferOutputLayerFlag( Int i, Int j )
     2141{
     2142  Bool outputLayerFlag;
     2143  switch ( getDefaultTargetOutputLayerIdc( ) )
     2144  {
     2145  case 0:
     2146    outputLayerFlag = true;
     2147    break;
     2148  case 1:
     2149    outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 ); 
     2150    break;
     2151  case 2:
     2152    if ( i == 0 && j == 0)
     2153    {     
     2154      outputLayerFlag = true;  // This is a software only fix for a bug in the spec. In spec outputLayerFlag is neither present nor inferred.
     2155    }
     2156    else
     2157    {
     2158      assert( 0 );
     2159    }
     2160    break;
     2161  default:     
     2162    assert( 0 );
     2163    break;
     2164  }
     2165  return outputLayerFlag;
     2166}
     2167
     2168Int TComVPS::getMaxSubLayersInLayerSetMinus1( Int i )
     2169{
     2170  Int maxSLMinus1 = 0;
     2171  Int optLsIdx    = getLayerSetIdxForOutputLayerSet( i );
     2172  for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )
     2173  {
     2174    Int lId = m_layerSetLayerIdList[optLsIdx][k];
     2175    maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) ));
     2176  }
     2177  return maxSLMinus1;
     2178}
    22002179
    22012180#endif // H_MV
     
    24452424, m_ppsInferScalingListFlag(false)
    24462425, m_ppsScalingListRefLayerId(0)
    2447 #if H_MV_HLS_7_POC_P0041
    24482426, m_pocResetInfoPresentFlag(false)
    2449 #endif
    24502427#if H_3D
    24512428, m_pcDLT(NULL)
     
    24552432  m_scalingList = new TComScalingList;
    24562433
    2457 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 
     2434#if H_MV
    24582435  for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )
    24592436  {
     
    24612438  }
    24622439#endif
    2463 
    24642440}
    24652441
     
    29802956    // Consider to check here:
    29812957    // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer0 and RefPicSetInterLayer1 that is a RASL picture. "   
    2982 #if H_MV_HLS_7_MISC_P0130_20
    29832958    assert( picRef->getSlice(0)->getDiscardableFlag() == false ); // "There shall be no picture that has discardable_flag equal to 1 in RefPicSetInterLayer0 or RefPicSetInterLayer1".       
    2984 #endif
    29852959  }
    29862960}
     
    30182992    {
    30192993      break;
    3020   }       
     2994    }       
    30212995  }       
    30222996
     
    30283002      if ( pcPic )
    30293003      {
    3030       if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() )
    3031       {
    3032         Bool remainingInterLayerReferencesFlag = false;
    3033         for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
     3004        if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() )
    30343005        {
    3035           TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS();
    3036           if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) )
     3006          Bool remainingInterLayerReferencesFlag = false;
     3007          for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
     3008          {
     3009            TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS();
     3010            if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) )
     3011            {
     3012              for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ )
     3013              {
     3014                if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ],  k  ) )
     3015                {
     3016                  remainingInterLayerReferencesFlag = true;
     3017                }
     3018              }
     3019            }
     3020          }
     3021          if( !remainingInterLayerReferencesFlag )
    30373022          {
    3038             for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ )
    3039             {
    3040               if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ],  k  ) )
    3041               {
    3042                 remainingInterLayerReferencesFlag = true;
     3023            pcPic->getSlice(0)->setReferenced( false );                   
    30433024          }
    30443025        }
    3045           }
    3046         }
    3047         if( !remainingInterLayerReferencesFlag )
    3048         {
    3049           pcPic->getSlice(0)->setReferenced( false );                   
    3050       }
    3051     }
    3052       }
    3053   }
    3054 }
     3026      }
     3027    }
     3028  }
    30553029}
    30563030
     
    31573131  Int numActiveRefLayerPics;
    31583132
    3159 #if H_MV_HLS_7_MISC_P0079_18
    31603133  if( getLayerId() == 0 || getNumRefLayerPics() ==  0 )
    3161 #else
    3162   if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerId() ) ==  0 )
    3163 #endif
    31643134  {
    31653135    numActiveRefLayerPics = 0;
     
    31753145  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
    31763146  {
    3177 #if H_MV_HLS_7_MISC_P0079_18
    31783147    numActiveRefLayerPics = 1;
    3179 #else
    3180     numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0;
    3181 #endif
    31823148  }
    31833149  else
     
    32073173    for ( Int refListIdx = 0; refListIdx < ((m_eSliceType==B_SLICE) ? 2 : 1); refListIdx++ )
    32083174    {
    3209 #if MTK_ARP_REF_SELECTION_G0053
    32103175      Int diffPOC=MAX_INT;
    32113176      Int idx=-1;
    3212 #endif
    32133177      for(Int i = 0; i < getNumRefIdx(RefPicList(refListIdx)); i++ )
    32143178      {
    32153179        if ( getRefPic(RefPicList(refListIdx), i)->getPOC() != getPOC() )
    32163180        {
    3217 #if MTK_ARP_REF_SELECTION_G0053
    32183181          if( abs(getRefPic(RefPicList(refListIdx), i)->getPOC() - getPOC()) < diffPOC)
    32193182          {
     
    32213184            idx=i;
    32223185          }
    3223 #else
    3224           setFirstTRefIdx (RefPicList(refListIdx), i);
    3225           break;
    3226 #endif
    32273186        }
    3228 #if MTK_ARP_REF_SELECTION_G0053
    32293187        if(idx>=0)
    32303188        {
    32313189          setFirstTRefIdx (RefPicList(refListIdx), idx);
    32323190        }
    3233 #endif
    32343191      }
    32353192    }
     
    33683325#endif
    33693326
    3370 #if MTK_DDD_G0063
     3327#if H_3D_DDD
    33713328  if( getIsDepth() && getViewIndex() > 0 )
    33723329  {
     
    34263383    }
    34273384
    3428 #if MTK_DDD_G0063
     3385#if H_3D_DDD
    34293386    InitializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i );
    34303387#endif
     
    34343391#endif
    34353392
    3436 #if MTK_DDD_G0063
     3393#if H_3D_DDD
    34373394Void TComSlice::InitializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx )
    34383395{
     
    38373794{
    38383795  m_crossLayerIrapAlignedFlag = true;
    3839 #if H_MV_HLS_7_MISC_P0068_21
    38403796  m_allLayersIdrAlignedFlag   = false;
    3841 #endif
    38423797  m_bitRatePresentVpsFlag = false;
    38433798  m_picRatePresentVpsFlag = false;
     
    38663821      m_minHorizontalCtuOffsetPlus1 [i][j] = -1;
    38673822    }
    3868 #if H_MV_HLS_7_MISC_P0182_13
    38693823    m_baseLayerParameterSetCompatibilityFlag[i] = false;
    3870 #endif
    38713824  }
    38723825  for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ )
     
    38893842  if ( m_vpsVuiBspHrdParameters ) delete m_vpsVuiBspHrdParameters;
    38903843  m_vpsVuiBspHrdParameters = NULL;
     3844}
     3845
     3846Void TComVPSVUI::inferVpsVui( Bool encoderFlag )
     3847{
     3848  // inference of syntax elements that differ from default inference (as done in constructor), when VPS VUI is not present
     3849  if (!encoderFlag )
     3850  {
     3851    setCrossLayerIrapAlignedFlag( false );
     3852  }
     3853  else
     3854  {
     3855    assert( !getCrossLayerIrapAlignedFlag() );
     3856  }
    38913857}
    38923858
     
    39553921  setMatrixCoefficients     ( videoSignalInfo->getMatrixCoeffsVps           () );
    39563922}
    3957 #endif
     3923
     3924TComDpbSize::TComDpbSize()
     3925{
     3926  for (Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++ )
     3927  {     
     3928    m_subLayerFlagInfoPresentFlag[i]  = false;
     3929
     3930    for (Int j = 0; j < MAX_TLAYER; j++  )
     3931    {       
     3932      m_subLayerDpbInfoPresentFlag [i][j] = ( j == 0) ;
     3933      m_maxVpsNumReorderPics       [i][j] = 0;
     3934      m_maxVpsLatencyIncreasePlus1 [i][j] = 0;
     3935
     3936      for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ )
     3937      {
     3938        m_maxVpsDecPicBufferingMinus1[i][k][j] = 0;
     3939      }
     3940    }
     3941  }
     3942}
     3943#endif
  • trunk/source/Lib/TLibCommon/TComSlice.h

    r872 r884  
    473473  Bool m_crossLayerPicTypeAlignedFlag;
    474474  Bool m_crossLayerIrapAlignedFlag;
    475 #if H_MV_HLS_7_MISC_P0068_21
    476475  Bool m_allLayersIdrAlignedFlag;
    477 #endif
    478476  Bool m_bitRatePresentVpsFlag;
    479477  Bool m_picRatePresentVpsFlag;
     
    484482  Int  m_constantPicRateIdc          [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER];
    485483  Int  m_avgPicRate                  [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER];
    486 #if H_MV_HLS_7_VPS_P0076_15
    487484  Bool m_videoSignalInfoIdxPresentFlag;
    488485  Int  m_vpsNumVideoSignalInfoMinus1;
    489486  TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO];   
    490487  Int  m_vpsVideoSignalInfoIdx       [MAX_NUM_VIDEO_SIGNAL_INFO];
    491 #endif
    492488  Bool m_tilesNotInUseFlag;
    493489  Bool m_tilesInUseFlag              [MAX_NUM_LAYERS];
     
    500496  Bool m_ctuBasedOffsetEnabledFlag   [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    501497  Int  m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    502 #if !H_MV_HLS_7_VPS_P0076_15
    503   Bool m_videoSignalInfoIdxPresentFlag;
    504   Int  m_vpsNumVideoSignalInfoMinus1;
    505   TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO];   
    506   Int  m_vpsVideoSignalInfoIdx       [MAX_NUM_VIDEO_SIGNAL_INFO];
    507 #endif
    508498  Bool m_vpsVuiBspHrdPresentFlag;
    509499  TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters;
    510 #if H_MV_HLS_7_MISC_P0182_13
    511500  Bool m_baseLayerParameterSetCompatibilityFlag[MAX_NUM_LAYERS];
    512 #endif
    513501
    514502public:
     
    521509  Bool getCrossLayerIrapAlignedFlag(  ) { return m_crossLayerIrapAlignedFlag; }
    522510
    523 #if H_MV_HLS_7_MISC_P0068_21
    524511  Void setAllLayersIdrAlignedFlag( Bool flag ) { m_allLayersIdrAlignedFlag = flag; }
    525512  Bool getAllLayersIdrAlignedFlag(  ) { return m_allLayersIdrAlignedFlag; }
    526 #endif
    527513
    528514  Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; }
     
    550536  Int  getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; }
    551537
    552 #if H_MV_HLS_7_VPS_P0076_15
    553538  Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; }
    554539  Bool getVideoSignalInfoIdxPresentFlag(  ) { return m_videoSignalInfoIdxPresentFlag; }
     
    562547  Void setVpsVideoSignalInfoIdx( Int i, Int  val ) { m_vpsVideoSignalInfoIdx[i] = val; }
    563548  Int  getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; }
    564 #endif
    565549
    566550  Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; }
     
    593577  Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int  val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; }
    594578  Int  getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; }
    595 #if !H_MV_HLS_7_VPS_P0076_15
    596   Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; }
    597   Bool getVideoSignalInfoIdxPresentFlag(  ) { return m_videoSignalInfoIdxPresentFlag; }
    598 
    599   Void    setVideoSignalInfo( Int i, TComVideoSignalInfo* val )                        { m_videoSignalInfo[i] = val;  } 
    600   TComVideoSignalInfo* getVideoSignalInfo( Int i )                                     { return m_videoSignalInfo[i]; }
    601 
    602   Void setVpsNumVideoSignalInfoMinus1( Int  val ) { m_vpsNumVideoSignalInfoMinus1 = val; }
    603   Int  getVpsNumVideoSignalInfoMinus1(  ) { return m_vpsNumVideoSignalInfoMinus1; }
    604 
    605   Void setVpsVideoSignalInfoIdx( Int i, Int  val ) { m_vpsVideoSignalInfoIdx[i] = val; }
    606   Int  getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; }
    607 #endif
     579
    608580  Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; }
    609581  Bool getVpsVuiBspHrdPresentFlag(  ) { return m_vpsVuiBspHrdPresentFlag; }
     
    612584  TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters(  ) { return m_vpsVuiBspHrdParameters; }
    613585
    614 #if H_MV_HLS_7_MISC_P0182_13
    615586  Void setBaseLayerParameterSetCompatibilityFlag( Int i, Bool flag ) { m_baseLayerParameterSetCompatibilityFlag[i] = flag; }
    616587  Bool getBaseLayerParameterSetCompatibilityFlag( Int i ) { return m_baseLayerParameterSetCompatibilityFlag[i]; }
    617 #endif
    618 
    619 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    620   Void inferVpsVui( Bool encoderFlag )
    621   {
    622     // inference of syntax elements that differ from default inference (as done in constructor), when VPS VUI is not present
    623     if (!encoderFlag )
    624     {
    625       setCrossLayerIrapAlignedFlag( false );
    626     }
    627     else
    628     {
    629       assert( !getCrossLayerIrapAlignedFlag() );
    630     }
    631 
    632   }
    633 #endif
     588
     589  Void inferVpsVui( Bool encoderFlag );
    634590};
    635591
     
    686642
    687643public:
    688   TComDpbSize( )
    689   {
    690     for (Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++ )
    691     {     
    692       m_subLayerFlagInfoPresentFlag[i]  = false;
    693 
    694       for (Int j = 0; j < MAX_TLAYER; j++  )
    695       {       
    696         m_subLayerDpbInfoPresentFlag [i][j] = ( j == 0) ;
    697         m_maxVpsNumReorderPics       [i][j] = 0;
    698         m_maxVpsLatencyIncreasePlus1 [i][j] = 0;
    699 
    700         for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ )
    701         {
    702           m_maxVpsDecPicBufferingMinus1[i][k][j] = 0;
    703         }
    704       }
    705     } 
    706   } 
     644  TComDpbSize( ); 
    707645
    708646  Void setSubLayerFlagInfoPresentFlag( Int i, Bool flag ) { m_subLayerFlagInfoPresentFlag[i] = flag; }
     
    768706  /// VPS EXTENSION SYNTAX ELEMENTS
    769707  Bool        m_avcBaseLayerFlag;
    770 #if H_MV_HLS_7_VPS_P0307_23
    771708  Int         m_vpsNonVuiExtensionLength;
    772 #else
    773   Int         m_vpsVuiOffset;
    774 #endif
    775709  Bool        m_splittingFlag;
    776710  Bool        m_scalabilityMaskFlag          [MAX_NUM_SCALABILITY_TYPES];
     
    788722  Int         m_maxTidIlRefPicsPlus1     [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    789723  Bool        m_allRefLayersActiveFlag;
    790 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    791   Int         m_vpsNumberLayerSetsMinus1;
    792 #endif
    793724  Int         m_vpsNumProfileTierLevelMinus1;   
    794725  Bool        m_vpsProfilePresentFlag    [MAX_VPS_OP_SETS_PLUS1];
    795726
    796 #if !H_MV_HLS_7_VPS_P0048_14
    797   Int         m_profileRefMinus1         [MAX_VPS_PROFILE_TIER_LEVEL];
    798 #endif
    799 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    800727  Int         m_numAddOutputLayerSets;   
    801728  Int         m_defaultTargetOutputLayerIdc;
    802 #else 
    803   Bool        m_moreOutputLayerSetsThanDefaultFlag;
    804   Int         m_numAddOutputLayerSetsMinus1;   
    805   Int         m_defaultOneTargetOutputLayerIdc;
    806 #endif
    807729
    808730  Int         m_outputLayerSetIdxMinus1  [MAX_VPS_OUTPUTLAYER_SETS]; 
    809731  Bool        m_outputLayerFlag          [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1];
    810732  Int         m_profileLevelTierIdx      [MAX_VPS_OUTPUTLAYER_SETS ];
    811 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    812733  Bool        m_altOutputLayerFlag       [MAX_VPS_OUTPUTLAYER_SETS];
    813 #else
    814   Bool        m_altOutputLayerFlag;
    815 #endif
    816734  Bool        m_repFormatIdxPresentFlag;
    817735  Int         m_vpsNumRepFormatsMinus1;
     
    869787#if H_3D_SPIVMP
    870788  Int         m_iSubPULog2Size           [MAX_NUM_LAYERS   ];
    871 #endif
    872 #endif
    873 #if QC_SPIVMP_MPI_G0119
    874789  Int         m_iSubPUMPILog2Size;
     790#endif
    875791#endif
    876792#if H_3D_VSP
     
    974890  Bool    getAvcBaseLayerFlag()                                            { return m_avcBaseLayerFlag; }
    975891
    976 #if H_MV_HLS_7_VPS_P0307_23
    977892  Void    setVpsNonVuiExtensionLength( Int  val )                          { m_vpsNonVuiExtensionLength = val; }
    978893  Int     getVpsNonVuiExtensionLength(  )                                  { return m_vpsNonVuiExtensionLength; }
    979 #else
    980   Void    setVpsVuiOffset( Int  val )                                      { m_vpsVuiOffset = val; }
    981   Int     getVpsVuiOffset(  )                                              { return m_vpsVuiOffset; }
    982 #endif
    983894
    984895  Void    setSplittingFlag( Bool val )                                     { m_splittingFlag = val;  }
     
    988899  Void    setScalabilityMaskFlag( Int scalType, Bool val )                     { m_scalabilityMaskFlag[scalType] = val;  }
    989900  Bool    getScalabilityMaskFlag( Int scalType )                               { return m_scalabilityMaskFlag[scalType]; }
     901 
    990902  Int     getNumScalabilityTypes( );
    991903
     
    1009921  Void    setViewIdVal( Int viewOrderIndex, Int  val )                     { m_viewIdVal[viewOrderIndex] = val; }
    1010922  Int     getViewIdVal( Int viewOrderIndex )                               { return m_viewIdVal[viewOrderIndex]; }
     923 
    1011924  Void    setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val;  }
    1012925  Bool    getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps )           { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; }
     926 
    1013927  Void    setVpsSubLayersMaxMinus1PresentFlag( Bool flag )                 { m_vpsSubLayersMaxMinus1PresentFlag = flag; }
    1014928  Bool    getVpsSubLayersMaxMinus1PresentFlag(  )                          { return m_vpsSubLayersMaxMinus1PresentFlag; }
     929 
    1015930  Void    setSubLayersVpsMaxMinus1( Int i, Int  val )                      { m_subLayersVpsMaxMinus1[i] = val; }
    1016931  Int     getSubLayersVpsMaxMinus1( Int i )                                { return m_subLayersVpsMaxMinus1[i]; }
    1017932  Void    checkSubLayersVpsMaxMinus1( Int i )                              { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); }
     933
    1018934  Void    setMaxTidRefPresentFlag( Bool flag )                             { m_maxTidRefPresentFlag = flag; }
    1019935  Bool    getMaxTidRefPresentFlag(  )                                      { return m_maxTidRefPresentFlag; }
     936
    1020937  Void    setMaxTidIlRefPicsPlus1( Int i, Int j, Int  val )                { m_maxTidIlRefPicsPlus1[i][j] = val; }
    1021938  Int     getMaxTidIlRefPicsPlus1( Int i, Int j )                          { return m_maxTidIlRefPicsPlus1[i][j]; }
     939 
    1022940  Void    setAllRefLayersActiveFlag( Bool flag )                           { m_allRefLayersActiveFlag = flag; }
    1023941  Bool    getAllRefLayersActiveFlag(  )                                    { return m_allRefLayersActiveFlag; }
    1024942 
    1025 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1026   Void    setVpsNumberLayerSetsMinus1( Int val )                           { m_vpsNumberLayerSetsMinus1 = val;  }
    1027   Int     getVpsNumberLayerSetsMinus1( )                                   { return m_vpsNumberLayerSetsMinus1; }
    1028 #endif
    1029  
    1030943  Void    setVpsNumProfileTierLevelMinus1( Int val )                       { m_vpsNumProfileTierLevelMinus1 = val;  }
    1031944  Int     getVpsNumProfileTierLevelMinus1( )                               { return m_vpsNumProfileTierLevelMinus1; }
     
    1034947  Bool    getVpsProfilePresentFlag( Int idx )                              { return m_vpsProfilePresentFlag[idx]; }
    1035948
    1036 #if !H_MV_HLS_7_VPS_P0048_14
    1037   Void    setProfileRefMinus1( Int profileTierLevelIdx, Int val )          { m_profileRefMinus1[ profileTierLevelIdx ] = val;  }
    1038   Int     getProfileRefMinus1( Int profileTierLevelIdx )                   { return m_profileRefMinus1[ profileTierLevelIdx ]; }
    1039   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.
    1040 #endif
    1041 
    1042 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1043   Void    setMoreOutputLayerSetsThanDefaultFlag( Bool flag )               { m_moreOutputLayerSetsThanDefaultFlag = flag; }
    1044   Bool    getMoreOutputLayerSetsThanDefaultFlag()                          { return m_moreOutputLayerSetsThanDefaultFlag; }
    1045 #endif
    1046  
    1047 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1048949  Void    setNumAddOutputLayerSets( Int val )                              { m_numAddOutputLayerSets = val; }
    1049950  Int     getNumAddOutputLayerSets( )                                      { return m_numAddOutputLayerSets; }
    1050 #else
    1051   Void    setNumAddOutputLayerSetsMinus1( Int val )                        { m_numAddOutputLayerSetsMinus1 = val; }
    1052   Int     getNumAddOutputLayerSetsMinus1( )                                { return m_numAddOutputLayerSetsMinus1; }
    1053 #endif
    1054  
    1055 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     951 
    1056952  Void    setDefaultTargetOutputLayerIdc( Int  val )                       { m_defaultTargetOutputLayerIdc = val; }
    1057953  Int     getDefaultTargetOutputLayerIdc(  )                               { return m_defaultTargetOutputLayerIdc; }   
    1058 #else
    1059   Void    setDefaultOneTargetOutputLayerIdc( Int  val )                    { m_defaultOneTargetOutputLayerIdc = val; }
    1060   Int     getDefaultOneTargetOutputLayerIdc(  )                            { return m_defaultOneTargetOutputLayerIdc; }
    1061   Void    checkDefaultOneTargetOutputLayerIdc( )                           { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); }
    1062 #endif
    1063954 
    1064955  Void    setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val )        { m_outputLayerSetIdxMinus1[ outLayerSetIdx ]  = val; }
     
    1067958  Void    setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag )       { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; }
    1068959  Bool    getOutputLayerFlag( Int outLayerSetIdx, Int i )                  { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; }
    1069 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1070   Bool    inferOutputLayerFlag( Int i, Int j )                             
    1071   {
    1072     Bool outputLayerFlag;
    1073     switch ( getDefaultTargetOutputLayerIdc( ) )
    1074     {
    1075     case 0:
    1076       outputLayerFlag = true;
    1077       break;
    1078     case 1:
    1079       outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 ); 
    1080       break;
    1081     case 2:
    1082       if ( i == 0 && j == 0)
    1083       {     
    1084         outputLayerFlag = true;  // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred.
    1085       }
    1086       else
    1087       {
    1088         assert( 0 );
    1089       }
    1090       break;
    1091     default:     
    1092       assert( 0 );
    1093       break;
    1094     }
    1095     return outputLayerFlag;
    1096   }
    1097 #else
    1098   Bool    inferOutputLayerFlag( Int layerSetIdx, Int i )                   { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1  ) ));  }
    1099 #endif
     960
     961  Bool    inferOutputLayerFlag( Int i, Int j );
    1100962
    1101963  Void    setProfileLevelTierIdx( Int outLayerSetIdx, Int val )            { m_profileLevelTierIdx[ outLayerSetIdx ] = val; }
    1102964  Int     getProfileLevelTierIdx( Int outLayerSetIdx )                     { return m_profileLevelTierIdx[ outLayerSetIdx ]; }
    1103965 
    1104 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1105966  Void    setAltOutputLayerFlag( Int i, Bool flag )                        { m_altOutputLayerFlag[i] = flag; }
    1106967  Bool    getAltOutputLayerFlag( Int i )                                   { return m_altOutputLayerFlag[i]; }
    1107 #else
    1108   Void    setAltOutputLayerFlag( Bool flag )                               { m_altOutputLayerFlag = flag; }
    1109   Bool    getAltOutputLayerFlag(  )                                        { return m_altOutputLayerFlag; }
    1110 #endif
    1111968
    1112969  Void    setRepFormatIdxPresentFlag( Bool flag )                          { m_repFormatIdxPresentFlag = flag; }
     
    1121978  Void    setRepFormat( Int i, TComRepFormat* val )                        { m_repFormat[i] = val;  }
    1122979  TComRepFormat* getRepFormat( Int i )                                     { return m_repFormat[i]; }
     980 
    1123981  Void    setMaxOneActiveRefLayerFlag( Bool flag)                          { m_maxOneActiveRefLayerFlag = flag; }
    1124982  Bool    getMaxOneActiveRefLayerFlag( )                                   { return m_maxOneActiveRefLayerFlag; }
     
    1134992  Void    setPocLsbNotPresentFlag( Int i, Bool flag )                      { m_pocLsbNotPresentFlag[i] = flag; }
    1135993  Bool    getPocLsbNotPresentFlag( Int i )                                 { return m_pocLsbNotPresentFlag[i]; }
     994 
    1136995  Void    setDirectDepTypeLenMinus2( Int val)                              { m_directDepTypeLenMinus2 = val; }
    1137996  Int     getDirectDepTypeLenMinus2( )                                     { return m_directDepTypeLenMinus2; }
     
    11421001  Void    setDefaultDirectDependencyType( Int  val )                       { m_defaultDirectDependencyType = val; }
    11431002  Int     getDefaultDirectDependencyType(  )                               { return m_defaultDirectDependencyType; }
     1003 
    11441004  Void    setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; }
    11451005  Int     getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps)   { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; }
     
    11671027
    11681028  Int     getProfileLevelTierIdxLen()                                      { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };       
    1169 
    1170 #if H_MV_HLS_7_VPS_P0306_22
    11711029  Int     getVpsRepFormatIdxLen()                                          { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); };       
    1172 #endif
     1030
    11731031  Int     getNumLayersInIdList ( Int lsIdx );
    11741032
     
    11781036  Void    deriveLayerSetLayerIdList();
    11791037
    1180 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    11811038  Int     getLayerSetIdxForOutputLayerSet( Int i )                         { return ( i <= getVpsNumLayerSetsMinus1() ) ? i  : getOutputLayerSetIdxMinus1( i ) + 1 ; };
    11821039
     
    11891046  Int     getNumOutputLayersInOutputLayerSet( Int i )                      { return (Int) getTargetOptLayerIdList( i ).size(); };
    11901047  Int     getOlsHighestOutputLayerId( Int i )                              { return getTargetOptLayerIdList( i ).back(); }; 
    1191 #else
    1192   Void    deriveTargetLayerIdLists();
    1193   std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx )     { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; };
    1194   std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx )     { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; };
    1195 #endif
    1196 
    1197 #if H_MV_HLS_7_HRD_P0156_7
    1198   Int     getMaxSubLayersInLayerSetMinus1( Int i )
    1199   {
    1200     Int maxSLMinus1 = 0;
    1201     Int optLsIdx    = getLayerSetIdxForOutputLayerSet( i );
    1202     for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )
    1203     {
    1204       Int lId = m_layerSetLayerIdList[optLsIdx][k];
    1205       maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) ));
    1206     }
    1207     return maxSLMinus1;
    1208   }
    1209 #endif
     1048
     1049  Int     getMaxSubLayersInLayerSetMinus1( Int i );
    12101050
    12111051  // inference
     
    12321072  UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
    12331073  Bool getCamParPresent      ( Int viewIndex )  { return m_bCamParPresent[viewIndex]; }
    1234 #if FIX_CAM_PARS_COLLECTOR
    12351074  Void setCamParPresent      ( Int viewIndex, Bool val )  { m_bCamParPresent[viewIndex] = val; }
    1236 #endif
    12371075  Bool hasCamParInSliceHeader( Int viewIndex )  { return m_bCamParInSliceHeader[viewIndex]; }
    12381076  Void setHasCamParInSliceHeader( Int viewIndex, Bool b )  { m_bCamParInSliceHeader[viewIndex] = b; }
     
    12481086  Int     getSubPULog2Size(Int layerIdInVps)           { return m_iSubPULog2Size[layerIdInVps]; }
    12491087  Void    setSubPULog2Size(Int layerIdInVps, Int u)    { m_iSubPULog2Size[layerIdInVps] = u;}
    1250 #endif
    1251 #endif
    1252 #if QC_SPIVMP_MPI_G0119
    12531088  Int     getSubPUMPILog2Size( )           { return m_iSubPUMPILog2Size; }
    12541089  Void    setSubPUMPILog2Size( Int u )     { m_iSubPUMPILog2Size = u;    }
     1090#endif
    12551091#endif
    12561092#if H_3D_VSP
     
    19401776  Int  m_ppsScalingListRefLayerId;
    19411777
    1942 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
    19431778  Bool m_ppsExtensionTypeFlag[PS_EX_T_MAX_NUM];
    1944 #endif
    1945 #if H_MV_HLS_7_POC_P0041
    19461779  Bool m_pocResetInfoPresentFlag;
    1947 #endif
    19481780#endif
    19491781
     
    20881920  Int  getPpsScalingListRefLayerId(  ) { return m_ppsScalingListRefLayerId; }
    20891921
    2090 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
    20911922  Void setPpsExtensionTypeFlag( Int i, Bool flag ) { m_ppsExtensionTypeFlag[i] = flag; }
    20921923  Bool getPpsExtensionTypeFlag( Int i ) { return m_ppsExtensionTypeFlag[i]; }
    2093 #endif
    2094 
    2095 #if H_MV_HLS_7_POC_P0041
     1924
    20961925  Void setPocResetInfoPresentFlag( Bool flag ) { m_pocResetInfoPresentFlag = flag; }
    20971926  Bool getPocResetInfoPresentFlag(  ) { return m_pocResetInfoPresentFlag; }
    2098 #endif
    2099 
    21001927#endif
    21011928};
     
    22432070  Int        m_interLayerPredLayerIdc       [MAX_NUM_LAYERS];
    22442071
    2245 #if H_MV_HLS_7_POC_P0041
    22462072  Int        m_sliceSegmentHeaderExtensionLength;
    22472073  Int        m_pocResetIdc;
     
    22522078  Int        m_pocMsbVal;
    22532079  Bool       m_pocMsbValRequiredFlag;
    2254 #endif
    22552080
    22562081#if H_3D
     
    22782103#endif
    22792104
    2280 #if MTK_DDD_G0063
     2105#if H_3D_DDD
    22812106  Int          m_aiDDDInvScale [MAX_NUM_LAYERS];
    22822107  Int          m_aiDDDInvOffset[MAX_NUM_LAYERS];
     
    26002425  Int  getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; }
    26012426
    2602 #if H_MV_HLS_7_POC_P0041
    26032427  Void setSliceSegmentHeaderExtensionLength( Int  val ) { m_sliceSegmentHeaderExtensionLength = val; }
    26042428  Int  getSliceSegmentHeaderExtensionLength(  ) { return m_sliceSegmentHeaderExtensionLength; }
     
    26372461    return getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA;
    26382462  }
    2639 #endif
    26402463
    26412464  // Additional variables derived in slice header semantics
     
    26582481
    26592482#endif
    2660 #if MTK_DDD_G0063
     2483#if H_3D_DDD
    26612484  Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx );
    26622485  Int  getDepthFromDV( Int iDV, Int iBaseViewIdx )
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r872 r884  
    7676#if H_3D
    7777#define H_3D_QTLPC                        1   // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068
    78                                               // HHI_QTLPC_RAU_OFF_C0160     // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
     78                                              // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
     79                                              // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055
    7980
    8081#define H_3D_VSO                          1   // VSO, View synthesis optimization, includes:
     
    8384                                              // SAIT_VSO_EST_A0033, JCT3V-A0033 modification 3
    8485                                              // LGE_WVSO_A0119
     86                                              // SCU_HS_VSD_BUGFIX_IMPROV_G0163
    8587#define H_3D_NBDV                         1   // Neighboring block disparity derivation
    8688                                              // QC_JCT3V-A0097
     
    102104                                              // SHARP_ARP_REF_CHECK_F0105        ARP reference picture selection and DPB check
    103105                                              // LGE_ARP_CTX_F0161                JCT3V-F0161
     106                                              // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061
     107                                              // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053
     108
    104109#define H_3D_IC                           1   // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060
    105110                                              // Unifying rounding offset, for IC part, JCT3V-D0135
     
    109114                                              // LGE_IC_CTX_F0160 //JCT3V-F0160
    110115                                              // SEC_ONLY_TEXTURE_IC_F0151
     116                                              // MTK_IC_FLAG_CABAC_SIMP_G0061
     117                                              // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121
    111118
    112119#if H_3D_NBDV
     
    133140                                              // MTK_VSP_SIMPLIFICATION_F0111 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss
    134141                                              // LGE_SHARP_VSP_INHERIT_F0104
     142                                              // NTT_STORE_SPDV_VSP_G0148 Storing Sub-PU based DV for VSP
     143                                              // Restricted bi-prediction for VSP
    135144
    136145#define H_3D_IV_MERGE                     1   // Inter-view motion merge candidate
     
    145154                                              // ETRIKHU_MERGE_REUSE_F0093 QC_DEPTH_IV_MRG_F0125, JCT3V-F0125: Depth oriented Inter-view MV candidate
    146155                                              // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode
     156                                              // MTK_NBDV_IVREF_FIX_G0067      , Disable IvMC, VSP when IVREF is not available, JCT3V-G0067
     157                                              // SEC_DEPTH_DV_DERIVAITON_G0074, Simplification of DV derivation for depth, JCT3V-G0074
     158                                              // QC_DEPTH_MERGE_SIMP_G0127 Remove DV candidate and shifting candidate for depth coding
     159
    147160#define H_3D_TMVP                         1   // QC_TMVP_C0047
    148161                                              // Sony_M23639
     
    173186                                              // SEC_DMM3_RBC_F0147 Removal of DMM3 and RBC from DMMs
    174187                                              // QC_DIM_DELTADC_UNIFY_F0132 Unify delta DC coding in depth intra modes
     188                                              // Unify intra SDC and inter SDC
     189                                              // QC_GENERIC_SDC_G0122 Generalize SDC to all depth intra modes
     190                                              // SCU_HS_DEPTH_DC_PRED_G0143
     191                                              // HS_TSINGHUA_SDC_SPLIT_G0111
     192                                              // QC_PKU_SDC_SPLIT_G0123 Intra SDC Split
     193
     194
    175195
    176196#define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
    177                                               // LGE_INTER_SDC_E0156  Enable inter SDC for depth coding
     197                                              // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding
     198                                              // SEC_INTER_SDC_G0101 Improved inter SDC with multiple DC candidates
     199
    178200#define H_3D_SPIVMP                       1   // H_3D_SPIVMP    // JCT3V-F0110: Sub-PU level inter-view motion prediction
     201                                              // SEC_SPIVMP_MCP_SIZE_G0077, Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077
     202                                              // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate
     203                                              // Simplification on Sub-PU level temporal interview motion prediction
     204
     205
     206#define H_3D_DBBP                         1   // DBBP: Depth-based Block Partitioning and Merging
     207
     208#define H_3D_DDD                          1   // Disparity derived depth coding
     209
    179210#define H_3D_FCO                          0   // Flexible coding order for 3D
    180211
     
    258289
    259290
     291///// ***** DEPTH BASED BLOCK PARTITIONING *********
     292#if H_3D_DBBP
     293#define DBBP_INVALID_SHORT                (-4)
     294#define RWTH_DBBP_PACK_MODE               SIZE_2NxN
     295#endif
     296
     297
    260298///// ***** FCO *********
    261299#if H_3D_FCO
     
    269307#endif
    270308
    271 
    272309/////////////////////////////////////////////////////////////////////////////////////////
    273 ///////////////////////////////////   HTM-10.0 Integrations //////////////////////////////
     310///////////////////////////////////   TBD                  //////////////////////////////
    274311/////////////////////////////////////////////////////////////////////////////////////////
    275 #if H_3D
    276 #if  H_3D_QTLPC
    277 #define MTK_TEX_DEP_PAR_G0055             1   // Texture-partition-dependent depth partition. JCT3V-G0055
    278 #endif
    279 
    280 #define MTK_DDD_G0063                     1   // Disparity derived depth coding
    281 #define HTM10RC1_FIX                           1   // Fix of DDD
    282 
    283 
    284 #if H_3D_VSP
    285 #define MTK_RBIP_VSP_G0069                1   // Restricted bi-prediction for VSP
    286 #define NTT_STORE_SPDV_VSP_G0148          1   // Storing Sub-PU based DV for VSP
    287 #endif
    288 
    289 #define H_3D_DBBP                         1   // DBBP: Depth-based Block Partitioning and Merging
    290 
    291 #if H_3D_DBBP
    292 #define DBBP_INVALID_SHORT                (-4)
    293 #define RWTH_DBBP_PACK_MODE               SIZE_2NxN
    294 #endif
    295 
    296 #if H_3D_DIM
    297 #define QC_PKU_SDC_SPLIT_G0123            1   // Intra SDC Split
    298 #if QC_PKU_SDC_SPLIT_G0123
    299 #define HS_TSINGHUA_SDC_SPLIT_G0111       1
    300 #endif
    301 #define SCU_HS_DEPTH_DC_PRED_G0143        1
    302 #define QC_GENERIC_SDC_G0122              1  // Generalize SDC to all depth intra modes
    303 #if H_3D_DIM_SDC && H_3D_INTER_SDC
    304 #define QC_SDC_UNIFY_G0130                1  // Unify intra SDC and inter SDC
    305 #define QC_SDC_UNIFY_G0130_FIX            1  // Fix bug of G0130
    306 #define QC_SDC_UNIFY_G0130_FIX2           1  // Fix bug of G0130
    307 #endif
    308 #define SEC_INTER_SDC_G0101               1  // Improved inter SDC with multiple DC candidates
    309 #endif
    310 
    311 #define KHU_SIMP_SPIVMP_G0147             1  // Simplification on Sub-PU level temporal interview motion prediction
    312 
    313 #if H_3D_SPIVMP
    314 #define QC_SPIVMP_MPI_G0119               1 // Sub-PU level MPI merge candidate
    315 #endif
    316 
    317 #define QC_DEPTH_MERGE_SIMP_G0127         1 // Remove DV candidate and shifting candidate for depth coding
    318 #define SEC_IC_ARP_SIG_G0072              1   // Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121
    319 #define SCU_HS_VSD_BUGFIX_IMPROV_G0163    1
    320 #define SEC_SPIVMP_MCP_SIZE_G0077         1  // Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077
    321 #define SEC_DEPTH_DV_DERIVAITON_G0074     1  // Simplification of DV derivation for depth, JCT3V-G0074
    322 #define MTK_ARP_REF_SELECTION_G0053       1   // ARP Reference picture selection in JCT3V-G0053
    323 #define MTK_ARP_FLAG_CABAC_SIMP_G0061     1   // Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061
    324 #define MTK_IC_FLAG_CABAC_SIMP_G0061      1   // Use only 1 context for IC flag in JCT3V-G0061
    325 #define MTK_NBDV_IVREF_FIX_G0067          1   // Disable IvMC, VSP when IVREF is not available, JCT3V-G0067
    326 #endif
    327 
    328 /////////////////////////////////////////////////////////////////////////////////////////
    329 ///////////////////////////////////   HTM-10.1 Integrations //////////////////////////////
    330 /////////////////////////////////////////////////////////////////////////////////////////
    331 
    332 
    333 // TBD
     312
    334313// #define H_MV_HLS_7_POC_P0041_3            0 // (POC/P0041/POC reset) #3 It was remarked that we should require each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. This was agreed. Decision: Adopt (with constraint for discardable_flag as described above)
    335314// #define H_MV_HLS_7_POC_P0041_FIXES        0 // (POC/P0041/Fixes) For each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture.
     
    343322// #define H_MV_HLS_7_VPS_P0300_27           0 // Output part only. (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt.
    344323
    345 
    346 #define H_MV_HLS_7_VPS_P0306_22                1 // (VPS/P0306/ue(v) coded syntax elements) #22 Several minor modifications to the VPS syntax, consistent with eliminating the previous intention to avoid ue(v) parsing in the VPS
    347 #define H_MV_HLS_7_SEI_P0204_26                1 // (SEI/P0204/sub-bitstream SEI) #26 Add sub-bitstream property SEI message. Decision: Adopt
    348 #define H_MV_HLS_7_MISC_P0130_20               1 // (MISC/P0130/discardable not in inter-layer RPS) #20 Add constraint restricting pictures marked as discardable from being present in the temporal or inter-layer RPS,
    349 #define H_MV_HLS_7_VPS_P0125_24                1 // (VPS/P0125/VPS extension offset ) #24 Decision: Keep it as a reserved FFFF value.
    350 #define H_MV_HLS_7_VPS_P0307_23                1 // (VPS/P0307/VPS VUI extension)  #23 Decision: Adopt modification in P0307.
    351 #define H_MV_HLS_7_POC_P0041                   1 // Syntax related to POC reset
    352 
    353 
    354 #define H_MV_HLS7_GEN                          0  // General changes (not tested)
    355 #define H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27    1  // Output layer sets, various
    356                                                   // (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt.
    357                                                   // (VPS/P0156/Num of output_layer_flag) #10 Proposal 3: The output_layer_flag[ i ][ j ] is signalled for j equal to 0 to NumLayersInIdList[ lsIdx ] inclusive. It was remarked that we might be able to just assume that the top layer is always output; however, this was not entirely clear , so the safe thing to do may be to also send the flag for this layer.
    358                                                   // (VPS/P0295/Default output layer sets) #5 Discussion from (P0110). Decision: Three-state approach (text in P0295, decoder shall allow 3 to be present and shall treat 3 the same as the value 2).
    359 
    360 
    361 #define H_MV_HLS_7_HRD_P0156_7                 1  // (HRD/P0156/MaxSubLayersInLayerSetMinus1) #7 Proposal 1: signal, in the VPS extension, the DPB parameters for an output layer set for sub-DPBs only up to the maximum temporal sub-layers in the corresponding layer set
    362 #define H_MV_HLS_7_VPS_P0048_14                1  // (VPS/P0048/profile_ref_minus1 rem) #14 Remove profile_ref_minus1 from the VPS extension, from JCTVC-P0048
    363 #define H_MV_HLS_7_VPS_P0076_15                1  // (VPS/P0076/video signal info move) #15 Move video signal information syntax structure earlier in the VPS VUI.
    364 #define H_MV_HLS_7_SPS_P0155_16_32             1  // (SPS/P0155/sps_sub_layer_ordering_info) #16, #32 Not signal the sps_max_num_reorder_pics[], sps_max_latency_increase_plus1[], and sps_max_dec_pic_buffering_minus1[] syntax elements in the SPS when nuh_layer_id > 0.
    365 #define H_MV_HLS_7_GEN_P0166_PPS_EXTENSION     1  // (GEN/P0166/pps_extension) #17 Add PPS extension type flags for conditional presence of syntax extensions per extension type, aligned with the SPS extension type flags, from JCTVC-P0166. Further align the SPS extension type flags syntax between RExt and MV-HEVC/SHVC
    366 #define H_MV_HLS_7_FIX_SET_DPB_SIZE            1  // Fix derivation dpb size parameters
    367 #define H_MV_HLS_7_RESERVED_FLAGS              1  // Added flags
    368                                                   // (SPS/P0312/SHVC reserved flag) The flag will be used for the syntax vert_phase_position_enable_flag in SHVC draft
    369                                                   // (VPS/O0215/SHVC reserved flag): this flag will be used for the syntax cross_layer_phase_alignment_flag in SHVC draft.
    370                                                   // (VPS VUI/O0199,P0312/SHVC reserved flags) the 3 reserved bits will be used for the syntaxes single_layer_for_non_irap_flag, higher_layer_irap_skip_flag and vert_phase_position_not_in_use_flag in SHVC draft.
    371 #define H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO   1  // Discard VPS with nuh_layer_Id > 0
    372 #define H_MV_HLS_7_MISC_P0130_EOS              1  // (MISC/P0130/EOS NAL layer id) #19 Require that end of bitstream NAL unit shall have nuh_layer_id equal to 0, from JCTVC-P0130. Decoders shall allow an end of bitstream NAL unit with nuh_layer_id > 0 to be present, and shall ignore the NAL unit.
    373 #define H_MV_HLS_7_MISC_P0182_13               1  // (MISC/P0182/BL PS Compatibility flag) #13 Define the flag (in VPS VUI) with the proposed semantics, without specifying an associated extraction process. Editors to select the position in the VPS VUI.
    374 #define H_MV_HLS_7_MISC_P0068_21               1  // (MISC/P0068/all irap idr flag) #21 Add flag in VUI to indicate that all IRAP pictures are IDRs and that all layer pictures in an AU are IDR aligned, from JCTVC-P0068 proposal 1.
    375 #define H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG               1  // Fix inference of cross_layer_irap_aligned_flag
    376 #define H_MV_HLS_7_MISC_P0079_18               1  // (MISC/P0079/NumActiveRefLayerPics) #18 Modification of derivation of variable NumActiveRefLayerPics.
    377 #define FIX_CAM_PARS_COLLECTOR                 1
    378 #define UPDATE_HM13                            1  // Only some parts in H_3D parts are marked!
    379 #if H_3D
    380 #define H_3D_FIX_G0148_BRACE                   1
    381 #endif
     324#define H_MV_HLS7_GEN                        0  // General changes (not tested)
     325
     326
     327
    382328/////////////////////////////////////////////////////////////////////////////////////////
    383329///////////////////////////////////   HM RELATED DEFINES ////////////////////////////////
     
    416362#define MAX_NUM_BITSTREAM_PARTITIONS    100 ///< Maximum value is actually not specified
    417363#define MAX_NUM_BSP_SCHED_COMBINATION   100 ///< Maximum value is actually not specified
    418 #if H_MV_HLS_7_SEI_P0204_26
    419364#define MAX_SUB_STREAMS                 1024
    420 #endif
    421365#else
    422366#define MAX_NUM_LAYER_IDS                64
     
    909853#if H_MV
    910854
    911 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
    912855enum PpsExtensionTypes
    913856{
     
    921864
    922865//Below for sps, would be good if this could be aligned
    923 #endif
    924866
    925867  enum PsExtensionTypes
  • trunk/source/Lib/TLibDecoder/SEIread.cpp

    r872 r884  
    9999    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    100100    break;
    101 #if H_MV_HLS_7_SEI_P0204_26
     101#if H_MV
    102102  case SEI::SUB_BITSTREAM_PROPERTY:
    103103    fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
     
    245245      xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);
    246246      break;
    247 #if H_MV_HLS_7_SEI_P0204_26
     247#if H_MV
    248248     case SEI::SUB_BITSTREAM_PROPERTY:
    249249       sei = new SEISubBitstreamProperty;
     
    777777
    778778}
    779 #if H_MV_HLS_7_SEI_P0204_26
     779#if H_MV
    780780Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei)
    781781{
  • trunk/source/Lib/TLibDecoder/SEIread.h

    r872 r884  
    7373  Void xParseSEISOPDescription        (SEISOPDescription &sei, UInt payloadSize);
    7474  Void xParseSEIScalableNesting       (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps);
    75 #if H_MV_HLS_7_SEI_P0204_26
     75#if H_MV
    7676  Void  xParseSEISubBitstreamProperty   (SEISubBitstreamProperty &sei);
    7777  Void  xResizeSubBitstreamPropertySeiArrays(SEISubBitstreamProperty &sei);
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r872 r884  
    366366
    367367  READ_FLAG( uiCode, "pps_extension_flag");
    368 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
    369368  if (uiCode)
    370369  {
     
    383382    if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )
    384383    {
    385 #if H_MV_HLS_7_POC_P0041
    386384      READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    387 #endif
    388385    }
    389386
     
    406403#endif
    407404  }
    408 #else
    409   if (uiCode)
    410   {
    411 #if H_3D
    412     parsePPSExtension( pcPPS, pcVPS );
    413     READ_FLAG( uiCode, "pps_extension2_flag");
    414     if ( uiCode )
    415     {
    416 #endif
    417       while ( xMoreRbspData() )
    418       {
    419         READ_FLAG( uiCode, "pps_extension_data_flag");
    420       }
    421 #if H_3D
    422     }
    423 #endif
    424   }
    425 #endif
    426405}
    427406
     
    849828  assert(uiCode <= 12);
    850829
    851 #if H_MV_HLS_7_SPS_P0155_16_32
     830#if H_MV
    852831  if ( pcSPS->getLayerId() == 0 )
    853832  { 
     
    888867    }
    889868  }
    890 #if H_MV_HLS_7_SPS_P0155_16_32
     869#if H_MV
    891870  }
    892871#endif
     
    10531032    READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode );
    10541033    READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );
    1055 #if H_MV_HLS_7_RESERVED_FLAGS
    10561034    READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" );
    1057 #endif
    10581035  }
    10591036}
     
    10921069  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    10931070
    1094 #if H_MV_HLS_7_VPS_P0125_24
    10951071  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    1096 #else
    1097 #if H_MV && !H_MV_HLS7_GEN
    1098   READ_CODE( 16, uiCode,  "vps_extension_offset" );               
    1099 #else
    1100   READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    1101 #endif
    1102 #endif
    11031072  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
    11041073  UInt subLayerOrderingInfoPresentFlag;
     
    12121181  READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
    12131182
    1214 #if !H_MV_HLS_7_VPS_P0307_23
    1215   READ_FLAG( uiCode, "vps_vui_present_flag" );                    pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
    1216   if ( pcVPS->getVpsVuiPresentFlag() )
    1217   { 
    1218   READ_CODE( 16, uiCode, "vps_vui_offset" );                      pcVPS->setVpsVuiOffset( uiCode );
    1219   }
    1220 #endif
    1221 
    12221183  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
    12231184
     
    13251286
    13261287  READ_FLAG( uiCode, "all_ref_layers_active_flag" );             pcVPS->setAllRefLayersActiveFlag( uiCode == 1 );
    1327 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1328   READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1"      );  pcVPS->setVpsNumberLayerSetsMinus1    ( uiCode );
    1329 #endif
    1330 
    1331 #if !H_MV_HLS_7_VPS_P0306_22
    1332   READ_CODE( 6,  uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );
    1333 #else
     1288
    13341289  READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 
    1335 #endif
     1290
    13361291  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    13371292  {
    13381293    READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
    1339 #if !H_MV_HLS_7_VPS_P0048_14
    1340     if( !pcVPS->getVpsProfilePresentFlag( i ) )
    1341     {
    1342       READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
    1343       pcVPS->checkProfileRefMinus1( i );     
    1344     }
    1345 #endif
    13461294    parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
    13471295    if( !pcVPS->getVpsProfilePresentFlag( i ) )
    13481296    {
    13491297      TComPTL temp = *pcVPS->getPTL( i );
    1350 #if H_MV_HLS_7_VPS_P0048_14
    13511298      *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 );
    1352 #else
    1353       *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );
    1354 #endif
    13551299      pcVPS->getPTL( i )->copyLevelFrom( &temp );
    13561300    }
    13571301  }
    13581302
    1359 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13601303  READ_UVLC( uiCode, "num_add_output_layer_sets"      ); pcVPS->setNumAddOutputLayerSets( uiCode );
    13611304  pcVPS->initTargetLayerIdLists( );
     
    13651308  } 
    13661309
    1367 #else
    1368   Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
    1369 
    1370   READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );
    1371 
    1372   if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
    1373   {
    1374     READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1"      ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );
    1375     numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);
    1376   }
    1377 
    1378   if( numOutputLayerSets > 1)
    1379   {
    1380     READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );
    1381     pcVPS->checkDefaultOneTargetOutputLayerIdc();
    1382   } 
    1383 #endif
    1384 
    13851310  pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 ));
    13861311  pcVPS->setOutputLayerSetIdxMinus1(0, -1);
    13871312
    1388 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13891313  pcVPS->deriveTargetLayerIdList( 0 );
    13901314  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    13911315  {
    13921316    if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )   
    1393 #else
    1394   for( Int i = 1; i < numOutputLayerSets; i++ )
    1395   {
    1396     if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
    1397 #endif
    13981317    {       
    13991318      READ_UVLC( uiCode,      "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );
    1400 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14011319    }
    14021320
     
    14161334    }
    14171335    pcVPS->deriveTargetLayerIdList( i );
    1418 #else
    1419       for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    1420       {
    1421         READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 );
    1422       }       
    1423     }
    1424     else
    1425     { // These inference rules would also be helpful in spec text
    1426       pcVPS->setOutputLayerSetIdxMinus1(i, i - 1 );
    1427       for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    1428       {             
    1429         pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j ));
    1430       }
    1431     }
    1432 #endif
     1336
    14331337    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    14341338    {     
     
    14361340    }
    14371341
    1438 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14391342    if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
    14401343    {
     
    14421345    }
    14431346  }
    1444 #else
    1445   }
    1446   if( pcVPS->getMaxLayersMinus1() > 0 )
    1447   {
    1448     READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );
    1449   }
    1450 #endif
    1451 
    1452 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1453   pcVPS->deriveTargetLayerIdLists();
    1454 #endif
    14551347
    14561348  READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
    14571349  if ( pcVPS->getRepFormatIdxPresentFlag() )
    14581350  {
    1459 #if H_MV_HLS_7_VPS_P0306_22
    14601351    READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
    1461 #else
    1462     READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
    1463 #endif
    14641352  }
    14651353
     
    14791367      if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    14801368      {
    1481 #if H_MV_HLS_7_VPS_P0306_22
    14821369        READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1483 #else
    1484         READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1485 #endif
    14861370      }
    14871371    }
     
    15001384  }
    15011385
    1502 #if H_MV_HLS_7_RESERVED_FLAGS
    15031386  READ_FLAG( uiCode, "vps_reserved_zero_flag" );
    1504 #endif
    15051387  parseDpbSize( pcVPS );
    15061388
     
    15311413  } 
    15321414
    1533 #if H_MV_HLS_7_VPS_P0307_23
    15341415  READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode );
    15351416  for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ )
     
    15381419  }
    15391420  READ_FLAG( uiCode, "vps_vui_present_flag" );  pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
    1540 #endif
    1541 #if !H_MV_HLS_7_RESERVED_FLAGS
    1542   READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" );
    1543 #endif
    15441421  if( pcVPS->getVpsVuiPresentFlag() )
    15451422  {
     
    15471424    parseVPSVUI( pcVPS );
    15481425  }     
    1549 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    15501426  {
    15511427    TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( );
     
    15531429    pcVPSVUI->inferVpsVui( false );
    15541430  }
    1555 #endif
    15561431
    15571432  pcVPS->checkVPSExtensionSyntax();
     
    16011476    READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 );
    16021477  }
    1603 #if H_MV_HLS_7_MISC_P0068_21
    16041478  if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) )
    16051479  {
    16061480    READ_FLAG( uiCode, "all_layers_idr_aligned_flag" ); pcVPSVUI->setAllLayersIdrAlignedFlag( uiCode == 1 );
    16071481  }
    1608 #endif
    16091482  READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 );
    16101483  READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 );
    16111484  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    16121485  {
    1613 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    16141486    for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1615 #else
    1616     for( Int i = 0; i  <=  pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
    1617 #endif
    16181487    {
    16191488      for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
     
    16411510  }
    16421511
    1643 #if H_MV_HLS_7_VPS_P0076_15
    16441512  READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    16451513  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     
    16751543    }
    16761544  }
    1677 #endif
    16781545
    16791546  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
     
    17121579  }
    17131580
    1714 #if H_MV_HLS_7_RESERVED_FLAGS
    17151581  READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" );
    1716 #endif
    1717 
    17181582  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
    17191583
     
    17371601  }
    17381602
    1739 #if !H_MV_HLS_7_VPS_P0076_15
    1740   READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    1741   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
    1742   {
    1743     READ_CODE( 4, uiCode, "vps_num_video_signal_info_minus1" ); pcVPSVUI->setVpsNumVideoSignalInfoMinus1( uiCode );
    1744   }
    1745   else
    1746   {
    1747     pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
    1748   }
    1749 
    1750   for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ )
    1751   {
    1752     assert( pcVPSVUI->getVideoSignalInfo( i ) == NULL );
    1753     TComVideoSignalInfo* curVideoSignalInfo = new TComVideoSignalInfo();     
    1754     parseVideoSignalInfo( curVideoSignalInfo );
    1755     pcVPSVUI->setVideoSignalInfo(i, curVideoSignalInfo );
    1756   }
    1757  
    1758   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    1759   {
    1760     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1761     {
    1762       READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
    1763       assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );
    1764     }
    1765   }
    1766   else
    1767   {
    1768     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1769     {
    1770       pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i );
    1771     }
    1772   }
    1773 #endif
    17741603  READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 );
    17751604  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
     
    17771606    parseVpsVuiBspHrdParameters( pcVPS );
    17781607}
    1779 #if H_MV_HLS_7_MISC_P0182_13
    17801608  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    17811609  {
     
    17851613    }
    17861614  }
    1787 #endif
    17881615}
    17891616
     
    18641691  { 
    18651692    READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 );
    1866 #if H_MV_HLS_7_HRD_P0156_7
    18671693    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1868 #else
    1869     for( Int j = 0; j  <=  vps->getMaxTLayers() - 1 ; j++ )
    1870 #endif
    18711694    { 
    18721695      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    18761699      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    18771700      { 
    1878 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    18791701        for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ )   
    1880 #else
    1881         for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
    1882 #endif
    18831702        {
    18841703          READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
     
    19331752        READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
    19341753#if H_3D_SPIVMP
    1935 #if SEC_SPIVMP_MCP_SIZE_G0077
    19361754        READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]");     pcVPS->setSubPULog2Size(i, uiCode+3);
    1937 #else
    1938         READ_UVLC (uiCode, "log2_sub_PU_size_minus2");     pcVPS->setSubPULog2Size(i, uiCode+2);
    1939 #endif
    19401755#endif
    19411756#endif
     
    19651780        if (i!=1)
    19661781        {
    1967 #if SEC_SPIVMP_MCP_SIZE_G0077
    19681782          READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]");     pcVPS->setSubPULog2Size(i, uiCode+3);
    1969 #else
    1970           READ_UVLC (uiCode, "log2_sub_PU_size_minus2[i]");     pcVPS->setSubPULog2Size(i, uiCode+2);
    1971 #endif
    19721783        }
    19731784#endif
     
    19911802  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
    19921803  {
    1993 #if FIX_CAM_PARS_COLLECTOR
    19941804    pcVPS->setCamParPresent         ( viewIndex, false );
    19951805    pcVPS->setHasCamParInSliceHeader( viewIndex, false );
    1996 #endif
    19971806    READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
    19981807    if ( bCamParPresentFlag )
     
    20131822    }
    20141823  }
    2015 #if QC_SPIVMP_MPI_G0119
    20161824  READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3");              pcVPS->setSubPUMPILog2Size( uiCode + 3 );
    2017 #endif
    20181825  READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    20191826}
     
    27282535  if(pps->getSliceHeaderExtensionPresentFlag())
    27292536  {
    2730 #if !H_MV_HLS_7_POC_P0041   
    2731     READ_UVLC(uiCode,"slice_header_extension_length");
    2732     for(Int i=0; i<uiCode; i++)
    2733     {
    2734       UInt ignore;
    2735       READ_CODE(8,ignore,"slice_header_extension_data_byte");
    2736     }
    2737   }
    2738 #else
    27392537#if H_MV
    27402538    READ_UVLC( uiCode, "slice_segment_header_extension_length" ); rpcSlice->setSliceSegmentHeaderExtensionLength( uiCode );
     
    28062604    }
    28072605  }
    2808 #endif
    28092606#endif
    28102607  }
     
    31032900#endif
    31042901#if H_3D_INTER_SDC
    3105 #if QC_SDC_UNIFY_G0130
    31062902Void TDecCavlc::parseDeltaDC( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    31072903{
     
    31132909  assert(0);
    31142910}
    3115 #else
    3116 Void TDecCavlc::parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    3117 {
    3118   assert(0);
    3119 }
    3120 
    3121 Void TDecCavlc::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart )
    3122 {
    3123   assert(0);
    3124 }
    3125 #endif
     2911
    31262912#endif
    31272913#if H_3D_DBBP
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r872 r884  
    124124#endif
    125125#if H_3D_INTER_SDC
    126 #if QC_SDC_UNIFY_G0130
    127126  Void  parseDeltaDC        ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
    128127  Void  parseSDCFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    129 #else
    130   Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    131   Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
    132 #endif
    133128#endif
    134129#if H_3D_DBBP
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r872 r884  
    293293
    294294
    295 #if MTK_DDD_G0063
     295#if H_3D_DDD
    296296      pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth );
    297297#endif
     
    339339      if( pcCU->getSlice()->getIsDepth())
    340340      {
    341 #if SEC_DEPTH_DV_DERIVAITON_G0074
    342341        DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
    343 #else
    344         DvInfo.bDV = m_ppcCU[uiDepth]->getDispNeighBlocks(0, 0, &DvInfo);
    345 #endif
    346342      }
    347343      else
     
    414410    m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth );
    415411    UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
    416 
    417 #if !SEC_IC_ARP_SIG_G0072
     412#if H_3D_ARP
     413    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
     414#endif
    418415#if H_3D_IC
    419416    m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    420 #endif
    421 #endif
    422 #if H_3D_ARP
    423     m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
    424 #endif
    425 #if SEC_IC_ARP_SIG_G0072
    426 #if H_3D_IC
    427     m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    428 #endif
    429417#endif
    430418
     
    466454    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    467455
    468 #if MTK_DDD_G0063
     456#if H_3D_DDD
    469457    if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() )
    470458    {
     
    484472        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    485473        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    486 #if NTT_STORE_SPDV_VSP_G0148
     474#if H_3D_VSP
    487475        if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 )
    488476        {
     
    551539  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    552540
    553 #if QC_SDC_UNIFY_G0130
     541#if H_3D_DIM_SDC
    554542  m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    555543#endif
     
    573561  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    574562  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    575 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    576   m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    577 #endif
    578563  // Coefficient decoding
    579564  Bool bCodeDQP = getdQPFlag();
     
    663648#endif
    664649#if H_3D_INTER_SDC
    665 #if QC_SDC_UNIFY_G0130
    666650      if( m_ppcCU[uiDepth]->getSDCFlag( 0 ) )
    667 #else
    668       if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) )
    669 #endif
    670651      {
    671652        xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
     
    730711  UInt  uiWidth      = pcCU->getWidth ( 0 );
    731712  UInt  uiHeight     = pcCU->getHeight( 0 );
    732 #if !SEC_INTER_SDC_G0101
    733   UChar* pMask       = pcCU->getInterSDCMask();
    734 
    735   memset( pMask, 0, uiWidth*uiHeight );
    736   pcCU->xSetInterSDCCUMask( pcCU, pMask );
    737 #endif
    738713
    739714  Pel  *pResi;
     
    746721    for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
    747722    {
    748 #if SEC_INTER_SDC_G0101
    749723      pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( 0, 0 );
    750 #else
    751       UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];
    752 #if QC_SDC_UNIFY_G0130
    753       pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( uiSeg, 0 );
    754 #else
    755       pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );
    756 #endif
    757 #endif
    758724    }
    759725    pResi += uiResiStride;
     
    929895#endif
    930896 
    931 #if H_3D && UPDATE_HM13
     897#if H_3D
    932898  Bool useDltFlag = (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps());
    933899
     
    955921    {
    956922#if H_3D
    957 #if UPDATE_HM13
    958923      if ( useDltFlag )
    959 #else
    960       if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
    961 #endif
    962924      {
    963925        pReco    [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );
     
    11511113  UInt uiWidth        = pcCU->getWidth  ( 0 );
    11521114  UInt uiHeight       = pcCU->getHeight ( 0 );
    1153 #if QC_PKU_SDC_SPLIT_G0123
    1154 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1155 #if QC_GENERIC_SDC_G0122
    11561115  TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
    1157 #endif
    1158 #else
    1159 #if QC_GENERIC_SDC_G0122
    1160   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1161 #endif
    1162 #endif
    1163 #endif
    1164 #if QC_PKU_SDC_SPLIT_G0123
    11651116  UInt numParts = 1;
    1166   UInt i = 0;
    11671117  UInt sdcDepth    = 0;
    11681118  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     
    11811131  UInt    uiLumaPredMode = 0; 
    11821132
    1183 #if HS_TSINGHUA_SDC_SPLIT_G0111
    11841133  if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1)
    11851134  {
     
    11881137    uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
    11891138  }
    1190 #else
    1191   if (uiWidth == 64)
    1192   {
    1193     numParts = 4;
    1194     sdcDepth = 1;
    1195     uiWidth = uiHeight = 32;
    1196   }
    1197 #endif
    1198 
    1199   for ( i = 0; i < numParts; i++ )
     1139
     1140  for ( Int i = 0; i < numParts; i++ )
    12001141  {
    12011142    uiStride    = pcRecoYuv->getStride  ();
     
    12031144    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    12041145    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1205  
     1146
    12061147    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    12071148    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     
    12111152
    12121153    AOF( uiWidth == uiHeight );
    1213 #else
    1214   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    1215   TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
    1216   TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
    1217  
    1218   UInt    uiStride    = pcRecoYuv->getStride  ();
    1219   Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
    1220   Pel*    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1221   Pel*    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1222  
    1223   UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1224   Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1225   UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1226  
    1227   UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
    1228  
    1229   AOF( uiWidth == uiHeight );
    1230   AOF( uiAbsPartIdx == 0 );
    1231   AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
    1232   AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
    1233 #endif
    1234  
    1235   //===== init availability pattern =====
    1236   Bool  bAboveAvail = false;
    1237   Bool  bLeftAvail  = false;
    1238 #if QC_PKU_SDC_SPLIT_G0123
    1239   pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
    1240   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1241 #else
    1242   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
    1243   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1244 #endif
    1245 #if !QC_PKU_SDC_SPLIT_G0123
    1246 #if QC_GENERIC_SDC_G0122
    1247   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1248 #endif
    1249 #endif
    1250 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1251   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1252 #endif
    1253   //===== get prediction signal =====
    1254 #if H_3D_DIM
    1255   if( isDimMode( uiLumaPredMode ) )
    1256   {
    1257     m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight
    1258 #if QC_GENERIC_SDC_G0122
    1259       , false, dmm4Segmentation
    1260 #endif
    1261       );
    1262 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1263     Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
    1264     Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
    1265     for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    1266     {
    1267       dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
    1268     }
    1269 #endif
    1270   }
    1271   else
    1272   {
    1273 #endif
    1274     m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    1275 #if H_3D_DIM
    1276   }
    1277 #endif
    1278 #if QC_PKU_SDC_SPLIT_G0123
     1154
     1155    //===== init availability pattern =====
     1156    Bool  bAboveAvail = false;
     1157    Bool  bLeftAvail  = false;
     1158
     1159    pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
     1160    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
     1161
     1162    TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
     1163    //===== get prediction signal =====
     1164    if( isDimMode( uiLumaPredMode ) )
     1165    {
     1166      m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, false, dmm4Segmentation  );
     1167      Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
     1168      Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
     1169      for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
     1170      {
     1171        dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
     1172      }
     1173    }
     1174    else
     1175    {
     1176      m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1177    }
     1178
    12791179    if ( numParts > 1 )
    12801180    {
     
    12921192    }
    12931193    uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 );
    1294 #if HS_TSINGHUA_SDC_SPLIT_G0111
    12951194    dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1296 #endif
    12971195  }
    12981196  uiAbsPartIdx = 0;
     
    13091207  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    13101208  uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1311 #endif
    13121209  // number of segments depends on prediction mode
    13131210  UInt uiNumSegments = 1;
     
    13261223    uiMaskStride = pcWedgelet->getStride();
    13271224  }
    1328 #if QC_GENERIC_SDC_G0122
    13291225  if( getDimType( uiLumaPredMode ) == DMM4_IDX )
    13301226  {
    13311227    uiNumSegments = 2;
    1332 #if HS_TSINGHUA_SDC_SPLIT_G0111
    13331228    pbMask  = dmm4SegmentationOrg->getPattern();
    13341229    uiMaskStride = dmm4SegmentationOrg->getStride();
    1335 #else
    1336     pbMask  = dmm4Segmentation->getPattern();
    1337     uiMaskStride = dmm4Segmentation->getStride();
    1338 #endif
    1339   }
    1340 #endif
     1230  }
    13411231  // get DC prediction for each segment
    13421232  Pel apDCPredValues[2];
     
    14001290    pRecCr += uiStrideC;
    14011291  }
    1402 #if QC_GENERIC_SDC_G0122
    1403 #if HS_TSINGHUA_SDC_SPLIT_G0111
    14041292  dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
    1405 #else
    1406   dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1407 #endif
    1408 #endif
    14091293}
    14101294#endif
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r872 r884  
    111111  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
    112112
    113 #if SEC_IC_ARP_SIG_G0072
    114113  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 )
    115 #else
    116   if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )
    117 #endif
    118114  {
    119115    return;
     
    272268      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
    273269      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    274 #if !SEC_IC_ARP_SIG_G0072
     270#if H_3D_ARP
     271      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
     272#endif
    275273#if H_3D_IC
    276274      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    277 #endif
    278 #endif
    279 #if H_3D_ARP
    280       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    281 #endif
    282 #if SEC_IC_ARP_SIG_G0072
    283 #if H_3D_IC
    284       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    285 #endif
    286275#endif
    287276#if H_3D_DBBP
     
    362351      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    363352
    364 #if MTK_DDD_G0063
     353#if H_3D_DDD
    365354      if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() )
    366355      {
     
    384373          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    385374          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    386 #if NTT_STORE_SPDV_VSP_G0148
     375#if H_3D_VSP
    387376#if H_3D_DBBP
    388377          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
     
    440429        }
    441430      }
    442 #if !SEC_IC_ARP_SIG_G0072
     431#if H_3D_ARP
     432      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
     433#endif
    443434#if H_3D_IC
    444435      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    445436#endif
    446 #endif
    447 #if H_3D_ARP
    448       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    449 #endif
    450 #if SEC_IC_ARP_SIG_G0072
    451 #if H_3D_IC
    452       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    453 #endif
    454 #endif
    455437    }
    456438#if H_3D_VSP
    457 #if NTT_STORE_SPDV_VSP_G0148
    458439    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0))
    459 #else
    460     if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == false))
    461 #endif
    462440#else
    463441    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
     
    797775  UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    798776  UInt uiChromaOffset = uiLumaOffset>>2;
    799 #if QC_SDC_UNIFY_G0130
    800777#if H_3D_DIM_SDC
    801778  if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx) )
     
    807784    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
    808785  }
    809 #endif
    810786
    811787#if H_3D_INTER_SDC
     
    817793  }
    818794#endif
    819 #if QC_SDC_UNIFY_G0130_FIX
    820795  if( pcCU->getSlice()->getIsDepth() && ( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) )
    821 #else
    822   if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) )
    823 #endif
    824796  {
    825797    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
     
    842814    }
    843815  }
    844 #else
    845 #if H_3D_DIM_SDC
    846   if( pcCU->getSDCFlag( uiAbsPartIdx ) )
    847   {
    848     assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
    849     assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
    850     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
    851     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
    852     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
    853     return;
    854   }
    855 #endif
    856  
    857 #if H_3D_INTER_SDC
    858   if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
    859   {
    860     assert( !pcCU->isSkipped( uiAbsPartIdx ) );
    861     assert( !pcCU->isIntra( uiAbsPartIdx) );
    862     assert( pcCU->getSlice()->getIsDepth() );
    863 
    864     decodeInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth );
    865     return;
    866   }
    867 #endif
    868816#endif
    869817
     
    893841
    894842#if H_3D_INTER_SDC
    895 #if QC_SDC_UNIFY_G0130
    896843Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    897844{
     
    904851  }
    905852
    906 #if SEC_INTER_SDC_G0101
    907853  if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) )
    908 #else
    909   if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) )
    910 #endif
    911854  {
    912855    return;
    913856  }
    914857
    915 #if SEC_INTER_SDC_G0101
    916858  assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
    917 #else
    918   assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
    919 #endif
    920 
    921859  m_pcEntropyDecoderIf->parseSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    922860}
    923 
    924 #else
    925 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    926 {
    927   pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth);
    928 
    929   if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )
    930   {
    931     return;
    932   }
    933 
    934   if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) )
    935   {
    936     return;
    937   }
    938 
    939   m_pcEntropyDecoderIf->parseInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    940 }
    941 
    942 Void TDecEntropy::decodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    943 {
    944   if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )
    945   {
    946     return;
    947   }
    948 
    949   if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || !pcCU->getInterSDCFlag( uiAbsPartIdx ) )
    950   {
    951     return;
    952   }
    953 
    954   UInt uiNumSegments = ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ? 1 : ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 );
    955 
    956   // decode residual data for each segment
    957   for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ )
    958   {
    959     m_pcEntropyDecoderIf->parseInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth, uiSeg );
    960   }
    961 }
    962 #endif
    963861#endif
    964862#if H_3D_DBBP
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r872 r884  
    9696#endif
    9797#if H_3D_INTER_SDC
    98 #if QC_SDC_UNIFY_G0130
    9998  virtual Void parseDeltaDC       ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) = 0;
    10099  virtual Void parseSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    101 #else
    102   virtual Void parseInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    103   virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0;
    104 #endif
    105100#endif
    106101#if H_3D_DBBP
     
    187182#endif
    188183#if H_3D_INTER_SDC
    189 #if QC_SDC_UNIFY_G0130
    190184  Void decodeSDCFlag           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    191 #else
    192   Void decodeInterSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    193   Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    194 #endif
    195185#endif
    196186#if H_3D_DBBP
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r872 r884  
    8686, m_cDdcFlagSCModel           ( 1,             1,               NUM_DDC_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    8787, m_cDdcDataSCModel           ( 1,             1,               NUM_DDC_DATA_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    88 #if QC_GENERIC_SDC_G0122
    8988, m_cAngleFlagSCModel         ( 1,             1,               NUM_ANGLE_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels)
    90 #if !QC_SDC_UNIFY_G0130
    91 , m_cIntraSdcFlagSCModel      ( 1,             1,               NUM_INTRASDC_FLAG_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
    92 #endif
    93 #endif
    9489#if H_3D_DIM_DMM
    9590, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     
    10095#endif
    10196#endif
    102 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    103 , m_cInterSDCFlagSCModel             ( 1,             1,  NUM_INTER_SDC_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    104 , m_cInterSDCResidualSCModel         ( 1,             1,  NUM_INTER_SDC_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
    105 , m_cInterSDCResidualSignFlagSCModel ( 1,             1,  NUM_INTER_SDC_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
    106 #endif
    107 #if QC_SDC_UNIFY_G0130
     97#if H_3D_DIM_SDC
    10898, m_cSDCFlagSCModel                  ( 1,             1,  NUM_SDC_FLAG_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
    10999#endif
     
    180170  m_cDdcFlagSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DDC_FLAG );
    181171  m_cDdcDataSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DDC_DATA );
    182 #if QC_GENERIC_SDC_G0122
    183172  m_cAngleFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG );
    184 #if !QC_SDC_UNIFY_G0130
    185   m_cIntraSdcFlagSCModel.initBuffer      ( sliceType, qp, (UChar*)INIT_INTRASDC_FLAG );
    186 #endif
    187 #endif
    188173#if H_3D_DIM_DMM
    189174  m_cDmm1DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM1_DATA );
     
    194179#endif
    195180#endif
    196 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    197   m_cInterSDCFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG );
    198   m_cInterSDCResidualSCModel.initBuffer   ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
    199   m_cInterSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    200 #endif
    201 #if QC_SDC_UNIFY_G0130
     181#if H_3D_DIM_SDC
    202182  m_cSDCFlagSCModel.initBuffer            ( sliceType, qp, (UChar*)INIT_SDC_FLAG );
    203183#endif
     
    260240  m_cDdcFlagSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG );
    261241  m_cDdcDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DDC_DATA );
    262 #if QC_GENERIC_SDC_G0122
    263242  m_cAngleFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG );
    264 #if !QC_SDC_UNIFY_G0130
    265   m_cIntraSdcFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );
    266 #endif
    267 #endif
    268243#if H_3D_DIM_DMM
    269244  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
     
    274249#endif
    275250#endif
    276 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    277   m_cInterSDCFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    278   m_cInterSDCResidualSCModel.initBuffer   ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
    279   m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    280 #endif
    281 #if QC_SDC_UNIFY_G0130
     251#if H_3D_DIM_SDC
    282252  m_cSDCFlagSCModel.initBuffer            ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    283253#endif
     
    817787  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    818788
    819 #if MTK_TEX_DEP_PAR_G0055
    820789  Bool depthDependent = false;
    821790  UInt uiTexturePart = uiMode;
    822 #endif
    823791  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
    824792  {
    825793    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
    826794    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
    827 #if !MTK_TEX_DEP_PAR_G0055
    828     if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN)
    829 #else
    830795    if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth )
    831796    {
     
    834799    }
    835800    if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N)
    836 #endif
    837801    {
    838802      bParsePartSize = false;
     
    879843    if(bParsePartSize)
    880844    {
    881 #endif
    882 #if MTK_TEX_DEP_PAR_G0055
    883845      if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N)
    884846      {
     
    920882        }
    921883      }
    922 #if MTK_TEX_DEP_PAR_G0055
     884#if H_3D_QTLPC
    923885      }
    924886      else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD)
     
    985947      }
    986948      else
     949      {
    987950        assert(0);
    988 #endif
     951      }
    989952#if H_MV_ENC_DEC_TRAC         
    990953      DTRACE_CU("part_mode", eMode )
    991954#endif
    992 #if H_3D_QTLPC
    993955    }
    994956#endif
     
    10411003    }
    10421004    if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE )
    1043 #if H_3D_DIM_SDC
    1044 #if QC_GENERIC_SDC_G0122
    1045       if( 1 ) // This should be cleaned up.
    1046 #else
    1047       if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )
    1048 #endif
    1049 #endif
    10501005    {
    10511006#endif
     
    10631018#if H_3D_DIM
    10641019    if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE )
    1065 #if H_3D_DIM_SDC
    1066 #if QC_GENERIC_SDC_G0122
    1067       if( 1 )  // This should be cleaned up.
    1068 #else
    1069       if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )
    1070 #endif
    1071 #endif
    10721020    {
    10731021#endif
     
    11711119  }
    11721120
    1173 #if !QC_SDC_UNIFY_G0130
    1174   if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
    1175   {
    1176     UInt symbol;
    1177 #if QC_GENERIC_SDC_G0122
    1178     UInt uiNumSegments = isDimMode( dir ) ? 2 : 1;
    1179 #else
    1180     UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;
    1181 #endif
    1182 
    1183     if( pcCU->getSDCFlag( absPartIdx ) )
    1184     {
    1185       assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N);
    1186       pcCU->setTrIdxSubParts(0, absPartIdx, depth);
    1187       pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth);
    1188     }
    1189 
    1190     m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );
    1191 
    1192     if( symbol )
    1193     {
    1194       if( !pcCU->getSDCFlag( absPartIdx ) )
    1195       {
    1196         dir += symbol;
    1197       }
    1198     }
    1199     for( UInt segment = 0; segment < uiNumSegments; segment++ )
    1200     {
    1201       Pel valDeltaDC = 0;
    1202       if( symbol )
    1203       {
    1204         xParseDimDeltaDC( valDeltaDC, uiNumSegments );
    1205       }
    1206 
    1207       if( pcCU->getSDCFlag( absPartIdx ) )
    1208       {
    1209         pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );
    1210       }
    1211       else
    1212       {
    1213         pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC );
    1214       }
    1215     }
    1216   }
    1217 #endif
    12181121  pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
    12191122}
    12201123
    1221 #if QC_GENERIC_SDC_G0122
    12221124Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth )
    12231125{
     
    12341136  uiIsDimMode = uiSymbol ? 0 : 1;
    12351137  pcCU->setLumaIntraDirSubParts( 0, absPartIdx, depth );
    1236 #if !QC_SDC_UNIFY_G0130
    1237   if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case
    1238   {
    1239     m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraSdcFlagSCModel.get( 0, 0, pcCU->getCtxSDCFlag( absPartIdx ) ) );
    1240   }
    1241   else
    1242   {
    1243     uiSymbol = 0;
    1244   }
    1245 
    1246   pcCU->setSDCFlagSubParts( uiSymbol, absPartIdx, depth );
    1247 #endif
     1138
    12481139  //decode DMM index
    12491140  if( uiIsDimMode )
     
    12601151  }
    12611152}
    1262 #else
    1263 Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth )
    1264 {
    1265   UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );
    1266   UInt dir = 0;
    1267   Bool sdcFlag = 0;
    1268   UInt symbol = 1;
    1269   UInt modeCode = 0 ;
    1270   UInt binNum = 0;
    1271   UInt ctxDepthMode = 0;
    1272 
    1273   if( puIdx == 2 )
    1274   {
    1275     {
    1276       ctxDepthMode = puIdx*3 + binNum;
    1277       m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1278       modeCode = (modeCode<<1) + symbol;
    1279       binNum++;
    1280     }
    1281          if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;}
    1282     else if( modeCode == 1 ) { dir = 0;          sdcFlag = 0;}
    1283   }
    1284   else if( puIdx == 0 )
    1285   {
    1286     while( binNum < 1 && symbol )
    1287     {
    1288       ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
    1289       m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1290       modeCode = (modeCode<<1) + symbol;
    1291       binNum++;
    1292     }
    1293     if( modeCode == 0 )
    1294     {
    1295       dir = 0;
    1296       sdcFlag = 0;
    1297     }
    1298     else if ( modeCode == 1 )
    1299     {
    1300       dir = (2*DMM1_IDX+DIM_OFFSET);
    1301       sdcFlag = 0;
    1302     }
    1303   }
    1304   else
    1305   {
    1306     while( binNum < 4 && symbol )
    1307     {
    1308       ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
    1309       m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1310       modeCode = (modeCode<<1) + symbol;
    1311       binNum++;
    1312     }
    1313     if ( modeCode == 0 )        { dir =  PLANAR_IDX;             sdcFlag = 1;}
    1314     else if ( modeCode == 2 )   { dir = 5;                       sdcFlag = 0;}
    1315     else if ( modeCode == 6 )   { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
    1316     else if ( modeCode == 14 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
    1317     else if ( modeCode == 15 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
    1318 
    1319   }
    1320   pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
    1321 #if H_3D_DIM_SDC
    1322   pcCU->setSDCFlagSubParts( sdcFlag, absPartIdx, depth );
    1323 #endif
    1324 }
    1325 #endif
    13261153#endif
    13271154
     
    21892016  if( 1 == uiW )   
    21902017  {
    2191 #if MTK_ARP_FLAG_CABAC_SIMP_G0061
    21922018    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) );
    2193 #else
    2194     m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 3 ) );
    2195 #endif
    21962019    uiW += ( 1 == uiCode ? 1 : 0 );
    21972020  }
     
    22132036{
    22142037  UInt uiSymbol = 0;
    2215 #if MTK_IC_FLAG_CABAC_SIMP_G0061
    22162038  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) );
    2217 #else
    2218   UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx );
    2219   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );
    2220 #endif
    22212039#if !H_MV_ENC_DEC_TRAC
    22222040  DTRACE_CABAC_VL( g_nSymbolCounter++ );
     
    22362054
    22372055#if H_3D_INTER_SDC
    2238 #if QC_SDC_UNIFY_G0130
    22392056Void TDecSbac::parseDeltaDC( TComDataCU* pcCU, UInt absPartIdx, UInt depth )
    22402057{
     
    22672084  else
    22682085  {
    2269 #if SEC_INTER_SDC_G0101
    22702086    uiNumSegments = 1;
    2271 #else
    2272     PartSize cPartSize = pcCU->getPartitionSize( absPartIdx );
    2273     uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 );
    2274 #endif
    22752087    symbol = 1;
    22762088  }
     
    23232135  }
    23242136}
    2325 #else
    2326 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    2327 {
    2328   UInt uiSymbol = 0;
    2329   UInt uiCtxInterSDCFlag = pcCU->getCtxInterSDCFlag( uiAbsPartIdx );
    2330 
    2331   m_pcTDecBinIf->decodeBin( uiSymbol, m_cInterSDCFlagSCModel.get( 0, 0, uiCtxInterSDCFlag ) );
    2332 
    2333   if( uiSymbol )
    2334   {
    2335     pcCU->setInterSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth );
    2336     pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth );
    2337     pcCU->setCbfSubParts( 1, 1, 1, uiAbsPartIdx, uiDepth );
    2338   }
    2339   else
    2340   {
    2341     pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth);
    2342   }
    2343 }
    2344 
    2345 Void TDecSbac::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
    2346 {
    2347   UInt uiAbsIdx   = 0;
    2348   UInt uiSign     = 0;
    2349   Int  iIdx       = 0;
    2350 
    2351   xReadExGolombLevel( uiAbsIdx, m_cInterSDCResidualSCModel.get( 0, 0, 0 ) );
    2352 
    2353   uiAbsIdx++;
    2354   m_pcTDecBinIf->decodeBin( uiSign, m_cInterSDCResidualSignFlagSCModel.get( 0, 0, 0 ) );
    2355   iIdx = (Int)( uiSign ? -1 : 1 ) * uiAbsIdx;
    2356 
    2357   pcCU->setInterSDCSegmentDCOffset( iIdx, uiSegment, uiAbsPartIdx );
    2358 }
    2359 #endif
     2137
    23602138#endif
    23612139
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r872 r884  
    112112#endif
    113113#if H_3D_INTER_SDC
    114 #if QC_SDC_UNIFY_G0130
    115114  Void  parseDeltaDC         ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
    116115  Void  parseSDCFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    117 #else
    118   Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    119   Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
    120 #endif
    121116#endif
    122117#if H_3D_DBBP
     
    218213  ContextModel3DBuffer m_cDdcFlagSCModel;
    219214  ContextModel3DBuffer m_cDdcDataSCModel;
    220 #if QC_GENERIC_SDC_G0122
    221215  ContextModel3DBuffer m_cAngleFlagSCModel;
    222 #if !QC_SDC_UNIFY_G0130
    223   ContextModel3DBuffer m_cIntraSdcFlagSCModel;
    224 #endif
    225 #endif
    226216#if H_3D_DIM_DMM
    227217  ContextModel3DBuffer m_cDmm1DataSCModel;
     
    232222#endif
    233223#endif
    234 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    235   ContextModel3DBuffer m_cInterSDCFlagSCModel;
    236   ContextModel3DBuffer m_cInterSDCResidualSCModel;
    237   ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel;
    238 #endif
    239 #if QC_SDC_UNIFY_G0130
     224#if H_3D_DIM_SDC 
    240225  ContextModel3DBuffer m_cSDCFlagSCModel;
    241226#endif
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r872 r884  
    5151  m_aaiCodedOffset         = new Int* [ MAX_NUM_LAYERS ];
    5252  m_aaiCodedScale          = new Int* [ MAX_NUM_LAYERS ];
    53 #if !FIX_CAM_PARS_COLLECTOR
    54   m_aiViewId               = new Int  [ MAX_NUM_LAYERS ];
    55 
    56   m_bViewReceived          = new Bool [ MAX_NUM_LAYERS ];
    57 #endif
    5853  for( UInt uiId = 0; uiId < MAX_NUM_LAYERS; uiId++ )
    5954  {
     
    6560  m_iLog2Precision   = LOG2_DISP_PREC_LUT;
    6661  m_uiBitDepthForLUT = 8; // fixed
    67 #if FIX_CAM_PARS_COLLECTOR
    6862  m_receivedIdc = NULL;
    6963  m_vps         = NULL;
    70 #endif
    7164}
    7265
     
    8073  delete [] m_aaiCodedOffset;
    8174  delete [] m_aaiCodedScale;
    82 #if !FIX_CAM_PARS_COLLECTOR
    83   delete [] m_aiViewId; 
    84   delete [] m_bViewReceived;
    85 #endif
    8675
    8776  xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    8877  xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    89 #if FIX_CAM_PARS_COLLECTOR
    9078  xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 );
    91 #endif
    92 }
    93 
    94 
    95 #if FIX_CAM_PARS_COLLECTOR
     79}
     80
     81
    9682Void
    9783CamParsCollector::init( FILE* pCodedScaleOffsetFile, TComVPS* vps)
     
    159145  }
    160146}
    161 #else
    162 Void
    163 CamParsCollector::init( FILE* pCodedScaleOffsetFile )
    164 {
    165   m_bInitialized            = true;
    166   m_pCodedScaleOffsetFile   = pCodedScaleOffsetFile;
    167   m_uiCamParsCodedPrecision = 0;
    168   m_bCamParsVaryOverTime    = false;
    169   m_iLastViewIndex             = -1;
    170   m_iLastPOC                = -1;
    171   m_uiMaxViewIndex             = 0;
    172 }
    173 #endif
    174 
    175147
    176148
     
    206178  CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
    207179{
    208 #if FIX_CAM_PARS_COLLECTOR
    209180  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
    210 #else
    211   Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
    212 #endif
    213181  Int     iLog2DivChroma = iLog2DivLuma + 1;
    214182
     
    252220}
    253221
    254 #if !FIX_CAM_PARS_COLLECTOR
    255 Void
    256 CamParsCollector::setSlice( TComSlice* pcSlice )
    257 {
    258 
    259   if( pcSlice == 0 )
    260   {
    261     AOF( xIsComplete() );
    262     if( m_bCamParsVaryOverTime || m_iLastPOC == 0 )
    263     {
    264       xOutput( m_iLastPOC );
    265     }
    266     return;
    267   }
    268  
    269   if ( pcSlice->getIsDepth())
    270   {
    271     return;
    272   }
    273 
    274   Bool  bFirstAU          = ( pcSlice->getPOC()     == 0 );
    275   Bool  bFirstSliceInAU   = ( pcSlice->getPOC()     != Int ( m_iLastPOC ) );
    276   Bool  bFirstSliceInView = ( pcSlice->getViewIndex()  != UInt( m_iLastViewIndex ) || bFirstSliceInAU );
    277 
    278   AOT(  bFirstSliceInAU  &&   pcSlice->getViewIndex()  != 0 );
    279   AOT( !bFirstSliceInAU  &&   pcSlice->getViewIndex()   < UInt( m_iLastViewIndex ) );
    280  
    281   AOT( !bFirstSliceInAU  &&   pcSlice->getViewIndex()   > UInt( m_iLastViewIndex + 1 ) );
    282  
    283   AOT( !bFirstAU         &&   pcSlice->getViewIndex()   > m_uiMaxViewIndex );
    284 
    285   if ( !bFirstSliceInView )
    286   {
    287     if( m_bCamParsVaryOverTime ) // check consistency of slice parameters here
    288     {
    289       UInt uiViewIndex = pcSlice->getViewIndex();
    290       for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
    291       {
    292         AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale    () [ uiBaseViewIndex ] );
    293         AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset   () [ uiBaseViewIndex ] );
    294         AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] );
    295         AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] );
    296       }
    297     }
    298     return;
    299   }
    300 
    301   if( bFirstSliceInAU )
    302   {
    303     if( !bFirstAU )
    304     {
    305       AOF( xIsComplete() );
    306       xOutput( m_iLastPOC );
    307     }
    308     ::memset( m_bViewReceived, false, MAX_NUM_LAYERS * sizeof( Bool ) );
    309   }
    310 
    311   UInt uiViewIndex                       = pcSlice->getViewIndex();
    312   m_bViewReceived[ uiViewIndex ]         = true;
    313   if( bFirstAU )
    314   {
    315     m_uiMaxViewIndex                     = std::max( m_uiMaxViewIndex, uiViewIndex );
    316     m_aiViewId[ uiViewIndex ]            = pcSlice->getViewId();
    317 
    318     if( uiViewIndex == 1 )
    319     {
    320       m_uiCamParsCodedPrecision       = pcSlice->getVPS()->getCamParPrecision     ();
    321       m_bCamParsVaryOverTime          = pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex );
    322     }
    323     else if( uiViewIndex > 1 )
    324     {
    325       AOF( m_uiCamParsCodedPrecision == pcSlice->getVPS()->getCamParPrecision     () );
    326       AOF( m_bCamParsVaryOverTime    == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) );
    327     }
    328 
    329     for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    330     {
    331       if( m_bCamParsVaryOverTime )
    332       {
    333         m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseIndex ];
    334         m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseIndex ];
    335         m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedScale () [ uiBaseIndex ];
    336         m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseIndex ];
    337         xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
    338         xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
    339       }
    340       else
    341       {
    342         m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedScale    (uiViewIndex) [ uiBaseIndex ];
    343         m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedOffset   (uiViewIndex) [ uiBaseIndex ];
    344         m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ];
    345         m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ];
    346         xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    347         xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    348       }
    349     }
    350   }
    351   else
    352   {
    353     AOF( m_aiViewId[ uiViewIndex ] == pcSlice->getViewId() );
    354     if( m_bCamParsVaryOverTime )
    355     {
    356       for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    357       {
    358         m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseIndex ];
    359         m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseIndex ];
    360         m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedScale () [ uiBaseIndex ];
    361         m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseIndex ];
    362 
    363         xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    364         xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    365       }
    366     }
    367   }
    368  
    369   m_iLastViewIndex = (Int)pcSlice->getViewIndex(); 
    370   m_iLastPOC       = (Int)pcSlice->getPOC();
    371 }
    372 
    373 #else
    374222Void
    375223CamParsCollector::setSlice( TComSlice* pcSlice )
     
    440288  }
    441289}
    442 #endif
    443290
    444291
     
    454301#endif
    455302
    456 #if !FIX_CAM_PARS_COLLECTOR
    457 Bool
    458 CamParsCollector::xIsComplete()
    459 {
    460   for( UInt uiView = 0; uiView <= m_uiMaxViewIndex; uiView++ )
    461   {
    462     if( m_bViewReceived[ uiView ] == 0 )
    463     {
    464       return false;
    465     }
    466   }
    467   return true;
    468 }
    469 #endif
    470303
    471304Void
     
    474307  if( m_pCodedScaleOffsetFile )
    475308  {
    476 #if FIX_CAM_PARS_COLLECTOR
    477309    if( iPOC == m_firstReceivedPoc )
    478 #else
    479     if( iPOC == 0 )
    480 #endif
    481310    {
    482311      fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
    483312      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
    484 #if FIX_CAM_PARS_COLLECTOR
    485313      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    486314      {
    487315        fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) );
    488 #else       
    489       for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    490       {
    491         fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_aiViewId[ uiViewIndex ] );
    492 #endif
    493316      }
    494317      fprintf( m_pCodedScaleOffsetFile, "\n\n");
     
    496319      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
    497320    }
    498 #if FIX_CAM_PARS_COLLECTOR
    499321    if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
    500 #else
    501     if( iPOC == 0 || m_bCamParsVaryOverTime )
    502 #endif
    503322    {
    504323      Int iS = iPOC;
     
    510329          if( uiViewIndex != uiBaseIndex )
    511330          {
    512 #if FIX_CAM_PARS_COLLECTOR
    513331            if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 )
    514332            {           
     
    516334                iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() );
    517335            }           
    518 #else
    519             fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
    520               iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_uiCamParsCodedPrecision );
    521 #endif
    522 
    523336          }
    524337        }
     
    641454  for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++)
    642455  {
    643 #if H_MV_HLS_7_SPS_P0155_16_32
     456#if H_MV
    644457    numReorderPics[temporalLayer] = ( getLayerId() == 0 ) ? pcSlice->getSPS()->getNumReorderPics(temporalLayer) : pcSlice->getVPS()->getNumReorderPics(temporalLayer);
    645458#else
     
    647460#endif
    648461  }
    649 #if H_MV_HLS_7_SPS_P0155_16_32
     462#if H_MV
    650463  if ( getLayerId() == 0 )
    651464  { 
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r872 r884  
    7171  ~CamParsCollector ();
    7272
    73 #if FIX_CAM_PARS_COLLECTOR
    7473  Void  init        ( FILE* pCodedScaleOffsetFile, TComVPS* vps );
    75 #else
    76   Void  init        ( FILE* pCodedScaleOffsetFile );
    77 #endif
    7874
    7975  Void  uninit      ();
     
    8783#endif
    8884
    89 #if MTK_DDD_G0063
     85#if H_3D_DDD
    9086  Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];}
    9187  Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];}
     
    9490
    9591private:
    96 #if FIX_CAM_PARS_COLLECTOR
    9792  Void xResetReceivedIdc( Bool overWriteFlag );
    98 #else
    99   Bool  xIsComplete ();
    100 #endif
    10193  Void  xOutput     ( Int iPOC );
    10294
     
    108100  Int**   m_aaiCodedScale;
    109101 
    110 #if !FIX_CAM_PARS_COLLECTOR
    111   Int*    m_aiViewId; 
    112 #else
    113102  TComVPS* m_vps;
    114103  Int**    m_receivedIdc;
     
    116105  Int      m_lastPoc;
    117106  Int      m_firstReceivedPoc;
    118 #endif
    119 
    120  
    121 #if !FIX_CAM_PARS_COLLECTOR
    122   Bool*   m_bViewReceived;
    123   UInt    m_uiCamParsCodedPrecision;
    124 #endif
     107
     108 
    125109  Bool    m_bCamParsVaryOverTime;
    126 #if !FIX_CAM_PARS_COLLECTOR
    127   Int     m_iLastViewIndex;
    128   Int     m_iLastPOC;
    129   UInt    m_uiMaxViewIndex;
    130 #endif
    131 
    132110
    133111  UInt    m_uiBitDepthForLUT;
  • trunk/source/Lib/TLibEncoder/NALwrite.cpp

    r872 r884  
    9191  vector<uint8_t>& rbsp   = nalu.m_Bitstream.getFIFO();
    9292
    93 #if H_MV_HLS_7_MISC_P0130_EOS  // This will handle situation when writing NAL with zero payload
     93#if H_MV  // This will handle situation when writing NAL with zero payload
    9494  if (rbsp.size() == 0) return;
    9595#endif
  • trunk/source/Lib/TLibEncoder/SEIwrite.cpp

    r872 r884  
    9393    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    9494    break;
    95 #if H_MV_HLS_7_SEI_P0204_26
     95#if H_MV
    9696    case SEI::SUB_BITSTREAM_PROPERTY:
    9797    fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
     
    151151    xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps);
    152152    break;
    153 #if H_MV_HLS_7_SEI_P0204_26
     153#if H_MV
    154154   case SEI::SUB_BITSTREAM_PROPERTY:
    155155   xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
     
    589589}
    590590
    591 #if H_MV_HLS_7_SEI_P0204_26
     591#if H_MV
    592592Void SEIWriter::xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei)
    593593{
  • trunk/source/Lib/TLibEncoder/SEIwrite.h

    r872 r884  
    6666  Void xWriteSEISOPDescription(const SEISOPDescription& sei);
    6767  Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps);
    68 #if H_MV_HLS_7_SEI_P0204_26
     68#if H_MV
    6969  Void xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei);
    7070#endif
  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r872 r884  
    272272  WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag");
    273273
    274 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
    275274#if !H_MV
    276275  WRITE_FLAG( 0, "pps_extension_flag" );
     
    290289  if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )
    291290  {
    292 #if H_MV_HLS_7_POC_P0041
    293291    WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );
    294 #endif
    295292  }
    296293
     
    303300
    304301#endif
    305 #else
    306 #if !H_3D
    307   WRITE_FLAG( 0, "pps_extension_flag" );
    308 #else
    309   WRITE_FLAG( 1, "pps_extension_flag" );
    310   codePPSExtension( pcPPS );
    311   WRITE_FLAG( 0, "pps_extension2_flag" );
    312 #endif
    313 #endif
     302
    314303}
    315304
     
    725714#endif
    726715  WRITE_UVLC( pcSPS->getBitsForPOC()-4,                 "log2_max_pic_order_cnt_lsb_minus4" );
    727 #if H_MV_HLS_7_SPS_P0155_16_32
     716#if H_MV
    728717  if ( pcSPS->getLayerId() == 0 )
    729718  { 
     
    741730    }
    742731  }
    743 #if H_MV_HLS_7_SPS_P0155_16_32
     732#if H_MV
    744733  }
    745734#endif
     
    871860    WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" );
    872861    WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" );
    873 #if H_MV_HLS_7_RESERVED_FLAGS
    874862    WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" );
    875 #endif
    876863  }
    877864}
     
    904891  WRITE_FLAG( pcVPS->getTemporalNestingFlag(),                "vps_temporal_id_nesting_flag" );
    905892  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    906 #if H_MV_HLS_7_VPS_P0125_24
    907893  WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
    908 #else
    909 #if H_MV && !H_MV_HLS7_GEN
    910   WRITE_CODE( 0xffff,                              16,        "vps_extension_offset" );
    911 #else
    912   WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
    913 #endif
    914 #endif
    915894  codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 );
    916895  const Bool subLayerOrderingInfoPresentFlag = 1;
     
    1010989{
    1011990  WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0,          "avc_base_layer_flag" );
    1012 #if !H_MV_HLS_7_VPS_P0307_23
    1013   WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
    1014   if ( pcVPS->getVpsVuiPresentFlag() )
    1015   { 
    1016   WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16,                 "vps_vui_offset" );  // TBD
    1017   }
    1018 #endif
    1019 
    1020991  WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
    1021  
     992
    1022993  for( Int type = 0; type < MAX_NUM_SCALABILITY_TYPES; type++ )
    1023994  {
     
    10421013    {     
    10431014      WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6,          "layer_id_in_nuh[i]");
    1044   }
     1015    }
    10451016    else
    10461017    {
    10471018      assert( pcVPS->getLayerIdInNuh( i ) == i );
    1048   }
     1019    }
    10491020
    10501021    assert(  pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i );
     
    10641035
    10651036
    1066     WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" );
    1067    
    1068     if ( pcVPS->getViewIdLen( ) > 0 )
    1069     {   
    1070       for( Int i = 0; i < pcVPS->getNumViews(); i++ )
    1071       {
    1072         WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLen( ), "view_id_val[i]" );
    1073       }
    1074     }
    1075     else
    1076     {
    1077       for( Int i = 0; i < pcVPS->getNumViews(); i++ )
    1078       {
    1079         assert( pcVPS->getViewIdVal( i ) == 0 );
    1080       }
    1081     }
     1037  WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" );
     1038
     1039  if ( pcVPS->getViewIdLen( ) > 0 )
     1040  {   
     1041    for( Int i = 0; i < pcVPS->getNumViews(); i++ )
     1042    {
     1043      WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLen( ), "view_id_val[i]" );
     1044    }
     1045  }
     1046  else
     1047  {
     1048    for( Int i = 0; i < pcVPS->getNumViews(); i++ )
     1049    {
     1050      assert( pcVPS->getViewIdVal( i ) == 0 );
     1051    }
     1052  }
    10821053
    10831054
     
    11221093
    11231094  WRITE_FLAG( pcVPS->getAllRefLayersActiveFlag( ) ? 1 : 0 , "all_ref_layers_active_flag" );
    1124 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1125   WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( )    , 10,    "vps_number_layer_sets_minus1"      );
    1126 #endif
    1127 
    1128 #if !H_MV_HLS_7_VPS_P0306_22
    1129   WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6,     "vps_num_profile_tier_level_minus1" );
    1130 #else
    11311095  WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" );
    1132 #endif
    11331096
    11341097  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    11351098  {
    11361099    WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" );
    1137 #if !H_MV_HLS_7_VPS_P0048_14
    1138     if( !pcVPS->getVpsProfilePresentFlag( i ) )
    1139     {   
    1140       WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" );
    1141       pcVPS->checkProfileRefMinus1( i );     
    1142     }
    1143 #endif
    11441100    codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );
    11451101  }
    11461102
    1147 
    1148 
    1149 
    1150 
    1151 
    1152 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    11531103  WRITE_UVLC( pcVPS->getNumAddOutputLayerSets( ), "num_add_output_layer_sets" );
    11541104
     
    11571107    WRITE_CODE( pcVPS->getDefaultTargetOutputLayerIdc( ), 2, "default_target_output_layer_idc" );
    11581108  } 
    1159 #else
    1160   Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
    1161 
    1162   WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" );
    1163 
    1164   if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
    1165   {
    1166     WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( )    , 10,    "num_add_output_layer_sets_minus1"      );
    1167     numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1 );
    1168   }
    1169 
    1170   if( numOutputLayerSets > 1)
    1171   {
    1172     WRITE_CODE( pcVPS->getDefaultOneTargetOutputLayerIdc( ), 2, "default_one_target_output_layer_idc" );
    1173     pcVPS->checkDefaultOneTargetOutputLayerIdc();
    1174   } 
    1175 #endif
     1109
    11761110
    11771111  assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 ));
    11781112  assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 );
    11791113
    1180 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1181 
    11821114  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    11831115  {
    11841116    if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )   
    1185 #else
    1186   for( Int i = 1; i < numOutputLayerSets; i++ )
    1187   {
    1188     if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
    1189 #endif
    11901117    {     
    11911118      WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ),      "output_layer_set_idx_minus1[i]" );
    1192 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    11931119    }
    11941120
     
    12081134    }       
    12091135
    1210 #else
    1211       for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ )
    1212       {
    1213         WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" );
    1214       }     
    1215     }
    1216     else
    1217     { // These inference rules would also be helpful in spec text
    1218       assert( pcVPS->getOutputLayerSetIdxMinus1(i ) ==  i - 1 );
    1219       for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    1220       {             
    1221         assert( pcVPS->getOutputLayerFlag( i , j ) == pcVPS->inferOutputLayerFlag( i, j ));
    1222       }
    1223     }
    1224 #endif
    12251136    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    12261137    {     
    12271138      WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" );   
    12281139    }
    1229 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    12301140    if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
    12311141    {
     
    12331143    }
    12341144  }
    1235 #else
    1236   }
    1237 
    1238   if( pcVPS->getMaxLayersMinus1() > 0 )
    1239   {
    1240     WRITE_FLAG( pcVPS->getAltOutputLayerFlag( ) ? 1 : 0 , "alt_output_layer_flag" );
    1241   }
    1242 #endif
    1243 
    1244 
    1245 
    1246 
    12471145
    12481146  WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" );
    12491147  if ( pcVPS->getRepFormatIdxPresentFlag() )
    12501148  {
    1251 #if H_MV_HLS_7_VPS_P0306_22
    12521149    WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" );
    1253 #else
    1254     WRITE_CODE( pcVPS->getVpsNumRepFormatsMinus1( ), 4, "vps_num_rep_formats_minus1" );
    1255 #endif
    12561150  }
    12571151
     
    12691163      if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    12701164      {
    1271 #if H_MV_HLS_7_VPS_P0306_22
    12721165        WRITE_CODE( pcVPS->getVpsRepFormatIdx(i), pcVPS->getVpsRepFormatIdxLen(), "vps_rep_format_idx[i]" );
    1273 #else
    1274         WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 8, "vps_rep_format_idx" );
    1275 #endif
    12761166      }
    12771167    }
     
    12891179    }
    12901180  }
    1291 #if H_MV_HLS_7_RESERVED_FLAGS
    12921181  WRITE_FLAG( 0, "vps_reserved_zero_flag" );
    1293 #endif
    12941182  codeDpbSize( pcVPS );
    12951183
     
    13211209    }
    13221210  } 
    1323 #if H_MV_HLS_7_VPS_P0307_23
    13241211  WRITE_UVLC( 0, "vps_non_vui_extension_length" );
    13251212  WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
    1326 #endif
    1327 #if !H_MV_HLS_7_RESERVED_FLAGS 
    1328     WRITE_FLAG ( 0,                                      "vps_shvc_reserved_zero_flag" );
    1329 #endif
    1330     if( pcVPS->getVpsVuiPresentFlag() )
    1331     {
    1332       m_pcBitIf->writeAlignOne();  // vps_vui_alignment_bit_equal_to_one
    1333       codeVPSVUI( pcVPS );
    1334     }     
    1335 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    1336     {
    1337       TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( );
    1338       assert( pcVPSVUI );
    1339       pcVPSVUI->inferVpsVui( true );
    1340     }
    1341 #endif
    1342 }
     1213  if( pcVPS->getVpsVuiPresentFlag() )
     1214  {
     1215    m_pcBitIf->writeAlignOne();  // vps_vui_alignment_bit_equal_to_one
     1216    codeVPSVUI( pcVPS );
     1217  }     
     1218  {
     1219    TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( );
     1220    assert( pcVPSVUI );
     1221    pcVPSVUI->inferVpsVui( true );
     1222  }
     1223}
     1224
    13431225Void TEncCavlc::codeVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo )
    13441226{
     
    13591241  { 
    13601242    WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" );
    1361 #if H_MV_HLS_7_HRD_P0156_7
    13621243    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1363 #else
    1364     for( Int j = 0; j  <=  vps->getMaxTLayers() - 1 ; j++ )
    1365 #endif
    13661244    { 
    13671245      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    13711249      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    13721250      { 
    1373 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13741251        for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ )   
    1375 #else
    1376         for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   // Preliminary fix does not match with spec
    1377 #endif
    13781252        {
    13791253          WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );
     
    13951269        if ( j > 0 )
    13961270        {
    1397 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13981271          for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ )   
    1399 #else
    1400           for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
    1401 #endif
    14021272          {
    14031273            assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     
    14511321    WRITE_FLAG( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" );
    14521322  }
    1453 #if H_MV_HLS_7_MISC_P0068_21
    14541323  if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) )
    14551324  {
    14561325    WRITE_FLAG( pcVPSVUI->getAllLayersIdrAlignedFlag( ) ? 1 : 0 , "all_layers_idr_aligned_flag" );
    14571326  }
    1458 #endif
    14591327  WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" );
    14601328  WRITE_FLAG( pcVPSVUI->getPicRatePresentVpsFlag( ) ? 1 : 0 , "pic_rate_present_vps_flag" );
    14611329  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    14621330  {
    1463 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14641331    for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1465 #else
    1466     for( Int i = 0; i  <=  pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
    1467 #endif
    14681332    {
    14691333      for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
     
    14911355  }
    14921356
    1493 #if H_MV_HLS_7_VPS_P0076_15
    14941357  WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" );
    14951358  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     
    15251388    }
    15261389  }
    1527 #endif
    15281390  WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" );
    15291391  if( !pcVPSVUI->getTilesNotInUseFlag() )
     
    15601422    }
    15611423  }
    1562 #if H_MV_HLS_7_RESERVED_FLAGS
    15631424  WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" );
    1564 #endif
    15651425  WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" );
    15661426
     
    15841444  }
    15851445
    1586 #if !H_MV_HLS_7_VPS_P0076_15
    1587   WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" );
    1588   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
    1589   {
    1590     WRITE_CODE( pcVPSVUI->getVpsNumVideoSignalInfoMinus1( ), 4, "vps_num_video_signal_info_minus1" );
    1591   }
    1592   else
    1593   {
    1594     pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
    1595   }
    1596 
    1597   for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ )
    1598   {
    1599     assert( pcVPSVUI->getVideoSignalInfo( i ) != NULL );
    1600     TComVideoSignalInfo* curVideoSignalInfo = pcVPSVUI->getVideoSignalInfo( i );
    1601     codeVideoSignalInfo( curVideoSignalInfo );     
    1602   }
    1603 
    1604   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    1605   {
    1606     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1607     {
    1608       WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );
    1609       assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );
    1610     }
    1611 }
    1612   else
    1613   {
    1614     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1615     {
    1616       assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i  ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) );
    1617     }
    1618   }
    1619 #endif
     1446
    16201447  WRITE_FLAG( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ? 1 : 0 , "vps_vui_bsp_hrd_present_flag" );
    16211448  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
     
    16231450    codeVpsVuiBspHrdParameters( pcVPS );
    16241451  }
    1625 #if H_MV_HLS_7_MISC_P0182_13
    16261452  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    16271453  {
     
    16301456      WRITE_FLAG( pcVPSVUI->getBaseLayerParameterSetCompatibilityFlag( i ) ? 1 : 0 , "base_layer_parameter_set_compatibility_flag" );
    16311457    }
    1632 }
    1633 #endif
     1458  }
    16341459}
    16351460
     
    17051530        WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
    17061531#if H_3D_SPIVMP
    1707 #if SEC_SPIVMP_MCP_SIZE_G0077
    17081532        WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]");
    1709 #else
    1710         WRITE_UVLC( pcVPS->getSubPULog2Size(i)-2, "log2_sub_PU_size_minus2[i]");
    1711 #endif
    17121533#endif
    17131534#endif
     
    17341555        if (i!=1)
    17351556        {
    1736 #if SEC_SPIVMP_MCP_SIZE_G0077
    17371557          WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]");
    1738 #else
    1739           WRITE_UVLC( pcVPS->getSubPULog2Size(i)-2, "log2_sub_PU_size_minus2[i]");
    1740 #endif
    17411558        }
    17421559#endif
     
    17711588    }
    17721589  }
    1773 #if QC_SPIVMP_MPI_G0119
    17741590  WRITE_UVLC( pcVPS->getSubPUMPILog2Size( ) - 3, "log2_sub_PU_MPI_size_minus3");
    1775 #endif
    17761591#if H_3D_TMVP
    17771592  WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 ,          "iv_mv_scaling_flag" );
     
    22352050#endif
    22362051
    2237 #if !H_MV_HLS_7_POC_P0041
    2238 #if PPS_FIX_DEPTH
    2239   if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag() || pcSlice->getIsDepth() )
    2240 #else
    2241   if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
    2242 #endif
    2243   {
    2244     WRITE_UVLC(0,"slice_header_extension_length");
    2245   }
    2246 #endif
    2247 
    2248 #if H_MV_HLS_7_POC_P0041
     2052
    22492053#if !H_MV
    22502054  if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
     
    23542158  }
    23552159#endif
    2356 #endif
    23572160}
    23582161
     
    28242627
    28252628#if H_3D_INTER_SDC
    2826 #if QC_SDC_UNIFY_G0130
    28272629Void TEncCavlc::codeDeltaDC( TComDataCU* pcCU, UInt uiAbsPartIdx )
    28282630{
     
    28342636  assert(0);
    28352637}
    2836 #else
    2837 Void TEncCavlc::codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    2838 {
    2839   assert(0);
    2840 }
    2841 
    2842 Void TEncCavlc::codeInterSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
    2843 {
    2844   assert(0);
    2845 }
    2846 #endif
     2638
    28472639#endif
    28482640   
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r872 r884  
    133133#endif
    134134#if H_3D_INTER_SDC
    135 #if QC_SDC_UNIFY_G0130
    136135  Void codeDeltaDC       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    137136  Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    138 #else
    139   Void codeInterSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    140   Void codeInterSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
    141 #endif
    142137#endif
    143138#if H_3D_DBBP
  • trunk/source/Lib/TLibEncoder/TEncCfg.h

    r872 r884  
    347347
    348348  Bool      m_useStrongIntraSmoothing;                        ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat.
    349 #if H_MV_HLS_7_SEI_P0204_26
     349#if H_MV
    350350  Bool              m_subBistreamPropSEIEnabled;
    351351  Int               m_numAdditionalSubStreams;
     
    397397#if H_3D_SPIVMP
    398398  Int      m_iSubPULog2Size;
    399 #endif
    400 #if QC_SPIVMP_MPI_G0119
    401399  Int      m_iSubPUMPILog2Size;
    402400#endif
     
    507505  Int        getSubPULog2Size                   ()                   { return m_iSubPULog2Size;}
    508506  Void       setSubPULog2Size                   (Int u)              { m_iSubPULog2Size = u; }     
    509 #endif
    510 #if QC_SPIVMP_MPI_G0119
    511507  Int        getSubPUMPILog2Size            ()               { return m_iSubPUMPILog2Size;}
    512508  Void       setSubPUMPILog2Size            (Int u)          { m_iSubPUMPILog2Size = u;   }     
     
    789785  Int   getScalableNestingSEIEnabled()                     { return m_scalableNestingSEIEnabled; }
    790786
    791 #if H_MV_HLS_7_SEI_P0204_26
     787#if H_MV
    792788  Bool   getSubBitstreamPropSEIEnabled()        { return m_subBistreamPropSEIEnabled;}
    793789  Void   setSubBitstreamPropSEIEnabled(Bool x)  { m_subBistreamPropSEIEnabled = x;}
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r872 r884  
    547547          bTryNx2N  = false;
    548548          bTry2NxN  = false;
    549 #if MTK_TEX_DEP_PAR_G0055
    550549          if( pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize(uiCUIdx) != SIZE_2Nx2N)
    551550          {
     
    555554              bTryNx2N  = true;
    556555          }
    557 #endif
    558556        }
    559557      }
     
    582580          if (rpcTempCU->getSlice()->getIsDepth() )
    583581          {
    584 #if SEC_DEPTH_DV_DERIVAITON_G0074
    585582            DvInfo.bDV = rpcTempCU->getDispforDepth(0, 0, &DvInfo);
    586 #else
    587             DvInfo.bDV = rpcTempCU->getDispNeighBlocks(0, 0, &DvInfo);
    588 #endif
    589583          }
    590584          else
     
    15331527#endif
    15341528    m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx );
    1535 #if !SEC_IC_ARP_SIG_G0072
     1529#if H_3D_ARP
     1530    m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
     1531#endif
    15361532#if H_3D_IC
    15371533    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
    15381534#endif
    1539 #endif
    1540 #if H_3D_ARP
    1541     m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
    1542 #endif
    1543 #if SEC_IC_ARP_SIG_G0072
    1544 #if H_3D_IC
    1545     m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
    1546 #endif
    1547 #endif
    15481535    finishCU(pcCU,uiAbsPartIdx,uiDepth);
    15491536    return;
     
    15531540  m_pcEntropyCoder->encodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    15541541 
    1555 #if QC_SDC_UNIFY_G0130
     1542#if H_3D_DIM_SDC
    15561543  m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false );
    15571544#endif
     
    15701557  // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    15711558  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
    1572 #if !SEC_IC_ARP_SIG_G0072
     1559
     1560#if H_3D_ARP
     1561  m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
     1562#endif
    15731563#if H_3D_IC
    15741564  m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
    15751565#endif
    1576 #endif
    1577 #if H_3D_ARP
    1578   m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
    1579 #endif
    1580 #if SEC_IC_ARP_SIG_G0072
    1581 #if H_3D_IC
    1582   m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
    1583 #endif
    1584 #endif
    1585 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    1586   m_pcEntropyCoder->encodeInterSDCFlag( pcCU, uiAbsPartIdx, false );
    1587 #endif
    1588 
    15891566  // Encode Coefficients
    15901567  Bool bCodeDQP = getdQPFlag();
     
    18091786#if H_3D_ARP
    18101787  Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1;
    1811 #if SEC_IC_ARP_SIG_G0072
    18121788  if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV || bICFlag )
    1813 #else
    1814   if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV )
    1815 #endif
    18161789  {
    18171790    nARPWMax = 0;
     
    18211794    memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) );
    18221795    rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
    1823 #if !UPDATE_HM13
    1824     rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uhDepth );
    1825 #endif
    18261796    rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
    18271797#if H_3D_IC
     
    18561826#endif
    18571827
    1858 #if MTK_DDD_G0063
     1828#if H_3D_DDD
    18591829    Int iDDDCand = rpcTempCU->getUseDDDCandIdx();
    18601830    UChar ucDDDepth = rpcTempCU->getDDTmpDepth();
     
    18951865          rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );
    18961866#endif
    1897 #if MTK_DDD_G0063
     1867#if H_3D_DDD
    18981868          if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand )
    18991869          {
     
    19251895          else
    19261896#endif
    1927 #if NTT_STORE_SPDV_VSP_G0148
    1928             {
     1897#if H_3D_VSP
     1898          {
    19291899          if ( vspFlag[uiMergeCand] )
    19301900          {
     
    19591929            rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    19601930            rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    1961 #if NTT_STORE_SPDV_VSP_G0148
     1931#if H_3D_VSP
    19621932          }
    19631933        }
     
    19921962
    19931963          rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
    1994 #if NTT_STORE_SPDV_VSP_G0148 // possible bug fix
     1964#if H_3D_VSP // possible bug fix
    19951965          if( rpcTempCU->getSkipFlag(0) )
    19961966          {
     
    20071977          if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual )
    20081978          {
    2009 #if SEC_INTER_SDC_G0101
    20101979            for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )
    20111980            {
     
    20392008              xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );
    20402009            }
    2041 #else
    2042             if( rpcTempCU != rpcTempCUPre )
    2043             {
    2044               rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag  );
    2045               rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth );
    2046             }
    2047             rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
    2048             rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
    2049             rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth );
    2050 #if H_3D_VSO //M2
    2051             if( m_pcRdCost->getUseRenModel() )
    2052             { //Reset
    2053               UInt  uiWidth     = m_ppcOrigYuv[uhDepth]->getWidth    ();
    2054               UInt  uiHeight    = m_ppcOrigYuv[uhDepth]->getHeight   ();
    2055               Pel*  piSrc       = m_ppcOrigYuv[uhDepth]->getLumaAddr ();
    2056               UInt  uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride   ();
    2057               m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    2058             }
    2059 #endif
    2060             m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU,
    2061               m_ppcOrigYuv[uhDepth],
    2062               ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],
    2063               m_ppcResiYuvTemp[uhDepth],
    2064               m_ppcRecoYuvTemp[uhDepth],
    2065               uhDepth );
    2066 
    2067             xCheckDQP( rpcTempCU );
    2068             xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );
    2069 #endif
    20702010          }
    20712011#endif
     
    21422082{
    21432083
    2144 #if UPDATE_HM13
    21452084#if H_3D
    21462085  const Bool bTransquantBypassFlag = rpcTempCU->getCUTransquantBypass(0);
    2147 #endif
    21482086#endif
    21492087#if  H_3D_FAST_TEXTURE_ENCODING
     
    21572095  Int nARPWMax    = rpcTempCU->getSlice()->getARPStepNum() - 1;
    21582096
    2159 #if SEC_IC_ARP_SIG_G0072
    21602097  if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV || rpcTempCU->getICFlag(0) )
    2161 #else
    2162   if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV  )
    2163 #endif
    21642098  {
    21652099    nARPWMax = 0;
     
    21702104    if( bFirstTime == false && rpcTempCU->getSlice()->getVPS()->getUseAdvRP( iLayerId ) )
    21712105    {
    2172 #if UPDATE_HM13
    21732106      rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0),bTransquantBypassFlag );     
    2174 #else
    2175       rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0) );
    2176 #endif
    21772107    }
    21782108#endif
     
    21942124  rpcTempCU->setPartSizeSubParts  ( ePartSize,  0, uhDepth );
    21952125  rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
    2196 #if MTK_DDD_G0063
     2126#if H_3D_DDD
    21972127  rpcTempCU->setUseDDD( false, 0, uhDepth );
    21982128#endif
     
    22562186#endif
    22572187  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false );
    2258 #if NTT_STORE_SPDV_VSP_G0148 // possible bug fix
     2188#if H_3D_VSP // possible bug fix
    22592189  if( rpcTempCU->getQtRootCbf(0)==0 )
    22602190  {
     
    22762206  xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
    22772207#if H_3D_INTER_SDC
    2278 #if SEC_INTER_SDC_G0101 // ONLY_2NX2N_SDC
    22792208  if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && ePartSize == SIZE_2Nx2N)
    2280 #else
    2281   if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() )
    2282 #endif
    2283   {
    2284 #if SEC_INTER_SDC_G0101
     2209  {
    22852210    for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )
    22862211    {
     
    22882213      {
    22892214        Int orgQP = rpcBestCU->getQP( 0 );
    2290 #if UPDATE_HM13
    22912215        rpcTempCU->initEstData( uhDepth, orgQP ,bTransquantBypassFlag );     
    2292 #else
    2293         rpcTempCU->initEstData( uhDepth, orgQP );
    2294 #endif
    22952216        rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth );
    22962217      }
     
    23202241      xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
    23212242    }
    2322 #else
    2323     if( rpcTempCU != rpcTempCUPre )
    2324     {
    2325       Int orgQP = rpcBestCU->getQP( 0 );
    2326       rpcTempCU->initEstData( uhDepth, orgQP );
    2327       rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth );
    2328     }
    2329     rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
    2330     rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
    2331     rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth );
    2332 #if H_3D_VSO // M3
    2333     if( m_pcRdCost->getUseRenModel() )
    2334     {
    2335       UInt  uiWidth     = m_ppcOrigYuv[uhDepth]->getWidth ( );
    2336       UInt  uiHeight    = m_ppcOrigYuv[uhDepth]->getHeight( );
    2337       Pel*  piSrc       = m_ppcOrigYuv[uhDepth]->getLumaAddr( );
    2338       UInt  uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride();
    2339       m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    2340     }
    2341 #endif
    2342 
    2343     m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU,
    2344       m_ppcOrigYuv[uhDepth],
    2345       ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],
    2346       m_ppcResiYuvTemp[uhDepth],
    2347       m_ppcRecoYuvTemp[uhDepth],
    2348       uhDepth );
    2349 
    2350   xCheckDQP( rpcTempCU );
    2351   xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
    2352 #endif
     2243
    23532244  }
    23542245#endif
     
    25932484  m_pcEntropyCoder->encodePredMode( rpcTempCU, 0,          true );
    25942485  m_pcEntropyCoder->encodePartSize( rpcTempCU, 0, uiDepth, true );
    2595 #if QC_SDC_UNIFY_G0130
     2486#if H_3D_DIM_SDC
    25962487  m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true );
    25972488#endif
     
    26502541  m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0,          true );
    26512542  m_pcEntropyCoder->encodePartSize ( rpcTempCU, 0, uiDepth, true );
    2652 #if QC_SDC_UNIFY_G0130
     2543#if H_3D_DIM_SDC
    26532544  m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true );
    26542545#endif
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r872 r884  
    151151Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    152152{
    153 #if SEC_IC_ARP_SIG_G0072
    154153  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 )
    155 #else
    156   if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )
    157 #endif
    158154  {
    159155    return;
     
    670666  UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    671667  UInt uiChromaOffset = uiLumaOffset>>2;
    672 #if QC_SDC_UNIFY_G0130
    673668#if H_3D_DIM_SDC
    674669  if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx ) )
     
    680675    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
    681676  }
    682 #endif
    683 
    684 #if H_3D_INTER_SDC
     677
    685678  if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx ) )
    686679  {
     
    689682    assert( pcCU->getSlice()->getIsDepth() );
    690683  }
    691 #endif
    692 #if QC_SDC_UNIFY_G0130_FIX
     684
    693685  if( pcCU->getSlice()->getIsDepth() && ( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) )
    694 #else
    695   if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) )
    696 #endif
    697686  {
    698687    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
     
    715704    }
    716705  }
    717 #else
    718 #if H_3D_DIM_SDC
    719   if( pcCU->getSDCFlag( uiAbsPartIdx ) )
    720   {
    721     assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
    722     assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
    723     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
    724     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
    725     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
    726     return;
    727   }
    728 #endif
    729 
    730 #if H_3D_INTER_SDC
    731   if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
    732   {
    733     assert( !pcCU->isSkipped( uiAbsPartIdx ) );
    734     assert( !pcCU->isIntra( uiAbsPartIdx) );
    735     assert( pcCU->getSlice()->getIsDepth() );
    736 
    737     encodeInterSDCResidualData( pcCU, uiAbsPartIdx, false );
    738     return;
    739   }
    740 #endif
    741706#endif
    742707
     
    799764
    800765#if H_3D_INTER_SDC
    801 #if QC_SDC_UNIFY_G0130
    802766Void TEncEntropy::encodeDeltaDC  ( TComDataCU* pcCU, UInt absPartIdx )
    803767{
     
    813777  }
    814778
    815 #if SEC_INTER_SDC_G0101
    816779  if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) )
    817 #else
    818   if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) )
    819 #endif
    820   {
    821     return;
    822   }
    823 
    824 #if SEC_INTER_SDC_G0101
     780  {
     781    return;
     782  }
     783
    825784  assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
    826 #else
    827   assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
    828 #endif
    829785
    830786  if( bRD )
     
    835791  m_pcEntropyCoderIf->codeSDCFlag( pcCU, uiAbsPartIdx );
    836792}
    837 #else
    838 Void TEncEntropy::encodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    839 {
    840   if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )
    841   {
    842     return;
    843   }
    844 
    845   if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) )
    846   {
    847     return;
    848   }
    849 
    850   if( bRD )
    851   {
    852     uiAbsPartIdx = 0;
    853   }
    854 
    855   m_pcEntropyCoderIf->codeInterSDCFlag( pcCU, uiAbsPartIdx );
    856 }
    857 
    858 Void TEncEntropy::encodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    859 {
    860   if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )
    861   {
    862     return;
    863   }
    864 
    865   if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || !pcCU->getInterSDCFlag( uiAbsPartIdx ) )
    866   {
    867     return;
    868   }
    869 
    870   if( bRD )
    871   {
    872     uiAbsPartIdx = 0;
    873   }
    874 
    875   // number of segments depends on prediction mode for INTRA
    876   UInt uiNumSegments = ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ? 1 : ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 );
    877 
    878   // encode residual data for each segment
    879   for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ )
    880   {
    881     m_pcEntropyCoderIf->codeInterSDCResidualData( pcCU, uiAbsPartIdx, uiSeg );
    882   }
    883 }
    884 #endif
     793
    885794#endif
    886795#if H_3D_DBBP
  • trunk/source/Lib/TLibEncoder/TEncEntropy.h

    r872 r884  
    9595#endif
    9696#if H_3D_INTER_SDC
    97 #if QC_SDC_UNIFY_G0130
    9897  virtual Void codeDeltaDC       ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9998  virtual Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    100 #else
    101   virtual Void codeInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    102   virtual Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0;
    103 #endif
    10499#endif
    105100#if H_3D_DBBP
     
    190185#endif
    191186#if H_3D_INTER_SDC
    192 #if QC_SDC_UNIFY_G0130
    193187  Void encodeDeltaDC      ( TComDataCU* pcCU, UInt absPartIdx );
    194188  Void encodeSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    195 #else
    196   Void encodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    197   Void encodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD );
    198 #endif
    199189#endif
    200190#if H_3D_DBBP
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r872 r884  
    296296}
    297297
    298 #if H_MV_HLS_7_SEI_P0204_26
     298#if H_MV
    299299SEISubBitstreamProperty *TEncGOP::xCreateSEISubBitstreamProperty( TComSPS *sps)
    300300{
     
    365365    delete sei;
    366366  }
    367 #if H_MV_HLS_7_SEI_P0204_26
     367#if H_MV
    368368  if( m_pcCfg->getSubBitstreamPropSEIEnabled() )
    369369  {
  • trunk/source/Lib/TLibEncoder/TEncGOP.h

    r872 r884  
    212212
    213213  SEIToneMappingInfo*     xCreateSEIToneMappingInfo();
    214 #if H_MV_HLS_7_SEI_P0204_26
     214#if H_MV
    215215  SEISubBitstreamProperty *xCreateSEISubBitstreamProperty( TComSPS *sps);
    216216#endif
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r872 r884  
    9292, m_cDdcFlagSCModel           ( 1,             1,               NUM_DDC_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    9393, m_cDdcDataSCModel           ( 1,             1,               NUM_DDC_DATA_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    94 #if QC_GENERIC_SDC_G0122
    9594, m_cAngleFlagSCModel         ( 1,             1,               NUM_ANGLE_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels)
    96 #if !QC_SDC_UNIFY_G0130
    97 , m_cIntraSdcFlagSCModel      ( 1,             1,               NUM_INTRASDC_FLAG_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
    98 #endif
    99 #endif
    10095#if H_3D_DIM_DMM
    10196, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     
    106101#endif
    107102#endif
    108 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    109 , m_cInterSDCFlagSCModel             ( 1,             1,  NUM_INTER_SDC_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    110 , m_cInterSDCResidualSCModel         ( 1,             1,  NUM_INTER_SDC_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
    111 , m_cInterSDCResidualSignFlagSCModel ( 1,             1,  NUM_INTER_SDC_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
    112 #endif
    113 #if QC_SDC_UNIFY_G0130
     103#if H_3D_DIM_SDC
    114104, m_cSDCFlagSCModel                  ( 1,             1,  NUM_SDC_FLAG_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
    115105#endif
     
    178168  m_cDdcFlagSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG );
    179169  m_cDdcDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DDC_DATA );
    180 #if QC_GENERIC_SDC_G0122
    181170  m_cAngleFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG );
    182 #if !QC_SDC_UNIFY_G0130
    183   m_cIntraSdcFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );
    184 #endif
    185 #endif
    186171#if H_3D_DIM_DMM
    187172  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
     
    192177#endif
    193178#endif
    194 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    195   m_cInterSDCFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    196   m_cInterSDCResidualSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
    197   m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    198 #endif
    199 #if QC_SDC_UNIFY_G0130
     179#if H_3D_DIM_SDC
    200180  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    201181#endif
     
    240220      curCost += m_cCUICFlagSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_IC_FLAG );
    241221#endif
    242 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    243       curCost += m_cInterSDCFlagSCModel.calcCost      ( curSliceType, qp, (UChar*)INIT_INTER_SDC_FLAG );
    244       curCost += m_cInterSDCResidualSCModel.calcCost  ( curSliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
    245       curCost += m_cInterSDCResidualSignFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    246 #endif
    247 #if QC_SDC_UNIFY_G0130
     222#if H_3D_DIM_SDC
    248223      curCost += m_cSDCFlagSCModel.calcCost           ( curSliceType, qp, (UChar*)INIT_SDC_FLAG );
    249224#endif
     
    279254      curCost += m_cDdcFlagSCModel.calcCost           ( curSliceType, qp, (UChar*)INIT_DDC_FLAG );
    280255      curCost += m_cDdcDataSCModel.calcCost           ( curSliceType, qp, (UChar*)INIT_DDC_DATA );
    281 #if QC_GENERIC_SDC_G0122
    282256      curCost += m_cAngleFlagSCModel.calcCost         ( curSliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 
    283 #if !QC_SDC_UNIFY_G0130
    284       curCost += m_cIntraSdcFlagSCModel.calcCost      ( curSliceType, qp, (UChar*)INIT_INTRASDC_FLAG ); 
    285 #endif
    286 #endif
    287257#if H_3D_DIM_DMM
    288258      curCost += m_cDmm1DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM1_DATA );
     
    348318  m_cDdcFlagSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG );
    349319  m_cDdcDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DDC_DATA );
    350 #if QC_GENERIC_SDC_G0122
    351320  m_cAngleFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG );
    352 #if !QC_SDC_UNIFY_G0130
    353   m_cIntraSdcFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );
    354 #endif
    355 #endif
    356321#if H_3D_DIM_DMM
    357322  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
     
    362327#endif
    363328#endif
    364 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    365   m_cInterSDCFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    366   m_cInterSDCResidualSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
    367   m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    368 #endif
    369 #if QC_SDC_UNIFY_G0130
     329#if H_3D_DIM_SDC
    370330  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    371331#endif
     
    672632  this->m_cDepthIntraModeSCModel .copyFrom( &pSrc->m_cDepthIntraModeSCModel );
    673633  this->m_cDdcFlagSCModel        .copyFrom( &pSrc->m_cDdcFlagSCModel );
    674 #if QC_GENERIC_SDC_G0122
    675634  this->m_cAngleFlagSCModel      .copyFrom( &pSrc->m_cAngleFlagSCModel );
    676 #if !QC_SDC_UNIFY_G0130
    677   this->m_cIntraSdcFlagSCModel   .copyFrom( &pSrc->m_cIntraSdcFlagSCModel );
    678 #endif
    679 #endif
    680635}
    681636#endif
     
    728683  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    729684
    730 #if MTK_TEX_DEP_PAR_G0055
    731685  Bool depthDependent = false;
    732686  UInt uiTexturePart = eSize;
    733 #endif
    734687  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC() )
    735688  {
     
    737690    UInt uiCUIdx            = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();
    738691    assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth);
    739 #if !MTK_TEX_DEP_PAR_G0055
    740     if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) != SIZE_NxN)
    741 #else
    742692    if(pcTextureCU->getDepth(uiCUIdx) == uiDepth )
    743693    {
     
    746696    }
    747697    if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) == SIZE_2Nx2N)
    748 #endif
    749698    {
    750699      assert( eSize == SIZE_2Nx2N );
     
    768717  DTRACE_CU("part_mode", eSize )
    769718#endif       
    770 #if MTK_TEX_DEP_PAR_G0055
     719#if H_3D_QTLPC
    771720    if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N)
    772721    {
     
    838787    }
    839788  }
    840 #if MTK_TEX_DEP_PAR_G0055
     789#if H_3D_QTLPC
    841790    }
    842791    else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD)
     
    1050999  if( nBinNum > 1 )
    10511000  {
    1052 #if MTK_ARP_FLAG_CABAC_SIMP_G0061
    10531001     m_pcBinIf->encodeBin( ( iW == iMaxW ) ? 1 : 0, m_cCUPUARPWSCModel.get( 0, 0, 2 ) );
    1054 #else
    1055      m_pcBinIf->encodeBin( ( iW == iMaxW ) ? 1 : 0, m_cCUPUARPWSCModel.get( 0, 0, 3 ) );
    1056 #endif
    10571002  }
    10581003#if H_MV_ENC_DEC_TRAC
     
    10721017  // get context function is here
    10731018  UInt uiSymbol = pcCU->getICFlag( uiAbsPartIdx ) ? 1 : 0;
    1074 #if MTK_IC_FLAG_CABAC_SIMP_G0061
    10751019  m_pcBinIf->encodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) );
    1076 #else
    1077   UInt uiCtxIC  = pcCU->getCtxICFlag( uiAbsPartIdx ) ;
    1078   m_pcBinIf->encodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );
    1079 #endif
    10801020#if !H_MV_ENC_DEC_TRAC
    10811021  DTRACE_CABAC_VL( g_nSymbolCounter++ );
    10821022  DTRACE_CABAC_T( "\tICFlag" );
    1083   DTRACE_CABAC_T( "\tuiCtxIC: ");
    1084   DTRACE_CABAC_V( uiCtxIC );
    10851023  DTRACE_CABAC_T( "\tuiSymbol: ");
    10861024  DTRACE_CABAC_V( uiSymbol );
     
    11671105    }
    11681106    if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE )
    1169 #if H_3D_DIM_SDC
    1170 #if QC_GENERIC_SDC_G0122
    1171       if( 1 )
    1172 #else
    1173       if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )
    1174 #endif
    1175 #endif
    1176     {
    1177 #endif
    1178     predNum[j] = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds[j]); 
    1179     for(UInt i = 0; i < predNum[j]; i++)
    1180     {
    1181       if(dir[j] == preds[j][i])
    1182       {
    1183         predIdx[j] = i;
    1184       }
    1185     }
    1186     m_pcBinIf->encodeBin((predIdx[j] != -1)? 1 : 0, m_cCUIntraPredSCModel.get( 0, 0, 0 ) );
     1107    {
     1108#endif
     1109      predNum[j] = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds[j]); 
     1110      for(UInt i = 0; i < predNum[j]; i++)
     1111      {
     1112        if(dir[j] == preds[j][i])
     1113        {
     1114          predIdx[j] = i;
     1115        }
     1116      }
     1117      m_pcBinIf->encodeBin((predIdx[j] != -1)? 1 : 0, m_cCUIntraPredSCModel.get( 0, 0, 0 ) );
    11871118#if H_MV_ENC_DEC_TRAC
    1188     DTRACE_CU("prev_intra_luma_pred_flag", (predIdx[j] != -1)? 1 : 0);
     1119      DTRACE_CU("prev_intra_luma_pred_flag", (predIdx[j] != -1)? 1 : 0);
    11891120#endif
    11901121#if H_3D_DIM
     
    11971128#if H_3D_DIM
    11981129    if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE )
    1199 #if H_3D_DIM_SDC
    1200 #if QC_GENERIC_SDC_G0122
    1201       if( 1 )
    1202 #else
    1203       if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )
    1204 #endif
    1205 #endif
    12061130    {
    12071131#endif
     
    13011225  default: break;
    13021226  }
    1303 #if !QC_SDC_UNIFY_G0130
    1304   if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
    1305   {
    1306     UInt dimDeltaDC;
    1307     Pel  deltaDC;
    1308 #if QC_GENERIC_SDC_G0122
    1309     UInt uiNumSegments = isDimMode( dir ) ? 2 : 1;
    1310 #else
    1311     UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;
    1312 #endif
    1313     if( pcCU->getSDCFlag( absPartIdx ) )
    1314     {
    1315       if( uiNumSegments==1 )
    1316       {
    1317         dimDeltaDC = pcCU->getSDCSegmentDCOffset(0, absPartIdx) ? 1 : 0;
    1318       }
    1319       else
    1320       {
    1321         dimDeltaDC = ( pcCU->getSDCSegmentDCOffset(0, absPartIdx) || pcCU->getSDCSegmentDCOffset(1, absPartIdx) ) ? 1 : 0;
    1322       }
    1323     }
    1324     else
    1325     {
    1326       dimDeltaDC = isDimDeltaDC( dir );
    1327     }
    1328 
    1329     m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );
    1330 
    1331     if( dimDeltaDC )
    1332     {
    1333       for( UInt segment = 0; segment < uiNumSegments; segment++ )
    1334       {
    1335         deltaDC = pcCU->getSDCFlag( absPartIdx ) ? pcCU->getSDCSegmentDCOffset(segment, absPartIdx) : pcCU->getDimDeltaDC( dimType, segment, absPartIdx );
    1336         xCodeDimDeltaDC( deltaDC, uiNumSegments );
    1337       }
    1338     }
    1339   }
    1340 #endif
    1341 }
    1342 
    1343 #if QC_GENERIC_SDC_G0122
     1227}
     1228
    13441229Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )
    13451230{
     
    13501235    m_pcBinIf->encodeBin( isDimMode( dir ) ? 0 : 1, m_cAngleFlagSCModel.get( 0, 0, pcCU->getCtxAngleFlag( absPartIdx ) ) );
    13511236  }
    1352 #if !QC_SDC_UNIFY_G0130
    1353   if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case
    1354   {
    1355     m_pcBinIf->encodeBin( pcCU->getSDCFlag( absPartIdx ) ? 1 : 0, m_cIntraSdcFlagSCModel.get( 0, 0, pcCU->getCtxSDCFlag( absPartIdx ) ) );
    1356 }
    1357 #endif
    13581237  if( isDimMode( dir ) )
    13591238  {
     
    13701249  }
    13711250}
    1372 #else
    1373 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )
    1374 {
    1375   UInt codeWordTable[3][7] =    {{0, 0, 0, 1, 0, 0, 0},{0, 2, 6, 14, 15, 0, 0},{0, 1, 0, 0, 0, 0, 0}};
    1376   UInt codeWordLenTable[3][7] = {{0, 1, 0, 1, 0, 0, 0},{1, 2, 3,  4,  4, 0, 0},{1, 1, 0, 0, 0, 0, 0}};
    1377   UInt dir = pcCU->getLumaIntraDir( absPartIdx );
    1378   UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );
    1379   UInt codeIdx = 0;
    1380 
    1381   if( dir < NUM_INTRA_MODE )
    1382   {
    1383     codeIdx = 1;
    1384   }
    1385   if( isDimMode( dir ) )
    1386   {
    1387     switch( getDimType( dir ) )
    1388     {
    1389     case DMM1_IDX: codeIdx = 3; break;
    1390     case DMM4_IDX: codeIdx = 4; break;
    1391     default:                    break;
    1392     }
    1393   }
    1394 
    1395 #if H_3D_DIM_SDC
    1396   if( pcCU->getSDCFlag( absPartIdx ) )
    1397   {
    1398     switch( dir )
    1399     {
    1400       case PLANAR_IDX:  codeIdx = 0; break;
    1401       default:          codeIdx = 2; break;
    1402     }
    1403   }
    1404 #endif
    1405   //mode coding
    1406   for( UInt i = 0; i < codeWordLenTable[puIdx][codeIdx]; i++ )
    1407   {
    1408     UInt bit = codeWordTable[puIdx][codeIdx] & ( 1<<(codeWordLenTable[puIdx][codeIdx] - i - 1) );
    1409     UInt ctxDepthMode = puIdx*3 + ( (i >= 2) ? 2 : i );
    1410     m_pcBinIf->encodeBin( bit!=0 , m_cDepthIntraModeSCModel.get(0, 0, ctxDepthMode) );
    1411   }
    1412 }
    1413 #endif
    14141251#endif
    14151252
     
    24462283
    24472284#if H_3D_INTER_SDC
    2448 #if QC_SDC_UNIFY_G0130
    24492285Void TEncSbac::codeDeltaDC( TComDataCU* pcCU, UInt absPartIdx )
    24502286{
     
    24822318  else //all-zero inter SDC is not allowed
    24832319  {
    2484 #if SEC_INTER_SDC_G0101
    24852320    uiNumSegments = 1;
    2486 #else
    2487     PartSize cPartSize = pcCU->getPartitionSize( absPartIdx );
    2488     uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 );
    2489 #endif
    24902321    dimDeltaDC = 1;
    24912322  }
     
    25192350  m_pcBinIf->encodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
    25202351}
    2521 #else
    2522 Void TEncSbac::codeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    2523 {
    2524   UInt uiSymbol = pcCU->getInterSDCFlag( uiAbsPartIdx ) ? 1 : 0;
    2525   UInt uiCtxInterSDCFlag = pcCU->getCtxInterSDCFlag( uiAbsPartIdx );
    2526 
    2527   m_pcBinIf->encodeBin( uiSymbol, m_cInterSDCFlagSCModel.get( 0, 0, uiCtxInterSDCFlag ) );
    2528 }
    2529 
    2530 Void TEncSbac::codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
    2531 {
    2532   Pel segmentDCOffset = pcCU->getInterSDCSegmentDCOffset( uiSegment, uiAbsPartIdx );
    2533 
    2534   UInt uiSign     = segmentDCOffset < 0 ? 1 : 0;
    2535   UInt uiAbsIdx   = abs( segmentDCOffset );
    2536 
    2537   assert( uiAbsIdx > 0 );
    2538   uiAbsIdx--;
    2539   xWriteExGolombLevel( uiAbsIdx, m_cInterSDCResidualSCModel.get( 0, 0, 0 ) );
    2540   m_pcBinIf->encodeBin( uiSign, m_cInterSDCResidualSignFlagSCModel.get( 0, 0, 0 ) );
    2541 }
    2542 #endif
     2352
    25432353#endif
    25442354
  • trunk/source/Lib/TLibEncoder/TEncSbac.h

    r872 r884  
    162162#endif
    163163#if H_3D_INTER_SDC
    164 #if QC_SDC_UNIFY_G0130
    165164  Void codeDeltaDC       ( TComDataCU* pcCU, UInt absPartIdx );
    166165  Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    167 #else
    168   Void codeInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    169   Void codeInterSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
    170 #endif
    171166#endif
    172167#if H_3D_DBBP
     
    262257  ContextModel3DBuffer m_cDdcFlagSCModel;
    263258  ContextModel3DBuffer m_cDdcDataSCModel;
    264 #if QC_GENERIC_SDC_G0122
    265259  ContextModel3DBuffer m_cAngleFlagSCModel;
    266 #if !QC_SDC_UNIFY_G0130
    267   ContextModel3DBuffer m_cIntraSdcFlagSCModel;
    268 #endif
    269 #endif
    270260#if H_3D_DIM_DMM
    271261  ContextModel3DBuffer m_cDmm1DataSCModel;
     
    276266#endif
    277267#endif
    278 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    279   ContextModel3DBuffer m_cInterSDCFlagSCModel;
    280   ContextModel3DBuffer m_cInterSDCResidualSCModel;
    281   ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel;
    282 #endif
    283 #if QC_SDC_UNIFY_G0130
     268#if H_3D_DIM_SDC
    284269  ContextModel3DBuffer m_cSDCFlagSCModel;
    285270#endif
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r872 r884  
    920920      m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    921921
    922 #if QC_SDC_UNIFY_G0130
     922#if H_3D_DIM_SDC
    923923      m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
    924924#endif
     
    939939      {
    940940        m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 );
    941 #if QC_SDC_UNIFY_G0130_FIX
     941#if H_3D_DIM_SDC
    942942        if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( 0 ) ) && getDimType( pcCU->getLumaIntraDir( 0 ) ) < DIM_NUM_TYPE )
    943943        {
     
    956956        {
    957957          m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPart * uiQNumParts );
    958 #if QC_SDC_UNIFY_G0130_FIX
     958#if H_3D_DIM_SDC
    959959          if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiPart * uiQNumParts ) ) && getDimType( pcCU->getLumaIntraDir( uiPart * uiQNumParts ) ) < DIM_NUM_TYPE )
    960960          {
     
    967967      {
    968968        m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiAbsPartIdx );
    969 #if QC_SDC_UNIFY_G0130_FIX
     969#if H_3D_DIM_SDC
    970970        if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiAbsPartIdx ) ) && getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx ) ) < DIM_NUM_TYPE )
    971971        {
     
    975975    }
    976976  }
    977 #if QC_SDC_UNIFY_G0130 && !QC_SDC_UNIFY_G0130_FIX
    978     Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
    979     UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2;
    980 
    981     if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
    982     {
    983       for( Int iPart = 0; iPart < iPartNum; iPart++ )
    984       {
    985         if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE )
    986         {
    987           m_pcEntropyCoder->encodeDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart );
    988         }
    989       }
    990     }
    991 #endif
     977
    992978  }
    993979  if( bChroma )
     
    18751861
    18761862#if H_3D_DIM_SDC
    1877 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost,
    1878 #if QC_GENERIC_SDC_G0122
    1879   Bool bZeroResidual, Int iSDCDeltaResi
    1880 #else
    1881   Bool bResidual
    1882 #endif
    1883   )
     1863Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
    18841864{
    18851865  UInt    uiLumaPredMode    = pcCU     ->getLumaIntraDir( uiAbsPartIdx );
    18861866  UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
    18871867  UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
    1888 #if QC_PKU_SDC_SPLIT_G0123
    1889 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1890 #if QC_GENERIC_SDC_G0122
    18911868  TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
    1892 #endif
    1893 #else
    1894 #if QC_GENERIC_SDC_G0122
    1895   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1896 #endif
    1897 #endif
    1898 #endif
    1899 #if QC_PKU_SDC_SPLIT_G0123
    19001869  UInt numParts = 1;
    1901   UInt i = 0;
    19021870  UInt sdcDepth = 0;
    19031871  UInt uiStride;         
     
    19101878  UInt uiRecIPredStride;
    19111879
    1912 #if HS_TSINGHUA_SDC_SPLIT_G0111
    19131880  if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 )
    19141881  {
     
    19171884    uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
    19181885  }
    1919 #else
    1920   if (uiWidth == 64)
    1921   {
    1922     numParts = 4;
    1923     sdcDepth = 1;
    1924     uiWidth = uiHeight = 32;
    1925   }
    1926 #endif
    1927 
    1928   for ( i = 0; i < numParts; i++ )
     1886
     1887  for ( Int i = 0; i < numParts; i++ )
    19291888  {
    19301889    uiStride          = pcOrgYuv ->getStride  ();
     
    19381897
    19391898    AOF( uiWidth == uiHeight );
    1940 #else
    1941   UInt    uiStride          = pcOrgYuv ->getStride  ();
    1942   Pel*    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
    1943   Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1944   Pel*    piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1945  
    1946   UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1947   Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1948   UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1949  
    1950   AOF( uiWidth == uiHeight );
    1951   AOF( uiAbsPartIdx == 0 );
    1952   AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
    1953   AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
    1954 #endif
    1955 #if !QC_GENERIC_SDC_G0122
    1956   AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) );
    1957   AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || uiWidth < 64  );
    1958 #endif
    1959  
    1960   //===== init availability pattern =====
    1961   Bool  bAboveAvail = false;
    1962   Bool  bLeftAvail  = false;
    1963 #if QC_PKU_SDC_SPLIT_G0123
    1964   pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
    1965   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    1966 #else
    1967   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
    1968   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    1969  
    1970 #endif
    1971 #if !QC_PKU_SDC_SPLIT_G0123
    1972 #if QC_GENERIC_SDC_G0122
    1973   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1974 #endif
    1975 #endif
    1976 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1977 #if QC_GENERIC_SDC_G0122
    1978   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1979 #endif
    1980 #endif
    1981   //===== get prediction signal =====
    1982 #if H_3D_DIM
    1983   if( isDimMode( uiLumaPredMode ) )
    1984   {
    1985 #if HS_TSINGHUA_SDC_SPLIT_G0111 
    1986     UInt dimType   = getDimType  ( uiLumaPredMode );
    1987     UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
    1988     if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
    1989     {
    1990       if (g_aucConvertToBit[uiWidth] == 2)  // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
    1991         patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
    1992       else
    1993         patternID = patternID >> 1;  // Other cases
    1994       pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID);
    1995     }
    1996 #endif
    1997     predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true
    1998 #if QC_GENERIC_SDC_G0122
    1999       , dmm4Segmentation
    2000 #endif
    2001       );
    2002 #if HS_TSINGHUA_SDC_SPLIT_G0111
    2003     Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
    2004     Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
    2005     for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    2006     {
    2007       dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
    2008     }
    2009 #endif
    2010   }
    2011   else
    2012   {
    2013 #endif
    2014     predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    2015 #if H_3D_DIM
    2016   }
    2017 #endif
    2018 #if QC_PKU_SDC_SPLIT_G0123
     1899
     1900    //===== init availability pattern =====
     1901    Bool  bAboveAvail = false;
     1902    Bool  bLeftAvail  = false;
     1903    pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
     1904    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
     1905    TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
     1906    //===== get prediction signal =====
     1907    if( isDimMode( uiLumaPredMode ) )
     1908    {
     1909      UInt dimType   = getDimType  ( uiLumaPredMode );
     1910      UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
     1911      if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
     1912      {
     1913        if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
     1914        {                                   
     1915          patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
     1916        }
     1917        else
     1918        {
     1919          patternID = patternID >> 1;  // Other cases
     1920        }
     1921        pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID);
     1922      }
     1923      predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true , dmm4Segmentation    );
     1924      Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
     1925      Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
     1926      for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
     1927      {
     1928        dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
     1929      }
     1930    }
     1931    else
     1932    {
     1933      predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1934    }
    20191935    if ( numParts > 1 )
    20201936    {
     
    20311947    }
    20321948    uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 );
    2033 #if HS_TSINGHUA_SDC_SPLIT_G0111
    20341949    dmm4Segmentation->destroy(); delete dmm4Segmentation;
    2035 #endif
    20361950  }
    20371951  uiAbsPartIdx = 0;
     
    20401954  piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    20411955  piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    2042  
     1956
    20431957  uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    20441958  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     
    20501964    uiHeight = pcCU->getHeight( 0 );
    20511965  }
    2052 #endif
    20531966  // number of segments depends on prediction mode
    20541967  UInt uiNumSegments = 1;
    20551968  Bool* pbMask = NULL;
    20561969  UInt uiMaskStride = 0;
    2057    
     1970
    20581971  if( getDimType( uiLumaPredMode ) == DMM1_IDX )
    20591972  {
    20601973    Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
    2061    
     1974
    20621975    WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    20631976    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
    2064    
     1977
    20651978    uiNumSegments = 2;
    20661979    pbMask = pcWedgelet->getPattern();
    20671980    uiMaskStride = pcWedgelet->getStride();
    20681981  }
    2069 #if QC_GENERIC_SDC_G0122
    20701982  if( getDimType( uiLumaPredMode ) == DMM4_IDX )
    20711983  {
    20721984    uiNumSegments = 2;
    2073 #if HS_TSINGHUA_SDC_SPLIT_G0111
    2074     pbMask  = dmm4SegmentationOrg->getPattern();
     1985    pbMask       = dmm4SegmentationOrg->getPattern();
    20751986    uiMaskStride = dmm4SegmentationOrg->getStride();
    2076 #else
    2077     pbMask  = dmm4Segmentation->getPattern();
    2078     uiMaskStride = dmm4Segmentation->getStride();
    2079 #endif
    2080   }
    2081 #endif
    2082  
     1987  }
     1988
    20831989  // get DC prediction for each segment
    20841990  Pel apDCPredValues[2];
    20851991  analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode );
    2086  
     1992
    20871993  // get original DC for each segment
    20881994  Pel apDCOrigValues[2];
    20891995  analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true );
    2090  
     1996
    20911997  for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
    20921998  {
    20931999    // remap reconstructed value to valid depth values
    2094 #if QC_GENERIC_SDC_G0122
    20952000    Pel pDCRec = ( !bZeroResidual ) ? apDCOrigValues[uiSegment] : apDCPredValues[uiSegment];
    2096 #else
    2097     Pel pDCRec = bResidual?apDCOrigValues[uiSegment]:apDCPredValues[uiSegment];
    2098 #endif
    20992001    // get residual (idx)
    21002002#if H_3D_DIM_DLT
     
    21032005    Pel pResidualIdx = pDCRec - apDCPredValues[uiSegment];
    21042006#endif
    2105 #if QC_GENERIC_SDC_G0122
    21062007    if( !bZeroResidual )
    21072008    {
     
    21132014      }
    21142015    }
    2115 #endif
    21162016    // save SDC DC offset
    21172017    pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx);
    21182018  }
    2119  
     2019
    21202020  // reconstruct residual based on mask + DC residuals
    21212021  Pel apDCResiValues[2];
     
    21322032#endif
    21332033  }
    2134  
     2034
    21352035  //===== reconstruction =====
    21362036  Bool* pMask     = pbMask;
     
    21382038  Pel* pReco      = piReco;
    21392039  Pel* pRecIPred  = piRecIPred;
    2140  
     2040
    21412041  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    21422042  {
     
    21472047
    21482048      Pel pResiDC = apDCResiValues[ucSegment];
    2149      
     2049
    21502050      pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResiDC );
    21512051      pRecIPred[ uiX ] = pReco[ uiX ];
     
    21562056    pMask     += uiMaskStride;
    21572057  }
    2158  
     2058
    21592059  // clear UV
    21602060  UInt  uiStrideC     = pcPredYuv->getCStride();
    21612061  Pel   *pRecCb       = pcPredYuv->getCbAddr();
    21622062  Pel   *pRecCr       = pcPredYuv->getCrAddr();
    2163  
     2063
    21642064  for (Int y=0; y<uiHeight/2; y++)
    21652065  {
     
    21692069      pRecCr[x] = 128;
    21702070    }
    2171    
     2071
    21722072    pRecCb += uiStrideC;
    21732073    pRecCr += uiStrideC;
    21742074  }
    2175  
     2075
    21762076  //===== determine distortion =====
    21772077#if H_3D_VSO
     
    21812081#endif
    21822082    ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
    2183  
     2083
    21842084  //===== determine rate and r-d cost =====
    21852085  m_pcEntropyCoder->resetBits();
    2186  
     2086
    21872087  // encode reduced intra header
    2188 #if QC_SDC_UNIFY_G0130
    21892088  if( !pcCU->getSlice()->isIntra() )
    21902089  {
     
    21972096  }
    21982097
    2199 #if QC_SDC_UNIFY_G0130_FIX2
    22002098  m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth( 0 ), true );
    2201 #else
    2202   m_pcEntropyCoder->encodePartSize( pcCU, 0, true );
    2203 #endif
    22042099  m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
    2205 #else
    2206   m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    2207 #endif
    2208  
     2100
    22092101  // encode pred direction + DC residual data
    22102102  m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    2211 #if QC_SDC_UNIFY_G0130
    22122103  Bool bDummy = false;
    22132104  m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy );
    2214 #endif
    22152105  UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
    2216  
     2106
    22172107#if H_3D_VSO
    22182108  if ( m_pcRdCost->getUseLambdaScaleVSO())
     
    22212111#endif
    22222112    dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist );
    2223 #if QC_GENERIC_SDC_G0122
    2224 #if HS_TSINGHUA_SDC_SPLIT_G0111
    22252113  dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
    2226 #else
    2227   dmm4Segmentation->destroy(); delete dmm4Segmentation;
    2228 #endif
    2229 #endif
    22302114}
    22312115#endif
     
    30932977          case( DMM4_IDX ):
    30942978            {
    3095 #if !QC_GENERIC_SDC_G0122
    3096               if( uiWidth > 4 )
    3097 #endif
    30982979              {
    30992980                biSegmentation = new TComWedgelet( uiWidth, uiHeight );
     
    31513032      {
    31523033        pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth );
    3153 #if QC_GENERIC_SDC_G0122
    31543034        for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ )
    31553035        {
     
    31583038            continue;
    31593039          }
    3160 #endif
    31613040#endif
    31623041     
     
    31693048      bTestZeroResi |= pcCU->getSDCFlag(uiPartOffset);
    31703049#endif
    3171 #if QC_GENERIC_SDC_G0122
    31723050      if( uiSDC != 0 && iSDCDeltaResi != 0 )
    31733051      {
    31743052        bTestZeroResi = false;
    31753053      }
    3176 #endif
    31773054#endif
    31783055     
     
    32053082
    32063083          // start encoding with SDC
    3207 #if QC_GENERIC_SDC_G0122
    32083084          xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi );
    3209 #else
    3210           xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, (testZeroResi!=0));
    3211 #endif
    32123085        }
    32133086        else
     
    32823155#if H_3D_DIM_ENC || H_3D_DIM_SDC
    32833156      }
    3284 #endif
    3285 #if QC_GENERIC_SDC_G0122
    32863157        } // SDC residual loop
    32873158#endif
     
    38853756  for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
    38863757  {
    3887       UInt uiCostCand = MAX_UINT;
    3888       UInt uiBitsCand = 0;
    3889      
    3890       PartSize ePartSize = pcCU->getPartitionSize( 0 );
    3891      
    3892 #if H_3D_VSP && NTT_STORE_SPDV_VSP_G0148
    3893       pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    3894       pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3758    UInt uiCostCand = MAX_UINT;
     3759    UInt uiBitsCand = 0;
     3760
     3761    PartSize ePartSize = pcCU->getPartitionSize( 0 );
     3762
     3763#if H_3D_VSP
     3764    pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3765    pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    38953766#endif
    38963767
    38973768#if H_3D_SPIVMP
    3898       pcCU->setSPIVMPFlagSubParts( pbSPIVMPFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ));
    3899       if (pbSPIVMPFlag[uiMergeCand])
    3900       {
    3901         UInt uiSPAddr;
    3902 
    3903         Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
    3904 
    3905         pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
    3906 
    3907         for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
    3908         {
    3909           pcCU->getSPAbsPartIdx(uiAbsPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
    3910           pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
    3911           pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
    3912         }
    3913       }
    3914       else
    3915 #endif
    3916 #if NTT_STORE_SPDV_VSP_G0148
     3769    pcCU->setSPIVMPFlagSubParts( pbSPIVMPFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ));
     3770    if (pbSPIVMPFlag[uiMergeCand])
     3771    {
     3772      UInt uiSPAddr;
     3773
     3774      Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     3775
     3776      pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
     3777
     3778      for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
     3779      {
     3780        pcCU->getSPAbsPartIdx(uiAbsPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
     3781        pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
     3782        pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
     3783      }
     3784    }
     3785    else
     3786#endif
     3787#if H_3D_VSP
    39173788#if H_3D_DBBP
    39183789      if ( vspFlag[uiMergeCand] && !pcCU->getDBBPFlag(0) )
     
    39503821        pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    39513822        pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    3952 
    3953 #if NTT_STORE_SPDV_VSP_G0148
    3954       }
    3955 #endif
    3956 #if H_3D_VSP && !NTT_STORE_SPDV_VSP_G0148
    3957       pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    3958       pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    3959 #endif
    3960 
    3961 #if MTK_DDD_G0063
     3823#if H_3D_VSP
     3824      }
     3825#endif
     3826
     3827#if H_3D_DDD
    39623828      if( uiMergeCand == pcCU->getUseDDDCandIdx() )
    39633829      {
    3964           pcCU->setUseDDD( true, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    3965           pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3830        pcCU->setUseDDD( true, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3831        pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    39663832      }
    39673833      else
    39683834      {
    3969           pcCU->setUseDDD( false, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3835        pcCU->setUseDDD( false, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    39703836      }
    39713837#endif
     
    39753841      if (uiMergeCand == m_pcEncCfg->getMaxNumMergeCand() -1)
    39763842      {
    3977          uiBitsCand--;
     3843        uiBitsCand--;
    39783844      }
    39793845      uiCostCand = uiCostCand + m_pcRdCost->getCost( uiBitsCand );
     
    39863852        uiMergeIndex = uiMergeCand;
    39873853      }
    3988     }
     3854  }
    39893855  }
    39903856
     
    45774443    {
    45784444      uiLastMode = 1;
    4579           pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMv( cMv[1], ePartSize, uiPartAddr, 0, iPartIdx );
    4580           pcCU->getCUMvField(REF_PIC_LIST_1)->setAllRefIdx( iRefIdx[1], ePartSize, uiPartAddr, 0, iPartIdx );
    4581         TempMv = cMv[1] - cMvPred[1][iRefIdx[1]];
    4582             pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd    ( TempMv,                 ePartSize, uiPartAddr, 0, iPartIdx );
     4445      pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMv( cMv[1], ePartSize, uiPartAddr, 0, iPartIdx );
     4446      pcCU->getCUMvField(REF_PIC_LIST_1)->setAllRefIdx( iRefIdx[1], ePartSize, uiPartAddr, 0, iPartIdx );
     4447      TempMv = cMv[1] - cMvPred[1][iRefIdx[1]];
     4448      pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd    ( TempMv,                 ePartSize, uiPartAddr, 0, iPartIdx );
    45834449      pcCU->setInterDirSubParts( 2, uiPartAddr, iPartIdx, pcCU->getDepth(0) );
    4584      
     4450
    45854451      pcCU->setMVPIdxSubParts( aaiMvpIdx[1][iRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    45864452      pcCU->setMVPNumSubParts( aaiMvpNum[1][iRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
     
    46674533        pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    46684534#endif
    4669 #if MTK_DDD_G0063
     4535#if H_3D_DDD
    46704536        if( uiMRGIndex == pcCU->getUseDDDCandIdx() )
    46714537        {
     
    47034569        else
    47044570#endif
    4705 #if NTT_STORE_SPDV_VSP_G0148
     4571#if H_3D_VSP
    47064572#if H_3D_DBBP
    47074573        if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) )
     
    47354601        }
    47364602        else
    4737 #if H_3D_FIX_G0148_BRACE
    47384603          {
    4739 #endif
    47404604#endif
    47414605          pcCU->setInterDirSubParts  ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47424606            pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );
    47434607            pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
    4744 #if H_3D_FIX_G0148_BRACE
     4608#if H_3D
    47454609          }
    47464610#endif
     
    47584622        pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47594623#endif
    4760 #if MTK_DDD_G0063
     4624#if H_3D_DDD
    47614625        pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47624626#endif
     
    56165480    m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
    56175481    m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, true );
    5618 #if !SEC_IC_ARP_SIG_G0072
     5482#if H_3D_ARP
     5483    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
     5484#endif
    56195485#if H_3D_IC
    56205486    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    5621 #endif
    5622 #endif
    5623 #if H_3D_ARP
    5624     m_pcEntropyCoder->encodeARPW( pcCU, 0 );
    5625 #endif
    5626 #if SEC_IC_ARP_SIG_G0072
    5627 #if H_3D_IC
    5628     m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    5629 #endif
    56305487#endif
    56315488    uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
     
    58825739
    58835740#if H_3D_INTER_SDC
    5884 #if SEC_INTER_SDC_G0101
    58855741Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, Int uiOffest, const UInt uiDepth )
    5886 #else
    5887 Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, const UInt uiDepth )
    5888 #endif
    58895742{
    58905743  if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( 0 ) )
     
    58925745    return;
    58935746  }
    5894 #if QC_SDC_UNIFY_G0130
    58955747  pcCU->setSDCFlagSubParts( true, 0, uiDepth );
    5896 #else
    5897   pcCU->setInterSDCFlagSubParts( true, 0, 0, uiDepth );
    5898 #endif
    5899 
    5900   UInt  uiWidth      = pcCU->getWidth ( 0 );
    5901   UInt  uiHeight     = pcCU->getHeight( 0 );
    5902 #if SEC_INTER_SDC_G0101
    5903   UInt uiSegSize = 0;
    5904 #else
    5905   UChar* pMask       = pcCU->getInterSDCMask();
    5906   memset( pMask, 0, uiWidth*uiHeight );
    5907 
    5908   pcCU->xSetInterSDCCUMask( pcCU, pMask );
    5909 
    5910   UInt uiSegSize[4] = { 0, 0, 0, 0 };
    5911 #endif
     5748
     5749  UInt  uiWidth   = pcCU->getWidth ( 0 );
     5750  UInt  uiHeight  = pcCU->getHeight( 0 );
     5751  UInt  uiSegSize = 0;
     5752
    59125753  Pel *pPred, *pOrg;
    59135754  UInt uiPredStride = pcPred->getStride();
    59145755  UInt uiOrgStride  = pcOrg->getStride();
    59155756  UInt uiPelX, uiPelY;
    5916 #if !SEC_INTER_SDC_G0101
    5917   UInt uiPartitionSize = pcCU->getPartitionSize( 0 );
    5918   UInt uiSegmentNum = ( uiPartitionSize == SIZE_2Nx2N ) ? 1 : ( uiPartitionSize == SIZE_NxN ? 4 : 2 );
    5919 #endif
    59205757
    59215758  pPred = pcPred->getLumaAddr( 0 );
    59225759  pOrg  = pcOrg->getLumaAddr( 0 );
    5923 #if SEC_INTER_SDC_G0101
    59245760  Int pResDC = 0;
    5925 #else
    5926   Int pResDC[4] = { 0, 0, 0, 0};
    5927 #endif
    59285761
    59295762  //calculate dc value for prediction and original signal, and calculate residual and reconstruction
     
    59325765    for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
    59335766    {
    5934 #if SEC_INTER_SDC_G0101
    59355767      pResDC += (Int)( pOrg [uiPelX] - pPred[uiPelX] );
    59365768      uiSegSize++;
    5937 #else
    5938       UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];
    5939       pResDC[uiSeg] += (Int)( pOrg [uiPelX] - pPred[uiPelX] );
    5940       uiSegSize[uiSeg]++;
    5941 #endif
    59425769    }
    59435770    pOrg  += uiOrgStride;
     
    59455772  }
    59465773
    5947 #if SEC_INTER_SDC_G0101
    59485774  Int iResiOffset = ( pResDC  > 0 ? ( uiSegSize >> 1 ) : -1*( uiSegSize >> 1 ) );
    59495775  pResDC          = ( pResDC + iResiOffset ) / (Int) uiSegSize;
    59505776
    59515777  pcCU->setSDCSegmentDCOffset( pResDC + uiOffest, 0, 0 );
    5952 #else
    5953   for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ )
    5954   {
    5955     Int iResiOffset = ( pResDC [uiSeg] > 0 ? ( uiSegSize[uiSeg] >> 1 ) : -1*( uiSegSize[uiSeg] >> 1 ) );
    5956     pResDC [uiSeg]  = ( pResDC [uiSeg] + iResiOffset ) / (Int) uiSegSize[uiSeg];
    5957 #if QC_SDC_UNIFY_G0130
    5958     pcCU->setSDCSegmentDCOffset( pResDC[uiSeg], uiSeg, 0 );
    5959 #else
    5960     pcCU->setInterSDCSegmentDCOffset( pResDC[uiSeg], uiSeg, 0 );
    5961 #endif
    5962   }
    5963 #endif
     5778
    59645779
    59655780  Pel *pRec;
     
    59725787    for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
    59735788    {
    5974 #if SEC_INTER_SDC_G0101
    59755789      pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, pPred[uiPelX] + pcCU->getSDCSegmentDCOffset(0, 0) );
    5976 #else
    5977       UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];
    5978       assert( uiSeg < uiSegmentNum );
    5979 
    5980       pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, pPred[uiPelX] + pResDC[uiSeg] );
    5981 #endif
    59825790    }
    59835791    pPred     += uiPredStride;
     
    60195827#endif
    60205828
    6021 #if QC_SDC_UNIFY_G0130
     5829#if H_3D_DIM_SDC
    60225830  Bool bNonSkip = false;
    60235831#else
    60245832  Bool bNonSkip = true;
    60255833#endif
    6026 #if SEC_INTER_SDC_G0101
    60275834  bNonSkip |= ( pcCU->getSDCSegmentDCOffset( 0, 0 ) != 0 ) ? 1 : 0;
    6028 #else
    6029   for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ )
    6030   {
    6031 #if QC_SDC_UNIFY_G0130
    6032     bNonSkip |= ( pcCU->getSDCSegmentDCOffset( uiSeg, 0 ) != 0 ) ? 1 : 0;
    6033 #else
    6034     bNonSkip &= ( pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 ) != 0 ) ? 1 : 0;
    6035 #endif
    6036   }
    6037 #endif
    6038 
    60395835  if( !bNonSkip )
    60405836  {
     
    71766972    m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
    71776973    m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, true);
    7178 #if !SEC_IC_ARP_SIG_G0072
     6974#if H_3D_ARP
     6975    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
     6976#endif
    71796977#if H_3D_IC
    71806978    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    7181 #endif
    7182 #endif
    7183 #if H_3D_ARP
    7184     m_pcEntropyCoder->encodeARPW( pcCU, 0 );
    7185 #endif
    7186 #if SEC_IC_ARP_SIG_G0072
    7187 #if H_3D_IC
    7188     m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    7189 #endif
    71906979#endif
    71916980    ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits();
     
    72016990    m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    72026991    m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    7203 #if QC_SDC_UNIFY_G0130
     6992#if H_3D_DIM_SDC
    72046993    m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
    72056994#endif
    72066995    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    7207 #if !SEC_IC_ARP_SIG_G0072
     6996#if H_3D_ARP
     6997    m_pcEntropyCoder->encodeARPW( pcCU , 0 );
     6998#endif
    72086999#if H_3D_IC
    72097000    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    7210 #endif
    7211 #endif
    7212 #if H_3D_ARP
    7213     m_pcEntropyCoder->encodeARPW( pcCU , 0 );
    7214 #endif
    7215 #if SEC_IC_ARP_SIG_G0072
    7216 #if H_3D_IC
    7217     m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    7218 #endif
    7219 #endif
    7220 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    7221     m_pcEntropyCoder->encodeInterSDCFlag( pcCU, 0, true );
    72227001#endif
    72237002    Bool bDummy = false;
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r872 r884  
    218218    TComYuv* pcResi,
    219219    TComYuv* pcRec,
    220 #if SEC_INTER_SDC_G0101
    221220    Int      uiOffset,
    222 #endif
    223221    const UInt uiDepth );
    224222#endif
     
    355353#endif
    356354#if H_3D_DIM_SDC
    357   Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost,
    358 #if QC_GENERIC_SDC_G0122
    359     Bool bZeroResidual, Int iSDCDeltaResi
    360 #else
    361     Bool bResidual
    362 #endif
    363     );
     355  Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
    364356#endif
    365357#endif
  • trunk/source/Lib/TLibEncoder/TEncSlice.h

    r872 r884  
    107107  UInt                    m_uiSliceIdx;
    108108  std::vector<TEncSbac*> CTXMem;
    109 #if MTK_DDD_G0063
     109#if H_3D_DDD
    110110  Int          m_iDDDScale;
    111111  Int          m_iDDDOffset;
     
    146146  Void      setCtxMem( TEncSbac* sb, Int b )   { CTXMem[b] = sb; }
    147147
    148 #if MTK_DDD_G0063
     148#if H_3D_DDD
    149149  Void setDDDPar( Int iScale, Int iOffset, UInt uiPrecision ){ m_iDDDScale = iScale; m_iDDDOffset = iOffset; m_uiDDDPrecision = uiPrecision; }
    150150#endif
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r872 r884  
    667667  m_cSPS.setSPSId( getLayerIdInVps() );
    668668  m_cSPS.setLayerId( getLayerId() );
    669 #endif
    670 #if H_MV_HLS_7_VPS_P0048_14
    671669 // Code below needs to be moved to VPS
    672670#endif
     
    832830  m_cPPS.setSPSId( getLayerIdInVps() );
    833831
    834 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
    835 #if H_MV 
    836832  m_cPPS.setPpsExtensionTypeFlag          ( PPS_EX_T_MV ,true );
    837833#if H_3D
    838834  m_cPPS.setPpsExtensionTypeFlag          ( PPS_EX_T_3D ,true );
    839 #endif
    840 #endif
    841835#endif
    842836#endif
Note: See TracChangeset for help on using the changeset viewer.