Changeset 1084 in 3DVCSoftware for trunk/source/Lib/TLibEncoder


Ignore:
Timestamp:
24 Oct 2014, 11:44:58 (10 years ago)
Author:
tech
Message:

Merged branches/HTM-12.1-dev0@1083.

Location:
trunk/source/Lib/TLibEncoder
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1066 r1084  
    4949{
    5050#if H_MV_ENC_DEC_TRAC
    51 #if H_MV_HLS10_GEN_FIX
    5251  fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() );
    5352#else
    54   fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );
    55 #endif
    56 #else
    5753  fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() );
    5854#endif
     
    6258{
    6359#if H_MV_ENC_DEC_TRAC
    64 #if H_MV_HLS10_GEN_FIX
    6560  fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() );
    66 #else
    67   fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );
    68 #endif
    6961#else
    7062  fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() );
     
    218210  if( pcPPS->getTilesEnabledFlag() )
    219211  {
    220     WRITE_UVLC( pcPPS->getNumColumnsMinus1(),                                    "num_tile_columns_minus1" );
    221     WRITE_UVLC( pcPPS->getNumRowsMinus1(),                                       "num_tile_rows_minus1" );
    222     WRITE_FLAG( pcPPS->getUniformSpacingFlag(),                                  "uniform_spacing_flag" );
    223     if( pcPPS->getUniformSpacingFlag() == 0 )
    224     {
    225       for(UInt i=0; i<pcPPS->getNumColumnsMinus1(); i++)
    226       {
    227         WRITE_UVLC( pcPPS->getColumnWidth(i)-1,                                  "column_width_minus1" );
    228       }
    229       for(UInt i=0; i<pcPPS->getNumRowsMinus1(); i++)
    230       {
    231         WRITE_UVLC( pcPPS->getRowHeight(i)-1,                                    "row_height_minus1" );
    232       }
    233     }
    234     if(pcPPS->getNumColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0)
     212    WRITE_UVLC( pcPPS->getNumTileColumnsMinus1(),                                    "num_tile_columns_minus1" );
     213    WRITE_UVLC( pcPPS->getTileNumRowsMinus1(),                                       "num_tile_rows_minus1" );
     214    WRITE_FLAG( pcPPS->getTileUniformSpacingFlag(),                                  "uniform_spacing_flag" );
     215    if( !pcPPS->getTileUniformSpacingFlag() )
     216    {
     217      for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++)
     218      {
     219        WRITE_UVLC( pcPPS->getTileColumnWidth(i)-1,                                  "column_width_minus1" );
     220      }
     221      for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++)
     222      {
     223        WRITE_UVLC( pcPPS->getTileRowHeight(i)-1,                                    "row_height_minus1" );
     224      }
     225    }
     226    if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0)
    235227    {
    236228      WRITE_FLAG( pcPPS->getLoopFilterAcrossTilesEnabledFlag()?1 : 0,          "loop_filter_across_tiles_enabled_flag");
     
    249241    }
    250242  }
    251 #if !H_MV_HLS10_PPS
    252 #if H_MV
    253   if ( pcPPS->getLayerId() > 0 )
    254   {
    255     WRITE_FLAG( pcPPS->getPpsInferScalingListFlag( ) ? 1 : 0 , "pps_infer_scaling_list_flag" );
    256   }
    257 
    258   if( pcPPS->getPpsInferScalingListFlag( ) )
    259   {
    260     WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" );
    261   }
    262   else
    263   { 
    264 #endif 
    265 #endif
    266243  WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0,                          "pps_scaling_list_data_present_flag" );
    267244  if( pcPPS->getScalingListPresentFlag() )
     
    269246    codeScalingList( m_pcSlice->getScalingList() );
    270247  }
    271 #if !H_MV_HLS10_PPS
    272 #if H_MV
    273   }
    274 #endif
    275 #endif
    276248#if PPS_FIX_DEPTH
    277249  if( pcPPS->getSPS()->getVPS()->getDepthId(pcPPS->getSPS()->getLayerId()) )
     
    313285    if ( pcPPS->getPpsMultilayerExtensionFlag() )
    314286    {
    315 #if H_MV_HLS10_PPS
    316287      codePPSMultilayerExtension( pcPPS );
    317 #else
    318       WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );
    319       WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" );
    320 #endif
    321288    }
    322289
     
    385352            }
    386353           
    387 #if H_3D_DELTA_DLT
    388354            if( pcDLT->getInterViewDltPredEnableFlag( i ) )
    389355            {
     
    395361              pcDLT->getDeltaDLT(i, piRefDLT, uiRefNum, aiIdx2DepthValue_coded, &uiNumDepthValues_coded);
    396362            }
    397 #endif
    398363
    399364            if ( NULL == (puiDltDiffValues = (UInt *)calloc(uiNumDepthValues_coded, sizeof(UInt))) )
    400365            {
     366              // This should be changed to an assertion.
    401367              exit(-1);
    402368            }
     
    477443            {
    478444              WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[i]");    // num_entry
    479 
    480 #if !H_3D_DELTA_DLT
    481               if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false )   // Single-view DLT Diff Coding
    482 #endif
    483445              {
    484446                // The condition if( uiNumDepthValues_coded > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component.
     
    566528  if( defaultDisplayWindow.getWindowEnabledFlag() )
    567529  {
    568     WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset(),      "def_disp_win_left_offset");
    569     WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset(),    "def_disp_win_right_offset");
    570     WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset(),      "def_disp_win_top_offset");
    571     WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset(),    "def_disp_win_bottom_offset");
     530    WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset()  / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc()), "def_disp_win_left_offset");
     531    WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc()), "def_disp_win_right_offset");
     532    WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset()   / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc()), "def_disp_win_top_offset");
     533    WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset()/ TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc()), "def_disp_win_bottom_offset");
    572534  }
    573535  TimingInfo *timingInfo = pcVUI->getTimingInfo();
     
    691653#endif
    692654  WRITE_CODE( pcSPS->getMaxTLayers() - 1,  3,       "sps_max_sub_layers_minus1" );
    693 #if H_MV_HLS10_MULTILAYERSPS
    694655#if H_MV
    695656  }
     
    700661  if ( !pcSPS->getMultiLayerExtSpsFlag() )
    701662  {
    702 #endif
    703663#endif
    704664
     
    710670  WRITE_UVLC( pcSPS->getSPSId (),                   "sps_seq_parameter_set_id" );
    711671#if H_MV
    712 #if H_MV_HLS10_MULTILAYERSPS
    713672    if ( pcSPS->getMultiLayerExtSpsFlag() )
    714 #else
    715   if ( pcSPS->getLayerId() > 0 )
    716 #endif
    717673  {
    718674    WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" );
     
    735691  WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (),   "pic_width_in_luma_samples" );
    736692  WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(),   "pic_height_in_luma_samples" );
    737 #if !H_MV_HLS10_MULTILAYERSPS
    738 #if H_MV
    739   }
    740 #endif
    741 #endif
    742693  Window conf = pcSPS->getConformanceWindow();
    743694
     
    750701    WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" );
    751702  }
    752 #if H_MV_HLS10_MULTILAYERSPS
    753703#if H_MV
    754704}
    755705#endif
    756 #endif
    757706
    758707#if H_MV
    759 #if H_MV_HLS10_MULTILAYERSPS
    760708  if ( !pcSPS->getMultiLayerExtSpsFlag() )
    761 #else
    762   if ( pcSPS->getLayerId() == 0 )
    763 #endif
    764709  {
    765710#endif
     
    771716  WRITE_UVLC( pcSPS->getBitsForPOC()-4,                 "log2_max_pic_order_cnt_lsb_minus4" );
    772717#if H_MV
    773 #if H_MV_HLS10_MULTILAYERSPS
    774718  if ( !pcSPS->getMultiLayerExtSpsFlag())
    775 #else
    776   if ( pcSPS->getLayerId() == 0 )
    777 #endif
    778719  { 
    779720#endif
     
    806747  {
    807748#if H_MV
    808 #if H_MV_HLS10_MULTILAYERSPS
    809749    if ( pcSPS->getMultiLayerExtSpsFlag() )
    810 #else
    811     if ( pcSPS->getLayerId() > 0 )
    812 #endif
    813750    {   
    814751      WRITE_FLAG( pcSPS->getSpsInferScalingListFlag( ) ? 1 : 0 , "sps_infer_scaling_list_flag" );
     
    917854{
    918855  WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" );
    919 #if !H_MV_HLS10_PPS
    920   WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets( ), "num_scaled_ref_layer_offsets" );
    921 
    922   for( Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets( ); i++)
    923   {   
    924     WRITE_CODE( pcSPS->getScaledRefLayerId( i ), 6, "scaled_ref_layer_id" );
    925 
    926     Int j = pcSPS->getScaledRefLayerId( i );
    927    
    928     WRITE_SVLC( pcSPS->getScaledRefLayerLeftOffset( j ), "scaled_ref_layer_left_offset" );
    929     WRITE_SVLC( pcSPS->getScaledRefLayerTopOffset( j ), "scaled_ref_layer_top_offset" );
    930     WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" );
    931     WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" );
    932     WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" );
    933   }
    934 #endif
    935 }
    936 
    937 
    938 #if H_MV_HLS10_PPS
     856}
     857
     858
    939859Void TEncCavlc::codePPSMultilayerExtension(TComPPS* pcPPS)
    940860{
     
    944864  WRITE_UVLC( 0, "num_ref_loc_offsets" );
    945865}
    946 #endif
    947866
    948867#endif
     
    951870Void TEncCavlc::codeSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
    952871{
    953 #if H_3D_QTLPC
    954 #if !MTK_I0099_VPS_EX2
    955 //GT: This has to go to VPS
    956 if( depthFlag )
    957 {
    958   WRITE_FLAG( pcSPS->getUseQTL() ? 1 : 0, "use_qtl_flag");
    959   WRITE_FLAG( pcSPS->getUsePC()  ? 1 : 0, "use_pc_flag");
    960 }
    961 #endif
    962 #endif
    963 }
    964 
    965 
     872
     873}
    966874#endif
    967875
     
    974882#if H_MV
    975883  WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" );
    976 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL
    977884  WRITE_FLAG( pcVPS->getVpsBaseLayerAvailableFlag( ) ? 1 : 0 , "vps_base_layer_available_flag" );
    978 #else // H_MV_HLS10_GEN
    979   WRITE_FLAG( 1                                             , "vps_reserved_one_bit" );
    980 #endif // H_MV_HLS10_GEN
    981885#else
    982886  WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
     
    1008912  assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
    1009913  WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6,                 "vps_max_layer_id" ); 
    1010 #if H_MV_HLS10_GEN_FIX
    1011914  WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(),  "vps_num_layer_sets_minus1" );
    1012 #else
    1013   WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(),  "vps_max_num_layer_sets_minus1" );
    1014 #endif
    1015915  for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ )
    1016916  {
     
    1089989Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS )
    1090990{
    1091 #if H_MV_HLS10_PTL
    1092991  if( pcVPS->getMaxLayersMinus1() > 0  &&  pcVPS->getVpsBaseLayerInternalFlag() )
    1093992  {
    1094993    codePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1()  );
    1095994  }
    1096 #endif
    1097995
    1098996  WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
     
    11671065  }
    11681066
    1169 #if H_MV_HLS10_ADD_LAYERSETS
    11701067  if ( pcVPS->getNumIndependentLayers() > 1 )
    11711068  {
     
    11801077 
    11811078  }
    1182 #endif
    11831079
    11841080
     
    12181114  WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" );
    12191115
    1220 #if H_MV_HLS10_PTL
    12211116  Int offsetVal =  ( pcVPS->getMaxLayersMinus1() > 0  &&  pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1;   
    12221117  for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
     
    12261121    offsetVal++;
    12271122  }
    1228 #else
    1229   for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    1230   {
    1231     WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" );
    1232     codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );
    1233   }
    1234 #endif
    1235 
    1236 #if !H_MV_HLS10_ADD_LAYERSETS
    1237   if ( pcVPS->getNumIndependentLayers() > 1 )
    1238   {
    1239    WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" );
    1240   }
    1241   for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++)
    1242   {
    1243     for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++)
    1244     {
    1245       WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j )  , "highest_layer_idx_plus1" );
    1246     }
    1247   }
    1248 #endif
     1123
    12491124
    12501125  if (pcVPS->getNumLayerSets() > 1)
     
    12581133
    12591134
    1260 #if H_MV_HLS10_PTL_FIX
    12611135  if (pcVPS->getVpsBaseLayerInternalFlag() )
    12621136  { 
    12631137    assert( pcVPS->getProfileTierLevelIdx(0,0) == pcVPS->inferProfileTierLevelIdx(0,0) );
    12641138  }
    1265 #endif
    12661139
    12671140
     
    12701143    if( i >= pcVPS->getNumLayerSets( ) )   
    12711144    {     
    1272 #if !VPS_MISC_UPDATES
    1273       WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ),      "layer_set_idx_for_ols_minus1[i]" );
    1274 #else
    12751145      WRITE_CODE( pcVPS->getLayerSetIdxForOlsMinus1( i ), pcVPS->getLayerSetIdxForOlsMinus1Len( i ) ,      "layer_set_idx_for_ols_minus1[i]" );
    1276 #endif
    12771146    }
    12781147
     
    12921161    }       
    12931162       
    1294 #if H_MV_HLS10_PTL
    12951163    for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ )
    12961164    {   
     
    12991167        WRITE_CODE( pcVPS->getProfileTierLevelIdx( i, j ), pcVPS->getProfileTierLevelIdxLen() ,"profile_tier_level_idx[ i ][ j ]" );   
    13001168      }
    1301 #if H_MV_HLS10_PTL_FIX
    13021169      if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 )
    13031170      {
    13041171        assert( pcVPS->getProfileTierLevelIdx( i , j ) == pcVPS->inferProfileTierLevelIdx( i, j ) );
    13051172      }
    1306 #endif
    1307 
    1308     }
    1309 #else
    1310     if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    1311     {     
    1312       WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" );   
    1313     }
    1314 #endif
     1173
     1174    }
    13151175    if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
    13161176    {
     
    13621222  }
    13631223
    1364 #if !H_MV_HLS10_GEN_FIX
    1365   WRITE_FLAG( 0, "vps_reserved_zero_flag" );
    1366 #endif
    13671224  codeDpbSize( pcVPS );
    13681225
     
    14411298        for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ )   
    14421299        {
    1443 #if H_MV_HLS10_DBP_SIZE
    14441300          if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) ))
    14451301          {
     
    14531309            }
    14541310          }
    1455 #else
    1456           WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );
    1457 #endif
    14581311        }
    14591312        WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" );
     
    14661319          for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ )   
    14671320          {
    1468 #if H_MV_HLS10_DBP_SIZE
    14691321            if ( vps->getNecessaryLayerFlag(i, k ) )
    14701322            {           
    1471 #endif
    14721323              assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
    1473 #if H_MV_HLS10_DBP_SIZE
    14741324            }
    1475 #endif 
    14761325          }
    14771326          assert( dpbSize->getMaxVpsNumReorderPics      ( i, j ) ==  dpbSize->getMaxVpsNumReorderPics      ( i, j - 1 ) );
     
    15081357    pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, true );
    15091358  }
    1510 #if H_MV_HLS10_GEN_VSP_CONF_WIN
    15111359  WRITE_FLAG( pcRepFormat->getConformanceWindowVpsFlag( ) ? 1 : 0 , "conformance_window_vps_flag" );
    15121360  if ( pcRepFormat->getConformanceWindowVpsFlag() )
     
    15171365    WRITE_UVLC( pcRepFormat->getConfWinVpsBottomOffset( ), "conf_win_vps_bottom_offset" );
    15181366  }
    1519 #endif
    15201367}
    15211368
     
    15421389  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    15431390  {
    1544 #if H_MV_HLS10_VPS_VUI
    15451391    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ )
    1546 #else
    1547     for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1548 #endif
    15491392    {
    15501393      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
     
    15791422  else
    15801423  {
    1581 #if H_MV_HLS10_VPS_VUI
    15821424    assert( pcVPSVUI->getVpsNumVideoSignalInfoMinus1() == pcVPS->getMaxLayersMinus1() - ( pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1)  );
    1583 #else
    1584     pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
    1585 #endif
    15861425  }
    15871426
     
    15961435  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    15971436  {
    1598 #if I0045_VPS_VUI_VST_PARAMS
    15991437    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    16001438    {
    16011439      WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );
    16021440    }
    1603 #else
    1604     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1605     {
    1606       WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );
    1607       assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );
    1608     }
    1609   }
    1610   else
    1611   {
    1612     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1613     {
    1614       assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i  ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) );
    1615     }
    1616 #endif
    16171441  }
    16181442  WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" );
     
    16311455      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ )
    16321456      { 
    1633 #if H_MV_HLS10_REF_PRED_LAYERS
    16341457        Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdRefLayer(pcVPS->getLayerIdInNuh( i ) , j  )); 
    1635 #else
    1636         Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j  )); 
    1637 #endif
    16381458        if( pcVPSVUI->getTilesInUseFlag( i )  &&  pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 
    16391459        {
     
    16531473    }
    16541474  }
    1655 #if H_MV_HLS10_VPS_VUI
    16561475  WRITE_FLAG( pcVPSVUI->getSingleLayerForNonIrapFlag( ) ? 1 : 0 , "single_layer_for_non_irap_flag" );
    16571476  WRITE_FLAG( pcVPSVUI->getHigherLayerIrapSkipFlag( ) ? 1 : 0 , "higher_layer_irap_skip_flag" );
    1658 #else
    1659   WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" );
    1660 #endif
    16611477  WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" );
    16621478
     
    16671483      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )
    16681484      {
    1669 #if H_MV_HLS10_REF_PRED_LAYERS
    16701485        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
    1671 #else
    1672         if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
    1673 #endif
    16741486        {       
    16751487          WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" );
     
    17141526  assert ( vpsVuiBspHrdP );
    17151527 
    1716 #if H_MV_HLS10_VPS_VUI_BSP
    17171528  WRITE_UVLC( vpsVuiBspHrdP->getVpsNumAddHrdParams( ), "vps_num_add_hrd_params" );
    17181529
     
    17601571  } 
    17611572
    1762 #else // H_MV_HLS10_GEN
    1763   WRITE_UVLC( vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ), "vps_num_bsp_hrd_parameters_minus1" );
    1764   for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ )
    1765   { 
    1766     if( i > 0 )
    1767     {
    1768       WRITE_FLAG( vpsVuiBspHrdP->getBspCprmsPresentFlag( i ) ? 1 : 0 , "bsp_cprms_present_flag" );
    1769     }
    1770     TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i );
    1771     codeHrdParameters( hrdParameters, vpsVuiBspHrdP->getBspCprmsPresentFlag( i ), pcVPS->getMaxSubLayersMinus1() );     
    1772   } 
    1773   for( Int h = 1; h <= pcVPS->getVpsNumLayerSetsMinus1(); h++ )
    1774   { 
    1775     WRITE_UVLC( vpsVuiBspHrdP->getNumBitstreamPartitions( h ), "num_bitstream_partitions" );
    1776     for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 
    1777     {
    1778       for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 
    1779       {
    1780         WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" );
    1781       }
    1782     }
    1783     vpsVuiBspHrdP->checkLayerInBspFlag( pcVPS, h );
    1784 
    1785     if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) )
    1786     {
    1787       WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ), "num_bsp_sched_combinations_minus1" );
    1788       for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )
    1789       {
    1790         for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )
    1791         { 
    1792           WRITE_CODE( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ),  vpsVuiBspHrdP->getBspCombHrdIdxLen(), "bsp_comb_hrd_idx" );
    1793           WRITE_UVLC( vpsVuiBspHrdP->getBspCombSchedIdx( h, i, j ), "bsp_comb_sched_idx" );
    1794 
    1795           vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );
    1796         } 
    1797       }
    1798     } 
    1799   }
    1800 #endif 
    18011573
    18021574#endif
     
    18051577Void TEncCavlc::codeVPSExtension2( TComVPS* pcVPS )
    18061578{
    1807 #if SEC_VPS_CLEANUP_I0090
    18081579  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
    1809 #else
    1810   for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
    1811 #endif
    1812   {
    1813 #if !SEC_VPS_CLEANUP_I0090
    1814     if (i!= 0)
    1815 #endif
    1816     {
    1817 #if MTK_I0099_VPS_EX2
     1580  {
     1581    {
    18181582      WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
    1819 #if SEC_HLS_CLEANUP_I0100
    18201583      WRITE_FLAG( pcVPS->getIvMvScalingFlag( i ) ? 1 : 0 ,       "iv_mv_scaling_flag[i]" );
    1821 #endif
    1822 
    1823 #endif
     1584
    18241585      if ( !( pcVPS->getDepthId( i ) == 1 ) )
    18251586      {
    18261587#if H_3D_IV_MERGE
    1827 #if !MTK_I0099_VPS_EX2
    1828         WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
    1829 #endif
    18301588#if H_3D_SPIVMP
    18311589        WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]");
     
    18471605      else
    18481606      {
    1849 #if !MTK_I0099_VPS_EX2
    1850         if(i!=1)
    1851         {
    1852           WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
    1853         }
    1854 #if H_3D_SPIVMP
    1855         if (i!=1)
    1856         {
    1857           WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]");
    1858         }
    1859 #endif
    1860 #endif
    18611607#if H_3D_IV_MERGE
    18621608        WRITE_FLAG( pcVPS->getMPIFlag( i ) ? 1 : 0 ,          "mpi_flag[i]" );
    18631609#endif
    1864 #if MTK_I0099_VPS_EX2
    18651610        WRITE_UVLC( pcVPS->getSubPUMPILog2Size(i)-3, "log2_mpi_sub_PU_size_minus3[i]");
    1866 #endif
     1611
    18671612        WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 ,          "vps_depth_modes_flag[i]" );
    1868 #if SEPARATE_FLAG_I0085
     1613#if H_3D
    18691614        WRITE_FLAG( pcVPS->getIVPFlag( i ) ? 1 : 0 ,               "IVP_flag[i]" );
    18701615#endif
    1871 #if MTK_I0099_VPS_EX2
    18721616        WRITE_FLAG( pcVPS->getLimQtPredFlag    ( i ) ? 1 : 0 ,          "lim_qt_pred_flag[i]"     );
    1873 #endif
    18741617
    18751618#if H_3D_INTER_SDC
     
    18801623  }
    18811624  WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" );
    1882 #if SEC_VPS_CLEANUP_I0090
    18831625  for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
    1884 #else
    1885   for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
    1886 #endif
    18871626  {
    18881627    WRITE_FLAG( pcVPS->getCamParPresent(viewIndex) ? 1 : 0, "cp_present_flag[i]" );
     
    19021641    }
    19031642  }
    1904 #if !MTK_I0099_VPS_EX2
    1905   WRITE_UVLC( pcVPS->getSubPUMPILog2Size( ) - 3, "log2_sub_PU_MPI_size_minus3");
    1906 #endif
    1907 #if H_3D_TMVP
    1908 #if !SEC_HLS_CLEANUP_I0100
    1909   WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 ,          "iv_mv_scaling_flag" );
    1910 #endif
    1911 #endif
    19121643}
    19131644#endif
     
    19781709      esb++;
    19791710      WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );
    1980 #if NON_REF_NAL_TYPE_DISCARDABLE
    19811711      if (pcSlice->getDiscardableFlag( ))
    19821712      {
     
    19871717          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R);
    19881718      }
    1989 #endif
    19901719    }
    19911720
     
    21481877      if (pcSlice->getSPS()->getTMVPFlagsPresent())
    21491878      {
    2150 #if I0044_SLICE_TMVP
     1879#if H_MV
    21511880        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" );
    21521881#else
     
    23082037    }
    23092038#if H_3D_IC
    2310 #if SEC_HLS_CLEANUP_I0100
    23112039    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
    2312 #else
    2313     else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth())
    2314 #endif
    23152040    {
    23162041      WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" );
     
    23212046    }
    23222047#endif
    2323 #if MTK_SINGLE_DEPTH_MODE_I0095
     2048#if H_3D_SINGLE_DEPTH
    23242049    if(pcSlice->getIsDepth())
    23252050    {
     
    23852110  }
    23862111#if H_3D
    2387 #if LGE_FCO_I0116
     2112#if H_3D_FCO
    23882113  if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && pcSlice->getIsDepth() )
    23892114#else
     
    25752300  WRITE_FLAG(ptl->getFrameOnlyConstraintFlag(), "general_frame_only_constraint_flag");
    25762301 
    2577 #if H_MV_HLS10_PTL
    2578 #if H_MV_HLS10_PTL_INFER_FIX
     2302#if H_MV
    25792303  if( ptl->getV2ConstraintsPresentFlag() )
    2580 #else
    2581   if( ptl->getProfileIdc( ) ==  4 || ptl->getProfileCompatibilityFlag( 4 )  ||
    2582     ptl->getProfileIdc( ) ==  5 || ptl->getProfileCompatibilityFlag( 5 )  ||
    2583     ptl->getProfileIdc( ) ==  6 || ptl->getProfileCompatibilityFlag( 6 )  ||
    2584     ptl->getProfileIdc( ) ==  7 || ptl->getProfileCompatibilityFlag( 7 ) )
    2585 #endif
    25862304  {
    25872305    WRITE_FLAG( ptl->getMax12bitConstraintFlag( ) ? 1 : 0 , "max_12bit_constraint_flag" );
     
    26042322    WRITE_CODE( 0, 11, "XXX_reserved_zero_43bits[32..42]");
    26052323  }
    2606 #if H_MV_HLS10_PTL_INFER_FIX
    26072324    if( ptl->getInbldPresentFlag() )
    2608 #else
    2609   if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 )  ||
    2610     ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 )  ||
    2611     ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 )  ||
    2612     ptl->getProfileCompatibilityFlag( 5 ) )
    2613 #endif
    26142325  {
    26152326    WRITE_FLAG( ptl->getInbldFlag( ) ? 1 : 0 , "inbld_flag" );
     
    27622473  assert(0);
    27632474}
    2764 #if MTK_SINGLE_DEPTH_MODE_I0095
     2475#if H_3D_SINGLE_DEPTH
    27652476Void TEncCavlc::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
    27662477{
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r1066 r1084  
    107107  Void  codePPS                 ( TComPPS* pcPPS );
    108108
    109 #if H_MV_HLS10_PPS
    110109#if H_MV
    111110  Void codePPSMultilayerExtension( TComPPS* pcPPS );
    112 #endif
    113111#endif
    114112
     
    129127  Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx );
    130128  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    131 #if MTK_SINGLE_DEPTH_MODE_I0095
     129#if H_3D_SINGLE_DEPTH
    132130  Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx );
    133131#endif
  • trunk/source/Lib/TLibEncoder/TEncCfg.h

    r1039 r1084  
    124124  Int       m_iSourceWidth;
    125125  Int       m_iSourceHeight;
    126   Int       m_conformanceMode;
    127126  Window    m_conformanceWindow;
    128127  Int       m_framesToBeEncoded;
     
    229228  Bool      m_bPCMFilterDisableFlag;
    230229  Bool      m_loopFilterAcrossTilesEnabledFlag;
    231   Int       m_iUniformSpacingIdr;
     230  Bool      m_tileUniformSpacingFlag;
    232231  Int       m_iNumColumnsMinus1;
    233   UInt*     m_puiColumnWidth;
    234232  Int       m_iNumRowsMinus1;
    235   UInt*     m_puiRowHeight;
     233  std::vector<Int> m_tileColumnWidth;
     234  std::vector<Int> m_tileRowHeight;
    236235
    237236  Int       m_iWaveFrontSynchro;
     
    414413#if H_3D_DIM
    415414  Bool      m_useDMM;
    416 #if SEPARATE_FLAG_I0085
    417415  Bool      m_useIVP;
    418 #endif
    419416  Bool      m_useSDC;
    420417  Bool      m_useDLT;
    421418#endif
    422 #if MTK_SINGLE_DEPTH_MODE_I0095
     419#if H_3D_SINGLE_DEPTH
    423420  Bool      m_useSingleDepthMode;
    424421#endif
     
    426423  Bool      m_useMPI;
    427424#endif
    428 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX
    429425#if H_3D_QTLPC
    430426  Bool      m_bUseQTL;
    431 #if !MTK_I0099_VPS_EX2
    432   Bool      m_bUsePC;
    433 #endif
    434 #endif
    435427#endif
    436428#endif
    437429public:
    438430  TEncCfg()
    439   : m_puiColumnWidth()
    440   , m_puiRowHeight()
     431  : m_tileColumnWidth()
     432  , m_tileRowHeight()
    441433#if H_MV
    442434  , m_layerId(-1)
     
    452444
    453445  virtual ~TEncCfg()
    454   {
    455     delete[] m_puiColumnWidth;
    456     delete[] m_puiRowHeight;
    457   }
     446  {}
    458447 
    459448  Void setProfile(Profile::Name profile) { m_profile = profile; }
     
    678667  Void  setLFCrossTileBoundaryFlag               ( Bool   val  )       { m_loopFilterAcrossTilesEnabledFlag = val; }
    679668  Bool  getLFCrossTileBoundaryFlag               ()                    { return m_loopFilterAcrossTilesEnabledFlag;   }
    680   Void  setUniformSpacingIdr           ( Int i )           { m_iUniformSpacingIdr = i; }
    681   Int   getUniformSpacingIdr           ()                  { return m_iUniformSpacingIdr; }
     669  Void  setTileUniformSpacingFlag      ( Bool b )          { m_tileUniformSpacingFlag = b; }
     670  Bool  getTileUniformSpacingFlag      ()                  { return m_tileUniformSpacingFlag; }
    682671  Void  setNumColumnsMinus1            ( Int i )           { m_iNumColumnsMinus1 = i; }
    683672  Int   getNumColumnsMinus1            ()                  { return m_iNumColumnsMinus1; }
    684   Void  setColumnWidth ( UInt* columnWidth )
    685   {
    686     if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 )
    687     {
    688       Int  m_iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth;
    689       m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ];
    690 
    691       for(Int i=0; i<m_iNumColumnsMinus1; i++)
    692       {
    693         m_puiColumnWidth[i] = columnWidth[i];
    694         printf("col: m_iWidthInCU= %4d i=%4d width= %4d\n",m_iWidthInCU,i,m_puiColumnWidth[i]); //AFU
    695       }
    696     }
    697   }
    698   UInt  getColumnWidth                 ( UInt columnidx )  { return *( m_puiColumnWidth + columnidx ); }
     673  Void  setColumnWidth ( const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; }
     674  UInt  getColumnWidth                 ( UInt columnIdx )      { return m_tileColumnWidth[columnIdx]; }
    699675  Void  setNumRowsMinus1               ( Int i )           { m_iNumRowsMinus1 = i; }
    700676  Int   getNumRowsMinus1               ()                  { return m_iNumRowsMinus1; }
    701   Void  setRowHeight (UInt* rowHeight)
    702   {
    703     if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 )
    704     {
    705       Int  m_iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight;
    706       m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ];
    707 
    708       for(Int i=0; i<m_iNumRowsMinus1; i++)
    709       {
    710         m_puiRowHeight[i] = rowHeight[i];
    711         printf("row: m_iHeightInCU=%4d i=%4d height=%4d\n",m_iHeightInCU,i,m_puiRowHeight[i]); //AFU
    712       }
    713     }
    714   }
    715   UInt  getRowHeight                   ( UInt rowIdx )     { return *( m_puiRowHeight + rowIdx ); }
     677  Void  setRowHeight ( const std::vector<Int>& rowHeight)      { m_tileRowHeight = rowHeight; }
     678  UInt  getRowHeight                   ( UInt rowIdx )         { return m_tileRowHeight[rowIdx]; }
    716679  Void  xCheckGSParameters();
    717680  Void  setWaveFrontSynchro(Int iWaveFrontSynchro)       { m_iWaveFrontSynchro = iWaveFrontSynchro; }
     
    1013976  Bool      getUseDMM                       ()        { return m_useDMM; }
    1014977  Void      setUseDMM                       ( Bool b) { m_useDMM = b;    }
    1015 #if SEPARATE_FLAG_I0085
    1016978  Bool      getUseIVP                       ()        { return m_useIVP; }
    1017979  Void      setUseIVP                       ( Bool b) { m_useIVP = b;    }
    1018 #endif
    1019980  Bool      getUseSDC                       ()        { return m_useSDC; }
    1020981  Void      setUseSDC                       ( Bool b) { m_useSDC = b;    }
     
    1022983  Void      setUseDLT                       ( Bool b) { m_useDLT = b;    }
    1023984#endif
    1024 #if MTK_SINGLE_DEPTH_MODE_I0095
     985#if H_3D_SINGLE_DEPTH
    1025986  Void       setUseSingleDepthMode          ( Bool bVal )    { m_useSingleDepthMode = bVal; }
    1026987  Bool       getUseSingleDepthMode          ()               { return m_useSingleDepthMode; }
    1027988#endif
    1028 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX
    1029989#if H_3D_QTLPC
    1030990  Void      setUseQTL                       ( Bool b ) { m_bUseQTL = b;    }
    1031991  Bool      getUseQTL                       ()         { return m_bUseQTL; }
    1032 #if !MTK_I0099_VPS_EX2
    1033   Void      setUsePC                        ( Bool b ) { m_bUsePC  = b;    }
    1034   Bool      getUsePC                        ()         { return m_bUsePC;  }
    1035 #endif
    1036 #endif
    1037992#endif
    1038993#if H_3D_IV_MERGE
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r1066 r1084  
    409409
    410410#if H_3D_QTLPC
    411 #if MTK_I0099_VPS_EX2
    412411  TComVPS *vps            = pcPic->getSlice(0)->getVPS();
    413412  Bool  bLimQtPredFalg    = vps->getLimQtPredFlag(pcPic->getSlice(0)->getLayerId());
    414 #else
    415   TComSPS *sps            = pcPic->getSlice(0)->getSPS();
    416 #endif
    417413  TComPic *pcTexture      = rpcBestCU->getSlice()->getTexturePic();
    418414
     
    535531#if H_3D_QTLPC
    536532      //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
    537 
    538 #if MTK_I0099_VPS_EX2
    539 #if MTK_I0099_FIX
    540 #if LGE_FCO_I0116
     533#if H_3D_FCO
    541534      if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ) && pcTexture->getReconMark())
    542535#else
    543536      if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ))
    544 #endif
    545 #else
    546       if(depthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFalg)
    547 #endif
    548 #else
    549       if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL())
    550537#endif
    551538      {
     
    702689
    703690#if H_3D_QTLPC     
    704 #if MTK_I0099_VPS_EX2
    705 #if MTK_I0099_FIX
    706691      if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ))
    707 #else
    708       if(depthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFalg)
    709 #endif
    710 #else
    711       if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL())
    712 #endif
    713692      {
    714693        bTrySplitDQP = bTrySplit;
     
    734713    }
    735714#endif
    736 #if MTK_SINGLE_DEPTH_MODE_I0095
     715#if H_3D_SINGLE_DEPTH
    737716    rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
    738717    if(rpcBestCU->getSlice()->getApplySingleDepthMode())
     
    10571036              rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0     
    10581037#if H_3D_DIM_ENC
    1059 #if HHI_DMM4_ENC_I0066
    10601038              || rpcBestCU->getSlice()->getIsDepth()
    1061 #else
    1062             || ( rpcBestCU->getSlice()->getIsDepth() && rpcBestCU->getSlice()->isIRAP() )
    1063 #endif
    10641039#endif
    10651040            ) // avoid very complex intra if it is unlikely
    10661041          {
    1067 #if HHI_DMM4_ENC_I0066
     1042#if H_3D_DIM
    10681043            Bool bOnlyIVP = false;
    10691044            if( rpcBestCU->getSlice()->getIsDepth() && !(rpcBestCU->getSlice()->isIRAP()) &&
     
    10981073                if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
    10991074                {
    1100 #if HHI_DMM4_ENC_I0066
     1075#if H_3D_DIM
    11011076                  xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN, bOnlyIVP );
    11021077#else
     
    15901565    return;
    15911566  }
    1592 #if MTK_SINGLE_DEPTH_MODE_I0095
     1567#if H_3D_SINGLE_DEPTH
    15931568  m_pcEntropyCoder->encodeSingleDepthMode( pcCU, uiAbsPartIdx );
    15941569  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
     
    16271602  m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP );
    16281603  setdQPFlag( bCodeDQP );
    1629 #if MTK_SINGLE_DEPTH_MODE_I0095
     1604#if H_3D_SINGLE_DEPTH
    16301605  }
    16311606#endif
     
    18631838    Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    18641839    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    1865 #if !FIX_TICKET_79
    1866     InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    1867 #endif
    18681840#if H_3D_SPIVMP
    18691841    Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
     
    18781850    rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    18791851    rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
    1880 #if !FIX_TICKET_79
    1881       , inheritedVSPDisInfo
    1882 #endif
    18831852#if H_3D_SPIVMP
    18841853      , pcMvFieldSP, puhInterDirSP
     
    18951864
    18961865#else
    1897 #if FIX_TICKET_79
    18981866    rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand );
    1899 #else
    1900     rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );
    1901 #endif
    19021867#endif
    19031868
     
    19421907#if H_3D_VSP
    19431908          rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
    1944 #if !FIX_TICKET_79
    1945           rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );
    1946 #endif
    19471909#endif
    19481910#if H_3D_DDD
     
    20432005
    20442006          rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
    2045 #if MTK_SINGLE_DEPTH_MODE_I0095
     2007#if H_3D_SINGLE_DEPTH
    20462008          rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
    20472009#endif
     
    20612023          if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual )
    20622024          {
    2063 #if FAST_SDC_OFFSET_DECISION_I0084
    20642025            Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
    20652026            for( Int uiOffest = 1 ; uiOffest <= 5 ; uiOffest++ )
    2066 #else
    2067             for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )
    2068 #endif
    20692027            {
    2070 #if FAST_SDC_OFFSET_DECISION_I0084
    20712028              if( uiOffest > 3)
    20722029              {
     
    20842041                }
    20852042              }
    2086 #endif
    20872043              if( rpcTempCU != rpcTempCUPre )
    20882044              {
     
    20912047              }
    20922048              rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
    2093 #if MTK_SINGLE_DEPTH_MODE_I0095
     2049#if H_3D_SINGLE_DEPTH
    20942050              rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
    20952051#endif
     
    21062062              }
    21072063#endif
    2108 #if FAST_SDC_OFFSET_DECISION_I0084
    21092064              Int iSdcOffset = 0;
    21102065              if(uiOffest % 2 == 0)
     
    21272082                dOffsetCost [uiOffest -1] = rpcTempCU->getTotalCost();
    21282083              }
    2129 #else
    2130               m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU,
    2131                 m_ppcOrigYuv[uhDepth],
    2132                 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],
    2133                 m_ppcResiYuvTemp[uhDepth],
    2134                 m_ppcRecoYuvTemp[uhDepth],
    2135                 uiOffest,
    2136                 uhDepth );
    2137 #endif
    21382084
    21392085              xCheckDQP( rpcTempCU );
     
    22532199 
    22542200  rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
    2255 #if MTK_SINGLE_DEPTH_MODE_I0095
     2201#if H_3D_SINGLE_DEPTH
    22562202  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
    22572203#endif
     
    23262272  }
    23272273#endif
    2328 
    23292274#if H_3D_VSO // M4
    23302275  if( m_pcRdCost->getUseLambdaScaleVSO() )
     
    23322277  else
    23332278#endif
    2334 
    23352279  rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    23362280#if H_3D_INTER_SDC
     
    23422286  if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && ePartSize == SIZE_2Nx2N)
    23432287  {
    2344 #if FAST_SDC_OFFSET_DECISION_I0084
    23452288    Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
    23462289    for( Int uiOffest = 1 ; uiOffest <= 5 ; uiOffest++ )
    2347 #else
    2348     for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )
    2349 #endif
    2350     {
    2351 #if FAST_SDC_OFFSET_DECISION_I0084
     2290    {
    23522291      if( uiOffest > 3)
    23532292      {
     
    23652304        }
    23662305      }
    2367 #endif
     2306
    23682307      if( rpcTempCU != rpcTempCUPre )
    23692308      {
     
    23732312      }
    23742313      rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
    2375 #if MTK_SINGLE_DEPTH_MODE_I0095
     2314#if H_3D_SINGLE_DEPTH
    23762315      rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
    23772316#endif
     
    23892328#endif
    23902329
    2391 #if FAST_SDC_OFFSET_DECISION_I0084
    23922330      Int iSdcOffset = 0;
    23932331      if(uiOffest % 2 == 0)
     
    24102348        dOffsetCost [uiOffest -1] = rpcTempCU->getTotalCost();
    24112349      }
    2412 #else
    2413       m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU,
    2414         m_ppcOrigYuv[uhDepth],
    2415         ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],
    2416         m_ppcResiYuvTemp[uhDepth],
    2417         m_ppcRecoYuvTemp[uhDepth],
    2418         uiOffest,
    2419         uhDepth );
    2420 #endif
    24212350
    24222351      xCheckDQP( rpcTempCU );
     
    24932422  }
    24942423}
    2495 #if MTK_SINGLE_DEPTH_MODE_I0095
     2424#if H_3D_SINGLE_DEPTH
    24962425Void TEncCu::xCheckRDCostSingleDepth( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
    24972426{
     
    25602489}
    25612490#endif
     2491
    25622492Void TEncCu::xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG )
    25632493{
     
    25812511  AOF( uiWidth == uiHeight );
    25822512 
    2583 #if SEC_DBBP_DISALLOW_8x8_I0078
     2513#if H_3D_DBBP
     2514  // Is this correct here, was under the macro SEC_DBBP_DISALLOW_8x8_I0078, however the function is related to Single Depth Mode
    25842515  if(uiWidth <= 8)
    25852516  {
     
    25922523  // fetch virtual depth block
    25932524  UInt uiDepthStride = 0;
    2594 #if LGE_FCO_I0116
     2525#if H_3D_FCO
    25952526  Pel* pDepthPels = rpcTempCU->getVirtualDepthBlock(rpcTempCU->getZorderIdxInCU(), uiWidth, uiHeight, uiDepthStride);
    25962527#else
     
    26882619 
    26892620  // reconstruct final prediction signal by combining both segments
    2690 #if SHARP_DBBP_SIMPLE_FLTER_I0109
    26912621  m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize);
    2692 #else
    2693   m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight);
    2694 #endif
    2695  
    26962622  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false );
    26972623 
     
    27002626}
    27012627#endif
    2702 
    2703 #if HHI_DMM4_ENC_I0066
     2628#if H_3D_DIM
    27042629Void TEncCu::xCheckRDCostIntra( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize, Bool bOnlyIVP )
    27052630#else
     
    27072632#endif
    27082633{
    2709   UInt uiDepth = rpcTempCU->getDepth( 0 );
    2710  
     2634  UInt uiDepth = rpcTempCU->getDepth( 0 ); 
    27112635#if H_3D_VSO // M5
    27122636  if( m_pcRdCost->getUseRenModel() )
     
    27212645
    27222646  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
    2723 #if MTK_SINGLE_DEPTH_MODE_I0095
     2647#if H_3D_SINGLE_DEPTH
    27242648  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
    27252649#endif
     
    27332657    m_pcPredSearch->preestChromaPredMode( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth] );
    27342658  }
    2735 #if HHI_DMM4_ENC_I0066
     2659#if H_3D_DIM
    27362660  m_pcPredSearch  ->estIntraPredQT      ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, bSeparateLumaChroma, bOnlyIVP );
    27372661#else
     
    27512675  }
    27522676  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
    2753 #if MTK_SINGLE_DEPTH_MODE_I0095
     2677#if H_3D_SINGLE_DEPTH
    27542678  m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
    27552679  if(!rpcTempCU->getSingleDepthFlag(0))
     
    27682692  m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP );
    27692693  setdQPFlag( bCodeDQP );
    2770 #if MTK_SINGLE_DEPTH_MODE_I0095
     2694#if H_3D_SINGLE_DEPTH
    27712695  }
    27722696#endif       
     
    27982722
    27992723  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
    2800 #if MTK_SINGLE_DEPTH_MODE_I0095
     2724#if H_3D_SINGLE_DEPTH
    28012725  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
    28022726#endif
     
    28172741  }
    28182742  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
    2819 #if MTK_SINGLE_DEPTH_MODE_I0095
     2743#if H_3D_SINGLE_DEPTH
    28202744  m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
    28212745#endif
  • trunk/source/Lib/TLibEncoder/TEncCu.h

    r1039 r1084  
    159159  Void  xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false );
    160160#endif
    161 #if MTK_SINGLE_DEPTH_MODE_I0095
     161#if H_3D_SINGLE_DEPTH
    162162  Void  xCheckRDCostSingleDepth   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
    163163#endif
    164 #if HHI_DMM4_ENC_I0066
     164#if H_3D_DIM
    165165  Void  xCheckRDCostIntra   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bOnlyIVP );
    166166#else
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1066 r1084  
    119119  m_pcEntropyCoderIf->codeSkipFlag( pcCU, uiAbsPartIdx );
    120120}
    121 #if MTK_SINGLE_DEPTH_MODE_I0095
     121#if H_3D_SINGLE_DEPTH
    122122Void TEncEntropy::encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    123123{
     
    185185  else
    186186  {
    187 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
    188187    Int ICEnableCandidate = pcCU->getSlice()->getICEnableCandidate(pcCU->getSlice()->getDepth());
    189188    Int ICEnableNum = pcCU->getSlice()->getICEnableNum(pcCU->getSlice()->getDepth());
     
    195194    pcCU->getSlice()->setICEnableCandidate(pcCU->getSlice()->getDepth(), ICEnableCandidate);
    196195    pcCU->getSlice()->setICEnableNum(pcCU->getSlice()->getDepth(), ICEnableNum);
    197 #else
    198     g_aICEnableCANDIDATE[pcCU->getSlice()->getDepth()]++;
    199     if(pcCU->getICFlag(uiAbsPartIdx))
    200     {
    201       g_aICEnableNUM[pcCU->getSlice()->getDepth()]++;
    202     }
    203 #endif
    204196  }
    205197  if( pcCU->isICFlagRequired( uiAbsPartIdx ) )
     
    273265  }
    274266 
     267  m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );
     268 
    275269#if H_3D_DBBP
    276 #if! SEC_DBBP_EXPLICIT_SIG_I0077
    277   PartSize eVirtualPartSize = pcCU->getPartitionSize(uiAbsPartIdx);
    278   if( pcCU->getDBBPFlag(uiAbsPartIdx) )
    279   {
    280     AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
    281    
    282     // temporarily change partition size for DBBP blocks
    283     pcCU->setPartSizeSubParts(RWTH_DBBP_PACK_MODE, uiAbsPartIdx, uiDepth);
    284   }
    285 #endif
    286 #endif
    287  
    288   m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );
    289  
    290 #if H_3D_DBBP
    291 #if SEC_DBBP_EXPLICIT_SIG_I0077
    292 #if SEC_DBBP_DISALLOW_8x8_I0078
    293270  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
    294 #else
    295   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )
    296 #endif
    297 #else
    298 #if SEC_DBBP_DISALLOW_8x8_I0078
    299   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )
    300 #else
    301   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
    302 #endif
    303 #endif
    304271  {
    305272    encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD);
    306 #if !SEC_DBBP_EXPLICIT_SIG_I0077
    307     if( pcCU->getDBBPFlag(uiAbsPartIdx) )
    308     {
    309       // restore virtual partition size for DBBP blocks
    310       pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);
    311     }
    312 #endif
    313273  }
    314274#endif
  • trunk/source/Lib/TLibEncoder/TEncEntropy.h

    r1039 r1084  
    8686  virtual Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8787  virtual Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    88 #if MTK_SINGLE_DEPTH_MODE_I0095
     88#if H_3D_SINGLE_DEPTH
    8989  virtual Void codeSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9090#endif
     
    174174  Void encodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    175175  Void encodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    176 #if MTK_SINGLE_DEPTH_MODE_I0095
     176#if H_3D_SINGLE_DEPTH
    177177  Void encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false );
    178178#endif
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r1066 r1084  
    160160#endif
    161161#endif
    162 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
    163   m_aICEnableCandidate           = pcTEncTop->getICEnableCandidate();
    164   m_aICEnableNum           = pcTEncTop->getICEnableNum();
     162#if H_3D_IC
     163  m_aICEnableCandidate   = pcTEncTop->getICEnableCandidate();
     164  m_aICEnableNum         = pcTEncTop->getICEnableNum();
    165165#endif
    166166#if KWU_FIX_URQ
     
    395395Void TEncGOP::initGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP)
    396396{
     397#if H_MV_ALIGN_HM_15
     398  xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut, false );
     399#else
    397400  xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut );
     401#endif
    398402  m_iNumPicCoded = 0;
    399403}
     
    937941    pcSlice->setRefPicList ( rcListPic );
    938942#endif
    939 #if MTK_SINGLE_DEPTH_MODE_I0095
     943#if H_3D_SINGLE_DEPTH
    940944    TEncTop* pcEncTop = (TEncTop*) m_pcCfg;
    941945    bool enableSingleDepthMode=false;
     
    971975#endif   
    972976#endif
    973 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     977#if H_3D_IC
    974978    pcSlice->setICEnableCandidate( m_aICEnableCandidate );         
    975979    pcSlice->setICEnableNum( m_aICEnableNum );         
     
    12281232    UInt uiRealEndAddress = uiExternalAddress*pcPic->getNumPartInCU()+uiInternalAddress;
    12291233
    1230     UInt uiCummulativeTileWidth;
    1231     UInt uiCummulativeTileHeight;
    12321234    Int  p, j;
    12331235    UInt uiEncCUAddr;
    12341236
    1235     //set NumColumnsMinus1 and NumRowsMinus1
    1236     pcPic->getPicSym()->setNumColumnsMinus1( pcSlice->getPPS()->getNumColumnsMinus1() );
    1237     pcPic->getPicSym()->setNumRowsMinus1( pcSlice->getPPS()->getNumRowsMinus1() );
    1238 
    1239     //create the TComTileArray
    1240     pcPic->getPicSym()->xCreateTComTileArray();
    1241 
    1242     if( pcSlice->getPPS()->getUniformSpacingFlag() == 1 )
    1243     {
    1244       //set the width for each tile
    1245       for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++)
    1246       {
    1247         for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1()+1; p++)
    1248         {
    1249           pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )->
    1250             setTileWidth( (p+1)*pcPic->getPicSym()->getFrameWidthInCU()/(pcPic->getPicSym()->getNumColumnsMinus1()+1)
    1251             - (p*pcPic->getPicSym()->getFrameWidthInCU())/(pcPic->getPicSym()->getNumColumnsMinus1()+1) );
    1252         }
    1253       }
    1254 
    1255       //set the height for each tile
    1256       for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++)
    1257       {
    1258         for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1()+1; p++)
    1259         {
    1260           pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )->
    1261             setTileHeight( (p+1)*pcPic->getPicSym()->getFrameHeightInCU()/(pcPic->getPicSym()->getNumRowsMinus1()+1)
    1262             - (p*pcPic->getPicSym()->getFrameHeightInCU())/(pcPic->getPicSym()->getNumRowsMinus1()+1) );   
    1263         }
    1264       }
    1265     }
    1266     else
    1267     {
    1268       //set the width for each tile
    1269       for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++)
    1270       {
    1271         uiCummulativeTileWidth = 0;
    1272         for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1(); p++)
    1273         {
    1274           pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )->setTileWidth( pcSlice->getPPS()->getColumnWidth(p) );
    1275           uiCummulativeTileWidth += pcSlice->getPPS()->getColumnWidth(p);
    1276         }
    1277         pcPic->getPicSym()->getTComTile(j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p)->setTileWidth( pcPic->getPicSym()->getFrameWidthInCU()-uiCummulativeTileWidth );
    1278       }
    1279 
    1280       //set the height for each tile
    1281       for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++)
    1282       {
    1283         uiCummulativeTileHeight = 0;
    1284         for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1(); p++)
    1285         {
    1286           pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )->setTileHeight( pcSlice->getPPS()->getRowHeight(p) );
    1287           uiCummulativeTileHeight += pcSlice->getPPS()->getRowHeight(p);
    1288         }
    1289         pcPic->getPicSym()->getTComTile(p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcPic->getPicSym()->getFrameHeightInCU()-uiCummulativeTileHeight );
    1290       }
    1291     }
    1292     //intialize each tile of the current picture
    1293     pcPic->getPicSym()->xInitTiles();
     1237    pcPic->getPicSym()->initTiles(pcSlice->getPPS());
    12941238
    12951239    // Allocate some coders, now we know how many tiles there are.
     
    18141758
    18151759#if SETTING_NO_OUT_PIC_PRIOR
     1760          pcSlice->setNoRaslOutputFlag(false);
    18161761          if (pcSlice->isIRAP())
    18171762          {
     
    18211766            }
    18221767            //the inference for NoOutputPriorPicsFlag
     1768            // KJS: This cannot happen at the encoder
    18231769            if (!m_bFirst && pcSlice->isIRAP() && pcSlice->getNoRaslOutputFlag())
    18241770            {
     
    24922438  assert (m_iGopSize > 0);
    24932439 
    2494   return;
    2495 }
    2496 
    2497 Void TEncGOP::xInitGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut )
    2498 {
    2499   assert( iNumPicRcvd > 0 );
    2500   //  Exception for the first frame
    2501   if ( iPOCLast == 0 )
    2502   {
    2503     m_iGopSize    = 1;
    2504   }
    2505   else
    2506     m_iGopSize    = m_pcCfg->getGOPSize();
    2507  
    2508   assert (m_iGopSize > 0);
    2509 
    25102440  return;
    25112441}
  • trunk/source/Lib/TLibEncoder/TEncGOP.h

    r1066 r1084  
    116116#endif
    117117#endif
    118 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
    119   Int *m_aICEnableCandidate;
    120   Int *m_aICEnableNum;
     118#if H_3D_IC
     119  Int*                    m_aICEnableCandidate;
     120  Int*                    m_aICEnableNum;
    121121#endif
    122122  //--Adaptive Loop filter
     
    200200
    201201  Void xInitGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, bool isField );
    202   Void  xInitGOP          ( Int iPOC, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut );
    203202  Void  xGetBuffer        ( TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Int iNumPicRcvd, Int iTimeOffset, TComPic*& rpcPic, TComPicYuv*& rpcPicYuvRecOut, Int pocCurr, bool isField );
    204203 
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r1066 r1084  
    5858, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    5959, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    60 #if MTK_SINGLE_DEPTH_MODE_I0095
     60#if H_3D_SINGLE_DEPTH
    6161, m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    6262, m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     
    134134 
    135135  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
    136 #if MTK_SINGLE_DEPTH_MODE_I0095
     136#if H_3D_SINGLE_DEPTH
    137137  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    138138  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     
    214214      curCost  = m_cCUSplitFlagSCModel.calcCost       ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    215215      curCost += m_cCUSkipFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG );
    216 #if MTK_SINGLE_DEPTH_MODE_I0095
     216#if H_3D_SINGLE_DEPTH
    217217      curCost += m_cCUSingleDepthFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    218218      curCost += m_cSingleDepthValueSCModel.calcCost         ( curSliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     
    255255      curCost += m_CUTransquantBypassFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG );
    256256#if H_3D_DIM
    257 #if SEPARATE_FLAG_I0085
    258257    if( m_pcSlice->getVpsDepthModesFlag() || m_pcSlice->getIVPFlag() )
    259 #else
    260     if( m_pcSlice->getVpsDepthModesFlag() )
    261 #endif
    262258    {
    263259      curCost += m_cDepthIntraModeSCModel.calcCost    ( curSliceType, qp, (UChar*)INIT_DEPTH_INTRA_MODE );
     
    291287 
    292288  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
    293 #if MTK_SINGLE_DEPTH_MODE_I0095
     289#if H_3D_SINGLE_DEPTH
    294290  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    295291  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     
    454450  m_pcBinIf->encodeBinsEP( bins, numBins );
    455451}
    456 #if MTK_SINGLE_DEPTH_MODE_I0095
     452#if H_3D_SINGLE_DEPTH
    457453Void TEncSbac::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
    458454{
     
    462458  {
    463459    UInt uiUnaryIdx = (UInt) pcCU->getSingleDepthValue(uiAbsPartIdx);
    464     UInt uiNumCand = MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE;
     460    UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE;
    465461    if ( uiNumCand > 1 )
    466462    {
     
    563559
    564560#endif
    565 
    566 #if !FIX_TICKET_76
    567 #if H_3D_DIM_SDC
    568 Void TEncSbac::xCodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
    569 {
    570   assert( pcCU->getSlice()->getIsDepth() );
    571   assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
    572   assert( pcCU->getSDCFlag(uiAbsPartIdx) );
    573   assert( uiSegment < 2 );
    574  
    575   Pel segmentDCOffset = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);
    576  
    577   UInt uiResidual = segmentDCOffset == 0 ? 0 : 1;
    578   UInt uiSign     = segmentDCOffset < 0 ? 1 : 0;
    579   UInt uiAbsIdx   = abs(segmentDCOffset);
    580 
    581 #if H_3D_DIM_DLT
    582   UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );
    583 #else
    584   UInt uiMaxResidualBits = g_bitDepthY;
    585 #endif
    586   assert( uiMaxResidualBits <= g_bitDepthY );
    587  
    588   // residual flag
    589   m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );
    590 #if H_MV_ENC_DEC_TRAC
    591   DTRACE_CU("sdc_residual_flag[i]", uiResidual)
    592 #endif 
    593  
    594   if (uiResidual)
    595   {
    596     // encode sign bit of residual
    597     m_pcBinIf->encodeBinEP( uiSign );
    598 #if H_MV_ENC_DEC_TRAC
    599     DTRACE_CU("sdc_residual_sign_flag[i]", uiSign)
    600 #endif
    601 #if H_3D_DIM_DLT   
    602     UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );
    603 #else
    604     UInt uiNumDepthValues = ((1 << g_bitDepthY)-1);
    605 #endif
    606 
    607     assert(uiAbsIdx <= uiNumDepthValues);
    608    
    609     // encode residual magnitude
    610     uiAbsIdx -= 1;
    611 
    612 #if H_MV_ENC_DEC_TRAC
    613     DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx)
    614 #endif
    615 
    616     // prefix part
    617     if ( uiAbsIdx == 0 )
    618     {
    619       m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) );
    620     }
    621     else
    622     {
    623       UInt l = uiAbsIdx;
    624       UInt k = 0;
    625       UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2);
    626       while ( l > 0 && k < uiPrefixThreshold )
    627       {
    628         m_pcBinIf->encodeBin( 1, m_cSDCResidualSCModel.get(0, 0, 0) );
    629         l--;
    630         k++;
    631       }
    632       if ( uiAbsIdx < uiPrefixThreshold )
    633       {
    634         m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) );
    635       }     
    636       else
    637       { // suffix part
    638         uiAbsIdx -= uiPrefixThreshold;
    639         UInt uiSuffixLength = numBitsForValue(uiNumDepthValues - uiPrefixThreshold);
    640         UInt uiBitInfo = 0;
    641         for ( Int i = 0; i < uiSuffixLength; i++)
    642         {
    643           uiBitInfo = ( uiAbsIdx & ( 1 << i ) ) >> i;
    644           m_pcBinIf->encodeBinEP( uiBitInfo);
    645         }
    646       }
    647     }
    648    
    649   }
    650 }
    651 #endif
    652 #endif
    653561#endif
    654562
     
    717625  PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
    718626#if H_3D_QTLPC
    719 #if MTK_I0099_VPS_EX2
    720627  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
    721628  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
    722 #else
    723   TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
    724 #endif
    725629  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
    726630  Bool bDepthMapDetect   = (pcTexture != NULL);
     
    731635  Bool depthDependent = false;
    732636  UInt uiTexturePart = eSize;
    733 #if MTK_I0099_VPS_EX2
    734 #if LGE_FCO_I0116
     637
     638#if H_3D_FCO
    735639  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag && pcTexture->getReconMark())
    736640#else
    737641  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag )
    738 #endif
    739 #else
    740   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC() )
    741642#endif
    742643  {
     
    1097998  Bool bCodeSplitFlag    = true;
    1098999
    1099 #if MTK_I0099_VPS_EX2
    11001000  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
    11011001  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
    1102 #else
    1103   TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
    1104 #endif
    11051002  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
    11061003  Bool bDepthMapDetect   = (pcTexture != NULL);
     
    11091006  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);
    11101007
    1111 #if MTK_I0099_VPS_EX2
    1112 #if LGE_FCO_I0116
     1008#if H_3D_FCO
    11131009  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag && pcTexture->getReconMark() )
    11141010#else
    11151011  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag  )
    1116 #endif
    1117 #else
    1118   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC())
    11191012#endif
    11201013  {
     
    11671060    dir[j] = pcCU->getLumaIntraDir( absPartIdx+partOffset*j );
    11681061#if H_3D_DIM
    1169 #if SEPARATE_FLAG_I0085
    11701062    if( pcCU->getSlice()->getVpsDepthModesFlag() ||  pcCU->getSlice()->getIVPFlag() )
    1171 #else
    1172     if( pcCU->getSlice()->getVpsDepthModesFlag() )
    1173 #endif
    11741063    {
    11751064      codeIntraDepth( pcCU, absPartIdx+partOffset*j );
     
    13171206    }
    13181207    //mode coding
    1319 #if SEPARATE_FLAG_I0085
    13201208    if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag())
    13211209    {
    13221210      m_pcBinIf->encodeBin( uiCodeIdx == 0 ? 0 : 1, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
    13231211    }
    1324 #else
    1325     m_pcBinIf->encodeBin( uiCodeIdx == 0 ? 0 : 1, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
    1326 #endif
    13271212  }
    13281213}
     
    23682253  }
    23692254
    2370 #if HS_DMM_SIGNALLING_I0120
    23712255  UInt uiNumSegments = isDimMode( pcCU->getLumaIntraDir( absPartIdx ) ) ? 2 : 1;
    23722256  UInt dimDeltaDC = 1;
    2373 #else
    2374   UInt uiNumSegments = 0;
    2375   UInt dimDeltaDC = 0;
    2376 #endif
    2377 
    2378 #if HS_DMM_SIGNALLING_I0120
     2257
    23792258  if( pcCU->isIntra( absPartIdx ) && pcCU->getSDCFlag( absPartIdx ))
    23802259  {
    2381 #else
    2382   if( pcCU->isIntra( absPartIdx ) )
    2383   {
    2384     UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
    2385     uiNumSegments = isDimMode( dir ) ? 2 : 1;
    2386 
    2387     if( pcCU->getSDCFlag( absPartIdx ) )
    2388     {
    2389 #endif
    23902260      if( uiNumSegments == 1 )
    23912261      {
     
    23962266        dimDeltaDC = ( pcCU->getSDCSegmentDCOffset( 0, absPartIdx ) || pcCU->getSDCSegmentDCOffset( 1, absPartIdx ) ) ? 1 : 0;
    23972267      }
    2398 #if !HS_DMM_SIGNALLING_I0120
    2399     }
    2400     else
    2401     {
    2402       dimDeltaDC = isDimDeltaDC( dir );
    2403     }
    2404 #endif
    24052268    m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get( 0, 0, 0 ) );
    24062269  }
    2407 #if !HS_DMM_SIGNALLING_I0120
    2408   else //all-zero inter SDC is not allowed
    2409   {
    2410     uiNumSegments = 1;
    2411     dimDeltaDC = 1;
    2412   }
    2413 #endif
    24142270
    24152271  if( dimDeltaDC )
     
    24472303Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    24482304{
    2449 #if SEC_DBBP_EXPLICIT_SIG_I0077
    24502305  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
    24512306  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
    2452 #endif
    24532307  AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
    24542308  AOF( !pcCU->getSlice()->getIsDepth() );
  • trunk/source/Lib/TLibEncoder/TEncSbac.h

    r1039 r1084  
    130130  Void  xCodeDmm1WedgeIdx    ( UInt uiTabIdx, Int iNumBit );
    131131#endif
    132 #if !FIX_TICKET_76
    133 #if H_3D_DIM_SDC
    134   Void  xCodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
    135 #endif
    136 #endif
    137132#endif
    138133 
     
    155150  Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx );
    156151  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    157 #if MTK_SINGLE_DEPTH_MODE_I0095
     152#if H_3D_SINGLE_DEPTH
    158153  Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx );
    159154#endif
     
    224219  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    225220  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    226 #if MTK_SINGLE_DEPTH_MODE_I0095
     221#if H_3D_SINGLE_DEPTH
    227222  ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
    228223  ContextModel3DBuffer m_cSingleDepthValueSCModel;
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r1066 r1084  
    915915        }
    916916        m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true );
    917 #if MTK_SINGLE_DEPTH_MODE_I0095
     917#if H_3D_SINGLE_DEPTH
    918918        m_pcEntropyCoder->encodeSingleDepthMode(pcCU, 0, true );
    919919        if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
     
    921921        m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    922922      }
    923 #if MTK_SINGLE_DEPTH_MODE_I0095
     923#if H_3D_SINGLE_DEPTH
    924924      else
    925925      {
     
    927927      }
    928928#endif     
    929 #if MTK_SINGLE_DEPTH_MODE_I0095
     929#if H_3D_SINGLE_DEPTH
    930930      if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    931931      {
     
    945945        }
    946946      }
    947 #if MTK_SINGLE_DEPTH_MODE_I0095
    948     }
    949 #endif
    950     }
    951 #if MTK_SINGLE_DEPTH_MODE_I0095
     947#if H_3D_SINGLE_DEPTH
     948    }
     949#endif
     950    }
     951#if H_3D_SINGLE_DEPTH
    952952      if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    953953      {
     
    995995    }
    996996  }
    997 #if MTK_SINGLE_DEPTH_MODE_I0095
     997#if H_3D_SINGLE_DEPTH
    998998    }
    999999#endif
     
    18591859  dRDCost  += dSingleCost;
    18601860}
    1861 #if MTK_SINGLE_DEPTH_MODE_I0095
     1861#if H_3D_SINGLE_DEPTH
    18621862Void TEncSearch::xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel *DepthNeighbor )
    18631863{
     
    19701970      UInt dimType   = getDimType  ( uiLumaPredMode );
    19711971      UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
    1972 #if SHARP_DMM1_I0110
    19731972      UInt uiBaseWidth = pcCU->isDMM1UpscaleMode(uiWidth) ? pcCU->getDMM1BasePatternWidth(uiWidth) : uiWidth;
    19741973      if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiBaseWidth]].size() && dimType == DMM1_IDX )
    1975 #else
    1976       if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
    1977 #endif
    1978       {
    1979 #if SHARP_DMM1_I0110
     1974      {
    19801975        if (g_aucConvertToBit[uiBaseWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
    1981 #else
    1982         if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
    1983 #endif
    19841976        {                                   
    19851977          patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
     
    20432035    Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
    20442036
    2045 #if SHARP_DMM1_I0110
    20462037    WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    2047 #else
    2048     WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    2049 #endif
    20502038    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
    20512039
    20522040    uiNumSegments = 2;
    2053 #if SHARP_DMM1_I0110
    20542041    pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern( uiWidth ) : pcWedgelet->getPattern();
    20552042    uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
    2056 #else
    2057     pbMask = pcWedgelet->getPattern();
    2058     uiMaskStride = pcWedgelet->getStride();
    2059 #endif
    20602043  }
    20612044  if( getDimType( uiLumaPredMode ) == DMM4_IDX )
     
    28782861  pcCU->setChromIntraDirSubParts( uiBestMode, 0, pcCU->getDepth( 0 ) );
    28792862}
    2880 #if MTK_SINGLE_DEPTH_MODE_I0095
     2863#if H_3D_SINGLE_DEPTH
    28812864Void
    28822865TEncSearch::estIntraPredSingleDepth( TComDataCU* pcCU,
     
    29002883  Pel DepthNeighbours[5];
    29012884  //construction of depth candidates
    2902   for( Int i = 0; (i < 5)  && (index<MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ )
     2885  for( Int i = 0; (i < 5)  && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
    29032886  {
    29042887    if(!pcCU->getNeighDepth (0, 0, &testDepth, i))
     
    29832966                            UInt&       ruiDistC,
    29842967                            Bool        bLumaOnly
    2985 #if HHI_DMM4_ENC_I0066
     2968#if H_3D_DIM
    29862969                          , Bool        bOnlyIVP
    29872970#endif
     
    30323015    Int numModesForFullRD = g_aucIntraModeNumFast[ uiWidthBit ];
    30333016   
    3034 #if HHI_DMM4_ENC_I0066
     3017#if H_3D_DIM
    30353018    if( bOnlyIVP )
    30363019    {
     
    30803063        UInt   iModeBits = xModeBitsIntra( pcCU, uiMode, uiPU, uiPartOffset, uiDepth, uiInitTrDepth );
    30813064#if H_3D_VSO // M35
    3082 #if H_3D_VSO_FIX // This fix should be enabled after verification
    30833065        Double dLambda;
    30843066        if ( m_pcRdCost->getUseLambdaScaleVSO() )
     
    30923074
    30933075        Double cost      = (Double)uiSad + (Double)iModeBits * dLambda;
    3094 #else
    3095         Double cost      = (Double)uiSad + (Double)iModeBits * m_pcRdCost->getSqrtLambda();
    3096 #endif
    30973076#else
    30983077        Double cost      = (Double)uiSad + (Double)iModeBits * m_pcRdCost->getSqrtLambda();
     
    31353114      }
    31363115    }
    3137 #if HHI_DMM4_ENC_I0066
     3116#if H_3D_DIM
    31383117    }
    31393118#endif
     
    31433122    if( m_pcEncCfg->getIsDepth() && uiWidth >= DIM_MIN_SIZE && uiWidth <= DIM_MAX_SIZE && uiWidth == uiHeight )
    31443123    {
    3145 #if HHI_DMM4_ENC_I0066
    3146 #if SEPARATE_FLAG_I0085
    31473124      if( bOnlyIVP && m_pcEncCfg->getUseIVP() )
    3148 #else
    3149       if( bOnlyIVP )
    3150 #endif
    31513125      {
    31523126        TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
     
    31583132        pcCU->setDimDeltaDC( DMM4_IDX, 1, uiPartOffset, deltaDC2 );
    31593133
    3160 #if HS_DMM_SIGNALLING_I0120
    31613134        uiRdModeList[ numModesForFullRD++ ] = (DMM4_IDX+DIM_OFFSET);
    3162 #else
    3163         uiRdModeList[ numModesForFullRD++ ] = (2*DMM4_IDX  +DIM_OFFSET);
    3164         if( deltaDC1 != 0 || deltaDC2 != 0 )
    3165           uiRdModeList[ numModesForFullRD++ ] = (2*DMM4_IDX+1+DIM_OFFSET);
    3166 #endif
    31673135        dmm4Segmentation->destroy(); delete dmm4Segmentation;
    31683136      }
    31693137      else
    31703138      {
    3171 #endif
    31723139#if H_3D_FAST_DEPTH_INTRA
    31733140      Int  threshold    = max(((pcCU->getQP(0))>>3)-1,3);
     
    31773144
    31783145#if H_3D_DIM_DMM
    3179 #if SEPARATE_FLAG_I0085
    31803146      if( ( m_pcEncCfg->getUseDMM() || m_pcEncCfg->getUseIVP() )
    3181 #else
    3182       if( m_pcEncCfg->getUseDMM()
    3183 #endif
    31843147#if H_3D_FAST_DEPTH_INTRA
    31853148         && (uiRdModeList[0] != PLANAR_IDX || varCU >= varThreshold)
     
    31873150        )
    31883151      {
    3189 #if SEPARATE_FLAG_I0085
    31903152        UInt uiStart, uiEnd;
    31913153        if( m_pcEncCfg->getUseDMM() &&  m_pcEncCfg->getUseIVP() )
     
    32103172        }
    32113173        for( UInt dmmType = uiStart; dmmType < uiEnd; dmmType++ )
    3212 #else
    3213         for( UInt dmmType = 0; dmmType < DMM_NUM_TYPE; dmmType++ )
    3214 #endif
    32153174        {
    32163175#if H_3D_FCO
    32173176            TComPic* picTexture  = pcCU->getSlice()->getIvPic(false, pcCU->getSlice()->getViewIndex() );
    3218 #if LGE_FCO_I0116
     3177#if H_3D_FCO
    32193178            if ( !picTexture->getReconMark() && (DMM4_IDX == dmmType ) )
    32203179#else
     
    32343193              xSearchDmm1Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx );
    32353194              pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dmmType,  uiPartOffset, uiDepth + uiInitTrDepth );
    3236 #if SHARP_DMM1_I0110
    32373195              biSegmentation = pcCU->isDMM1UpscaleMode( uiWidth ) ?
    32383196                  &(g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])][uiTabIdx]) : &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
    3239 #else
    3240               biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
    3241 #endif
    32423197            } break;
    32433198
     
    32543209          if( biSegmentation )
    32553210          {
    3256 #if SHARP_DMM1_I0110
    32573211            if( dmmType == DMM1_IDX && pcCU->isDMM1UpscaleMode( uiWidth ) ){
    32583212                xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getScaledPattern(uiWidth), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 );
     
    32623216                xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 );
    32633217            }
    3264 #else
    3265             xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 );
    3266 #endif
    32673218            pcCU->setDimDeltaDC( dmmType, 0, uiPartOffset, deltaDC1 );
    32683219            pcCU->setDimDeltaDC( dmmType, 1, uiPartOffset, deltaDC2 );
    32693220
    3270 #if HS_DMM_SIGNALLING_I0120
    32713221            uiRdModeList[ numModesForFullRD++ ] = (dmmType  +DIM_OFFSET);
    3272 #else
    3273             uiRdModeList[ numModesForFullRD++ ] = (2*dmmType  +DIM_OFFSET);
    3274 #if HHI_DMM4_ENC_I0066
    3275             if( deltaDC1 != 0 || deltaDC2 != 0 )
    3276 #endif
    3277             uiRdModeList[ numModesForFullRD++ ] = (2*dmmType+1+DIM_OFFSET);
    3278 #endif
    3279 
    32803222            if( DMM4_IDX == dmmType ) { biSegmentation->destroy(); delete biSegmentation; }
    32813223          }
    32823224        }
    32833225      }
    3284 #if HHI_DMM4_ENC_I0066
     3226#if H_3D_DIM
    32853227      }
    32863228#endif
     
    32953237   
    32963238    UInt    uiBestPUMode  = 0;
    3297 #if SCU_HS_FAST_INTRA_SDC_I0123
     3239#if H_3D_FAST_INTRA_SDC
    32983240    UInt    uiBestPUModeConv  = 0;
    32993241    UInt    uiSecondBestPUModeConv  = 0;
     
    33093251    Double  dBestPUCost   = MAX_DOUBLE;
    33103252
    3311 #if SCU_HS_FAST_INTRA_SDC_I0123
     3253#if H_3D_FAST_INTRA_SDC
    33123254    Double  dBestPUCostConv   = MAX_DOUBLE;
    33133255    UInt varCU      = m_pcRdCost->calcVAR(piOrg, uiStride, uiWidth,uiHeight,pcCU->getDepth(0));
     
    33193261    Pel     apBestDCOffsets[2] = {0,0};
    33203262#endif
    3321 #if SCU_HS_FAST_INTRA_SDC_I0123
     3263#if H_3D_FAST_INTRA_SDC
    33223264    for( UInt uiMode = 0; uiMode < numModesForFullRD + rdSDC; uiMode++ )
    33233265#else
     
    33263268    {
    33273269      // set luma prediction mode
    3328 #if !SCU_HS_FAST_INTRA_SDC_I0123
     3270#if !H_3D_FAST_INTRA_SDC
    33293271     UInt uiOrgMode = uiRdModeList[uiMode]; 
    33303272#endif
    33313273     
    3332 #if SCU_HS_FAST_INTRA_SDC_I0123
     3274#if H_3D_FAST_INTRA_SDC
    33333275      UInt uiOrgMode;
    33343276      if (uiMode < numModesForFullRD)
     
    33563298     
    33573299#if H_3D_DIM_SDC
    3358 #if SCU_HS_FAST_INTRA_SDC_I0123
     3300#if H_3D_FAST_INTRA_SDC
    33593301      Bool bTestSDC = ( m_pcEncCfg->getUseSDC() && pcCU->getSDCAvailable(uiPartOffset) && uiMode >= numModesForFullRD);
    33603302#else
     
    33643306      for( UInt uiSDC=0; uiSDC<=(bTestSDC?1:0); uiSDC++ )
    33653307      {
    3366 #if SCU_HS_FAST_INTRA_SDC_I0123
     3308#if H_3D_FAST_INTRA_SDC
    33673309        if (!uiSDC && uiMode >= numModesForFullRD) continue;
    33683310#endif
    33693311        pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth );
    3370 #if FAST_SDC_OFFSET_DECISION_I0084
    33713312        Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
    33723313        for( Int iOffset = 1; iOffset <= 5; iOffset++ )
    3373 #else
    3374         for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ )
    3375 #endif
    3376         {
    3377 #if FAST_SDC_OFFSET_DECISION_I0084
     3314        {
    33783315          Int iSDCDeltaResi = 0;
    33793316          if(iOffset % 2 == 0)
     
    33853322            iSDCDeltaResi = -1 * (iOffset >> 1);
    33863323          }
    3387 #endif
    33883324          if( ( uiSDC == 0 ) && iSDCDeltaResi != 0 )
    33893325          {
    33903326            continue;
    33913327          }
    3392 #if FAST_SDC_OFFSET_DECISION_I0084
    33933328          if( iOffset > 3)
    33943329          {
     
    34073342          }
    34083343#endif
    3409 #endif
    34103344     
    34113345#if H_3D_DIM_ENC || H_3D_DIM_SDC
     
    34523386          // start encoding with SDC
    34533387          xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi );
    3454 #if FAST_SDC_OFFSET_DECISION_I0084
    34553388          if ( testZeroResi == 0 && iOffset <= 3 )
    34563389          {
    34573390            dOffsetCost [iOffset -1] = dPUCost;
    34583391          }
    3459 #endif
    34603392        }
    34613393        else
     
    34653397#if H_3D_DIM_ENC
    34663398          xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost, (testZeroResi != 0) );
    3467 #if SCU_HS_FAST_INTRA_SDC_I0123   
     3399#if H_3D_FAST_INTRA_SDC   
    34683400      if( dPUCost < dBestPUCostConv )
    34693401      {
     
    40173949#if H_3D_VSP
    40183950                                 , Int* vspFlag
    4019 #if !FIX_TICKET_79
    4020                                  , InheritedVSPDisInfo*  inheritedVSPDisInfo
    4021 #endif
    40223951#endif
    40233952#if H_3D_SPIVMP
     
    40794008      pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand);
    40804009      pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
    4081 #if H_3D_VSP && !FIX_TICKET_79
    4082                                         , inheritedVSPDisInfo
    4083 #endif
    40844010#if H_3D_SPIVMP
    40854011        , pcMvFieldSP, puhInterDirSP
     
    41094035    pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand);
    41104036    pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours
    4111 #if H_3D_VSP && !FIX_TICKET_79
    4112                                       , inheritedVSPDisInfo
    4113 #endif
    41144037#if H_3D_SPIVMP
    41154038      , pcMvFieldSP, puhInterDirSP
     
    41324055#endif
    41334056  }
    4134 #if H_3D_VSP && !FIX_TICKET_75
    4135   xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours,vspFlag, numValidMergeCand );
    4136 #else
    41374057  xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    4138 #endif
    41394058
    41404059#if H_3D_DBBP
     
    41644083#if H_3D_VSP
    41654084    pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    4166 #if !FIX_TICKET_79
    4167     pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    4168 #endif
    41694085#endif
    41704086
     
    42664182 * \returns Void
    42674183 */
    4268 #if H_3D_VSP && !FIX_TICKET_75
    4269 Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int* vspFlag, Int numValidMergeCand )
    4270 #else
    42714184Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int numValidMergeCand )
    4272 #endif
    42734185{
    42744186  if ( pcCU->isBipredRestriction(puIdx) )
     
    42764188    for( UInt mergeCand = 0; mergeCand < numValidMergeCand; ++mergeCand )
    42774189    {
    4278 #if H_3D_VSP && !FIX_TICKET_75
    4279       if ( (interDirNeighbours[mergeCand] == 3) && (vspFlag[mergeCand] == false) )
    4280 #else
    42814190      if ( interDirNeighbours[mergeCand] == 3 )
    4282 #endif
    42834191      {
    42844192        interDirNeighbours[mergeCand] = 1;
     
    49024810      Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    49034811      memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    4904 #if !FIX_TICKET_79
    4905       InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    4906 #endif
    49074812      UInt uiAbsPartIdx = 0;
    49084813      Int iWidth = 0;
     
    49224827#if H_3D_VSP
    49234828                      , vspFlag
    4924 #if !FIX_TICKET_79
    4925                       , inheritedVSPDisInfo
    4926 #endif
    49274829#endif
    49284830#if H_3D_SPIVMP
     
    49384840#if H_3D_VSP
    49394841        pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    4940 #if !FIX_TICKET_79
    4941         pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    4942 #endif
    49434842#endif
    49444843#if H_3D_DDD
     
    64306329    if( bCodeChroma )
    64316330    {
     6331      m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
     6332      m_pcEntropyCoder->resetBits();
    64326333        m_pcEntropyCoder->encodeQtCbf   ( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrMode );
    64336334      m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrU, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_U );
    6434       uiSingleBitsU = m_pcEntropyCoder->getNumberOfWrittenBits() - uiSingleBitsY;
     6335      uiSingleBitsU = m_pcEntropyCoder->getNumberOfWrittenBits();
    64356336     
     6337      m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
     6338      m_pcEntropyCoder->resetBits();
    64366339        m_pcEntropyCoder->encodeQtCbf   ( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrMode );
    64376340      m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrV, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_V );
    6438       uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits() - ( uiSingleBitsY + uiSingleBitsU );
     6341      uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits();
    64396342    }
    64406343   
     
    65176420        const Double singleCostY = m_pcRdCost->calcRdCost( uiSingleBitsY, uiNonzeroDistY );
    65186421#endif
     6422        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
     6423
    65196424        m_pcEntropyCoder->resetBits();
    65206425        m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_LUMA,     uiTrMode );
     
    65506455    else if( checkTransformSkipY )
    65516456    {
     6457      m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    65526458      m_pcEntropyCoder->resetBits();
    65536459      m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_LUMA, uiTrMode );
     
    66066512        {
    66076513          const Double dSingleCostU = m_pcRdCost->calcRdCost( uiSingleBitsU, uiNonzeroDistU );
     6514          m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    66086515          m_pcEntropyCoder->resetBits();
    66096516          m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_U,     uiTrMode );
     
    66316538      else if( checkTransformSkipUV )
    66326539      {
     6540        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    66336541        m_pcEntropyCoder->resetBits();
    66346542        m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_U, uiTrMode );
     
    66756583        {
    66766584          const Double dSingleCostV = m_pcRdCost->calcRdCost( uiSingleBitsV, uiNonzeroDistV );
     6585          m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    66776586          m_pcEntropyCoder->resetBits();
    66786587          m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_V,     uiTrMode );
     
    67006609      else if( checkTransformSkipUV )
    67016610      {
     6611        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    67026612        m_pcEntropyCoder->resetBits();
    67036613        m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_V, uiTrMode );
     
    68966806      pcCU->setCbfSubParts( uiAbsSumTransformSkipV ? uiSetCbf : 0, TEXT_CHROMA_V, uiAbsPartIdx, pcCU->getDepth(0)+uiTrModeC );
    68976807
    6898       m_pcEntropyCoder->resetBits();
    68996808      uiSingleBitsU = 0;
    69006809      uiSingleBitsV = 0;
     
    69026811      if( uiAbsSumTransformSkipU )
    69036812      {
     6813        m_pcEntropyCoder->resetBits();
    69046814        m_pcEntropyCoder->encodeQtCbf   ( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrMode );
    69056815        m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrU, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_U );
     
    69446854      if( uiAbsSumTransformSkipV )
    69456855      {
     6856        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
     6857        m_pcEntropyCoder->resetBits();
    69466858        m_pcEntropyCoder->encodeQtCbf   ( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrMode );
    69476859        m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrV, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_V );
    6948         uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits() - uiSingleBitsU;
     6860        uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits();
    69496861
    69506862        curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();
     
    73887300    }
    73897301    m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
    7390 #if MTK_SINGLE_DEPTH_MODE_I0095
     7302#if H_3D_SINGLE_DEPTH
    73917303    m_pcEntropyCoder->encodeSingleDepthMode ( pcCU, 0, true );
    73927304#endif
     
    78457757
    78467758  Pel refDC1 = 0; Pel refDC2 = 0;
    7847 #if SHARP_DMM1_I0110
    78487759  WedgeList*     pacWedgeList     = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    78497760  WedgeNodeList* pacWedgeNodeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeNodeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
    7850 #else
    7851   WedgeList*     pacWedgeList     = &g_dmmWedgeLists    [(g_aucConvertToBit[uiWidth])];
    7852   WedgeNodeList* pacWedgeNodeList = &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
    7853 #endif
    78547761
    78557762  // coarse wedge search
     
    78597766  {
    78607767    TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx()));
    7861 #if SHARP_DMM1_I0110
    78627768    Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
    78637769    UInt uiStride   = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride();
    78647770    xCalcBiSegDCs  ( piRef,  uiRefStride,  pbPattern, uiStride, refDC1, refDC2 );
    78657771    xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
    7866 #else
    7867     xCalcBiSegDCs  ( piRef,  uiRefStride,  pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
    7868     xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
    7869 #endif
    78707772
    78717773    Dist uiActDist = RDO_DIST_MAX;
     
    79037805    {
    79047806      TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId )));
    7905 #if SHARP_DMM1_I0110
    79067807      Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
    79077808      UInt uiStride   = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride();
    79087809      xCalcBiSegDCs  ( piRef,  uiRefStride,  pbPattern, uiStride, refDC1, refDC2 );
    79097810      xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
    7910 #else
    7911       xCalcBiSegDCs  ( piRef,  uiRefStride,  pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
    7912       xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
    7913 #endif
    79147811      Dist uiActDist = RDO_DIST_MAX;
    79157812#if H_3D_VSO
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r1039 r1084  
    181181                                  UInt&       ruiDistC,
    182182                                  Bool        bLumaOnly
    183 #if HHI_DMM4_ENC_I0066
     183#if H_3D_DIM
    184184                                , Bool        bOnlyIVP
    185185#endif
     
    191191                                  TComYuv*    pcRecoYuv,
    192192                                  UInt        uiPreCalcDistC );
    193 #if MTK_SINGLE_DEPTH_MODE_I0095
     193#if H_3D_SINGLE_DEPTH
    194194  Void  estIntraPredSingleDepth  ( TComDataCU* pcCU,
    195195                                  TComYuv*    pcOrgYuv,
     
    354354                                    UInt         uiAbsPartIdx,
    355355                                    UInt         stateU0V1Both2 );
    356 #if MTK_SINGLE_DEPTH_MODE_I0095
     356#if H_3D_SINGLE_DEPTH
    357357  Void xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel * DepthNeighbor );
    358358#endif
     
    429429#if H_3D_VSP
    430430                                  , Int* vspFlag
    431 #if !FIX_TICKET_79
    432                                   , InheritedVSPDisInfo*  inheritedVSPDisInfo
    433 #endif
    434431#endif
    435432#if H_3D_SPIVMP
     
    443440                                    TComMvField*    mvFieldNeighbours,
    444441                                    UChar*          interDirNeighbours,
    445 #if H_3D_VSP && !FIX_TICKET_75
    446                                     Int* vspFlag,
    447 #endif
    448442                                    Int             numValidMergeCand );
    449443
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r1066 r1084  
    7272  ContextModel::buildNextStateTable();
    7373#endif
    74 #if H_MV_HLS10_GEN_FIX
    7574#if H_MV
    7675  m_iNumSubstreams         = 0;
    77 #endif
    7876#endif
    7977
     
    8987  m_ivPicLists = NULL;
    9088#endif
    91 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     89#if H_3D_IC
    9290  m_aICEnableCandidate = NULL;
    9391  m_aICEnableNum = NULL;
     
    236234      for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ )
    237235      {
    238 #if H_MV_HLS10_GEN_FIX
    239236#if H_MV
    240237        xDelete( false, m_pppcRDSbacCoder, iDepth, iCIIdx);
     
    244241        delete m_pppcBinCoderCABAC[iDepth][iCIIdx];
    245242#endif
    246 #endif
    247243      }
    248244    }
     
    250246    for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
    251247    {
    252 #if H_MV_HLS10_GEN_FIX
    253248#if H_MV
    254249      xDelete( true, m_pppcRDSbacCoder  , iDepth);
     
    258253      delete [] m_pppcBinCoderCABAC[iDepth];
    259254#endif
    260 #endif
    261     }
    262 
    263 #if H_MV_HLS10_GEN_FIX
     255    }
     256
    264257#if H_MV
    265258     xDelete( true, m_pppcRDSbacCoder  );
     
    269262    delete [] m_pppcBinCoderCABAC;
    270263#endif
    271 #endif
    272264    for ( UInt ui = 0; ui < m_iNumSubstreams; ui++ )
    273265    {
     
    276268        for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ )
    277269        {
    278 #if H_MV_HLS10_GEN_FIX
    279270#if H_MV
    280271          xDelete(false, m_ppppcRDSbacCoders  ,ui, iDepth, iCIIdx);
     
    284275          delete m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx];
    285276#endif
    286 #endif
    287277        }
    288278      }
     
    290280      for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
    291281      {
    292 #if H_MV_HLS10_GEN_FIX
    293282#if H_MV
    294283        xDelete(true, m_ppppcRDSbacCoders  ,ui, iDepth);
     
    298287        delete [] m_ppppcBinCodersCABAC[ui][iDepth];
    299288#endif
    300 #endif
    301       }
    302 
    303 
    304 #if H_MV_HLS10_GEN_FIX
     289      }
     290
     291
    305292#if H_MV
    306293      xDelete(true, m_ppppcRDSbacCoders,   ui);
     
    310297      delete[] m_ppppcBinCodersCABAC[ui];
    311298#endif
    312 #endif
    313     }
    314 #if H_MV_HLS10_GEN_FIX
     299    }
    315300#if H_MV
    316301    xDelete(true, m_ppppcRDSbacCoders    ) ;
     
    332317  delete[] m_pcRdCosts;
    333318#endif
    334 #endif
    335319
    336320#if !H_MV
     
    370354
    371355  xInitPPSforTiles();
    372 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     356#if H_3D_IC
    373357  m_aICEnableCandidate = new Int[ 10 ];
    374358  m_aICEnableNum = new Int[ 10 ];
     
    769753#if H_MV 
    770754  m_cSPS.setUpdateRepFormatFlag           ( false );   
    771 #if H_MV_HLS10_MULTILAYERSPS 
    772755  Bool multiLayerExtensionFlag  = ( getLayerId() > 0 ) && ( m_cVPS->getNumRefLayers( getLayerId() ) > 0 );
    773756 
     
    778761    m_cSPS.setSpsScalingListRefLayerId( m_cVPS->getIdRefLayer( getLayerId(), 0 ) );
    779762  }
    780 #else
    781   m_cSPS.setSpsInferScalingListFlag       ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) );
    782   m_cSPS.setSpsScalingListRefLayerId      ( 0              );
    783 #endif
    784763  m_cSPS.setSpsExtensionPresentFlag       ( true );
    785764  m_cSPS.setSpsMultilayerExtensionFlag    ( true );
     
    829808  m_cSPS.setUseAMP ( m_useAMP );
    830809
    831 #if !MTK_I0099_VPS_EX2
    832 #if H_3D_QTLPC
    833   m_cSPS.setUseQTL( m_bUseQTL );
    834   m_cSPS.setUsePC ( m_bUsePC  );
    835 #endif
    836 #endif
    837 
    838810  for (i = g_uiMaxCUDepth-g_uiAddCUDepth; i < g_uiMaxCUDepth; i++ )
    839811  {
     
    863835    for( Int is = 0; is < targetDecLayerIdList.size(); is++  )
    864836    {
    865 #if H_MV_HLS10_ADD_LAYERSETS
    866837      if ( m_cVPS->getNecessaryLayerFlag( ols, is ) )
    867838      {     
    868839        m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true );       
    869840      }
    870 #else
    871       m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true );       
    872 #endif
    873     }
    874   }
    875 #if !H_MV_HLS10_ADD_LAYERSETS
    876   m_cVPS->inferDbpSizeLayerSetZero( &m_cSPS, true );
    877 #endif
     841    }
     842  }
    878843#endif
    879844  m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma);
     
    889854  {
    890855    TComVUI* pcVUI = m_cSPS.getVuiParameters();
    891     pcVUI->setAspectRatioInfoPresentFlag(getAspectRatioIdc() != -1);
     856    pcVUI->setAspectRatioInfoPresentFlag(getAspectRatioInfoPresentFlag());
    892857    pcVUI->setAspectRatioIdc(getAspectRatioIdc());
    893858    pcVUI->setSarWidth(getSarWidth());
     
    13231288Void  TEncTop::xInitPPSforTiles()
    13241289{
    1325   m_cPPS.setUniformSpacingFlag( m_iUniformSpacingIdr );
    1326   m_cPPS.setNumColumnsMinus1( m_iNumColumnsMinus1 );
    1327   m_cPPS.setNumRowsMinus1( m_iNumRowsMinus1 );
    1328   if( m_iUniformSpacingIdr == 0 )
    1329   {
    1330     m_cPPS.setColumnWidth( m_puiColumnWidth );
    1331     m_cPPS.setRowHeight( m_puiRowHeight );
     1290  m_cPPS.setTileUniformSpacingFlag( m_tileUniformSpacingFlag );
     1291  m_cPPS.setNumTileColumnsMinus1( m_iNumColumnsMinus1 );
     1292  m_cPPS.setNumTileRowsMinus1( m_iNumRowsMinus1 );
     1293  if( !m_tileUniformSpacingFlag )
     1294  {
     1295    m_cPPS.setTileColumnWidth( m_tileColumnWidth );
     1296    m_cPPS.setTileRowHeight( m_tileRowHeight );
    13321297  }
    13331298  m_cPPS.setLoopFilterAcrossTilesEnabledFlag( m_loopFilterAcrossTilesEnabledFlag );
    13341299
    13351300  // # substreams is "per tile" when tiles are independent.
    1336   if (m_iWaveFrontSynchro
    1337     )
     1301  if (m_iWaveFrontSynchro )
    13381302  {
    13391303    m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1));
     
    13611325  }
    13621326
    1363   if( m_iNumColumnsMinus1 && m_iUniformSpacingIdr==0 )
     1327  if( m_iNumColumnsMinus1 && !m_tileUniformSpacingFlag )
    13641328  {
    13651329    for(Int i=0; i<m_iNumColumnsMinus1; i++)
    13661330    {
    1367       uiCummulativeColumnWidth += m_puiColumnWidth[i];
     1331      uiCummulativeColumnWidth += m_tileColumnWidth[i];
    13681332    }
    13691333
     
    13881352  }
    13891353
    1390   if( m_iNumRowsMinus1 && m_iUniformSpacingIdr==0 )
     1354  if( m_iNumRowsMinus1 && !m_tileUniformSpacingFlag )
    13911355  {
    13921356    for(Int i=0; i<m_iNumRowsMinus1; i++)
    1393       uiCummulativeRowHeight += m_puiRowHeight[i];
     1357      uiCummulativeRowHeight += m_tileRowHeight[i];
    13941358
    13951359    if( uiCummulativeRowHeight >= iHeightInCU )
  • trunk/source/Lib/TLibEncoder/TEncTop.h

    r1066 r1084  
    8080  TComPicLists*           m_ivPicLists;                   ///< access to picture lists of other layers
    8181#endif
    82 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     82#if H_3D_IC
    8383  Int *m_aICEnableCandidate;
    8484  Int *m_aICEnableNum;
     
    150150  Void  xInitPPSforTiles  ();
    151151  Void  xInitRPS          (Bool isFieldCoding);           ///< initialize PPS from encoder options
    152 #if H_MV_HLS10_GEN_FIX
    153152#if H_MV
    154153
     
    193192
    194193#endif
    195 #endif
    196194public:
    197195  TEncTop();
     
    209207  TComPicLists* getIvPicLists() { return m_ivPicLists; }
    210208#endif
    211 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
    212   Int *getICEnableCandidate() { return m_aICEnableCandidate; }
    213   Int *getICEnableNum() { return m_aICEnableNum; }
     209#if H_3D_IC
     210  Int*      getICEnableCandidate() { return m_aICEnableCandidate; }
     211  Int*      getICEnableNum() { return m_aICEnableNum; }
    214212#endif
    215213  Void      deletePicBuffer ();
     
    272270  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    273271#endif
    274 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     272#if H_3D_IC
    275273  Void                    setICEnableCandidate         ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; }
    276274  Void                    setICEnableNum         ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }
Note: See TracChangeset for help on using the changeset viewer.