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


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/TLibDecoder
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1066 r1084  
    5353  }
    5454  // To avoid mismatches
    55 #if H_MV_HLS10_GEN_FIX
    5655  fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() );
    5756#else
    58   fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );
    59 #endif
    60 #else
    6157  fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() );
    6258#endif
     
    7066    return;
    7167  }
    72 #if H_MV_HLS10_GEN_FIX
    7368  fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() );
    74 #else
    75   fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );
    76 #endif
    7769#else
    7870  fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() );
     
    300292  if( pcPPS->getTilesEnabledFlag() )
    301293  {
    302     READ_UVLC ( uiCode, "num_tile_columns_minus1" );                pcPPS->setNumColumnsMinus1( uiCode ); 
    303     READ_UVLC ( uiCode, "num_tile_rows_minus1" );                   pcPPS->setNumRowsMinus1( uiCode ); 
    304     READ_FLAG ( uiCode, "uniform_spacing_flag" );                   pcPPS->setUniformSpacingFlag( uiCode );
    305 
    306     if( !pcPPS->getUniformSpacingFlag())
    307     {
    308       UInt* columnWidth = (UInt*)malloc(pcPPS->getNumColumnsMinus1()*sizeof(UInt));
    309       for(UInt i=0; i<pcPPS->getNumColumnsMinus1(); i++)
     294    READ_UVLC ( uiCode, "num_tile_columns_minus1" );                pcPPS->setNumTileColumnsMinus1( uiCode ); 
     295    READ_UVLC ( uiCode, "num_tile_rows_minus1" );                   pcPPS->setNumTileRowsMinus1( uiCode ); 
     296    READ_FLAG ( uiCode, "uniform_spacing_flag" );                   pcPPS->setTileUniformSpacingFlag( uiCode == 1 );
     297
     298    if( !pcPPS->getTileUniformSpacingFlag())
     299    {
     300      std::vector<Int> columnWidth(pcPPS->getNumTileColumnsMinus1());
     301      for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++)
    310302      {
    311303        READ_UVLC( uiCode, "column_width_minus1" ); 
    312304        columnWidth[i] = uiCode+1;
    313305      }
    314       pcPPS->setColumnWidth(columnWidth);
    315       free(columnWidth);
    316 
    317       UInt* rowHeight = (UInt*)malloc(pcPPS->getNumRowsMinus1()*sizeof(UInt));
    318       for(UInt i=0; i<pcPPS->getNumRowsMinus1(); i++)
     306      pcPPS->setTileColumnWidth(columnWidth);
     307
     308      std::vector<Int> rowHeight (pcPPS->getTileNumRowsMinus1());
     309      for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++)
    319310      {
    320311        READ_UVLC( uiCode, "row_height_minus1" );
    321312        rowHeight[i] = uiCode + 1;
    322313      }
    323       pcPPS->setRowHeight(rowHeight);
    324       free(rowHeight); 
    325     }
    326 
    327     if(pcPPS->getNumColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0)
     314      pcPPS->setTileRowHeight(rowHeight);
     315    }
     316
     317    if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0)
    328318    {
    329319      READ_FLAG ( uiCode, "loop_filter_across_tiles_enabled_flag" );   pcPPS->setLoopFilterAcrossTilesEnabledFlag( uiCode ? true : false );
     
    342332    }
    343333  }
    344 #if !H_MV_HLS10_PPS
    345 #if H_MV
    346   if ( pcPPS->getLayerId() > 0 )
    347   {
    348     READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );   
    349   }
    350 
    351   if( pcPPS->getPpsInferScalingListFlag( ) )
    352   {
    353     READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
    354   }
    355   else
    356   { 
    357 #endif
    358 #endif
    359334  READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" );           pcPPS->setScalingListPresentFlag( uiCode ? true : false );
    360335  if(pcPPS->getScalingListPresentFlag ())
     
    362337    parseScalingList( pcPPS->getScalingList() );
    363338  }
    364 #if !H_MV_HLS10_PPS
    365 #if H_MV
    366   }
    367 #endif
    368 #endif
    369339  READ_FLAG( uiCode, "lists_modification_present_flag");
    370340  pcPPS->setListsModificationPresentFlag(uiCode);
     
    400370    if ( pcPPS->getPpsMultilayerExtensionFlag() )
    401371    {
    402 #if H_MV_HLS10_PPS
    403372      parsePPSMultilayerExtension( pcPPS );
    404 #else
    405       READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    406       READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" );
    407 #endif
    408373    }
    409374#if !H_3D
     
    505470              READ_CODE(8, uiNumDepthValues, "num_depth_values_in_dlt[i]");   // num_entry
    506471
    507 #if !H_3D_DELTA_DLT
    508               if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false )       // Single-view DLT Diff Coding
    509 #endif
    510472              {
    511473                // The condition if( pcVPS->getNumDepthValues(i) > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component.
     
    555517            }
    556518           
    557 #if H_3D_DELTA_DLT
    558519            if( pcDLT->getInterViewDltPredEnableFlag( i ) )
    559520            {
     
    571532              pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
    572533            }
    573 #else
    574             // store final DLT
    575             pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
    576 #endif
     534
    577535          }
    578536        }
     
    782740    READ_CODE( 3,  uiCode, "sps_max_sub_layers_minus1" );          pcSPS->setMaxTLayers   ( uiCode+1 );
    783741    assert(uiCode <= 6);
    784 #if H_MV_HLS10_MULTILAYERSPS
    785742#if H_MV
    786743  }
     
    793750  {
    794751#endif
    795 #endif
    796752
    797753    READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" );               pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );
     
    803759
    804760    parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
    805 #if H_MV_HLS10_PTL_INFER_FIX
     761#if H_MV
    806762    pcSPS->getPTL()->inferGeneralValues ( true, 0, NULL );
    807763    pcSPS->getPTL()->inferSubLayerValues( pcSPS->getMaxTLayers() - 1, 0, NULL );
    808 #endif
    809 #if H_MV
    810764  }
    811765#endif
     
    813767  assert(uiCode <= 15);
    814768#if H_MV
    815 #if H_MV_HLS10_MULTILAYERSPS
    816769  if ( pcSPS->getMultiLayerExtSpsFlag() )
    817 #else
    818   if ( pcSPS->getLayerId() > 0 )
    819 #endif
    820770  {
    821771    READ_FLAG( uiCode, "update_rep_format_flag" );               pcSPS->setUpdateRepFormatFlag( uiCode == 1 );
     
    839789    READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
    840790    READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
    841 #if !H_MV_HLS10_MULTILAYERSPS
    842 #if H_MV
    843   }
    844 #endif
    845 #endif
    846791  READ_FLAG(     uiCode, "conformance_window_flag");
    847792  if (uiCode != 0)
     
    855800    READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode  );
    856801    READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode  );   
    857 #if H_MV_HLS10_MULTILAYERSPS
    858   }
    859 #endif
     802  }
    860803#else
    861804    READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
     
    867810
    868811#if H_MV
    869 #if H_MV_HLS10_MULTILAYERSPS
    870812  if ( !pcSPS->getMultiLayerExtSpsFlag() )
    871 #else // H_MV_HLS10_GEN
    872   if ( pcSPS->getLayerId() == 0 )
    873 #endif // H_MV_HLS10_GEN
    874813  {
    875814#endif
     
    891830
    892831#if H_MV
    893 #if H_MV_HLS10_MULTILAYERSPS
    894832  if ( !pcSPS->getMultiLayerExtSpsFlag())
    895 #else
    896   if ( pcSPS->getLayerId() == 0 )
    897 #endif
    898833  { 
    899834#endif
     
    954889  {
    955890#if H_MV
    956 #if H_MV_HLS10_MULTILAYERSPS
    957891    if ( pcSPS->getMultiLayerExtSpsFlag() )
    958 #else
    959     if ( pcSPS->getLayerId() > 0 )
    960 #endif
    961892    {   
    962893      READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setSpsInferScalingListFlag( uiCode == 1 );
     
    10861017  READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
    10871018 
    1088 #if !H_MV_HLS10_PPS
    1089   READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode );
    1090 
    1091   for( Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets( ); i++)
    1092   {   
    1093     READ_CODE( 6, uiCode, "scaled_ref_layer_id" ); pcSPS->setScaledRefLayerId( i, uiCode );
    1094 
    1095     Int j = pcSPS->getScaledRefLayerId( i );
    1096     Int iCode;
    1097     READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); pcSPS->setScaledRefLayerLeftOffset( j, iCode );
    1098     READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); pcSPS->setScaledRefLayerTopOffset( j, iCode );
    1099     READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode );
    1100     READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );
    1101     READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" );
    1102   }
    1103 #endif
    11041019}
    11051020
     
    11071022Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
    11081023{
    1109 #if !MTK_I0099_VPS_EX2
    1110   UInt uiCode;
    1111 #if H_3D_QTLPC
    1112   //GT: This has to go to VPS
    1113   if( depthFlag )
    1114   {
    1115     READ_FLAG( uiCode, "use_qtl_flag" );
    1116     pcSPS->setUseQTL( uiCode );
    1117     READ_FLAG( uiCode, "use_pc_flag" );
    1118     pcSPS->setUsePC( uiCode );
    1119   }
    1120 #endif
    1121 #endif
    1122 }
    1123 #endif
    1124 
    1125 #if H_MV_HLS10_PPS
     1024
     1025}
     1026#endif
     1027
    11261028Void TDecCavlc::parsePPSMultilayerExtension(TComPPS* pcPPS)
    11271029{
     
    11341036
    11351037#endif
    1136 #endif
    11371038
    11381039Void TDecCavlc::parseVPS(TComVPS* pcVPS)
     
    11431044#if H_MV
    11441045  READ_FLAG( uiCode, "vps_base_layer_internal_flag" );            pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 );
    1145 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL
    11461046  READ_FLAG( uiCode, "vps_base_layer_available_flag" );           pcVPS->setVpsBaseLayerAvailableFlag( uiCode == 1 );
    1147 #else
    1148   READ_FLAG( uiCode, "vps_reserved_one_bit" );                    assert( uiCode == 1 );
    1149 #endif
    11501047#else
    11511048  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     
    11621059  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    11631060  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
    1164 #if H_MV_HLS10_PTL_INFER_FIX
    11651061#if H_MV
    11661062  pcVPS->getPTL()->inferGeneralValues ( true, 0, NULL );
    11671063  pcVPS->getPTL()->inferSubLayerValues( pcVPS->getMaxTLayers() - 1, 0, NULL );
    1168 #endif
    11691064#endif
    11701065  UInt subLayerOrderingInfoPresentFlag;
     
    11931088  READ_CODE( 6, uiCode, "vps_max_layer_id" );   pcVPS->setVpsMaxLayerId( uiCode );
    11941089
    1195 #if H_MV_HLS10_GEN_FIX
    11961090  READ_UVLC(    uiCode, "vps_num_layer_sets_minus1" );  pcVPS->setVpsNumLayerSetsMinus1( uiCode );
    1197 #else
    1198   READ_UVLC(    uiCode, "vps_max_num_layer_sets_minus1" );               pcVPS->setVpsNumLayerSetsMinus1( uiCode );
    1199 #endif
    12001091  for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ )
    12011092  {
     
    12411132        READ_FLAG( uiCode, "cprms_present_flag[i]" );              pcVPS->setCprmsPresentFlag( uiCode == 1 ? true : false, i );
    12421133      }
     1134      else
     1135      {
     1136        pcVPS->setCprmsPresentFlag( true, i );
     1137      }
     1138
    12431139      parseHrdParameters(pcVPS->getHrdParameters(i), pcVPS->getCprmsPresentFlag( i ), pcVPS->getMaxTLayers() - 1);
    12441140    }
     
    12861182  UInt uiCode;
    12871183
    1288 #if H_MV_HLS10_PTL
    12891184  if( pcVPS->getMaxLayersMinus1() > 0  &&  pcVPS->getVpsBaseLayerInternalFlag() )
    12901185  {
    12911186    parsePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1()  ); 
    12921187   
    1293 #if !H_MV_HLS10_PTL_INFER_FIX
    1294     // Copy Profile info
    1295     TComPTL temp = *pcVPS->getPTL( 1 );
    1296     *pcVPS->getPTL( 1 ) = *pcVPS->getPTL( 0 );
    1297     pcVPS->getPTL( 1 )->copyLevelFrom( &temp );
    1298 #else
    12991188    pcVPS->getPTL( 1 )->inferGeneralValues ( false, 1, pcVPS->getPTL( 0 ) );
    13001189    pcVPS->getPTL( 1 )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1(), 1, pcVPS->getPTL( 0 ) );   
    1301 #endif
    1302   }
    1303 #endif
     1190  }
    13041191
    13051192  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
     
    13751262  pcVPS->setRefLayers();
    13761263
    1377 #if H_MV_HLS10_ADD_LAYERSETS
    13781264  if ( pcVPS->getNumIndependentLayers() > 1 )
    13791265  {
     
    13881274    pcVPS->deriveAddLayerSetLayerIdList( i );
    13891275  }
    1390 #endif
    13911276
    13921277  READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 );
     
    14251310  READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 
    14261311
    1427 #if H_MV_HLS10_PTL
    14281312  Int offsetVal =  ( pcVPS->getMaxLayersMinus1() > 0  &&  pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1;   
    14291313  for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
     
    14311315    READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
    14321316    parsePTL ( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
    1433 #if H_MV_HLS10_PTL_INFER_FIX
    14341317    pcVPS->getPTL( offsetVal )->inferGeneralValues ( pcVPS->getVpsProfilePresentFlag( i ), offsetVal, pcVPS->getPTL( offsetVal - 1 ) );   
    14351318    pcVPS->getPTL( offsetVal )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1()      , offsetVal, pcVPS->getPTL( offsetVal - 1 ) );   
    1436 #else
    1437     if( !pcVPS->getVpsProfilePresentFlag( i ) )
    1438     {
    1439       TComPTL temp = *pcVPS->getPTL( offsetVal );
    1440       *pcVPS->getPTL( offsetVal ) = *pcVPS->getPTL( offsetVal - 1 );
    1441       pcVPS->getPTL( offsetVal )->copyLevelFrom( &temp );
    1442     }
    1443 #endif
    14441319    offsetVal++;
    14451320  }
    1446 #else
    1447   for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    1448   {
    1449     READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
    1450     parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
    1451     if( !pcVPS->getVpsProfilePresentFlag( i ) )
    1452     {
    1453       TComPTL temp = *pcVPS->getPTL( i );
    1454       *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 );
    1455       pcVPS->getPTL( i )->copyLevelFrom( &temp );
    1456     }
    1457   }
    1458 #endif
    1459 
    1460 #if !H_MV_HLS10_ADD_LAYERSETS
    1461   if ( pcVPS->getNumIndependentLayers() > 1 )
    1462   {
    1463    READ_UVLC( uiCode, "num_add_layer_sets"      ); pcVPS->setNumAddLayerSets( uiCode );
    1464   }
    1465   for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++)
    1466   {
    1467     for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++)
    1468     {
    1469       READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode );
    1470     }
    1471   }
    1472 #endif
     1321
    14731322
    14741323  if (pcVPS->getNumLayerSets() > 1)
     
    14841333  pcVPS->setLayerSetIdxForOlsMinus1(0, -1);
    14851334
    1486 #if H_MV_HLS10_NESSECARY_LAYER
    14871335  pcVPS->deriveNecessaryLayerFlags( 0 );
    1488 #endif
    14891336  pcVPS->deriveTargetLayerIdList( 0 );
    14901337
    1491 #if H_MV_HLS10_PTL_FIX
    14921338  if (pcVPS->getVpsBaseLayerInternalFlag() )
    14931339  { 
    14941340    pcVPS->setProfileTierLevelIdx(0,0, pcVPS->inferProfileTierLevelIdx(0,0) );
    14951341  }
    1496 #endif
    14971342  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    14981343  {
    14991344    if( i >= pcVPS->getNumLayerSets( ) )   
    15001345    {       
    1501 #if !VPS_MISC_UPDATES
    1502       READ_UVLC( uiCode,      "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
    1503 #else
    15041346      READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
    1505 #endif
    15061347    }
    15071348
     
    15201361      }
    15211362    }
    1522 #if H_MV_HLS10_NESSECARY_LAYER
    15231363    pcVPS->deriveNecessaryLayerFlags( i );
    1524 #endif
    15251364    pcVPS->deriveTargetLayerIdList( i );
    15261365
    1527 #if H_MV_HLS10_PTL
    15281366    for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ )
    15291367    {   
     
    15321370        READ_CODE( pcVPS->getProfileTierLevelIdxLen(), uiCode,"profile_tier_level_idx[ i ][ j ]" );   pcVPS->setProfileTierLevelIdx( i, j, uiCode );
    15331371      }
    1534 #if H_MV_HLS10_PTL_FIX
    15351372      if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 )
    15361373      {
    15371374        pcVPS->setProfileTierLevelIdx( i , j, pcVPS->inferProfileTierLevelIdx( i, j) );
    15381375      }
    1539 #endif
    1540     }
    1541 #else
    1542     if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    1543     {
    1544       READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" );   pcVPS->setProfileLevelTierIdx( i , uiCode );
    1545     }
    1546 #endif
     1376    }
    15471377
    15481378    if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
     
    15941424  }
    15951425
    1596 #if !H_MV_HLS10_GEN_FIX
    1597   READ_FLAG( uiCode, "vps_reserved_zero_flag" );
    1598 #endif
    15991426  parseDpbSize( pcVPS );
    16001427
     
    16701497    pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false );
    16711498  }
    1672 #if H_MV_HLS10_GEN_VSP_CONF_WIN
    16731499  READ_FLAG( uiCode, "conformance_window_vps_flag" ); pcRepFormat->setConformanceWindowVpsFlag( uiCode == 1 );
    16741500  if ( pcRepFormat->getConformanceWindowVpsFlag() )
     
    16791505    READ_UVLC( uiCode, "conf_win_vps_bottom_offset" ); pcRepFormat->setConfWinVpsBottomOffset( uiCode );
    16801506  }
    1681 #endif
    16821507}
    16831508
     
    17051530  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    17061531  {
    1707 #if H_MV_HLS10_VPS_VUI
    17081532    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <  pcVPS->getNumLayerSets(); i++ )
    1709 #else
    1710     for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1711 #endif
    17121533    {
    17131534      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
     
    17421563  else
    17431564  {
    1744 #if H_MV_HLS10_VPS_VUI
    17451565    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 );
    1746 #else
    1747     pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
    1748 #endif
    17491566  }
    17501567
     
    17571574  }
    17581575
    1759 #if I0045_VPS_VUI_VST_PARAMS
    17601576  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    17611577  {
     
    17791595    }
    17801596  }
    1781 #else
    1782   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    1783   {
    1784     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1785     {
    1786       READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
    1787       assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );
    1788     }
    1789   }
    1790   else
    1791   {
    1792     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1793     {
    1794       pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i );
    1795     }
    1796   }
    1797 #endif
     1597
    17981598  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
    17991599  if( !pcVPSVUI->getTilesNotInUseFlag() )
     
    18111611      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ )
    18121612      {
    1813 #if H_MV_HLS10_REF_PRED_LAYERS
    18141613        Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdDirectRefLayer(pcVPS->getLayerIdInNuh( i ) , j  )); 
    1815 #else
    1816         Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j  )); 
    1817 #endif
    18181614        if( pcVPSVUI->getTilesInUseFlag( i )  &&  pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 
    18191615        {
     
    18331629    }
    18341630  }
    1835 #if H_MV_HLS10_VPS_VUI
    18361631  READ_FLAG( uiCode, "single_layer_for_non_irap_flag" ); pcVPSVUI->setSingleLayerForNonIrapFlag( uiCode == 1 );
    18371632  READ_FLAG( uiCode, "higher_layer_irap_skip_flag" ); pcVPSVUI->setHigherLayerIrapSkipFlag( uiCode == 1 );
    1838 #else
    1839   READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" );
    1840 #endif
    18411633  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
    18421634
     
    18471639      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )
    18481640      {
    1849 #if H_MV_HLS10_REF_PRED_LAYERS
    18501641        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdDirectRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
    1851 #else
    1852         if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
    1853 #endif
    18541642        {       
    18551643          READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode );
     
    18701658  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
    18711659  {
    1872 #if VPS_MISC_UPDATES
    18731660    assert(pcVPS->getTimingInfo()->getTimingInfoPresentFlag() == 1);
    1874 #endif
    18751661    parseVpsVuiBspHrdParameters( pcVPS );
    18761662  }
     
    18931679
    18941680  TComVpsVuiBspHrdParameters*  vpsVuiBspHrdP = pcVPSVUI->getVpsVuiBspHrdParameters();
    1895 #if H_MV_HLS10_VPS_VUI_BSP
    18961681  assert( vpsVuiBspHrdP == NULL );
    18971682  vpsVuiBspHrdP = new TComVpsVuiBspHrdParameters;
    18981683  pcVPSVUI->setVpsVuiBspHrdParameters( vpsVuiBspHrdP );
    1899 #else
    1900   assert ( vpsVuiBspHrdP );
    1901 #endif
    19021684  UInt uiCode;
    1903 #if H_MV_HLS10_VPS_VUI_BSP
    19041685  READ_UVLC( uiCode, "vps_num_add_hrd_params" ); vpsVuiBspHrdP->setVpsNumAddHrdParams( uiCode );
    19051686  vpsVuiBspHrdP->createAfterVpsNumAddHrdParams( pcVPS );
     
    19901771    }
    19911772  } 
    1992 #else
    1993   READ_UVLC( uiCode, "vps_num_bsp_hrd_parameters_minus1" ); vpsVuiBspHrdP->setVpsNumBspHrdParametersMinus1( uiCode );
    1994   for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ )
    1995   { 
    1996     if( i > 0 )
    1997     {
    1998       READ_FLAG( uiCode, "bsp_cprms_present_flag" ); vpsVuiBspHrdP->setBspCprmsPresentFlag( i, uiCode == 1 );
    1999     }
    2000     TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i );
    2001     parseHrdParameters( hrdParameters, vpsVuiBspHrdP->getBspCprmsPresentFlag( i ), pcVPS->getMaxSubLayersMinus1() );     
    2002   } 
    2003   for( Int h = 1; h <= pcVPS->getVpsNumLayerSetsMinus1(); h++ )
    2004   { 
    2005     READ_UVLC( uiCode, "num_bitstream_partitions" ); vpsVuiBspHrdP->setNumBitstreamPartitions( h, uiCode );
    2006     for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 
    2007     {
    2008       for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 
    2009       {
    2010         READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 );
    2011       }
    2012     }
    2013     vpsVuiBspHrdP->checkLayerInBspFlag( pcVPS, h );
    2014    
    2015     if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) )
    2016     { 
    2017       READ_UVLC( uiCode, "num_bsp_sched_combinations_minus1" ); vpsVuiBspHrdP->setNumBspSchedCombinationsMinus1( h, uiCode );
    2018       for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )
    2019       {
    2020         for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )
    2021         { 
    2022           READ_CODE( vpsVuiBspHrdP->getBspCombHrdIdxLen(), uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode );
    2023           READ_UVLC( uiCode, "bsp_comb_sched_idx" ); vpsVuiBspHrdP->setBspCombSchedIdx( h, i, j, uiCode );
    2024           vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );
    2025         } 
    2026       }
    2027     } 
    2028   } 
    2029 #endif 
    20301773}
    20311774
     
    20601803        for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ )   
    20611804        {
    2062 #if H_MV_HLS10_DBP_SIZE
    20631805          if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) ))
    20641806          {
     
    20721814            }
    20731815          }
    2074 #else
    2075           READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
    2076 #endif
    20771816        }
    20781817        READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode );
     
    20851824          for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ )   
    20861825          {
    2087 #if H_MV_HLS10_DBP_SIZE
    20881826            if ( vps->getNecessaryLayerFlag(i, k ) )
    20891827            {           
    2090 #endif
    20911828              dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
    2092 #if H_MV_HLS10_DBP_SIZE
    20931829            }
    2094 #endif           
    20951830          }
    20961831          dpbSize->setMaxVpsNumReorderPics      ( i, j, dpbSize->getMaxVpsNumReorderPics      ( i, j - 1 ) );
     
    21061841{
    21071842  UInt uiCode;
    2108 #if SEC_VPS_CLEANUP_I0090
    21091843  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
    2110 #else
    2111   for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
    2112 #endif
    21131844  {
    21141845#if H_3D_ARP
     
    21191850    pcVPS->setSubPULog2Size(i, 0);
    21201851#endif
    2121 #if !SEC_VPS_CLEANUP_I0090
    2122     if ( i != 0 )
    2123 #endif
    2124     {
    2125 #if MTK_I0099_VPS_EX2
     1852    {
     1853#if H_3D_IV_MERGE
    21261854      READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
    2127 #if SEC_HLS_CLEANUP_I0100
    21281855      READ_FLAG( uiCode, "iv_mv_scaling_flag[i]");       pcVPS->setIvMvScalingFlag         ( i, uiCode == 1 ? true : false );
    21291856#endif
    2130 #endif
    21311857      if( !( pcVPS->getDepthId( i ) == 1 ) )
    21321858      {
    21331859#if H_3D_IV_MERGE
    2134 #if !MTK_I0099_VPS_EX2
    2135         READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
    2136 #endif
    21371860        if( !pcVPS->getNumDirectRefLayers(i) )
    21381861        {
     
    21661889      else
    21671890      {
    2168 #if !MTK_I0099_VPS_EX2
    2169 #if H_3D_IV_MERGE
    2170         if(i!=1)
    2171         {
    2172           READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
    2173           if( !pcVPS->getNumDirectRefLayers(i) )
    2174           {
    2175             assert( !uiCode );         
    2176           }
    2177         }
    2178 #endif
    2179 #if H_3D_SPIVMP
    2180         if (i!=1)
    2181         {
    2182           READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]");     pcVPS->setSubPULog2Size(i, uiCode+3);
    2183         }
    2184 #endif
    2185 #endif
    21861891#if H_3D_IV_MERGE
    21871892        READ_FLAG( uiCode, "mpi_flag[i]" );             pcVPS->setMPIFlag( i, uiCode == 1 ? true : false );
    2188 #endif
    2189 #if MTK_I0099_VPS_EX2
    21901893        READ_UVLC (uiCode, "log2_mpi_sub_PU_size_minus3[i]");     pcVPS->setSubPUMPILog2Size(i, uiCode+3);
    21911894#endif
    21921895        READ_FLAG( uiCode, "vps_depth_modes_flag[i]" );             pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );
    2193 #if SEPARATE_FLAG_I0085
     1896#if H_3D
    21941897        READ_FLAG( uiCode, "ivp_flag[i]" );                   pcVPS->setIVPFlag( i, uiCode == 1 ? true : false );
    21951898#endif
    2196 #if MTK_I0099_VPS_EX2
     1899#if H_3D_QTLPC
    21971900        READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPredFlag     ( i, uiCode == 1 ? true : false );
    21981901#endif
     
    22091912
    22101913  READ_UVLC( uiCamParPrecision, "cp_precision" );
    2211 #if SEC_VPS_CLEANUP_I0090
    22121914  for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
    2213 #else
    2214   for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
    2215 #endif
    22161915  {
    22171916    pcVPS->setCamParPresent         ( viewIndex, false );
     
    22351934    }
    22361935  }
    2237 #if !MTK_I0099_VPS_EX2
    2238   READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3");              pcVPS->setSubPUMPILog2Size( uiCode + 3 );
    2239 #endif
    2240 #if !SEC_HLS_CLEANUP_I0100
    2241   READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    2242 #endif
    22431936}
    22441937#endif
     
    22881981  sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) );   
    22891982  sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false );
    2290 #if !H_MV_HLS10_ADD_LAYERSETS
    2291   vps->inferDbpSizeLayerSetZero( sps, false );
    2292 #endif
    22931983
    22941984  if ( sps->getVuiParametersPresentFlag() )
     
    23582048      esb++;
    23592049      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
    2360 #if NON_REF_NAL_TYPE_DISCARDABLE
    23612050      if ( uiCode == 1 )
    23622051      {
     
    23672056          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R);
    23682057      }
    2369 #endif
    23702058    }
    23712059
     
    25152203          rps->checkMaxNumPics(
    25162204            vps->getVpsExtensionFlag(),
    2517 #if H_MV_HLS10_MAXNUMPICS
    25182205            MAX_INT,  // To be replaced by MaxDbpSize
    2519 #else
    2520             vps->getMaxNumPics( rpcSlice->getLayerId() ),
    2521 #endif
    25222206            rpcSlice->getLayerId(),
    25232207            sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 );
     
    26322316        rps->checkMaxNumPics(
    26332317          vps->getVpsExtensionFlag(),
    2634 #if H_MV_HLS10_MAXNUMPICS
    26352318            MAX_INT,  // To be replaced by MaxDbpsize
    2636 #else
    2637           vps->getMaxNumPics( rpcSlice->getLayerId() ),
    2638 #endif
    26392319          rpcSlice->getLayerId(),
    26402320          sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 );
     
    26552335      if (rpcSlice->getSPS()->getTMVPFlagsPresent())
    26562336      {
    2657 #if I0044_SLICE_TMVP
     2337#if H_MV
    26582338        READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" );
    26592339#else
     
    28652545    }
    28662546#if H_3D_IC
    2867 #if SEC_HLS_CLEANUP_I0100
    28682547    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
    2869 #else
    2870     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth())
    2871 #endif
    28722548    {
    28732549      UInt uiCodeTmp = 0;
     
    28832559    }
    28842560#endif
    2885 #if MTK_SINGLE_DEPTH_MODE_I0095
     2561#if H_3D_SINGLE_DEPTH
    28862562    if(rpcSlice->getIsDepth())
    28872563    {
     
    30092685
    30102686#if H_3D
    3011 #if LGE_FCO_I0116
     2687#if H_3D_FCO
    30122688  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && rpcSlice->getIsDepth() )
    30132689#else
     
    30902766    }
    30912767    assert( ( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) == rpcSlice->getSliceSegmentHeaderExtensionLength() * 8  );
     2768  }
    30922769#else
    30932770    READ_UVLC( uiCode, "slice_header_extension_length" );
     
    30972774      READ_CODE(8,ignore,"slice_header_extension_data_byte");
    30982775    } 
    3099 #endif
    3100   }
    3101 #if INFERENCE_POC_MSB_VAL_PRESENT
    3102   else
    3103   {
    3104     rpcSlice->setSliceSegmentHeaderExtensionLength( 0 );
    3105     rpcSlice->setPocMsbValPresentFlag( false );
    3106   }
    3107 #endif
    3108 
    3109 
     2776  }
     2777#endif
    31102778  m_pcBitstream->readByteAlignment();
    31112779
     
    31982866      READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
    31992867#if H_MV
    3200 #if !H_MV_HLS10_PTL_INFER_FIX
    3201       rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );
    3202 #else
    32032868      // When profilePresentFlag is equal to 0, sub_layer_profile_present_flag[ i ] shall be equal to 0.
    32042869      assert( profilePresentFlag || !rpcPTL->getSubLayerProfilePresentFlag(i) );
    3205 #endif
    32062870#else
    32072871    }
     
    32212885  for(Int i = 0; i < maxNumSubLayersMinus1; i++)
    32222886  {
    3223 #if H_MV_HLS10_PTL_INFER_FIX
    32242887#if H_MV
    32252888    if( rpcPTL->getSubLayerProfilePresentFlag(i) )         
    32262889#else
    32272890    if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )         
    3228 #endif
    3229 #else
    3230     if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )   
    32312891#endif
    32322892    {
     
    32622922  ptl->setFrameOnlyConstraintFlag(uiCode ? true : false);
    32632923 
    3264 #if H_MV_HLS10_PTL
    3265 #if H_MV_HLS10_PTL_INFER_FIX
     2924#if H_MV
    32662925  if( ptl->getV2ConstraintsPresentFlag() )
    3267 #else
    3268   if( ptl->getProfileIdc( ) ==  4 || ptl->getProfileCompatibilityFlag( 4 )  ||
    3269       ptl->getProfileIdc( ) ==  5 || ptl->getProfileCompatibilityFlag( 5 )  ||
    3270       ptl->getProfileIdc( ) ==  6 || ptl->getProfileCompatibilityFlag( 6 )  ||
    3271       ptl->getProfileIdc( ) ==  7 || ptl->getProfileCompatibilityFlag( 7 ) )
    3272 #endif
    32732926  {
    32742927    READ_FLAG( uiCode, "max_12bit_constraint_flag" );        ptl->setMax12bitConstraintFlag      ( uiCode == 1 );
     
    32912944    READ_CODE(11, uiCode, "XXX_reserved_zero_43bits[32..42]");
    32922945  }
    3293 #if H_MV_HLS10_PTL_INFER_FIX
    32942946  if( ptl->getInbldPresentFlag() )
    3295 #else
    3296   if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 )  ||
    3297     ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 )  ||
    3298     ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 )  ||
    3299     ptl->getProfileCompatibilityFlag( 5 ) )
    3300 #endif
    33012947  {
    33022948    READ_FLAG( uiCode, "inbld_flag" ); ptl->setInbldFlag( uiCode == 1 );
     
    33312977  assert(0);
    33322978}
    3333 #if MTK_SINGLE_DEPTH_MODE_I0095
     2979#if H_3D_SINGLE_DEPTH
    33342980Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    33352981{
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r1066 r1084  
    9797#endif
    9898
    99 #if H_MV_HLS10_PPS
    10099#if H_MV
    101100  Void  parsePPSMultilayerExtension( TComPPS* pcPPS );
    102 #endif
    103101#endif
    104102
     
    126124 
    127125  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    128 #if MTK_SINGLE_DEPTH_MODE_I0095
     126#if H_3D_SINGLE_DEPTH
    129127  Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    130128#endif 
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r1066 r1084  
    420420    Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    421421    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    422 #if !FIX_TICKET_79
    423     InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    424 #endif
    425422#if H_3D_SPIVMP
    426423    Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
     
    434431    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    435432    m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    436 #if !FIX_TICKET_79
    437       , inheritedVSPDisInfo
    438 #endif
    439433#if H_3D_SPIVMP
    440434      , pcMvFieldSP, puhInterDirSP
     
    456450    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    457451#endif
    458 #endif
    459 #if H_3D_VSP && !FIX_TICKET_79
    460     if(vspFlag[uiMergeIndex])
    461     {
    462       pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiAbsPartIdx, 0, uiDepth);
    463     }
    464452#endif
    465453    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
     
    546534    return;
    547535  }
    548 #if MTK_SINGLE_DEPTH_MODE_I0095
     536#if H_3D_SINGLE_DEPTH
    549537  m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
    550538  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
     
    580568  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
    581569  setdQPFlag( bCodeDQP );
    582 #if MTK_SINGLE_DEPTH_MODE_I0095
     570#if H_3D_SINGLE_DEPTH
    583571  }
    584572#endif
     
    682670      break;
    683671    case MODE_INTRA:
    684 #if MTK_SINGLE_DEPTH_MODE_I0095
     672#if H_3D_SINGLE_DEPTH
    685673      if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
    686674        xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth );
     
    730718  }
    731719}
    732 #if MTK_SINGLE_DEPTH_MODE_I0095
     720#if H_3D_SINGLE_DEPTH
    733721Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    734722{
     
    749737  Pel DepthNeighbours[5];
    750738  Int index =0;
    751   for( Int i = 0; (i < 5) && (index<MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ )
     739  for( Int i = 0; (i < 5) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
    752740  {
    753741    if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i))
     
    859847  // get collocated depth block
    860848  UInt uiDepthStride = 0;
    861 #if LGE_FCO_I0116
     849#if H_3D_FCO
    862850  Pel* pDepthPels = pcCU->getVirtualDepthBlock(pcCU->getZorderIdxInCU(), pcCU->getWidth(0), pcCU->getHeight(0), uiDepthStride);
    863851#else
     
    932920 
    933921  // reconstruct final prediction signal by combining both segments
    934 #if SHARP_DBBP_SIMPLE_FLTER_I0109
    935922  m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize);
    936 #else
    937   m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0));
    938 #endif
    939  
     923
    940924  // inter recon
    941925  xDecodeInterTexture( pcCU, 0, uiDepth );
     
    13111295    Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
    13121296
    1313 #if SHARP_DMM1_I0110
    13141297    WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode(uiWidth) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] :  &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    1315 #else
    1316     WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
    1317 #endif
    13181298    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
    13191299
    13201300    uiNumSegments = 2;
    13211301
    1322 #if SHARP_DMM1_I0110
    13231302    pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
    13241303    uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
    1325 #else
    1326     pbMask = pcWedgelet->getPattern();
    1327     uiMaskStride = pcWedgelet->getStride();
    1328 #endif
    13291304  }
    13301305  if( getDimType( uiLumaPredMode ) == DMM4_IDX )
  • trunk/source/Lib/TLibDecoder/TDecCu.h

    r1039 r1084  
    123123  Void setdQPFlag               ( Bool b )                { m_bDecodeDQP = b;           }
    124124  Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
    125 #if MTK_SINGLE_DEPTH_MODE_I0095
     125#if H_3D_SINGLE_DEPTH
    126126  Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    127127#endif
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1039 r1084  
    5252  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
    5353}
    54 #if MTK_SINGLE_DEPTH_MODE_I0095
     54#if H_3D_SINGLE_DEPTH
    5555Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    5656{
     
    152152 
    153153#if H_3D_DBBP
    154 
    155 #if SEC_DBBP_EXPLICIT_SIG_I0077
    156 #if SEC_DBBP_DISALLOW_8x8_I0078
    157154  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
    158 #else
    159   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )
    160 #endif
    161 #else
    162 #if SEC_DBBP_DISALLOW_8x8_I0078
    163   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )
    164 #else
    165   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
    166 #endif
    167 #endif
    168155  {
    169156    decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
    170 #if !SEC_DBBP_EXPLICIT_SIG_I0077   
    171     if( pcCU->getDBBPFlag(uiAbsPartIdx) )
    172     {
    173      
    174       // get collocated depth block
    175       UInt uiDepthStride = 0;
    176       Pel* pDepthPels = NULL;
    177       pDepthPels = pcCU->getVirtualDepthBlock(uiAbsPartIdx, pcCU->getWidth(uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), uiDepthStride);
    178      
    179       AOF( pDepthPels != NULL );
    180       AOF( uiDepthStride != 0 );
    181      
    182       // derive true partitioning for this CU based on depth
    183       // (needs to be done in parsing process as motion vector predictors are also derived during parsing)
    184       PartSize eVirtualPartSize = m_pcPrediction->getPartitionSizeFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(uiAbsPartIdx));
    185       AOF( eVirtualPartSize != SIZE_NONE );
    186      
    187       pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);
    188      
    189       // make sure that DBBP flag is set for both segments
    190       UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
    191       pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth);
    192       pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
    193     }
    194 #endif
    195157  }
    196158#endif
     
    311273          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    312274          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    313 #if !FIX_TICKET_79
    314           InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    315 #endif
    316275#if H_3D_SPIVMP
    317276          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     
    320279          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    321280          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    322 #if !FIX_TICKET_79
    323             , inheritedVSPDisInfo
    324 #endif
    325281#if H_3D_SPIVMP
    326282            , pcMvFieldSP, puhInterDirSP
     
    334290          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    335291
    336 #if !FIX_TICKET_79
    337           if(vspFlag[uiMergeIndex])
    338           {
    339             pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
    340           }
    341 #endif
    342292#else
    343293#if H_3D
     
    360310        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    361311        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    362 #if !FIX_TICKET_79
    363         InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    364 #endif
    365312#if H_3D_SPIVMP
    366313        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     
    369316        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    370317        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
    371 #if !FIX_TICKET_79
    372           , inheritedVSPDisInfo
    373 #endif
    374318#if H_3D_SPIVMP
    375319          , pcMvFieldSP, puhInterDirSP
     
    382326          ,numValidMergeCand );
    383327        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    384 #if !FIX_TICKET_79
    385         if(vspFlag[uiMergeIndex])
    386         {
    387           pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
    388         }
    389 #endif
    390328#else
    391329#if H_3D
     
    485423#endif
    486424    }
    487 #if H_3D_VSP && !FIX_TICKET_75
    488     if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0))
    489 #else
    490425    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
    491 #endif
    492426    {
    493427      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r1039 r1084  
    8989public:
    9090  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    91 #if MTK_SINGLE_DEPTH_MODE_I0095
     91#if H_3D_SINGLE_DEPTH
    9292  virtual Void parseSingleDepthMode       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9393#endif
     
    132132  virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0;
    133133 
    134   virtual ~TDecEntropyIf() {};
     134  virtual ~TDecEntropyIf() {}
    135135};
    136136
     
    179179  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    180180  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    181 #if MTK_SINGLE_DEPTH_MODE_I0095
     181#if H_3D_SINGLE_DEPTH
    182182  Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
    183183#endif
  • trunk/source/Lib/TLibDecoder/TDecGop.cpp

    r976 r1084  
    248248    calcAndPrintHashStatus(*rpcPic->getPicYuvRec(), hash);
    249249  }
     250#if !H_MV
     251#if SETTING_PIC_OUTPUT_MARK
     252  rpcPic->setOutputMark(rpcPic->getSlice(0)->getPicOutputFlag() ? true : false);
     253#else
     254  rpcPic->setOutputMark(true);
     255#endif
     256  rpcPic->setReconMark(true);
     257#endif
    250258}
    251259
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r1066 r1084  
    5252, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    5353, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    54 #if MTK_SINGLE_DEPTH_MODE_I0095
     54#if H_3D_SINGLE_DEPTH
    5555, m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    5656, m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     
    136136  m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    137137  m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
    138 #if MTK_SINGLE_DEPTH_MODE_I0095
     138#if H_3D_SINGLE_DEPTH
    139139  m_cCUSingleDepthFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    140140  m_cSingleDepthValueSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     
    207207  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
    208208  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
    209 #if MTK_SINGLE_DEPTH_MODE_I0095
     209#if H_3D_SINGLE_DEPTH
    210210  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    211211  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     
    432432#endif
    433433
    434 #if !FIX_TICKET_76
    435 #if H_3D_DIM_SDC
    436 Void TDecSbac::xParseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
    437 {
    438   assert( pcCU->getSlice()->getIsDepth() );
    439   assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
    440   assert( pcCU->getSDCFlag(uiAbsPartIdx) );
    441   assert( uiSegment < 2 );
    442  
    443   UInt uiResidual = 0;
    444   UInt uiBit      = 0;
    445   UInt uiAbsIdx   = 0;
    446   UInt uiSign     = 0;
    447   Int  iIdx       = 0;
    448  
    449 #if H_3D_DIM_DLT
    450   UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );
    451 #else
    452   UInt uiMaxResidualBits = g_bitDepthY;
    453 #endif
    454   assert( uiMaxResidualBits <= g_bitDepthY );
    455  
    456   m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );
    457  
    458 #if H_MV_ENC_DEC_TRAC
    459   DTRACE_CU("sdc_residual_flag[i]", uiResidual)
    460 #endif
    461  
    462   if (uiResidual)
    463   {
    464     // decode residual sign bit
    465     m_pcTDecBinIf->decodeBinEP(uiSign);
    466 #if H_MV_ENC_DEC_TRAC
    467     DTRACE_CU("sdc_residual_sign_flag[i]", uiSign)
    468 #endif
    469    
    470     // decode residual magnitude
    471     // prefix part
    472     UInt uiCount = 0;
    473 #if H_3D_DIM_DLT
    474     UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );
    475 #else
    476     UInt uiNumDepthValues = ((1 << g_bitDepthY)-1);
    477 #endif
    478     UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2);
    479     for ( UInt ui = 0; ui < uiPrefixThreshold; ui++)
    480     {
    481       m_pcTDecBinIf->decodeBin( uiBit, m_cSDCResidualSCModel.get(0, 0, 0) );
    482       if ( uiBit == 0 )
    483         break;
    484       else
    485         uiCount++;
    486     }
    487     // suffix part
    488     if ( uiCount == uiPrefixThreshold )
    489     {
    490       for ( UInt ui = 0; ui < numBitsForValue(uiNumDepthValues - uiPrefixThreshold); ui++ )
    491       {
    492         m_pcTDecBinIf->decodeBinEP( uiBit );
    493         uiAbsIdx |= uiBit << ui;
    494       }
    495       uiAbsIdx += uiCount;
    496     }
    497     else
    498     {
    499       uiAbsIdx = uiCount;
    500     }
    501  
    502 #if H_MV_ENC_DEC_TRAC
    503     DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx)
    504 #endif
    505    
    506     uiAbsIdx += 1;
    507     iIdx =(Int)(uiSign ? -1 : 1)*uiAbsIdx;
    508   }
    509  
    510   pcCU->setSDCSegmentDCOffset(iIdx, uiSegment, uiAbsPartIdx);
    511 }
    512 #endif
    513 #endif
     434
    514435#endif
    515436/** Parse I_PCM information.
     
    649570#endif
    650571}
    651 #if MTK_SINGLE_DEPTH_MODE_I0095
     572#if H_3D_SINGLE_DEPTH
    652573Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    653574{
     
    671592
    672593    UInt uiUnaryIdx = 0;
    673     UInt uiNumCand = MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE;
     594    UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE;
    674595    if ( uiNumCand > 1 )
    675596    {
     
    781702  Bool bParseSplitFlag    = true;
    782703
    783 #if MTK_I0099_VPS_EX2
    784704  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
    785705  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
    786 #else
    787   TComSPS *sps            = pcCU->getPic()->getSlice(0)->getSPS();
    788 #endif
    789706  TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
    790707  Bool bDepthMapDetect    = (pcTexture != NULL);
     
    793710  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);
    794711
    795 #if MTK_I0099_VPS_EX2
    796 #if LGE_FCO_I0116
     712#if H_3D_FCO
    797713  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark())
    798714#else
    799715  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag)
    800 #endif
    801 #else
    802   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
    803716#endif
    804717  {
     
    843756#if H_3D_QTLPC
    844757  Bool bParsePartSize    = true;
    845 #if MTK_I0099_VPS_EX2
    846758  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
    847759  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
    848 #else
    849   TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
    850 #endif
    851760  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
    852761  Bool bDepthMapDetect   = (pcTexture != NULL);
     
    857766  Bool depthDependent = false;
    858767  UInt uiTexturePart = uiMode;
    859 #if MTK_I0099_VPS_EX2
    860 #if LGE_FCO_I0116
     768
     769#if H_3D_FCO
    861770  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark())
    862771#else
    863772  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag )
    864 #endif
    865 #else
    866   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
    867773#endif
    868774  {
     
    1076982  {
    1077983#if H_3D_DIM
    1078 #if SEPARATE_FLAG_I0085
    1079984    if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() )
    1080 #else
    1081     if( pcCU->getSlice()->getVpsDepthModesFlag() )
    1082 #endif
    1083985    {
    1084986      parseIntraDepth( pcCU, absPartIdx+partOffset*j, depth );
     
    12221124  if( uiIsDimMode )
    12231125  {
    1224 #if SEPARATE_FLAG_I0085
    12251126    if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag() )
    12261127    {
     
    12281129      if( !uiSymbol )
    12291130      {
    1230 #if HS_DMM_SIGNALLING_I0120
    12311131        pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
    1232 #else
    1233         pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
    1234 #endif
    12351132      }
    12361133      else
    12371134      {
    1238 #if HS_DMM_SIGNALLING_I0120
    12391135        pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
    1240 #else
    1241         pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
    1242 #endif
    12431136      }
    12441137    }
    12451138    else if ( pcCU->getSlice()->getVpsDepthModesFlag() )
    12461139    {
    1247 #if HS_DMM_SIGNALLING_I0120
    12481140      pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
    1249 #else
    1250       pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
    1251 #endif
    12521141    }
    12531142    else if( pcCU->getSlice()->getIVPFlag() )
    12541143    {
    1255 #if HS_DMM_SIGNALLING_I0120
    12561144      pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
    1257 #else
    1258       pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
    1259 #endif
    1260     }
    1261 #else
    1262     m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
    1263     if( !uiSymbol )
    1264     {
    1265 #if HS_DMM_SIGNALLING_I0120
    1266       pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
    1267 #else
    1268       pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
    1269 #endif
    1270     }
    1271     else
    1272     {
    1273 #if HS_DMM_SIGNALLING_I0120
    1274       pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
    1275 #else
    1276       pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
    1277 #endif
    1278     }
    1279 #endif
     1145    }
    12801146  }
    12811147}
     
    21902056  }
    21912057
    2192 #if HS_DMM_SIGNALLING_I0120
    21932058  UInt symbol = 1;
    21942059  UInt uiNumSegments = isDimMode( pcCU->getLumaIntraDir( absPartIdx ) ) ? 2 : 1;
    2195 #else
    2196   UInt symbol = 0;
    2197   UInt uiNumSegments = 0;
    2198 #endif
    2199 
    2200 #if HS_DMM_SIGNALLING_I0120
     2060
    22012061  if( pcCU->isIntra( absPartIdx ) && pcCU->getSDCFlag( absPartIdx ))
    22022062  {
    2203 #else
    2204   if( pcCU->isIntra( absPartIdx ) )
    2205   {
    2206     UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
    2207     uiNumSegments = isDimMode( dir ) ? 2 : 1;
    2208 #endif
     2063
    22092064    m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, 0 ) );
    2210 #if !HS_DMM_SIGNALLING_I0120
    2211     if( pcCU->getSDCFlag( absPartIdx ) )
    2212     {
    2213 #endif
    22142065      assert( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N );
    22152066      pcCU->setTrIdxSubParts( 0, absPartIdx, depth );
    22162067      pcCU->setCbfSubParts( 1, 1, 1, absPartIdx, depth );
    22172068    }
    2218 #if !HS_DMM_SIGNALLING_I0120
    2219     else
    2220     {
    2221       pcCU->setLumaIntraDirSubParts( dir + symbol, absPartIdx, depth );
    2222     }
    2223   }
    2224   else
    2225   {
    2226     uiNumSegments = 1;
    2227     symbol = 1;
    2228   }
    2229 #endif
    2230 
    22312069
    22322070  for( UInt segment = 0; segment < uiNumSegments; segment++ )
     
    22892127  m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
    22902128 
    2291 #if SEC_DBBP_EXPLICIT_SIG_I0077
    22922129  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
    22932130  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
     
    22952132  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth);
    22962133  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
    2297 #else
    2298   if( uiSymbol )
    2299   {
    2300     pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth);
    2301     UInt uiCurrPartNumQ = (pcCU->getPic()->getNumPartInCU() >> (2 * uiDepth)) >> 2;
    2302     pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth);
    2303   }
    2304 #endif
    23052134}
    23062135#endif
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r1039 r1084  
    129129 
    130130  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    131 #if MTK_SINGLE_DEPTH_MODE_I0095 
     131#if H_3D_SINGLE_DEPTH 
    132132  Void parseSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    133133#endif 
     
    182182  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    183183  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    184 #if MTK_SINGLE_DEPTH_MODE_I0095
     184#if H_3D_SINGLE_DEPTH
    185185  ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
    186186  ContextModel3DBuffer m_cSingleDepthValueSCModel;
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r1066 r1084  
    229229  }
    230230
    231 #if !LGE_FCO_I0116
     231#if !H_3D_FCO
    232232  if ( pcSlice->getIsDepth())
    233233  {
     
    669669#if H_MV
    670670  sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false );
    671 #if !H_MV_HLS10_ADD_LAYERSETS
    672   vps->inferDbpSizeLayerSetZero( sps, false );
    673 #endif
    674671  // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0
    675672  if ( vps->getVpsNumRepFormatsMinus1() == 0 )
     
    679676  }
    680677  sps->checkRpsMaxNumPics( vps, getLayerId() );
    681 #if H_MV_HLS10_MULTILAYERSPS
    682678
    683679  if( sps->getLayerId() != 0 )
     
    686682  }
    687683
    688 #if H_MV_HLS10_MULTILAYERSPS
    689684  // It is a requirement of bitstream conformance that, when the SPS is referred to by
    690685  // any current picture that belongs to an independent non-base layer, the value of
     
    695690    assert( sps->getMultiLayerExtSpsFlag() == 0 );
    696691  }
    697 #endif
    698692
    699693  if( sps->getMultiLayerExtSpsFlag() )
     
    701695    sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true );
    702696  }
    703 #else
    704   if( m_layerId > 0 )
    705   {
    706     sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true );
    707   }
    708 #endif
    709697#endif
    710698
     
    730718#if H_MV
    731719  m_apcSlicePilot->setVPS(vps); 
    732 #if H_MV_HLS10_REF_PRED_LAYERS
    733720  // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.
    734721  assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, pps->getLayerId() ) );   
    735722  // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.
    736723  assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, sps->getLayerId() ) );
    737 #else
    738   // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.
    739   assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) );   
    740   // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.
    741   assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) );
    742 #endif
    743724  sps->inferRepFormat  ( vps , m_layerId );
    744725  sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) );
     
    746727#endif
    747728  pps->setSPS(sps);
    748   pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1);
     729  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1);
    749730  pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) );
    750731
     
    807788  m_apcSlicePilot->setLayerId( nalu.m_layerId );
    808789  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_targetOptLayerSetIdx );
     790#else
     791  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder);
    809792#endif
    810793  // set POC for dependent slices in skipped pictures
     
    944927     xResetPocInPicBuffer();
    945928   }
    946 #endif
    947    
    948 #if I0044_SLICE_TMVP
    949   if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 )
     929
     930   if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 )
    950931  {
    951932    //update all pics in the DPB such that they cannot be used for TMPV ref
     
    10431024  Bool bNextSlice     = pcSlice->isNextSlice();
    10441025
    1045   UInt uiCummulativeTileWidth;
    1046   UInt uiCummulativeTileHeight;
    1047   UInt i, j, p;
    1048 
    1049   //set NumColumnsMins1 and NumRowsMinus1
    1050   pcPic->getPicSym()->setNumColumnsMinus1( pcSlice->getPPS()->getNumColumnsMinus1() );
    1051   pcPic->getPicSym()->setNumRowsMinus1( pcSlice->getPPS()->getNumRowsMinus1() );
    1052 
    1053   //create the TComTileArray
    1054   pcPic->getPicSym()->xCreateTComTileArray();
    1055 
    1056   if( pcSlice->getPPS()->getUniformSpacingFlag() )
    1057   {
    1058     //set the width for each tile
    1059     for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++)
    1060     {
    1061       for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1()+1; p++)
    1062       {
    1063         pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )->
    1064           setTileWidth( (p+1)*pcPic->getPicSym()->getFrameWidthInCU()/(pcPic->getPicSym()->getNumColumnsMinus1()+1)
    1065           - (p*pcPic->getPicSym()->getFrameWidthInCU())/(pcPic->getPicSym()->getNumColumnsMinus1()+1) );
    1066       }
    1067     }
    1068 
    1069     //set the height for each tile
    1070     for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++)
    1071     {
    1072       for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1()+1; p++)
    1073       {
    1074         pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )->
    1075           setTileHeight( (p+1)*pcPic->getPicSym()->getFrameHeightInCU()/(pcPic->getPicSym()->getNumRowsMinus1()+1)
    1076           - (p*pcPic->getPicSym()->getFrameHeightInCU())/(pcPic->getPicSym()->getNumRowsMinus1()+1) );   
    1077       }
    1078     }
    1079   }
    1080   else
    1081   {
    1082     //set the width for each tile
    1083     for(j=0; j < pcSlice->getPPS()->getNumRowsMinus1()+1; j++)
    1084     {
    1085       uiCummulativeTileWidth = 0;
    1086       for(i=0; i < pcSlice->getPPS()->getNumColumnsMinus1(); i++)
    1087       {
    1088         pcPic->getPicSym()->getTComTile(j * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + i)->setTileWidth( pcSlice->getPPS()->getColumnWidth(i) );
    1089         uiCummulativeTileWidth += pcSlice->getPPS()->getColumnWidth(i);
    1090       }
    1091       pcPic->getPicSym()->getTComTile(j * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + i)->setTileWidth( pcPic->getPicSym()->getFrameWidthInCU()-uiCummulativeTileWidth );
    1092     }
    1093 
    1094     //set the height for each tile
    1095     for(j=0; j < pcSlice->getPPS()->getNumColumnsMinus1()+1; j++)
    1096     {
    1097       uiCummulativeTileHeight = 0;
    1098       for(i=0; i < pcSlice->getPPS()->getNumRowsMinus1(); i++)
    1099       {
    1100         pcPic->getPicSym()->getTComTile(i * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcSlice->getPPS()->getRowHeight(i) );
    1101         uiCummulativeTileHeight += pcSlice->getPPS()->getRowHeight(i);
    1102       }
    1103       pcPic->getPicSym()->getTComTile(i * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcPic->getPicSym()->getFrameHeightInCU()-uiCummulativeTileHeight );
    1104     }
    1105   }
    1106 
    1107   pcPic->getPicSym()->xInitTiles();
     1026  UInt i;
     1027  pcPic->getPicSym()->initTiles(pcSlice->getPPS());
    11081028
    11091029  //generate the Coding Order Map and Inverse Coding Order Map
     
    11921112#endif   
    11931113#endif
    1194     // For generalized B
    1195 #if I0044_SLICE_TMVP
     1114#if H_MV
    11961115    if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() )
    11971116    {
     
    12721191
    12731192#if H_3D_IV_MERGE
    1274 #if LGE_FCO_I0116
     1193#if H_3D_FCO
    12751194  if( !pcSlice->getIsDepth() && m_pcCamParsCollector )
    12761195#else
     
    17271646  for (Int i = 0; i < vps->getNumDirectRefLayers( getLayerId()  ); i++ )
    17281647  {
    1729 #if H_MV_HLS10_REF_PRED_LAYERS
    17301648    Int refLayerId = vps->getIdDirectRefLayer( m_layerId, i );
    1731 #else
    1732     Int refLayerId = vps->getRefLayerId( m_layerId, i );
    1733 #endif
    17341649    allRefLayersInitilizedFlag = allRefLayersInitilizedFlag && m_layerInitilizedFlag[ refLayerId ];
    17351650  }
Note: See TracChangeset for help on using the changeset viewer.