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


Ignore:
Timestamp:
13 Oct 2014, 12:19:36 (10 years ago)
Author:
tech
Message:

Merged 12.0-dev1@1065.

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

Legend:

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

    r1039 r1066  
    4949{
    5050#if H_MV_ENC_DEC_TRAC
     51#if H_MV_HLS10_GEN_FIX
     52  fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() );
     53#else
    5154  fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );
     55#endif
    5256#else
    5357  fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() );
     
    5862{
    5963#if H_MV_ENC_DEC_TRAC
     64#if H_MV_HLS10_GEN_FIX
     65  fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() );
     66#else
    6067  fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );
     68#endif
    6169#else
    6270  fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() );
     
    241249    }
    242250  }
     251#if !H_MV_HLS10_PPS
    243252#if H_MV
    244253  if ( pcPPS->getLayerId() > 0 )
     
    254263  { 
    255264#endif 
     265#endif
    256266  WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0,                          "pps_scaling_list_data_present_flag" );
    257267  if( pcPPS->getScalingListPresentFlag() )
     
    259269    codeScalingList( m_pcSlice->getScalingList() );
    260270  }
     271#if !H_MV_HLS10_PPS
    261272#if H_MV
    262273  }
     274#endif
    263275#endif
    264276#if PPS_FIX_DEPTH
     
    301313    if ( pcPPS->getPpsMultilayerExtensionFlag() )
    302314    {
     315#if H_MV_HLS10_PPS
     316      codePPSMultilayerExtension( pcPPS );
     317#else
    303318      WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );
    304319      WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" );
     320#endif
    305321    }
    306322
     
    675691#endif
    676692  WRITE_CODE( pcSPS->getMaxTLayers() - 1,  3,       "sps_max_sub_layers_minus1" );
     693#if H_MV_HLS10_MULTILAYERSPS
     694#if H_MV
     695  }
     696  else
     697  {
     698    WRITE_CODE( pcSPS->getSpsExtOrMaxSubLayersMinus1( ), 3, "sps_ext_or_max_sub_layers_minus1" );
     699  }
     700  if ( !pcSPS->getMultiLayerExtSpsFlag() )
     701  {
     702#endif
     703#endif
     704
    677705  WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0,                             "sps_temporal_id_nesting_flag" );
    678706  codePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
     
    682710  WRITE_UVLC( pcSPS->getSPSId (),                   "sps_seq_parameter_set_id" );
    683711#if H_MV
     712#if H_MV_HLS10_MULTILAYERSPS
     713    if ( pcSPS->getMultiLayerExtSpsFlag() )
     714#else
    684715  if ( pcSPS->getLayerId() > 0 )
     716#endif
    685717  {
    686718    WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" );
     
    703735  WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (),   "pic_width_in_luma_samples" );
    704736  WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(),   "pic_height_in_luma_samples" );
     737#if !H_MV_HLS10_MULTILAYERSPS
    705738#if H_MV
    706739  }
     740#endif
    707741#endif
    708742  Window conf = pcSPS->getConformanceWindow();
     
    716750    WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" );
    717751  }
     752#if H_MV_HLS10_MULTILAYERSPS
    718753#if H_MV
     754}
     755#endif
     756#endif
     757
     758#if H_MV
     759#if H_MV_HLS10_MULTILAYERSPS
     760  if ( !pcSPS->getMultiLayerExtSpsFlag() )
     761#else
    719762  if ( pcSPS->getLayerId() == 0 )
     763#endif
    720764  {
    721765#endif
     
    727771  WRITE_UVLC( pcSPS->getBitsForPOC()-4,                 "log2_max_pic_order_cnt_lsb_minus4" );
    728772#if H_MV
     773#if H_MV_HLS10_MULTILAYERSPS
     774  if ( !pcSPS->getMultiLayerExtSpsFlag())
     775#else
    729776  if ( pcSPS->getLayerId() == 0 )
     777#endif
    730778  { 
    731779#endif
     
    758806  {
    759807#if H_MV
     808#if H_MV_HLS10_MULTILAYERSPS
     809    if ( pcSPS->getMultiLayerExtSpsFlag() )
     810#else
    760811    if ( pcSPS->getLayerId() > 0 )
     812#endif
    761813    {   
    762814      WRITE_FLAG( pcSPS->getSpsInferScalingListFlag( ) ? 1 : 0 , "sps_infer_scaling_list_flag" );
     
    865917{
    866918  WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" );
    867 
     919#if !H_MV_HLS10_PPS
    868920  WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets( ), "num_scaled_ref_layer_offsets" );
    869921
     
    880932    WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" );
    881933  }
    882 }
     934#endif
     935}
     936
     937
     938#if H_MV_HLS10_PPS
     939Void TEncCavlc::codePPSMultilayerExtension(TComPPS* pcPPS)
     940{
     941  WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );
     942  WRITE_FLAG( pcPPS->getPpsInferScalingListFlag( ) ? 1 : 0 , "pps_infer_scaling_list_flag" );
     943  WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" );
     944  WRITE_UVLC( 0, "num_ref_loc_offsets" );
     945}
     946#endif
     947
    883948#endif
    884949
     
    897962#endif
    898963}
    899 #endif
     964
     965
     966#endif
     967
     968
     969
    900970
    901971Void TEncCavlc::codeVPS( TComVPS* pcVPS )
     
    904974#if H_MV
    905975  WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" );
     976#if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL
     977  WRITE_FLAG( pcVPS->getVpsBaseLayerAvailableFlag( ) ? 1 : 0 , "vps_base_layer_available_flag" );
     978#else // H_MV_HLS10_GEN
    906979  WRITE_FLAG( 1                                             , "vps_reserved_one_bit" );
     980#endif // H_MV_HLS10_GEN
    907981#else
    908982  WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
     
    9301004    }
    9311005  }
    932 
    9331006  assert( pcVPS->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS );
    9341007#if H_MV
    9351008  assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
    9361009  WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6,                 "vps_max_layer_id" ); 
    937  
     1010#if H_MV_HLS10_GEN_FIX
     1011  WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(),  "vps_num_layer_sets_minus1" );
     1012#else
    9381013  WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(),  "vps_max_num_layer_sets_minus1" );
     1014#endif
    9391015  for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ )
    9401016  {
     
    10121088#if H_MV
    10131089Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS )
    1014 
     1090{
     1091#if H_MV_HLS10_PTL
     1092  if( pcVPS->getMaxLayersMinus1() > 0  &&  pcVPS->getVpsBaseLayerInternalFlag() )
     1093  {
     1094    codePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1()  );
     1095  }
     1096#endif
     1097
    10151098  WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
    10161099
     
    10841167  }
    10851168
     1169#if H_MV_HLS10_ADD_LAYERSETS
     1170  if ( pcVPS->getNumIndependentLayers() > 1 )
     1171  {
     1172    WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" );
     1173  }
     1174  for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++)
     1175  {
     1176    for (Int j = 1; j < pcVPS->getNumIndependentLayers(); j++)
     1177    {
     1178      WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j )  , "highest_layer_idx_plus1" );
     1179    }
     1180 
     1181  }
     1182#endif
     1183
     1184
    10861185  WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" );
    10871186  if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
     
    11191218  WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" );
    11201219
     1220#if H_MV_HLS10_PTL
     1221  Int offsetVal =  ( pcVPS->getMaxLayersMinus1() > 0  &&  pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1;   
     1222  for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
     1223  {
     1224    WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" );
     1225    codePTL( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );
     1226    offsetVal++;
     1227  }
     1228#else
    11211229  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    11221230  {
     
    11241232    codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );
    11251233  }
    1126 
     1234#endif
     1235
     1236#if !H_MV_HLS10_ADD_LAYERSETS
    11271237  if ( pcVPS->getNumIndependentLayers() > 1 )
    11281238  {
     
    11361246    }
    11371247  }
     1248#endif
     1249
    11381250  if (pcVPS->getNumLayerSets() > 1)
    11391251  {
     
    11461258
    11471259
     1260#if H_MV_HLS10_PTL_FIX
     1261  if (pcVPS->getVpsBaseLayerInternalFlag() )
     1262  { 
     1263    assert( pcVPS->getProfileTierLevelIdx(0,0) == pcVPS->inferProfileTierLevelIdx(0,0) );
     1264  }
     1265#endif
    11481266
    11491267
     
    11521270    if( i >= pcVPS->getNumLayerSets( ) )   
    11531271    {     
     1272#if !VPS_MISC_UPDATES
    11541273      WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ),      "layer_set_idx_for_ols_minus1[i]" );
     1274#else
     1275      WRITE_CODE( pcVPS->getLayerSetIdxForOlsMinus1( i ), pcVPS->getLayerSetIdxForOlsMinus1Len( i ) ,      "layer_set_idx_for_ols_minus1[i]" );
     1276#endif
    11551277    }
    11561278
     
    11691291      }
    11701292    }       
    1171 
    1172 
     1293       
     1294#if H_MV_HLS10_PTL
     1295    for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ )
     1296    {   
     1297      if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() > 0 )
     1298      {
     1299        WRITE_CODE( pcVPS->getProfileTierLevelIdx( i, j ), pcVPS->getProfileTierLevelIdxLen() ,"profile_tier_level_idx[ i ][ j ]" );   
     1300      }
     1301#if H_MV_HLS10_PTL_FIX
     1302      if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 )
     1303      {
     1304        assert( pcVPS->getProfileTierLevelIdx( i , j ) == pcVPS->inferProfileTierLevelIdx( i, j ) );
     1305      }
     1306#endif
     1307
     1308    }
     1309#else
    11731310    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    11741311    {     
    11751312      WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" );   
    11761313    }
     1314#endif
    11771315    if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
    11781316    {
     
    12241362  }
    12251363
     1364#if !H_MV_HLS10_GEN_FIX
    12261365  WRITE_FLAG( 0, "vps_reserved_zero_flag" );
     1366#endif
    12271367  codeDpbSize( pcVPS );
    12281368
     
    13011441        for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ )   
    13021442        {
     1443#if H_MV_HLS10_DBP_SIZE
     1444          if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) ))
     1445          {
     1446            WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );
     1447          }
     1448          else
     1449          {
     1450            if ( vps->getNecessaryLayerFlag( i, k ) && ( j == 0 ) && ( k == 0 ) )
     1451            {
     1452              assert( dpbSize->getMaxVpsDecPicBufferingMinus1(i ,k, j ) ==  0 );
     1453            }
     1454          }
     1455#else
    13031456          WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );
     1457#endif
    13041458        }
    13051459        WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" );
     
    13121466          for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ )   
    13131467          {
    1314             assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     1468#if H_MV_HLS10_DBP_SIZE
     1469            if ( vps->getNecessaryLayerFlag(i, k ) )
     1470            {           
     1471#endif
     1472              assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     1473#if H_MV_HLS10_DBP_SIZE
     1474            }
     1475#endif 
    13151476          }
    13161477          assert( dpbSize->getMaxVpsNumReorderPics      ( i, j ) ==  dpbSize->getMaxVpsNumReorderPics      ( i, j - 1 ) );
     
    13471508    pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, true );
    13481509  }
     1510#if H_MV_HLS10_GEN_VSP_CONF_WIN
     1511  WRITE_FLAG( pcRepFormat->getConformanceWindowVpsFlag( ) ? 1 : 0 , "conformance_window_vps_flag" );
     1512  if ( pcRepFormat->getConformanceWindowVpsFlag() )
     1513  {   
     1514    WRITE_UVLC( pcRepFormat->getConfWinVpsLeftOffset( ), "conf_win_vps_left_offset" );
     1515    WRITE_UVLC( pcRepFormat->getConfWinVpsRightOffset( ), "conf_win_vps_right_offset" );
     1516    WRITE_UVLC( pcRepFormat->getConfWinVpsTopOffset( ), "conf_win_vps_top_offset" );
     1517    WRITE_UVLC( pcRepFormat->getConfWinVpsBottomOffset( ), "conf_win_vps_bottom_offset" );
     1518  }
     1519#endif
    13491520}
    13501521
     
    13711542  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    13721543  {
     1544#if H_MV_HLS10_VPS_VUI
     1545    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ )
     1546#else
    13731547    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
     1548#endif
    13741549    {
    13751550      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
     
    14041579  else
    14051580  {
     1581#if H_MV_HLS10_VPS_VUI
     1582    assert( pcVPSVUI->getVpsNumVideoSignalInfoMinus1() == pcVPS->getMaxLayersMinus1() - ( pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1)  );
     1583#else
    14061584    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
     1585#endif
    14071586  }
    14081587
     
    14171596  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    14181597  {
     1598#if I0045_VPS_VUI_VST_PARAMS
     1599    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1600    {
     1601      WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );
     1602    }
     1603#else
    14191604    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    14201605    {
     
    14291614      assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i  ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) );
    14301615    }
     1616#endif
    14311617  }
    14321618  WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" );
     
    14451631      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ )
    14461632      { 
     1633#if H_MV_HLS10_REF_PRED_LAYERS
     1634        Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdRefLayer(pcVPS->getLayerIdInNuh( i ) , j  )); 
     1635#else
    14471636        Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j  )); 
     1637#endif
    14481638        if( pcVPSVUI->getTilesInUseFlag( i )  &&  pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 
    14491639        {
     
    14631653    }
    14641654  }
     1655#if H_MV_HLS10_VPS_VUI
     1656  WRITE_FLAG( pcVPSVUI->getSingleLayerForNonIrapFlag( ) ? 1 : 0 , "single_layer_for_non_irap_flag" );
     1657  WRITE_FLAG( pcVPSVUI->getHigherLayerIrapSkipFlag( ) ? 1 : 0 , "higher_layer_irap_skip_flag" );
     1658#else
    14651659  WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" );
     1660#endif
    14661661  WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" );
    14671662
     
    14721667      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )
    14731668      {
     1669#if H_MV_HLS10_REF_PRED_LAYERS
     1670        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
     1671#else
    14741672        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
     1673#endif
    14751674        {       
    14761675          WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" );
     
    15141713
    15151714  assert ( vpsVuiBspHrdP );
    1516 
    15171715 
     1716#if H_MV_HLS10_VPS_VUI_BSP
     1717  WRITE_UVLC( vpsVuiBspHrdP->getVpsNumAddHrdParams( ), "vps_num_add_hrd_params" );
     1718
     1719  for( Int i = pcVPS->getNumHrdParameters(); i < pcVPS->getNumHrdParameters() + vpsVuiBspHrdP->getVpsNumAddHrdParams(); i++ )
     1720  { 
     1721    if( i > 0 ) 
     1722    {
     1723      WRITE_FLAG( vpsVuiBspHrdP->getCprmsAddPresentFlag( i ) ? 1 : 0 , "cprms_add_present_flag" );
     1724    }
     1725    WRITE_UVLC( vpsVuiBspHrdP->getNumSubLayerHrdMinus1( i ), "num_sub_layer_hrd_minus1" );
     1726    TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i );
     1727    codeHrdParameters( hrdParameters, vpsVuiBspHrdP->getCprmsAddPresentFlag( i ), vpsVuiBspHrdP->getNumSubLayerHrdMinus1( i ) );     
     1728  }
     1729
     1730  for( Int h = 1; h < pcVPS->getNumOutputLayerSets(); h++ )
     1731  { 
     1732    WRITE_UVLC( vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ), "num_signalled_partitioning_schemes" );
     1733
     1734    for( Int j = 1; j < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; j++ )
     1735    { 
     1736      WRITE_UVLC( vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ), "num_partitions_in_scheme_minus1" );
     1737      for( Int k = 0; k  <=  vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ ) 
     1738      {
     1739        for( Int r = 0; r < pcVPS->getNumLayersInIdList(pcVPS->olsIdxToLsIdx( h ) )   ; r++ ) 
     1740        {
     1741          WRITE_FLAG( vpsVuiBspHrdP->getLayerIncludedInPartitionFlag( h, j, k, r ) ? 1 : 0 , "layer_included_in_partition_flag" );
     1742        }
     1743      }
     1744    } 
     1745    for( Int i = 0; i < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; i++ ) 
     1746    {
     1747      for( Int t = 0; t  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( pcVPS->olsIdxToLsIdx( h ) ); t++ )
     1748      { 
     1749        WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedulesMinus1( h, i, t ), "num_bsp_schedules_minus1" );
     1750        for( Int j = 0; j  <=  vpsVuiBspHrdP->getNumBspSchedulesMinus1( h, i, t ); j++ ) 
     1751        {
     1752          for( Int k = 0; k  <=  vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ )
     1753          { 
     1754            WRITE_CODE( vpsVuiBspHrdP->getBspHrdIdx( h, i, t, j, k ), vpsVuiBspHrdP->getBspHrdIdxLen( pcVPS ), "bsp_hrd_idx" );
     1755            WRITE_UVLC( vpsVuiBspHrdP->getBspSchedIdx( h, i, t, j, k ), "bsp_sched_idx" );
     1756          } 
     1757        }
     1758      } 
     1759    }
     1760  } 
     1761
     1762#else // H_MV_HLS10_GEN
    15181763  WRITE_UVLC( vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ), "vps_num_bsp_hrd_parameters_minus1" );
    15191764  for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ )
     
    15521797      }
    15531798    } 
    1554   } 
     1799  }
     1800#endif 
    15551801
    1556 
    15571802#endif
    15581803
     
    17331978      esb++;
    17341979      WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );
     1980#if NON_REF_NAL_TYPE_DISCARDABLE
     1981      if (pcSlice->getDiscardableFlag( ))
     1982      {
     1983        assert(pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R &&
     1984          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R &&
     1985          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R &&
     1986          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R &&
     1987          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R);
     1988      }
     1989#endif
    17351990    }
    17361991
     
    18932148      if (pcSlice->getSPS()->getTMVPFlagsPresent())
    18942149      {
     2150#if I0044_SLICE_TMVP
     2151        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" );
     2152#else
    18952153        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enable_flag" );
     2154#endif
    18962155      }
    18972156    }
     
    21262385  }
    21272386#if H_3D
     2387#if LGE_FCO_I0116
     2388  if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && pcSlice->getIsDepth() )
     2389#else
    21282390  if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )
     2391#endif
    21292392  {
    21302393    for( UInt uiId = 0; uiId < pcSlice->getViewIndex(); uiId++ )
     
    23122575  WRITE_FLAG(ptl->getFrameOnlyConstraintFlag(), "general_frame_only_constraint_flag");
    23132576 
     2577#if H_MV_HLS10_PTL
     2578#if H_MV_HLS10_PTL_INFER_FIX
     2579  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
     2586  {
     2587    WRITE_FLAG( ptl->getMax12bitConstraintFlag( ) ? 1 : 0 , "max_12bit_constraint_flag" );
     2588    WRITE_FLAG( ptl->getMax10bitConstraintFlag( ) ? 1 : 0 , "max_10bit_constraint_flag" );
     2589    WRITE_FLAG( ptl->getMax8bitConstraintFlag( ) ? 1 : 0 , "max_8bit_constraint_flag" );
     2590    WRITE_FLAG( ptl->getMax422chromaConstraintFlag( ) ? 1 : 0 , "max_422chroma_constraint_flag" );
     2591    WRITE_FLAG( ptl->getMax420chromaConstraintFlag( ) ? 1 : 0 , "max_420chroma_constraint_flag" );
     2592    WRITE_FLAG( ptl->getMaxMonochromeConstraintFlag( ) ? 1 : 0 , "max_monochrome_constraint_flag" );
     2593    WRITE_FLAG( ptl->getIntraConstraintFlag( ) ? 1 : 0 , "intra_constraint_flag" );
     2594    WRITE_FLAG( ptl->getOnePictureOnlyConstraintFlag( ) ? 1 : 0 , "one_picture_only_constraint_flag" );
     2595    WRITE_FLAG( ptl->getLowerBitRateConstraintFlag( ) ? 1 : 0 , "lower_bit_rate_constraint_flag" );
     2596    WRITE_CODE( 0, 16, "XXX_reserved_zero_34bits[0..15]");
     2597    WRITE_CODE( 0, 16, "XXX_reserved_zero_34bits[16..31]");
     2598    WRITE_CODE( 0, 2 , "XXX_reserved_zero_34bits[32..33]");
     2599  }
     2600  else
     2601  {
     2602    WRITE_CODE( 0, 16, "XXX_reserved_zero_43bits[0..15]");
     2603    WRITE_CODE( 0, 16, "XXX_reserved_zero_43bits[16..31]");
     2604    WRITE_CODE( 0, 11, "XXX_reserved_zero_43bits[32..42]");
     2605  }
     2606#if H_MV_HLS10_PTL_INFER_FIX
     2607    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
     2614  {
     2615    WRITE_FLAG( ptl->getInbldFlag( ) ? 1 : 0 , "inbld_flag" );
     2616  }
     2617  else
     2618  {
     2619    WRITE_FLAG(0, "reserved_zero_bit");
     2620  }
     2621#else
    23142622  WRITE_CODE(0 , 16, "XXX_reserved_zero_44bits[0..15]");
    23152623  WRITE_CODE(0 , 16, "XXX_reserved_zero_44bits[16..31]");
    23162624  WRITE_CODE(0 , 12, "XXX_reserved_zero_44bits[32..43]");
    2317     }
     2625#endif
     2626}
    23182627
    23192628/**
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r1039 r1066  
    107107  Void  codePPS                 ( TComPPS* pcPPS );
    108108
     109#if H_MV_HLS10_PPS
     110#if H_MV
     111  Void codePPSMultilayerExtension( TComPPS* pcPPS );
     112#endif
     113#endif
     114
    109115#if H_3D
    110116  Void  codePPSExtension        ( TComPPS* pcPPS );
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r1039 r1066  
    538538#if MTK_I0099_VPS_EX2
    539539#if MTK_I0099_FIX
     540#if LGE_FCO_I0116
     541      if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ) && pcTexture->getReconMark())
     542#else
    540543      if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ))
     544#endif
    541545#else
    542546      if(depthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFalg)
     
    25882592  // fetch virtual depth block
    25892593  UInt uiDepthStride = 0;
     2594#if LGE_FCO_I0116
     2595  Pel* pDepthPels = rpcTempCU->getVirtualDepthBlock(rpcTempCU->getZorderIdxInCU(), uiWidth, uiHeight, uiDepthStride);
     2596#else
    25902597  Pel* pDepthPels = rpcTempCU->getVirtualDepthBlock(0, uiWidth, uiHeight, uiDepthStride);
     2598#endif
    25912599  AOF( pDepthPels != NULL );
    25922600  AOF( uiDepthStride != 0 );
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1039 r1066  
    185185  else
    186186  {
     187#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     188    Int ICEnableCandidate = pcCU->getSlice()->getICEnableCandidate(pcCU->getSlice()->getDepth());
     189    Int ICEnableNum = pcCU->getSlice()->getICEnableNum(pcCU->getSlice()->getDepth());
     190    ICEnableCandidate++;
     191    if(pcCU->getICFlag(uiAbsPartIdx))
     192    {
     193      ICEnableNum++;
     194    }
     195    pcCU->getSlice()->setICEnableCandidate(pcCU->getSlice()->getDepth(), ICEnableCandidate);
     196    pcCU->getSlice()->setICEnableNum(pcCU->getSlice()->getDepth(), ICEnableNum);
     197#else
    187198    g_aICEnableCANDIDATE[pcCU->getSlice()->getDepth()]++;
    188199    if(pcCU->getICFlag(uiAbsPartIdx))
     
    190201      g_aICEnableNUM[pcCU->getSlice()->getDepth()]++;
    191202    }
     203#endif
    192204  }
    193205  if( pcCU->isICFlagRequired( uiAbsPartIdx ) )
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r1039 r1066  
    160160#endif
    161161#endif
    162 
     162#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     163  m_aICEnableCandidate           = pcTEncTop->getICEnableCandidate();
     164  m_aICEnableNum           = pcTEncTop->getICEnableNum();
     165#endif
    163166#if KWU_FIX_URQ
    164167  m_pcRateCtrl           = pcTEncTop->getRateCtrl();
     
    968971#endif   
    969972#endif
     973#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     974    pcSlice->setICEnableCandidate( m_aICEnableCandidate );         
     975    pcSlice->setICEnableNum( m_aICEnableNum );         
     976#endif
    970977    //  Slice info. refinement
    971978#if H_MV
  • trunk/source/Lib/TLibEncoder/TEncGOP.h

    r964 r1066  
    116116#endif
    117117#endif
     118#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     119  Int *m_aICEnableCandidate;
     120  Int *m_aICEnableNum;
     121#endif
    118122  //--Adaptive Loop filter
    119123  TEncSampleAdaptiveOffset*  m_pcSAO;
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r1039 r1066  
    732732  UInt uiTexturePart = eSize;
    733733#if MTK_I0099_VPS_EX2
     734#if LGE_FCO_I0116
     735  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag && pcTexture->getReconMark())
     736#else
    734737  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag )
     738#endif
    735739#else
    736740  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC() )
     
    11061110
    11071111#if MTK_I0099_VPS_EX2
     1112#if LGE_FCO_I0116
     1113  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag && pcTexture->getReconMark() )
     1114#else
    11081115  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag  )
     1116#endif
    11091117#else
    11101118  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC())
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r1039 r1066  
    30833083        Double dLambda;
    30843084        if ( m_pcRdCost->getUseLambdaScaleVSO() )
     3085        {
    30853086          dLambda = m_pcRdCost->getUseRenModel() ? m_pcRdCost->getLambdaVSO() : m_pcRdCost->getSqrtLambdaVSO();
     3087        }
    30863088        else       
     3089        {
    30873090          dLambda = m_pcRdCost->getSqrtLambda();       
    3088 
    3089         Double cost      = (Double)uiSad + (Double)iModeBits * m_pcRdCost->getSqrtLambda();
     3091        }
     3092
     3093        Double cost      = (Double)uiSad + (Double)iModeBits * dLambda;
    30903094#else
    30913095        Double cost      = (Double)uiSad + (Double)iModeBits * m_pcRdCost->getSqrtLambda();
     
    32123216#if H_3D_FCO
    32133217            TComPic* picTexture  = pcCU->getSlice()->getIvPic(false, pcCU->getSlice()->getViewIndex() );
     3218#if LGE_FCO_I0116
     3219            if ( !picTexture->getReconMark() && (DMM4_IDX == dmmType ) )
     3220#else
    32143221            if ( !picTexture->getReconMark() && (DMM3_IDX == dmmType || DMM4_IDX == dmmType ) )
     3222#endif
    32153223            {
    32163224                continue;
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r1039 r1066  
    7272  ContextModel::buildNextStateTable();
    7373#endif
     74#if H_MV_HLS10_GEN_FIX
     75#if H_MV
     76  m_iNumSubstreams         = 0;
     77#endif
     78#endif
    7479
    7580  m_pcSbacCoders           = NULL;
     
    8489  m_ivPicLists = NULL;
    8590#endif
     91#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     92  m_aICEnableCandidate = NULL;
     93  m_aICEnableNum = NULL;
     94#endif
    8695}
    8796
     
    227236      for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ )
    228237      {
     238#if H_MV_HLS10_GEN_FIX
     239#if H_MV
     240        xDelete( false, m_pppcRDSbacCoder, iDepth, iCIIdx);
     241        xDelete( false, m_pppcBinCoderCABAC, iDepth, iCIIdx);
     242#else
    229243        delete m_pppcRDSbacCoder[iDepth][iCIIdx];
    230244        delete m_pppcBinCoderCABAC[iDepth][iCIIdx];
     245#endif
     246#endif
    231247      }
    232248    }
     
    234250    for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
    235251    {
     252#if H_MV_HLS10_GEN_FIX
     253#if H_MV
     254      xDelete( true, m_pppcRDSbacCoder  , iDepth);
     255      xDelete( true, m_pppcBinCoderCABAC, iDepth);
     256#else
    236257      delete [] m_pppcRDSbacCoder[iDepth];
    237258      delete [] m_pppcBinCoderCABAC[iDepth];
    238     }
    239    
     259#endif
     260#endif
     261    }
     262
     263#if H_MV_HLS10_GEN_FIX
     264#if H_MV
     265     xDelete( true, m_pppcRDSbacCoder  );
     266     xDelete( true, m_pppcBinCoderCABAC);
     267#else
    240268    delete [] m_pppcRDSbacCoder;
    241269    delete [] m_pppcBinCoderCABAC;
    242 
     270#endif
     271#endif
    243272    for ( UInt ui = 0; ui < m_iNumSubstreams; ui++ )
    244273    {
     
    247276        for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ )
    248277        {
     278#if H_MV_HLS10_GEN_FIX
     279#if H_MV
     280          xDelete(false, m_ppppcRDSbacCoders  ,ui, iDepth, iCIIdx);
     281          xDelete(false, m_ppppcBinCodersCABAC,ui, iDepth, iCIIdx);
     282#else
    249283          delete m_ppppcRDSbacCoders  [ui][iDepth][iCIIdx];
    250284          delete m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx];
     285#endif
     286#endif
    251287        }
    252288      }
     
    254290      for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
    255291      {
     292#if H_MV_HLS10_GEN_FIX
     293#if H_MV
     294        xDelete(true, m_ppppcRDSbacCoders  ,ui, iDepth);
     295        xDelete(true, m_ppppcBinCodersCABAC,ui, iDepth);       
     296#else
    256297        delete [] m_ppppcRDSbacCoders  [ui][iDepth];
    257298        delete [] m_ppppcBinCodersCABAC[ui][iDepth];
    258       }
     299#endif
     300#endif
     301      }
     302
     303
     304#if H_MV_HLS10_GEN_FIX
     305#if H_MV
     306      xDelete(true, m_ppppcRDSbacCoders,   ui);
     307      xDelete(true, m_ppppcBinCodersCABAC, ui);     
     308#else
    259309      delete[] m_ppppcRDSbacCoders  [ui];
    260310      delete[] m_ppppcBinCodersCABAC[ui];
    261     }
     311#endif
     312#endif
     313    }
     314#if H_MV_HLS10_GEN_FIX
     315#if H_MV
     316    xDelete(true, m_ppppcRDSbacCoders    ) ;
     317    xDelete(true, m_ppppcBinCodersCABAC);
     318    xDelete(true, m_pcSbacCoders);
     319    xDelete(true, m_pcBinCoderCABACs);
     320    xDelete(true, m_pcRDGoOnSbacCoders); 
     321    xDelete(true, m_pcRDGoOnBinCodersCABAC);
     322    xDelete(true, m_pcBitCounters);
     323    xDelete(true, m_pcRdCosts);
     324#else
    262325    delete[] m_ppppcRDSbacCoders;
    263326    delete[] m_ppppcBinCodersCABAC;
     
    268331  delete[] m_pcBitCounters;
    269332  delete[] m_pcRdCosts;
    270  
     333#endif
     334#endif
     335
    271336#if !H_MV
    272337    // destroy ROM
     
    305370
    306371  xInitPPSforTiles();
    307 
     372#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     373  m_aICEnableCandidate = new Int[ 10 ];
     374  m_aICEnableNum = new Int[ 10 ];
     375
     376  for(int i=0;i<10;i++)
     377  {
     378    m_aICEnableCandidate[i]=0;
     379    m_aICEnableNum[i]=0;
     380  }
     381#endif
    308382  // initialize processing unit classes
    309383  m_cGOPEncoder.  init( this );
     
    695769#if H_MV 
    696770  m_cSPS.setUpdateRepFormatFlag           ( false );   
     771#if H_MV_HLS10_MULTILAYERSPS 
     772  Bool multiLayerExtensionFlag  = ( getLayerId() > 0 ) && ( m_cVPS->getNumRefLayers( getLayerId() ) > 0 );
     773 
     774  m_cSPS.setSpsExtOrMaxSubLayersMinus1( multiLayerExtensionFlag ? 7 : m_maxTempLayer - 1 );
     775  if ( multiLayerExtensionFlag )
     776  {
     777    m_cSPS.setSpsInferScalingListFlag   ( true );
     778    m_cSPS.setSpsScalingListRefLayerId( m_cVPS->getIdRefLayer( getLayerId(), 0 ) );
     779  }
     780#else
    697781  m_cSPS.setSpsInferScalingListFlag       ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) );
    698782  m_cSPS.setSpsScalingListRefLayerId      ( 0              );
    699   m_cSPS.setSpsExtensionPresentFlag              ( true );
     783#endif
     784  m_cSPS.setSpsExtensionPresentFlag       ( true );
    700785  m_cSPS.setSpsMultilayerExtensionFlag    ( true );
    701786#if H_3D
     
    778863    for( Int is = 0; is < targetDecLayerIdList.size(); is++  )
    779864    {
     865#if H_MV_HLS10_ADD_LAYERSETS
     866      if ( m_cVPS->getNecessaryLayerFlag( ols, is ) )
     867      {     
     868        m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true );       
     869      }
     870#else
    780871      m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true );       
    781     }
    782   }
    783 
     872#endif
     873    }
     874  }
     875#if !H_MV_HLS10_ADD_LAYERSETS
    784876  m_cVPS->inferDbpSizeLayerSetZero( &m_cSPS, true );
     877#endif
    785878#endif
    786879  m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma);
  • trunk/source/Lib/TLibEncoder/TEncTop.h

    r872 r1066  
    8080  TComPicLists*           m_ivPicLists;                   ///< access to picture lists of other layers
    8181#endif
     82#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     83  Int *m_aICEnableCandidate;
     84  Int *m_aICEnableNum;
     85#endif
    8286  // encoder search
    8387  TEncSearch              m_cSearch;                      ///< encoder search class
     
    146150  Void  xInitPPSforTiles  ();
    147151  Void  xInitRPS          (Bool isFieldCoding);           ///< initialize PPS from encoder options
    148 
     152#if H_MV_HLS10_GEN_FIX
     153#if H_MV
     154
     155  template <class T>     Void  xDelete( Bool ar, T inArray )
     156  {
     157    if( inArray != NULL)
     158    {
     159      if ( ar )
     160      {     
     161        delete[] inArray;
     162      }
     163      else
     164      {
     165        delete inArray;
     166      }
     167    }
     168  }
     169
     170  template <class T>     Void  xDelete( Bool ar, T inArray, Int idx1 )
     171  {
     172    if( inArray != NULL)
     173    {
     174        xDelete( ar, inArray[idx1]);
     175    }
     176  }
     177
     178  template <class T>     Void  xDelete( Bool ar, T inArray, Int idx1, Int idx2 )
     179  {
     180    if( inArray != NULL )
     181    {
     182      xDelete( ar, inArray[idx1], idx2 );
     183    }
     184  }
     185
     186  template <class T>     Void  xDelete( Bool ar, T inArray, Int idx1, Int idx2, Int idx3 )
     187  {
     188    if( inArray != NULL )
     189    {
     190      xDelete( ar, inArray[idx1], idx2, idx3 );
     191    }
     192  }
     193
     194#endif
     195#endif
    149196public:
    150197  TEncTop();
     
    161208#if H_MV 
    162209  TComPicLists* getIvPicLists() { return m_ivPicLists; }
     210#endif
     211#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     212  Int *getICEnableCandidate() { return m_aICEnableCandidate; }
     213  Int *getICEnableNum() { return m_aICEnableNum; }
    163214#endif
    164215  Void      deletePicBuffer ();
     
    221272  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    222273#endif
     274#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     275  Void                    setICEnableCandidate         ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; }
     276  Void                    setICEnableNum         ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }
     277#endif
    223278  // -------------------------------------------------------------------------------------------------------------------
    224279  // encoder function
Note: See TracChangeset for help on using the changeset viewer.