Changeset 1078 in SHVCSoftware for branches/SHM-dev/source


Ignore:
Timestamp:
10 Mar 2015, 18:22:44 (10 years ago)
Author:
seregin
Message:

fix inference for sps_max_dec_pic_buffering_minus1

Location:
branches/SHM-dev/source/Lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1073 r1078  
    17321732  Bool        m_extensionFlag;
    17331733  UInt        m_numScaledRefLayerOffsets;
     1734  Bool        m_multiLayerExtSpsFlag;
    17341735#if R0042_PROFILE_INDICATION 
    17351736  Int         m_NumDirectRefLayers;
     
    19101911
    19111912#if SVC_EXTENSION
    1912   Void     setLayerId(UInt layerId)            { m_layerId = layerId; }
    1913   UInt     getLayerId()                        { return m_layerId;    }
    1914   Int      getExtensionFlag()                  { return m_extensionFlag;  }
    1915   Void     setExtensionFlag(Int n)             { m_extensionFlag = n;     }
     1913  Void     setLayerId(UInt layerId)                 { m_layerId = layerId;           }
     1914  UInt     getLayerId()                             { return m_layerId;              }
     1915  Int      getExtensionFlag()                       { return m_extensionFlag;        }
     1916  Void     setExtensionFlag(Int n)                  { m_extensionFlag = n;           }
     1917  Bool     getMultiLayerExtSpsFlag()                { return m_multiLayerExtSpsFlag; }
     1918  Void     setMultiLayerExtSpsFlag(Bool flag)       { m_multiLayerExtSpsFlag = flag; }
    19161919#if R0042_PROFILE_INDICATION
    19171920  Int      getNumDirectRefLayers()                  { return  m_NumDirectRefLayers;  }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1075 r1078  
    714714  }
    715715
    716   Bool V1CompatibleSPSFlag = !( pcSPS->getLayerId() != 0 && uiTmp == 7 );
    717 
    718   if( V1CompatibleSPSFlag )
     716  pcSPS->setMultiLayerExtSpsFlag( pcSPS->getLayerId() != 0 && uiTmp == 7 );
     717
     718  if( !pcSPS->getMultiLayerExtSpsFlag() )
    719719  {
    720720#endif
     
    735735
    736736#if SVC_EXTENSION
    737   if( !V1CompatibleSPSFlag )
     737  if( pcSPS->getMultiLayerExtSpsFlag() )
    738738  {
    739739    READ_FLAG( uiCode, "update_rep_format_flag" );
     
    820820
    821821#if SVC_EXTENSION
    822   if( V1CompatibleSPSFlag
     822  if( !pcSPS->getMultiLayerExtSpsFlag()
    823823  {
    824824#endif
     
    839839      for (i++; i <= pcSPS->getMaxTLayers()-1; i++)
    840840      {
     841#if SVC_EXTENSION
     842        // When sps_max_dec_pic_buffering_minus1[ i ] is not present for i in the range of 0 to sps_max_sub_layers_minus1 - 1, inclusive,
     843        // due to sps_sub_layer_ordering_info_present_flag being equal to 0, it is inferred to be equal to sps_max_dec_pic_buffering_minus1[ sps_max_sub_layers_minus1 ].
     844        pcSPS->setMaxDecPicBuffering( pcSPS->getMaxDecPicBuffering(pcSPS->getMaxTLayers()-1), i );
     845#else
    841846        pcSPS->setMaxDecPicBuffering(pcSPS->getMaxDecPicBuffering(0), i);
     847#endif
    842848        pcSPS->setNumReorderPics(pcSPS->getNumReorderPics(0), i);
    843849        pcSPS->setMaxLatencyIncrease(pcSPS->getMaxLatencyIncrease(0), i);
     
    845851      break;
    846852    }
     853
     854#if SVC_EXTENSION
     855    if( i > 0 )
     856    {
     857      // When i is greater than 0, sps_max_dec_pic_buffering_minus1[ i ] shall be greater than or equal to sps_max_dec_pic_buffering_minus1[ i - 1 ].
     858      assert( pcSPS->getMaxDecPicBuffering(i) >= pcSPS->getMaxDecPicBuffering(i-1) );
     859    }
     860#endif
     861
    847862  }
    848863#if SVC_EXTENSION
     
    878893  {
    879894#if SVC_EXTENSION
    880     if( !V1CompatibleSPSFlag )
     895    if( pcSPS->getMultiLayerExtSpsFlag() )
    881896    {
    882897      READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setInferScalingListFlag( uiCode );
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1076 r1078  
    664664      // to avoid compiler warning "array subscript is above array bounds"
    665665      assert( i < MAX_TLAYER );
    666 #if LAYER_DECPICBUFF_PARAM && RESOLUTION_BASED_DPB
    667       sps->setMaxDecPicBuffering( activeVPS->getMaxVpsLayerDecPicBuffMinus1( m_commonDecoderParams->getTargetOutputLayerSetIdx(), sps->getLayerId(), i) + 1, i);
    668 #else
    669       sps->setMaxDecPicBuffering( activeVPS->getMaxVpsDecPicBufferingMinus1( m_commonDecoderParams->getTargetOutputLayerSetIdx(), activeVPS->getLayerIdcInOls( activeVPS->getOutputLayerSetIdx( m_commonDecoderParams->getTargetOutputLayerSetIdx() ), sps->getLayerId() ), i) + 1, i);
    670 #endif
     666
     667      // When sps_max_dec_pic_buffering_minus1[ i ] is not present for i in the range of 0 to sps_max_sub_layers_minus1, inclusive,
     668      // due to MultiLayerExtSpsFlag being equal to 1, for a layer that refers to the SPS and has nuh_layer_id equal to currLayerId,
     669      // the value of sps_max_dec_pic_buffering_minus1[ i ] is inferred to be equal to max_vps_dec_pic_buffering_minus1[ TargetOlsIdx ][ layerIdx ][ i ] of the active VPS,
     670      // where layerIdx is equal to the value such that LayerSetLayerIdList[ TargetDecLayerSetIdx ][ layerIdx ] is equal to currLayerId.
     671      if( sps->getMultiLayerExtSpsFlag() )
     672      {
     673        sps->setMaxDecPicBuffering( activeVPS->getMaxVpsDecPicBufferingMinus1( m_commonDecoderParams->getTargetOutputLayerSetIdx(), activeVPS->getLayerIdcInOls( activeVPS->getOutputLayerSetIdx( m_commonDecoderParams->getTargetOutputLayerSetIdx() ), m_layerId ), i) + 1, i);
     674      }
     675
     676      // The value of sps_max_dec_pic_buffering_minus1[ i ] shall be less than or equal to vps_max_dec_pic_buffering_minus1[ i ] for each value of i.
     677      assert( sps->getMaxDecPicBuffering(i) <= activeVPS->getMaxDecPicBuffering(i) );     
    671678    }
    672679
Note: See TracChangeset for help on using the changeset viewer.