Changeset 964 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncCavlc.cpp


Ignore:
Timestamp:
5 Jul 2014, 05:16:45 (10 years ago)
Author:
tech
Message:
  • Merged 11.0-dev0@963. (Update to HM 14.0 + MV-HEVC Draft 8 HLS)
  • Added coding results.
  • Changed version number.
File:
1 edited

Legend:

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

    r950 r964  
    140140    WRITE_UVLC( rps->getNumberOfNegativePictures(), "num_negative_pics" );
    141141    WRITE_UVLC( rps->getNumberOfPositivePictures(), "num_positive_pics" );
     142
    142143    Int prev = 0;
    143144    for(Int j=0 ; j < rps->getNumberOfNegativePictures(); j++)
     
    276277        pcPPS->getLayerId() != 1  )
    277278    {
    278         pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false );
     279#if H_MV_HLS_8_SPS_NODOC_48
     280      pcPPS->setPps3dExtensionFlag( false );
     281#else
     282      pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false );
     283#endif
    279284    }
    280285  #endif
     
    283288  WRITE_FLAG( 0, "pps_extension_flag" );
    284289#else
    285   WRITE_FLAG( 1, "pps_extension_flag" );
    286 
     290  WRITE_FLAG( 1, "pps_extension_present_flag" );
     291
     292#if H_MV_HLS_8_SPS_NODOC_48
     293    WRITE_FLAG( pcPPS->getPpsRangeExtensionsFlag( ) ? 1 : 0 , "pps_range_extensions_flag" );
     294    WRITE_FLAG( pcPPS->getPpsMultilayerExtensionFlag( ) ? 1 : 0 , "pps_multilayer_extension_flag" );
     295#if !H_3D
     296    WRITE_CODE( pcPPS->getPpsExtension6bits( ), 6, "pps_extension_6bits" );
     297#else
     298    WRITE_FLAG( pcPPS->getPps3dExtensionFlag( ) ? 1 : 0 , "pps_3d_extension_flag" );
     299    WRITE_CODE( pcPPS->getPpsExtension5bits( ), 5, "pps_extension_5bits" );
     300#endif
     301    if ( pcPPS->getPpsRangeExtensionsFlag() )
     302    {
     303      assert(0);
     304    }
     305
     306    if ( pcPPS->getPpsMultilayerExtensionFlag() )
     307    {
     308      WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );
     309#if H_MV_HLS_8_PPS_NODOC_NN
     310      WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" );
     311#endif
     312    }
     313
     314#if H_3D
     315    if( pcPPS->getPps3dExtensionFlag( )  ) // This probably needs to be aligned with Rext and SHVC
     316    {
     317      codePPSExtension( pcPPS );
     318    }
     319#endif
     320#else
    287321  for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ )
    288322  {
     
    305339    codePPSExtension( pcPPS );
    306340  }
     341#endif
    307342#endif
    308343
     
    822857  WRITE_FLAG( 0, "sps_extension_flag" );
    823858#else
    824   WRITE_FLAG( pcSPS->getSpsExtensionFlag(), "sps_extension_flag" );
    825 
    826   if ( pcSPS->getSpsExtensionFlag() )
    827   {
     859  WRITE_FLAG( pcSPS->getSpsExtensionPresentFlag(), "sps_extension_present_flag" );
     860
     861  if ( pcSPS->getSpsExtensionPresentFlag() )
     862  {
     863#if H_MV_HLS_8_SPS_NODOC_48
     864    WRITE_FLAG( pcSPS->getSpsRangeExtensionsFlag( ) ? 1 : 0 , "sps_range_extensions_flag" );
     865    WRITE_FLAG( pcSPS->getSpsMultilayerExtensionFlag( ) ? 1 : 0 , "sps_multilayer_extension_flag" );
     866#if !H_3D
     867    WRITE_CODE( pcSPS->getSpsExtension6bits( ), 6, "sps_extension_6bits" );
     868#else
     869    WRITE_FLAG( pcSPS->getSps3dExtensionFlag( ) ? 1 : 0 , "sps_3d_extension_flag" );
     870    WRITE_CODE( pcSPS->getSpsExtension5bits( ), 5, "sps_extension_5bits" );
     871#endif
     872 }
     873
     874  if ( pcSPS->getSpsRangeExtensionsFlag() )
     875  {
     876    assert( 0 );
     877  }
     878
     879  if ( pcSPS->getSpsMultilayerExtensionFlag() )
     880  {
     881    codeSPSExtension( pcSPS );
     882  }
     883
     884#if H_3D
     885  if ( pcSPS->getSps3dExtensionFlag() )
     886  {
     887    codeSPSExtension2( pcSPS, viewIndex, depthFlag  );
     888  }
     889
     890#endif
     891#else
    828892    for (Int i = 0; i < PS_EX_T_MAX_NUM; i++)
    829893    {
     
    848912#endif
    849913  }
     914#endif
    850915#endif
    851916}
     
    890955{
    891956  WRITE_CODE( pcVPS->getVPSId(),                    4,        "vps_video_parameter_set_id" );
     957#if H_MV_HLS_8_SYN_Q0041_03
     958  WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" );
     959  WRITE_FLAG( 1                                             , "vps_reserved_one_bit" );
     960#else
    892961  WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
     962#endif
    893963#if H_MV
    894964  WRITE_CODE( pcVPS->getMaxLayersMinus1(),       6,        "vps_max_layers_minus1" );
     
    9721042  }
    9731043#if H_MV
     1044#if H_MV_HLS_8_RPS_Q0100_36
     1045  WRITE_FLAG( pcVPS->getVpsExtensionFlag(),                     "vps_extension_flag" );
     1046#else
    9741047  WRITE_FLAG( 1,                     "vps_extension_flag" );
     1048#endif
    9751049  m_pcBitIf->writeAlignOne();
    9761050  codeVPSExtension( pcVPS );                           
     
    9961070Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS )
    9971071{
     1072 
     1073#if !H_MV_HLS_8_SYN_Q0041_03
    9981074  WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0,          "avc_base_layer_flag" );
     1075#endif
     1076
    9991077  WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
    10001078
     
    10101088
    10111089  if ( pcVPS->getSplittingFlag() )
    1012   { // Ignore old dimension id length
     1090  {
    10131091    pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1 ,pcVPS->inferLastDimsionIdLenMinus1() + 1 );       
    10141092  }   
     
    10421120  }
    10431121
    1044 
    10451122  WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" );
    10461123
     
    10681145    }
    10691146  }
     1147
    10701148  WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" );
    10711149  if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
     
    11091187  }
    11101188
    1111   WRITE_UVLC( pcVPS->getNumAddOutputLayerSets( ), "num_add_output_layer_sets" );
     1189#if H_MV_HLS_8_SYN_39_19
     1190  if ( pcVPS->getNumIndependentLayers() > 1 )
     1191  {
     1192   WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" );
     1193  }
     1194  for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++)
     1195  {
     1196    for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++)
     1197    {
     1198      WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j )  , "highest_layer_idx_plus1" );
     1199    }
     1200  }
     1201  if (pcVPS->getNumLayerSets() > 1)
     1202  {
     1203    WRITE_UVLC( pcVPS->getNumAddOlss( ), "num_add_olss" );
     1204    WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" );
     1205  }
     1206#else
     1207  WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" );
    11121208
    11131209  if( pcVPS->getNumOutputLayerSets() > 1)
    11141210  {
    1115     WRITE_CODE( pcVPS->getDefaultTargetOutputLayerIdc( ), 2, "default_target_output_layer_idc" );
     1211    WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" );
    11161212  } 
    1117 
     1213#endif
    11181214
    11191215  assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 ));
    1120   assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 );
     1216  assert( pcVPS->getLayerSetIdxForOlsMinus1( 0 ) == -1 );
     1217
     1218
     1219
    11211220
    11221221  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    11231222  {
     1223#if H_MV_HLS_8_SYN_39_19
     1224    if( i >= pcVPS->getNumLayerSets( ) )   
     1225#else
    11241226    if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )   
     1227#endif
    11251228    {     
    1126       WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ),      "output_layer_set_idx_minus1[i]" );
    1127     }
    1128 
    1129     if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultTargetOutputLayerIdc() == 2 )
     1229      WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ),      "layer_set_idx_for_ols_minus1[i]" );
     1230    }
     1231
     1232    if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 )
    11301233    {       
    1131       for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ); j++ )
     1234      for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ )
    11321235      {
    11331236        WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" );
     
    11361239    else
    11371240    {
    1138       for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ) - 1; j++ )
     1241      for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ) - 1; j++ )
    11391242      {             
    11401243        assert( pcVPS->getOutputLayerFlag( i , j ) == pcVPS->inferOutputLayerFlag( i, j ));
    11411244      }
    11421245    }       
     1246
    11431247
    11441248    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
     
    11521256  }
    11531257
     1258#if !H_MV_HLS_8_PMS_Q0195_20
    11541259  WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" );
    11551260  if ( pcVPS->getRepFormatIdxPresentFlag() )
     
    11571262    WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" );
    11581263  }
     1264#else
     1265  WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" );
     1266#endif
    11591267
    11601268  for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ )
    11611269  {   
     1270
    11621271    TComRepFormat* curRepFormat = pcVPS->getRepFormat(i);     
    11631272    TComRepFormat* prevRepFormat = i > 0 ? pcVPS->getRepFormat( i - 1) : NULL;
    11641273    codeRepFormat( i, curRepFormat ,  prevRepFormat);
    1165   }
    1166 
     1274
     1275  }
     1276
     1277#if H_MV_HLS_8_PMS_Q0195_20
     1278  if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
     1279  {
     1280    WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" );
     1281  }
     1282#endif
    11671283  if( pcVPS->getRepFormatIdxPresentFlag() )
    11681284  {
     1285#if H_MV_HLS_8_SYN_Q0041_03
     1286    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1287#else
    11691288    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1170     {
     1289#endif
     1290    {
     1291#if !H_MV_HLS_8_PMS_Q0195_20
    11711292      if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    11721293      {
     1294#endif
    11731295        WRITE_CODE( pcVPS->getVpsRepFormatIdx(i), pcVPS->getVpsRepFormatIdxLen(), "vps_rep_format_idx[i]" );
    1174       }
    1175     }
    1176   }
     1296#if !H_MV_HLS_8_PMS_Q0195_20
     1297      }
     1298#endif
     1299    }
     1300  }
     1301#if H_MV_HLS_8_PMS_Q0195_20
     1302  else
     1303  {
     1304#if H_MV_HLS_8_SYN_Q0041_03
     1305    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1306#else
     1307    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1308#endif
     1309    {
     1310      assert( pcVPS->getVpsRepFormatIdx( i ) ==  pcVPS->inferVpsRepFormatIdx( i ) );
     1311    }
     1312  }
     1313#endif
     1314
    11771315
    11781316  WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" );
     
    11871325    }
    11881326  }
     1327
    11891328  WRITE_FLAG( 0, "vps_reserved_zero_flag" );
    11901329  codeDpbSize( pcVPS );
     
    11931332
    11941333  WRITE_FLAG( pcVPS->getDefaultDirectDependencyFlag( ) ? 1 : 0 , "default_direct_dependency_flag" );
    1195 
    11961334  if ( pcVPS->getDefaultDirectDependencyFlag( ) )
    11971335  { 
     
    11991337  }
    12001338
     1339#if H_MV_HLS_8_SYN_Q0041_03
     1340  for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ?  1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ )
     1341  {
     1342    for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ?  0 : 1; j < i; j++ )
     1343#else
    12011344  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
    12021345  {
    12031346    for( Int j = 0; j < i; j++ )
     1347#endif
    12041348    {
    12051349      if (pcVPS->getDirectDependencyFlag( i, j) )
     
    12181362  } 
    12191363  WRITE_UVLC( 0, "vps_non_vui_extension_length" );
    1220   WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
     1364 
     1365
     1366
     1367
     1368WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
    12211369  if( pcVPS->getVpsVuiPresentFlag() )
    12221370  {
     
    12291377    pcVPSVUI->inferVpsVui( true );
    12301378  }
     1379
    12311380}
    12321381
     
    12481397  for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ )
    12491398  { 
     1399#if H_MV_HLS_8_MIS_Q0102_30
     1400    Int currLsIdx = vps->olsIdxToLsIdx( i );
     1401#endif
    12501402    WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" );
     1403#if H_MV_HLS_8_MIS_Q0102_30
     1404    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
     1405#else
    12511406    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
     1407#endif
    12521408    { 
    12531409      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    12571413      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    12581414      { 
    1259         for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ )   
     1415#if H_MV_HLS_8_MIS_Q0102_30
     1416        for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ )   
     1417#else
     1418        for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ )   
     1419#endif
    12601420        {
    12611421          WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );
    12621422        }
    12631423        WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" );
    1264 #if H_MV_HLS7_GEN
    1265         if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) )
    1266         {
    1267           for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ )
    1268           {
    1269             WRITE_UVLC( dpbSize->getMaxVpsLayerDecPicBuffMinus1( i, k, j ), "max_vps_layer_dec_pic_buff_minus1" );
    1270           }
    1271         }
    1272 #endif
    12731424        WRITE_UVLC( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ), "max_vps_latency_increase_plus1" );
    12741425      }
     
    12771428        if ( j > 0 )
    12781429        {
    1279           for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ )   
     1430#if H_MV_HLS_8_DBP_NODOC_42
     1431          for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ )   
     1432#else
     1433          for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ )   
     1434#endif
    12801435          {
    12811436            assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     
    12851440        }
    12861441      }
    1287     }       
    1288   } 
     1442    }
     1443  }
    12891444}
    12901445
     
    13241479  assert( pcVPSVUI );
    13251480
     1481
    13261482  WRITE_FLAG( pcVPSVUI->getCrossLayerPicTypeAlignedFlag( ) ? 1 : 0 , "cross_layer_pic_type_aligned_flag" );
    13271483  if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() )
     
    13371493  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    13381494  {
     1495#if H_MV_HLS_8_SYN_Q0041_03
     1496    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
     1497#else
    13391498    for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1340     {
     1499#endif
     1500    {
     1501#if H_MV_HLS_8_MIS_Q0102_30
     1502      for( Int j = 0; j  <=  pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ )
     1503#else         
    13411504      for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
     1505#endif
    13421506      {
    13431507        if( pcVPSVUI->getBitRatePresentVpsFlag( ) )
     
    13991563  if( !pcVPSVUI->getTilesNotInUseFlag() )
    14001564  {     
     1565#if H_MV_HLS_8_SYN_Q0041_03
     1566    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
     1567#else
    14011568    for( Int i = 0; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
     1569#endif
    14021570    {
    14031571      WRITE_FLAG( pcVPSVUI->getTilesInUseFlag( i ) ? 1 : 0 , "tiles_in_use_flag[i]" );
     
    14071575      }
    14081576    } 
    1409 
     1577#if H_MV_HLS_8_SYN_Q0041_03
     1578    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i  <=  pcVPS->getMaxLayersMinus1(); i++ ) 
     1579#else
    14101580    for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ ) 
     1581#endif
    14111582    {
    14121583      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ )
     
    14391610      for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )
    14401611      {
     1612#if H_MV_HLS_8_SYN_Q0041_03
     1613        if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )
     1614        {       
     1615#endif
    14411616        WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" );
    14421617        if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 )
     
    14481623          }
    14491624        }
     1625#if H_MV_HLS_8_SYN_Q0041_03
     1626        }
     1627#endif
    14501628      }
    14511629    }
     
    14951673    for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 
    14961674    {
     1675#if H_MV_HLS_8_HRD_Q0101_04
     1676      for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 
     1677      {
     1678        WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" );
     1679#else
    14971680      for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ ) 
    14981681      {
     
    15051688          vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec
    15061689        }
     1690#endif
    15071691      }
    15081692    }
     
    15101694
    15111695    if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) )
    1512     { 
    1513       WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinations( h ), "num_bsp_sched_combinations" );
    1514       for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinations( h ); i++ )
     1696    {
     1697      WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ), "num_bsp_sched_combinations_minus1" );
     1698#if H_MV_HLS_8_HRD_Q0182_05
     1699      for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )
     1700#else
     1701      for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )
     1702#endif
    15151703      {
    15161704        for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )
    15171705        { 
     1706#if H_MV_HLS_8_HRD_Q0101_04
     1707          WRITE_CODE( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ),  vpsVuiBspHrdP->getBspCombHrdIdxLen(), "bsp_comb_hrd_idx" );
     1708#else
    15181709          WRITE_UVLC( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), "bsp_comb_hrd_idx" );
     1710#endif
    15191711          WRITE_UVLC( vpsVuiBspHrdP->getBspCombSchedIdx( h, i, j ), "bsp_comb_sched_idx" );
     1712
     1713#if H_MV_HLS_8_HRD_Q0101_04
     1714          vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );
     1715#endif
    15201716        } 
    15211717      }
     
    16361832  if ( pcSlice->getRapPicFlag() )
    16371833  {
     1834#if SETTING_NO_OUT_PIC_PRIOR
     1835    WRITE_FLAG( pcSlice->getNoOutputPriorPicsFlag() ? 1 : 0, "no_output_of_prior_pics_flag" );
     1836#else
    16381837    WRITE_FLAG( 0, "no_output_of_prior_pics_flag" );
     1838#endif
    16391839  }
    16401840#if PPS_FIX_DEPTH
     
    17071907      Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1);
    17081908      WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "slice_pic_order_cnt_lsb");
    1709     }
     1909#if H_MV_HLS_8_POC_Q0142_32
     1910      pcSlice->setSlicePicOrderCntLsb( picOrderCntLSB );
     1911#endif
     1912    }
     1913
    17101914#endif
    17111915    if( !pcSlice->getIdrPicFlag() )
     
    21372341    }
    21382342
     2343#if H_MV_HLS_8_POC_Q0142_32
     2344    pcSlice->checkPocResetIdc();
     2345#endif
     2346
    21392347    if( pcSlice->getPocResetIdc() !=  0 )
    21402348    {
     
    21472355      WRITE_CODE( pcSlice->getPocLsbVal( ), pcSlice->getPocLsbValLen() , "poc_lsb_val" );
    21482356    }             
    2149    
     2357#if H_MV_HLS_8_POC_Q0142_32
     2358    pcSlice->checkPocLsbVal();
     2359#endif
     2360
    21502361    if( !pcSlice->getPocMsbValRequiredFlag() /* TODO &&  pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ )
    21512362    {
    21522363      WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" );
    21532364    }
     2365#if H_MV_HLS_8_POC_Q0146_15
     2366    else
     2367    {
     2368      assert( pcSlice->getPocMsbValPresentFlag() ==  pcSlice->inferPocMsbValPresentFlag( ) );
     2369    }
     2370#endif
    21542371   
    21552372    if( pcSlice->getPocMsbValPresentFlag() )
Note: See TracChangeset for help on using the changeset viewer.