Changeset 805 in SHVCSoftware for branches/SHM-6-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
17 Jun 2014, 16:58:15 (11 years ago)
Author:
nokia
Message:

Fix layer set array sizes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r802 r805  
    745745#endif
    746746  WRITE_CODE( pcVPS->getMaxLayerId(), 6,                       "vps_max_layer_id" );
     747#if Q0078_ADD_LAYER_SETS
     748  WRITE_UVLC(pcVPS->getVpsNumLayerSetsMinus1(),                "vps_num_layer_sets_minus1");
     749  for (UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx++)
     750#else
    747751  WRITE_UVLC( pcVPS->getNumLayerSets() - 1,                 "vps_num_layer_sets_minus1" );
    748   for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getNumLayerSets() - 1 ); opsIdx ++ )
     752  for (UInt opsIdx = 1; opsIdx <= (pcVPS->getNumLayerSets() - 1); opsIdx++)
     753#endif
    749754  {
    750755    // Operation point set
     
    10651070#if P0295_DEFAULT_OUT_LAYER_IDC
    10661071    }
     1072#if Q0078_ADD_LAYER_SETS
     1073    if ( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() >= 2 ) //Instead of == 2, >= 2 is used to follow the agreement that value 3 should be interpreted as 2
     1074#else
    10671075    if ( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 ) //Instead of == 2, >= 2 is used to follow the agreement that value 3 should be interpreted as 2
     1076#endif
    10681077    {
    10691078#endif
     
    14691478  if( vps->getBitRatePresentVpsFlag() || vps->getPicRatePresentVpsFlag() )
    14701479  {
     1480#if Q0078_ADD_LAYER_SETS
     1481    for( i = 0; i <= vps->getVpsNumLayerSetsMinus1(); i++ )
     1482#else
    14711483    for( i = 0; i < vps->getNumLayerSets(); i++ )
     1484#endif
    14721485    {
    14731486#if BITRATE_PICRATE_SIGNALLING
     
    16411654        codeHrdParameters(vps->getBspHrd(i), i==0 ? 1 : vps->getBspCprmsPresentFlag(i), vps->getMaxTLayers()-1);
    16421655      }
     1656#if Q0078_ADD_LAYER_SETS
     1657      for( UInt h = 1; h <= vps->getVpsNumLayerSetsMinus1(); h++ )
     1658#else
    16431659      for( UInt h = 1; h <= (vps->getNumLayerSets()-1); h++ )
     1660#endif
    16441661      {
    16451662        WRITE_UVLC( vps->getNumBitstreamPartitions(h), "num_bitstream_partitions[i]");
Note: See TracChangeset for help on using the changeset viewer.