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


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

Merged 12.0-dev1@1065.

Location:
trunk/source/Lib/TLibDecoder
Files:
5 edited

Legend:

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

    r1039 r1066  
    5353  }
    5454  // To avoid mismatches
     55#if H_MV_HLS10_GEN_FIX
     56  fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() );
     57#else
    5558  fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );
     59#endif
    5660#else
    5761  fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() );
     
    6670    return;
    6771  }
     72#if H_MV_HLS10_GEN_FIX
     73  fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() );
     74#else
    6875  fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );
     76#endif
    6977#else
    7078  fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() );
     
    334342    }
    335343  }
     344#if !H_MV_HLS10_PPS
    336345#if H_MV
    337346  if ( pcPPS->getLayerId() > 0 )
     
    347356  { 
    348357#endif
     358#endif
    349359  READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" );           pcPPS->setScalingListPresentFlag( uiCode ? true : false );
    350360  if(pcPPS->getScalingListPresentFlag ())
     
    352362    parseScalingList( pcPPS->getScalingList() );
    353363  }
    354 #if H_MV
    355   }
    356 #endif
    357 
     364#if !H_MV_HLS10_PPS
     365#if H_MV
     366  }
     367#endif
     368#endif
    358369  READ_FLAG( uiCode, "lists_modification_present_flag");
    359370  pcPPS->setListsModificationPresentFlag(uiCode);
     
    389400    if ( pcPPS->getPpsMultilayerExtensionFlag() )
    390401    {
     402#if H_MV_HLS10_PPS
     403      parsePPSMultilayerExtension( pcPPS );
     404#else
    391405      READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    392406      READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" );
     407#endif
    393408    }
    394409#if !H_3D
     
    415430  }
    416431}
     432
    417433
    418434#if H_3D
     
    759775  UInt  uiCode;
    760776  READ_CODE( 4,  uiCode, "sps_video_parameter_set_id");          pcSPS->setVPSId        ( uiCode );
     777
    761778#if H_MV
    762779  if ( pcSPS->getLayerId() == 0 )
     
    765782    READ_CODE( 3,  uiCode, "sps_max_sub_layers_minus1" );          pcSPS->setMaxTLayers   ( uiCode+1 );
    766783    assert(uiCode <= 6);
     784#if H_MV_HLS10_MULTILAYERSPS
     785#if H_MV
     786  }
     787  else
     788  {
     789    READ_CODE( 3, uiCode, "sps_ext_or_max_sub_layers_minus1" ); pcSPS->setSpsExtOrMaxSubLayersMinus1( uiCode );   
     790    pcSPS->inferSpsMaxSubLayersMinus1( false, NULL );
     791  }
     792  if ( !pcSPS->getMultiLayerExtSpsFlag() )
     793  {
     794#endif
     795#endif
    767796
    768797    READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" );               pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );
     
    774803
    775804    parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
     805#if H_MV_HLS10_PTL_INFER_FIX
     806    pcSPS->getPTL()->inferGeneralValues ( true, 0, NULL );
     807    pcSPS->getPTL()->inferSubLayerValues( pcSPS->getMaxTLayers() - 1, 0, NULL );
     808#endif
    776809#if H_MV
    777810  }
     
    780813  assert(uiCode <= 15);
    781814#if H_MV
     815#if H_MV_HLS10_MULTILAYERSPS
     816  if ( pcSPS->getMultiLayerExtSpsFlag() )
     817#else
    782818  if ( pcSPS->getLayerId() > 0 )
     819#endif
    783820  {
    784821    READ_FLAG( uiCode, "update_rep_format_flag" );               pcSPS->setUpdateRepFormatFlag( uiCode == 1 );
     
    802839    READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
    803840    READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
    804 #if H_MV
    805   }
     841#if !H_MV_HLS10_MULTILAYERSPS
     842#if H_MV
     843  }
     844#endif
    806845#endif
    807846  READ_FLAG(     uiCode, "conformance_window_flag");
     
    816855    READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode  );
    817856    READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode  );   
     857#if H_MV_HLS10_MULTILAYERSPS
     858  }
     859#endif
    818860#else
    819861    READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
     
    825867
    826868#if H_MV
     869#if H_MV_HLS10_MULTILAYERSPS
     870  if ( !pcSPS->getMultiLayerExtSpsFlag() )
     871#else // H_MV_HLS10_GEN
    827872  if ( pcSPS->getLayerId() == 0 )
     873#endif // H_MV_HLS10_GEN
    828874  {
    829875#endif
     
    845891
    846892#if H_MV
     893#if H_MV_HLS10_MULTILAYERSPS
     894  if ( !pcSPS->getMultiLayerExtSpsFlag())
     895#else
    847896  if ( pcSPS->getLayerId() == 0 )
     897#endif
    848898  { 
    849899#endif
     
    904954  {
    905955#if H_MV
     956#if H_MV_HLS10_MULTILAYERSPS
     957    if ( pcSPS->getMultiLayerExtSpsFlag() )
     958#else
    906959    if ( pcSPS->getLayerId() > 0 )
     960#endif
    907961    {   
    908962      READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setSpsInferScalingListFlag( uiCode == 1 );
     
    10321086  READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
    10331087 
     1088#if !H_MV_HLS10_PPS
    10341089  READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode );
    10351090
     
    10461101    READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" );
    10471102  }
     1103#endif
    10481104}
    10491105
     
    10661122}
    10671123#endif
     1124
     1125#if H_MV_HLS10_PPS
     1126Void TDecCavlc::parsePPSMultilayerExtension(TComPPS* pcPPS)
     1127{
     1128  UInt uiCode = 0;
     1129  READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
     1130  READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );
     1131  READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
     1132  READ_UVLC( uiCode, "num_ref_loc_offsets" ); assert( uiCode == 0 );
     1133}
     1134
     1135#endif
    10681136#endif
    10691137
     
    10751143#if H_MV
    10761144  READ_FLAG( uiCode, "vps_base_layer_internal_flag" );            pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 );
     1145#if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL
     1146  READ_FLAG( uiCode, "vps_base_layer_available_flag" );           pcVPS->setVpsBaseLayerAvailableFlag( uiCode == 1 );
     1147#else
    10771148  READ_FLAG( uiCode, "vps_reserved_one_bit" );                    assert( uiCode == 1 );
     1149#endif
    10781150#else
    10791151  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     
    10901162  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    10911163  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
     1164#if H_MV_HLS10_PTL_INFER_FIX
     1165#if H_MV
     1166  pcVPS->getPTL()->inferGeneralValues ( true, 0, NULL );
     1167  pcVPS->getPTL()->inferSubLayerValues( pcVPS->getMaxTLayers() - 1, 0, NULL );
     1168#endif
     1169#endif
    10921170  UInt subLayerOrderingInfoPresentFlag;
    10931171  READ_FLAG(subLayerOrderingInfoPresentFlag, "vps_sub_layer_ordering_info_present_flag");
     
    11151193  READ_CODE( 6, uiCode, "vps_max_layer_id" );   pcVPS->setVpsMaxLayerId( uiCode );
    11161194
     1195#if H_MV_HLS10_GEN_FIX
     1196  READ_UVLC(    uiCode, "vps_num_layer_sets_minus1" );  pcVPS->setVpsNumLayerSetsMinus1( uiCode );
     1197#else
    11171198  READ_UVLC(    uiCode, "vps_max_num_layer_sets_minus1" );               pcVPS->setVpsNumLayerSetsMinus1( uiCode );
     1199#endif
    11181200  for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ )
    11191201  {
     
    12041286  UInt uiCode;
    12051287
     1288#if H_MV_HLS10_PTL
     1289  if( pcVPS->getMaxLayersMinus1() > 0  &&  pcVPS->getVpsBaseLayerInternalFlag() )
     1290  {
     1291    parsePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1()  ); 
     1292   
     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
     1299    pcVPS->getPTL( 1 )->inferGeneralValues ( false, 1, pcVPS->getPTL( 0 ) );
     1300    pcVPS->getPTL( 1 )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1(), 1, pcVPS->getPTL( 0 ) );   
     1301#endif
     1302  }
     1303#endif
     1304
    12061305  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
    12071306
     
    12751374  }
    12761375  pcVPS->setRefLayers();
     1376
     1377#if H_MV_HLS10_ADD_LAYERSETS
     1378  if ( pcVPS->getNumIndependentLayers() > 1 )
     1379  {
     1380    READ_UVLC( uiCode, "num_add_layer_sets"      ); pcVPS->setNumAddLayerSets( uiCode );
     1381  }
     1382  for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++)
     1383  {
     1384    for (Int j = 1; j < pcVPS->getNumIndependentLayers(); j++)
     1385    {
     1386      READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode );
     1387    }
     1388    pcVPS->deriveAddLayerSetLayerIdList( i );
     1389  }
     1390#endif
     1391
    12771392  READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 );
    12781393  if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
     
    13101425  READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 
    13111426
     1427#if H_MV_HLS10_PTL
     1428  Int offsetVal =  ( pcVPS->getMaxLayersMinus1() > 0  &&  pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1;   
     1429  for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
     1430  {
     1431    READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
     1432    parsePTL ( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
     1433#if H_MV_HLS10_PTL_INFER_FIX
     1434    pcVPS->getPTL( offsetVal )->inferGeneralValues ( pcVPS->getVpsProfilePresentFlag( i ), offsetVal, pcVPS->getPTL( offsetVal - 1 ) );   
     1435    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
     1444    offsetVal++;
     1445  }
     1446#else
    13121447  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    13131448  {
     
    13211456    }
    13221457  }
    1323 
     1458#endif
     1459
     1460#if !H_MV_HLS10_ADD_LAYERSETS
    13241461  if ( pcVPS->getNumIndependentLayers() > 1 )
    13251462  {
     
    13331470    }
    13341471  }
     1472#endif
     1473
    13351474  if (pcVPS->getNumLayerSets() > 1)
    13361475  {
     
    13451484  pcVPS->setLayerSetIdxForOlsMinus1(0, -1);
    13461485
     1486#if H_MV_HLS10_NESSECARY_LAYER
     1487  pcVPS->deriveNecessaryLayerFlags( 0 );
     1488#endif
    13471489  pcVPS->deriveTargetLayerIdList( 0 );
    13481490
     1491#if H_MV_HLS10_PTL_FIX
     1492  if (pcVPS->getVpsBaseLayerInternalFlag() )
     1493  { 
     1494    pcVPS->setProfileTierLevelIdx(0,0, pcVPS->inferProfileTierLevelIdx(0,0) );
     1495  }
     1496#endif
    13491497  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    13501498  {
    13511499    if( i >= pcVPS->getNumLayerSets( ) )   
    13521500    {       
     1501#if !VPS_MISC_UPDATES
    13531502      READ_UVLC( uiCode,      "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
     1503#else
     1504      READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
     1505#endif
    13541506    }
    13551507
     
    13681520      }
    13691521    }
     1522#if H_MV_HLS10_NESSECARY_LAYER
     1523    pcVPS->deriveNecessaryLayerFlags( i );
     1524#endif
    13701525    pcVPS->deriveTargetLayerIdList( i );
    13711526
     1527#if H_MV_HLS10_PTL
     1528    for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ )
     1529    {   
     1530      if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() > 0 )
     1531      {
     1532        READ_CODE( pcVPS->getProfileTierLevelIdxLen(), uiCode,"profile_tier_level_idx[ i ][ j ]" );   pcVPS->setProfileTierLevelIdx( i, j, uiCode );
     1533      }
     1534#if H_MV_HLS10_PTL_FIX
     1535      if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 )
     1536      {
     1537        pcVPS->setProfileTierLevelIdx( i , j, pcVPS->inferProfileTierLevelIdx( i, j) );
     1538      }
     1539#endif
     1540    }
     1541#else
    13721542    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    1373     {      
     1543    {
    13741544      READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" );   pcVPS->setProfileLevelTierIdx( i , uiCode );
    13751545    }
     1546#endif
     1547
    13761548    if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
    13771549    {
     
    14221594  }
    14231595
     1596#if !H_MV_HLS10_GEN_FIX
    14241597  READ_FLAG( uiCode, "vps_reserved_zero_flag" );
     1598#endif
    14251599  parseDpbSize( pcVPS );
    14261600
     
    14841658  if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() )
    14851659  { 
    1486   READ_CODE( 2,  uiCode, "chroma_format_vps_idc" );          pcRepFormat->setChromaFormatVpsIdc       ( uiCode );
    1487   if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )
    1488   {
    1489     READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 );
    1490   }
    1491   READ_CODE( 4,  uiCode, "bit_depth_vps_luma_minus8" );      pcRepFormat->setBitDepthVpsLumaMinus8    ( uiCode );
    1492   READ_CODE( 4,  uiCode, "bit_depth_vps_chroma_minus8" );    pcRepFormat->setBitDepthVpsChromaMinus8  ( uiCode );
     1660    READ_CODE( 2,  uiCode, "chroma_format_vps_idc" );          pcRepFormat->setChromaFormatVpsIdc       ( uiCode );
     1661    if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )
     1662    {
     1663      READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 );
     1664    }
     1665    READ_CODE( 4,  uiCode, "bit_depth_vps_luma_minus8" );      pcRepFormat->setBitDepthVpsLumaMinus8    ( uiCode );
     1666    READ_CODE( 4,  uiCode, "bit_depth_vps_chroma_minus8" );    pcRepFormat->setBitDepthVpsChromaMinus8  ( uiCode );
    14931667  }
    14941668  else
     
    14961670    pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false );
    14971671  }
     1672#if H_MV_HLS10_GEN_VSP_CONF_WIN
     1673  READ_FLAG( uiCode, "conformance_window_vps_flag" ); pcRepFormat->setConformanceWindowVpsFlag( uiCode == 1 );
     1674  if ( pcRepFormat->getConformanceWindowVpsFlag() )
     1675  {
     1676    READ_UVLC( uiCode, "conf_win_vps_left_offset" ); pcRepFormat->setConfWinVpsLeftOffset( uiCode );
     1677    READ_UVLC( uiCode, "conf_win_vps_right_offset" ); pcRepFormat->setConfWinVpsRightOffset( uiCode );
     1678    READ_UVLC( uiCode, "conf_win_vps_top_offset" ); pcRepFormat->setConfWinVpsTopOffset( uiCode );
     1679    READ_UVLC( uiCode, "conf_win_vps_bottom_offset" ); pcRepFormat->setConfWinVpsBottomOffset( uiCode );
     1680  }
     1681#endif
    14981682}
    14991683
     
    15211705  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    15221706  {
     1707#if H_MV_HLS10_VPS_VUI
     1708    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <  pcVPS->getNumLayerSets(); i++ )
     1709#else
    15231710    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
     1711#endif
    15241712    {
    15251713      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
     
    15541742  else
    15551743  {
     1744#if H_MV_HLS10_VPS_VUI
     1745    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 );
     1746#else
    15561747    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
     1748#endif
    15571749  }
    15581750
     
    15651757  }
    15661758
     1759#if I0045_VPS_VUI_VST_PARAMS
     1760  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
     1761  {
     1762    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1763    {
     1764      READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
     1765    }
     1766  }
     1767  else if ( !pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     1768  {
     1769    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1770    {
     1771      pcVPSVUI->setVpsVideoSignalInfoIdx( i, i );
     1772    }
     1773  }
     1774  else
     1775  {
     1776    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1777    {
     1778      pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 );
     1779    }
     1780  }
     1781#else
    15671782  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    15681783  {
     
    15801795    }
    15811796  }
     1797#endif
    15821798  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
    15831799  if( !pcVPSVUI->getTilesNotInUseFlag() )
     
    15941810    {
    15951811      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ )
    1596       { 
     1812      {
     1813#if H_MV_HLS10_REF_PRED_LAYERS
     1814        Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdDirectRefLayer(pcVPS->getLayerIdInNuh( i ) , j  )); 
     1815#else
    15971816        Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j  )); 
     1817#endif
    15981818        if( pcVPSVUI->getTilesInUseFlag( i )  &&  pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 
    15991819        {
     
    16131833    }
    16141834  }
     1835#if H_MV_HLS10_VPS_VUI
     1836  READ_FLAG( uiCode, "single_layer_for_non_irap_flag" ); pcVPSVUI->setSingleLayerForNonIrapFlag( uiCode == 1 );
     1837  READ_FLAG( uiCode, "higher_layer_irap_skip_flag" ); pcVPSVUI->setHigherLayerIrapSkipFlag( uiCode == 1 );
     1838#else
    16151839  READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" );
     1840#endif
    16161841  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
    16171842
     
    16221847      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )
    16231848      {
     1849#if H_MV_HLS10_REF_PRED_LAYERS
     1850        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdDirectRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
     1851#else
    16241852        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
     1853#endif
    16251854        {       
    16261855          READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode );
     
    16411870  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
    16421871  {
     1872#if VPS_MISC_UPDATES
     1873    assert(pcVPS->getTimingInfo()->getTimingInfoPresentFlag() == 1);
     1874#endif
    16431875    parseVpsVuiBspHrdParameters( pcVPS );
    16441876  }
     
    16611893
    16621894  TComVpsVuiBspHrdParameters*  vpsVuiBspHrdP = pcVPSVUI->getVpsVuiBspHrdParameters();
    1663  
     1895#if H_MV_HLS10_VPS_VUI_BSP
     1896  assert( vpsVuiBspHrdP == NULL );
     1897  vpsVuiBspHrdP = new TComVpsVuiBspHrdParameters;
     1898  pcVPSVUI->setVpsVuiBspHrdParameters( vpsVuiBspHrdP );
     1899#else
    16641900  assert ( vpsVuiBspHrdP );
    1665 
     1901#endif
    16661902  UInt uiCode;
     1903#if H_MV_HLS10_VPS_VUI_BSP
     1904  READ_UVLC( uiCode, "vps_num_add_hrd_params" ); vpsVuiBspHrdP->setVpsNumAddHrdParams( uiCode );
     1905  vpsVuiBspHrdP->createAfterVpsNumAddHrdParams( pcVPS );
     1906  for( Int i = pcVPS->getNumHrdParameters(); i < pcVPS->getNumHrdParameters() + vpsVuiBspHrdP->getVpsNumAddHrdParams(); i++ )
     1907  { 
     1908    if( i > 0 ) 
     1909    {
     1910      READ_FLAG( uiCode, "cprms_add_present_flag" ); vpsVuiBspHrdP->setCprmsAddPresentFlag( i, uiCode == 1 );
     1911    }
     1912    else
     1913    {
     1914       vpsVuiBspHrdP->setCprmsAddPresentFlag( i, true );
     1915    }
     1916
     1917    READ_UVLC( uiCode, "num_sub_layer_hrd_minus1" ); vpsVuiBspHrdP->setNumSubLayerHrdMinus1( i, uiCode );
     1918    TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i );
     1919    parseHrdParameters( hrdParameters, vpsVuiBspHrdP->getCprmsAddPresentFlag( i ), vpsVuiBspHrdP->getNumSubLayerHrdMinus1( i ) );     
     1920  }
     1921
     1922  vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( 0, 0, 0);
     1923  vpsVuiBspHrdP->createAfterNumPartitionsInSchemeMinus1( 0, 0 );
     1924
     1925  for( Int h = 0; h < pcVPS->getNumOutputLayerSets(); h++ )
     1926  {
     1927    if ( h == 0)
     1928    {
     1929      vpsVuiBspHrdP->setNumSignalledPartitioningSchemes( h, 0 );
     1930    }
     1931    else
     1932    {
     1933      READ_UVLC( uiCode, "num_signalled_partitioning_schemes" ); vpsVuiBspHrdP->setNumSignalledPartitioningSchemes( h, uiCode );
     1934    }   
     1935    vpsVuiBspHrdP->createAfterNumSignalledPartitioningSchemes( h );
     1936
     1937    for( Int j = 0; j < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; j++ )
     1938    {
     1939      if ( j == 0 && h == 0 )
     1940      {
     1941        vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, uiCode );
     1942      }
     1943      else if( j == 0 )
     1944      {
     1945        vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, pcVPS->getNumLayersInIdList( h ) - 1 );
     1946      }
     1947      else
     1948      {
     1949        READ_UVLC( uiCode, "num_partitions_in_scheme_minus1" ); vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, uiCode );
     1950      }
     1951      vpsVuiBspHrdP->createAfterNumPartitionsInSchemeMinus1( h, j );
     1952
     1953      for( Int k = 0; k  <=  vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ ) 
     1954      {
     1955        for( Int r = 0; r < pcVPS->getNumLayersInIdList(pcVPS->olsIdxToLsIdx( h ) )   ; r++ ) 
     1956        {
     1957          if( h == 0 && j == 0 && k == 0 && r == 0 )
     1958          {
     1959             vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, true );
     1960          }
     1961          else if ( h > 0 && j == 0 )
     1962          {
     1963             vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, (k == r) );
     1964          }
     1965          else
     1966          {
     1967            READ_FLAG( uiCode, "layer_included_in_partition_flag" ); vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, uiCode == 1 );
     1968          }         
     1969        }
     1970      }
     1971    } 
     1972    if ( h > 0 )
     1973    {
     1974      for( Int i = 0; i < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; i++ ) 
     1975      {
     1976        for( Int t = 0; t  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( pcVPS->olsIdxToLsIdx( i ) ); t++ )
     1977        { 
     1978          READ_UVLC( uiCode, "num_bsp_schedules_minus1" ); vpsVuiBspHrdP->setNumBspSchedulesMinus1( h, i, t, uiCode );
     1979          vpsVuiBspHrdP->createAfterNumBspSchedulesMinus1( h, i, t );
     1980          for( Int j = 0; j  <=  vpsVuiBspHrdP->getNumBspSchedulesMinus1( h, i, t ); j++ ) 
     1981          {
     1982            for( Int k = 0; k  <=  vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ )
     1983            { 
     1984              READ_CODE( vpsVuiBspHrdP->getBspHrdIdxLen( pcVPS ), uiCode, "bsp_hrd_idx" ); vpsVuiBspHrdP->setBspHrdIdx( h, i, t, j, k, uiCode );
     1985              READ_UVLC( uiCode, "bsp_sched_idx" ); vpsVuiBspHrdP->setBspSchedIdx( h, i, t, j, k, uiCode );
     1986            } 
     1987          }
     1988        } 
     1989      }
     1990    }
     1991  } 
     1992#else
    16671993  READ_UVLC( uiCode, "vps_num_bsp_hrd_parameters_minus1" ); vpsVuiBspHrdP->setVpsNumBspHrdParametersMinus1( uiCode );
    16681994  for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ )
     
    17012027    } 
    17022028  } 
    1703 
     2029#endif 
     2030}
    17042031
    17052032Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo )
     
    17332060        for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ )   
    17342061        {
     2062#if H_MV_HLS10_DBP_SIZE
     2063          if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) ))
     2064          {
     2065            READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
     2066          }
     2067          else
     2068          {
     2069            if ( vps->getNecessaryLayerFlag( i, k ) && ( j == 0 ) && ( k == 0 ))
     2070            {
     2071              dpbSize->setMaxVpsDecPicBufferingMinus1(i ,k, j, 0 );
     2072            }
     2073          }
     2074#else
    17352075          READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
     2076#endif
    17362077        }
    17372078        READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode );
     
    17442085          for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ )   
    17452086          {
    1746             dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     2087#if H_MV_HLS10_DBP_SIZE
     2088            if ( vps->getNecessaryLayerFlag(i, k ) )
     2089            {           
     2090#endif
     2091              dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     2092#if H_MV_HLS10_DBP_SIZE
     2093            }
     2094#endif           
    17472095          }
    17482096          dpbSize->setMaxVpsNumReorderPics      ( i, j, dpbSize->getMaxVpsNumReorderPics      ( i, j - 1 ) );
     
    19402288  sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) );   
    19412289  sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false );
     2290#if !H_MV_HLS10_ADD_LAYERSETS
    19422291  vps->inferDbpSizeLayerSetZero( sps, false );
     2292#endif
    19432293
    19442294  if ( sps->getVuiParametersPresentFlag() )
     
    20082358      esb++;
    20092359      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
     2360#if NON_REF_NAL_TYPE_DISCARDABLE
     2361      if ( uiCode == 1 )
     2362      {
     2363        assert(rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R &&
     2364          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R &&
     2365          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R &&
     2366          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R &&
     2367          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R);
     2368      }
     2369#endif
    20102370    }
    20112371
     
    21552515          rps->checkMaxNumPics(
    21562516            vps->getVpsExtensionFlag(),
     2517#if H_MV_HLS10_MAXNUMPICS
     2518            MAX_INT,  // To be replaced by MaxDbpSize
     2519#else
    21572520            vps->getMaxNumPics( rpcSlice->getLayerId() ),
     2521#endif
    21582522            rpcSlice->getLayerId(),
    21592523            sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 );
     
    22682632        rps->checkMaxNumPics(
    22692633          vps->getVpsExtensionFlag(),
     2634#if H_MV_HLS10_MAXNUMPICS
     2635            MAX_INT,  // To be replaced by MaxDbpsize
     2636#else
    22702637          vps->getMaxNumPics( rpcSlice->getLayerId() ),
     2638#endif
    22712639          rpcSlice->getLayerId(),
    22722640          sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 );
     
    22872655      if (rpcSlice->getSPS()->getTMVPFlagsPresent())
    22882656      {
     2657#if I0044_SLICE_TMVP
     2658        READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" );
     2659#else
    22892660        READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" );
     2661#endif
    22902662        rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false );
    22912663      }
     
    26373009
    26383010#if H_3D
     3011#if LGE_FCO_I0116
     3012  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && rpcSlice->getIsDepth() )
     3013#else
    26393014  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
     3015#endif
    26403016  {
    26413017    UInt uiViewIndex = rpcSlice->getViewIndex();
     
    27233099#endif
    27243100  }
     3101#if INFERENCE_POC_MSB_VAL_PRESENT
     3102  else
     3103  {
     3104    rpcSlice->setSliceSegmentHeaderExtensionLength( 0 );
     3105    rpcSlice->setPocMsbValPresentFlag( false );
     3106  }
     3107#endif
    27253108
    27263109
     
    28153198      READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
    28163199#if H_MV
    2817     rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );
     3200#if !H_MV_HLS10_PTL_INFER_FIX
     3201      rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );
     3202#else
     3203      // When profilePresentFlag is equal to 0, sub_layer_profile_present_flag[ i ] shall be equal to 0.
     3204      assert( profilePresentFlag || !rpcPTL->getSubLayerProfilePresentFlag(i) );
     3205#endif
    28183206#else
    28193207    }
     
    28333221  for(Int i = 0; i < maxNumSubLayersMinus1; i++)
    28343222  {
    2835     if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )
     3223#if H_MV_HLS10_PTL_INFER_FIX
     3224#if H_MV
     3225    if( rpcPTL->getSubLayerProfilePresentFlag(i) )         
     3226#else
     3227    if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )         
     3228#endif
     3229#else
     3230    if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )   
     3231#endif
    28363232    {
    28373233      parseProfileTier(rpcPTL->getSubLayerPTL(i));
     
    28663262  ptl->setFrameOnlyConstraintFlag(uiCode ? true : false);
    28673263 
     3264#if H_MV_HLS10_PTL
     3265#if H_MV_HLS10_PTL_INFER_FIX
     3266  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
     3273  {
     3274    READ_FLAG( uiCode, "max_12bit_constraint_flag" );        ptl->setMax12bitConstraintFlag      ( uiCode == 1 );
     3275    READ_FLAG( uiCode, "max_10bit_constraint_flag" );        ptl->setMax10bitConstraintFlag      ( uiCode == 1 );
     3276    READ_FLAG( uiCode, "max_8bit_constraint_flag" );         ptl->setMax8bitConstraintFlag       ( uiCode == 1 );
     3277    READ_FLAG( uiCode, "max_422chroma_constraint_flag" );    ptl->setMax422chromaConstraintFlag  ( uiCode == 1 );
     3278    READ_FLAG( uiCode, "max_420chroma_constraint_flag" );    ptl->setMax420chromaConstraintFlag  ( uiCode == 1 );
     3279    READ_FLAG( uiCode, "max_monochrome_constraint_flag" );   ptl->setMaxMonochromeConstraintFlag ( uiCode == 1 );
     3280    READ_FLAG( uiCode, "intra_constraint_flag" );            ptl->setIntraConstraintFlag         ( uiCode == 1 );
     3281    READ_FLAG( uiCode, "one_picture_only_constraint_flag" ); ptl->setOnePictureOnlyConstraintFlag( uiCode == 1 );
     3282    READ_FLAG( uiCode, "lower_bit_rate_constraint_flag" );   ptl->setLowerBitRateConstraintFlag  ( uiCode == 1 );   
     3283    READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[0..15]");
     3284    READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[16..31]");
     3285    READ_CODE(2 , uiCode, "XXX_reserved_zero_34bits[32..33]");
     3286  }
     3287  else
     3288  {
     3289    READ_CODE(16, uiCode, "XXX_reserved_zero_43bits[0..15]");
     3290    READ_CODE(16, uiCode, "XXX_reserved_zero_43bits[16..31]");
     3291    READ_CODE(11, uiCode, "XXX_reserved_zero_43bits[32..42]");
     3292  }
     3293#if H_MV_HLS10_PTL_INFER_FIX
     3294  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
     3301  {
     3302    READ_FLAG( uiCode, "inbld_flag" ); ptl->setInbldFlag( uiCode == 1 );
     3303  }
     3304  else
     3305  {
     3306    READ_FLAG(uiCode, "reserved_zero_bit");
     3307  }
     3308#else
    28683309  READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[0..15]");
    28693310  READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[16..31]");
    28703311  READ_CODE(12, uiCode, "XXX_reserved_zero_44bits[32..43]");
     3312#endif
    28713313}
    28723314
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r1039 r1066  
    9797#endif
    9898
     99#if H_MV_HLS10_PPS
     100#if H_MV
     101  Void  parsePPSMultilayerExtension( TComPPS* pcPPS );
     102#endif
     103#endif
     104
     105
    99106#if H_3D
    100107  Void  parsePPS            ( TComPPS* pcPPS, TComVPS* pcVPS );
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r1039 r1066  
    859859  // get collocated depth block
    860860  UInt uiDepthStride = 0;
     861#if LGE_FCO_I0116
     862  Pel* pDepthPels = pcCU->getVirtualDepthBlock(pcCU->getZorderIdxInCU(), pcCU->getWidth(0), pcCU->getHeight(0), uiDepthStride);
     863#else
    861864  Pel* pDepthPels = pcCU->getVirtualDepthBlock(0, pcCU->getWidth(0), pcCU->getHeight(0), uiDepthStride);
     865#endif
    862866  AOF( pDepthPels != NULL );
    863867  AOF( uiDepthStride != 0 );
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r1039 r1066  
    794794
    795795#if MTK_I0099_VPS_EX2
     796#if LGE_FCO_I0116
     797  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark())
     798#else
    796799  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag)
     800#endif
    797801#else
    798802  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
     
    854858  UInt uiTexturePart = uiMode;
    855859#if MTK_I0099_VPS_EX2
     860#if LGE_FCO_I0116
     861  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark())
     862#else
    856863  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag )
     864#endif
    857865#else
    858866  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r976 r1066  
    229229  }
    230230
     231#if !LGE_FCO_I0116
    231232  if ( pcSlice->getIsDepth())
    232233  {
    233234    return;
    234235  }
     236#endif
    235237
    236238  Int curPoc = pcSlice->getPOC();
     
    667669#if H_MV
    668670  sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false );
     671#if !H_MV_HLS10_ADD_LAYERSETS
    669672  vps->inferDbpSizeLayerSetZero( sps, false );
     673#endif
    670674  // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0
    671675  if ( vps->getVpsNumRepFormatsMinus1() == 0 )
     
    675679  }
    676680  sps->checkRpsMaxNumPics( vps, getLayerId() );
     681#if H_MV_HLS10_MULTILAYERSPS
     682
     683  if( sps->getLayerId() != 0 )
     684  {
     685    sps->inferSpsMaxSubLayersMinus1( true, vps );
     686  }
     687
     688#if H_MV_HLS10_MULTILAYERSPS
     689  // It is a requirement of bitstream conformance that, when the SPS is referred to by
     690  // any current picture that belongs to an independent non-base layer, the value of
     691  // MultiLayerExtSpsFlag derived from the SPS shall be equal to 0.
     692
     693  if ( m_layerId > 0 && vps->getNumRefLayers( m_layerId ) == 0 )
     694  { 
     695    assert( sps->getMultiLayerExtSpsFlag() == 0 );
     696  }
     697#endif
     698
     699  if( sps->getMultiLayerExtSpsFlag() )
     700  {
     701    sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true );
     702  }
     703#else
    677704  if( m_layerId > 0 )
    678705  {
    679706    sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true );
    680707  }
     708#endif
    681709#endif
    682710
     
    702730#if H_MV
    703731  m_apcSlicePilot->setVPS(vps); 
     732#if H_MV_HLS10_REF_PRED_LAYERS
     733  // 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.
     734  assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, pps->getLayerId() ) );   
     735  // 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.
     736  assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, sps->getLayerId() ) );
     737#else
    704738  // 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.
    705739  assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) );   
    706740  // 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.
    707741  assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) );
     742#endif
    708743  sps->inferRepFormat  ( vps , m_layerId );
    709744  sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) );
     745
    710746#endif
    711747  pps->setSPS(sps);
     
    909945   }
    910946#endif
     947   
     948#if I0044_SLICE_TMVP
     949  if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 )
     950  {
     951    //update all pics in the DPB such that they cannot be used for TMPV ref
     952    TComList<TComPic*>::iterator  iterRefPic = m_cListPic.begin(); 
     953    while( iterRefPic != m_cListPic.end() )
     954    {
     955      TComPic *refPic = *iterRefPic;
     956      if( ( refPic->getLayerId() == m_apcSlicePilot->getLayerId() ) && refPic->getReconMark() )
     957      {
     958        for(Int i = refPic->getNumAllocatedSlice()-1; i >= 0; i--)
     959        {
     960
     961          TComSlice *refSlice = refPic->getSlice(i);
     962          refSlice->setAvailableForTMVPRefFlag( false );
     963        }
     964      }
     965      iterRefPic++;
     966    }
     967  }
     968  m_apcSlicePilot->setAvailableForTMVPRefFlag( true );
     969#endif
     970
    911971  xActivateParameterSets();
    912972
     
    11331193#endif
    11341194    // For generalized B
     1195#if I0044_SLICE_TMVP
     1196    if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() )
     1197    {
     1198      TComPic* refPic = pcSlice->getRefPic(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
     1199
     1200      assert ( refPic );
     1201      assert ( refPic->getPicSym()->getSlice(0)->getAvailableForTMVPRefFlag() == true );
     1202    }
     1203#endif
     1204
     1205    // For generalized B
    11351206    // note: maybe not existed case (always L0 is copied to L1 if L1 is empty)
    11361207    if (pcSlice->isInterB() && pcSlice->getNumRefIdx(REF_PIC_LIST_1) == 0)
     
    12011272
    12021273#if H_3D_IV_MERGE
     1274#if LGE_FCO_I0116
     1275  if( !pcSlice->getIsDepth() && m_pcCamParsCollector )
     1276#else
    12031277  if( pcSlice->getIsDepth() && m_pcCamParsCollector )
     1278#endif
    12041279  {
    12051280    m_pcCamParsCollector->copyCamParamForSlice( pcSlice );
     
    16521727  for (Int i = 0; i < vps->getNumDirectRefLayers( getLayerId()  ); i++ )
    16531728  {
     1729#if H_MV_HLS10_REF_PRED_LAYERS
     1730    Int refLayerId = vps->getIdDirectRefLayer( m_layerId, i );
     1731#else
    16541732    Int refLayerId = vps->getRefLayerId( m_layerId, i );
     1733#endif
    16551734    allRefLayersInitilizedFlag = allRefLayersInitilizedFlag && m_layerInitilizedFlag[ refLayerId ];
    16561735  }
Note: See TracChangeset for help on using the changeset viewer.