Changeset 894 in SHVCSoftware


Ignore:
Timestamp:
26 Sep 2014, 03:22:40 (10 years ago)
Author:
qualcomm
Message:

JCTVC-R0231: Signalling of VPS VUI BSP HRD parameters and other related changes (Macro: VPS_VUI_BSP_HRD_PARAMS)

This patch includes some of the signalling changes in the VPS VUI BSP HRD parameters in R0231, and related adoptions.

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/SHM-dev/source
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r884 r894  
    17341734#endif
    17351735
     1736#if VPS_VUI_BSP_HRD_PARAMS
     1737  vps->setVpsVuiBspHrdPresentFlag(false);
     1738  TEncTop *pcCfg = &m_acTEncTop[0];
     1739  if( pcCfg->getBufferingPeriodSEIEnabled() )
     1740  {
     1741    vps->setVpsVuiBspHrdPresentFlag(true);
     1742    vps->setVpsNumAddHrdParams( vps->getMaxLayers() );
     1743    vps->createBspHrdParamBuffer(vps->getVpsNumAddHrdParams() + 1);
     1744    for(Int i = vps->getNumHrdParameters(), j = 0; i < vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams(); i++, j++)
     1745    {
     1746      vps->setCprmsAddPresentFlag( j, true );
     1747      vps->setNumSubLayerHrdMinus1( j, vps->getMaxTLayers() - 1 );
     1748
     1749      UInt layerId = j;
     1750      TEncTop *pcCfgLayer = &m_acTEncTop[layerId];
     1751
     1752      Int iPicWidth         = pcCfgLayer->getSourceWidth();
     1753      Int iPicHeight        = pcCfgLayer->getSourceHeight();
     1754#if LAYER_CTB
     1755      UInt uiWidthInCU       = ( iPicWidth  % m_acLayerCfg[layerId].m_uiMaxCUWidth  ) ? iPicWidth  / m_acLayerCfg[layerId].m_uiMaxCUWidth  + 1 : iPicWidth  / m_acLayerCfg[layerId].m_uiMaxCUWidth;
     1756      UInt uiHeightInCU      = ( iPicHeight % m_acLayerCfg[layerId].m_uiMaxCUHeight ) ? iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight + 1 : iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight;
     1757      UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_acLayerCfg[layerId].m_uiMaxCUDepth << 1);
     1758#else
     1759      UInt uiWidthInCU       = ( iPicWidth %m_uiMaxCUWidth  ) ? iPicWidth /m_uiMaxCUWidth  + 1 : iPicWidth /m_uiMaxCUWidth;
     1760      UInt uiHeightInCU      = ( iPicHeight%m_uiMaxCUHeight ) ? iPicHeight/m_uiMaxCUHeight + 1 : iPicHeight/m_uiMaxCUHeight;
     1761      UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_uiMaxCUDepth << 1);
     1762#endif
     1763      UInt uiNumCUsInFrame   = uiWidthInCU * uiHeightInCU;
     1764
     1765      UInt numDU = ( pcCfgLayer->getSliceMode() == 1 ) ? ( uiNumCUsInFrame / maxCU ) : ( 0 );
     1766      if( uiNumCUsInFrame % maxCU != 0 || numDU == 0 )
     1767      {
     1768        numDU ++;
     1769      }
     1770      vps->getBspHrd(i)->setNumDU( numDU );
     1771      vps->setBspHrdParameters( i, pcCfgLayer->getFrameRate(), numDU, pcCfgLayer->getTargetBitrate(), ( pcCfgLayer->getIntraPeriod() > 0 ) );
     1772    }
     1773
     1774    // Signalling of additional partitioning schemes
     1775    for(Int h = 1; h < vps->getNumOutputLayerSets(); h++)
     1776    {
     1777      Int lsIdx = vps->getOutputLayerSetIdx( h );
     1778      vps->setNumSignalledPartitioningSchemes(h, 1);  // Only the default per-layer partitioning scheme
     1779      for(Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h); j++)
     1780      {
     1781        // ToDo: Add code for additional partitioning schemes here
     1782        // ToDo: Initialize num_partitions_in_scheme_minus1 and layer_included_in_partition_flag
     1783      }
     1784
     1785      for(Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h); i++)
     1786      {
     1787        if( i == 0 )
     1788        {
     1789          for(Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1( lsIdx ); t++)
     1790          {
     1791            vps->setNumBspSchedulesMinus1( h, i, t, 0 );
     1792            for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ )
     1793            {
     1794              for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++ )
     1795              {
     1796                // Only for the default partition
     1797                Int nuhlayerId = vps->getLayerSetLayerIdList( lsIdx, k);
     1798                Int layerIdxInVps = vps->getLayerIdInVps( nuhlayerId );
     1799                vps->setBspHrdIdx(h, i, t, j, k, layerIdxInVps + vps->getNumHrdParameters());
     1800
     1801                vps->setBspSchedIdx(h, i, t, j, k, 0);
     1802              }
     1803            }
     1804          }
     1805        }
     1806        else
     1807        {
     1808          assert(0);    // Need to add support for additional partitioning schemes.
     1809        }
     1810      }
     1811    }
     1812  }
     1813#else
     1814
    17361815#if O0164_MULTI_LAYER_HRD
    17371816  vps->setVpsVuiBspHrdPresentFlag(false);
     
    18051884    }
    18061885  }
     1886#endif
    18071887#endif
    18081888
  • branches/SHM-dev/source/Lib/TLibCommon/SEI.h

    r884 r894  
    592592  Bool  m_callerOwnsSEIs;
    593593  SEIMessages m_nestedSEIs;
     594#if VPS_VUI_BSP_HRD_PARAMS
     595  Int  m_seiPartitioningSchemeIdx;
     596  Int  m_seiOlsIdx;
     597#endif
    594598};
    595599
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r890 r894  
    31753175}
    31763176#endif
     3177
    31773178#if RESOLUTION_BASED_DPB
    31783179// RepFormat Assignment operator
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r890 r894  
    370370  UInt getNumDU                              ( )            { return m_numDU;          }
    371371  Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); }
     372
     373#if VPS_VUI_BSP_HRD_PARAMS
     374Void copyCommonInformation( TComHRD *refHrd )
     375{
     376  m_nalHrdParametersPresentFlag         = refHrd->getNalHrdParametersPresentFlag();
     377  m_vclHrdParametersPresentFlag         = refHrd->getVclHrdParametersPresentFlag();
     378  m_subPicCpbParamsPresentFlag          = refHrd->getSubPicCpbParamsPresentFlag();
     379  m_tickDivisorMinus2                   = refHrd->getTickDivisorMinus2();
     380  m_duCpbRemovalDelayLengthMinus1       = refHrd->getDuCpbRemovalDelayLengthMinus1();
     381  m_subPicCpbParamsInPicTimingSEIFlag   = refHrd->getSubPicCpbParamsInPicTimingSEIFlag();
     382  m_dpbOutputDelayDuLengthMinus1        = refHrd->getDpbOutputDelayDuLengthMinus1();
     383  m_bitRateScale                        = refHrd->getBitRateScale();
     384  m_cpbSizeScale                        = refHrd->getCpbSizeScale();
     385  m_ducpbSizeScale                      = refHrd->getDuCpbSizeScale();
     386  m_initialCpbRemovalDelayLengthMinus1  = refHrd->getInitialCpbRemovalDelayLengthMinus1();
     387  m_cpbRemovalDelayLengthMinus1         = refHrd->getCpbRemovalDelayLengthMinus1();
     388  m_dpbOutputDelayLengthMinus1          = refHrd->getDpbOutputDelayLengthMinus1();
     389}
     390#endif
    372391};
    373392
     
    814833#if O0164_MULTI_LAYER_HRD
    815834  Bool       m_vpsVuiBspHrdPresentFlag;
     835#if VPS_VUI_BSP_HRD_PARAMS
     836  Int                 m_vpsNumAddHrdParams;
     837  std::vector<Bool>   m_cprmsAddPresentFlag;
     838  std::vector<Int>    m_numSubLayerHrdMinus1;
     839  std::vector<TComHRD> m_bspHrd;
     840  Int    m_numSignalledPartitioningSchemes[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1];
     841  Int    m_numPartitionsInSchemeMinus1    [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16];
     842  Int    m_layerIncludedInPartitionFlag   [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_LAYERS][MAX_LAYERS];
     843  Int    m_numBspSchedulesMinus1          [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER];
     844  Int    m_bspHrdIdx                      [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER][31][MAX_LAYERS];
     845  Int    m_bspSchedIdx                    [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER][31][MAX_LAYERS];
     846#else
    816847  UInt       m_vpsNumBspHrdParametersMinus1;
    817848  Bool       m_bspCprmsPresentFlag[MAX_VPS_LAYER_SETS_PLUS1];
     
    823854  UInt       m_bspCombSchedIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16];
    824855#endif
     856#endif
    825857
    826858#if P0182_VPS_VUI_PS_FLAG
     
    867899  Void    createBspHrdParamBuffer(UInt numHrds)
    868900  {
     901#if VPS_VUI_BSP_HRD_PARAMS
     902    m_bspHrd.resize( numHrds );
     903    m_cprmsAddPresentFlag.resize( numHrds );
     904    m_numSubLayerHrdMinus1.resize( numHrds );
     905#else
    869906    m_bspHrd    = new TComHRD[ numHrds ];
     907#endif
    870908//    m_hrdOpSetIdx      = new UInt   [ getNumHrdParameters() ];
    871909//    m_cprmsPresentFlag = new Bool   [ getNumHrdParameters() ];
     
    875913  Int getBspHrdParamBufferCpbCntMinus1(UInt i, UInt sl)
    876914  {
     915#if VPS_VUI_BSP_HRD_PARAMS
     916    return m_bspHrd[i].getCpbCntMinus1(sl);
     917#else
    877918    return m_bspHrd->getCpbCntMinus1(sl);
     919#endif
    878920  }
    879921#endif
     
    11961238  Bool     getVpsVuiBspHrdPresentFlag()                         { return m_vpsVuiBspHrdPresentFlag;      }
    11971239  Void     setVpsVuiBspHrdPresentFlag(Bool x)                   { m_vpsVuiBspHrdPresentFlag = x;         }
     1240#if VPS_VUI_BSP_HRD_PARAMS
     1241  Int      getVpsNumAddHrdParams()                              { return m_vpsNumAddHrdParams; }
     1242  Void     setVpsNumAddHrdParams(Int  i)                   { m_vpsNumAddHrdParams = i;    }
     1243
     1244  Bool     getCprmsAddPresentFlag(Int i)                        { return m_cprmsAddPresentFlag[i];       }
     1245  Void     setCprmsAddPresentFlag(Int  i, Bool  val)  { m_cprmsAddPresentFlag[i] = val;        }
     1246
     1247  Int      getNumSubLayerHrdMinus1(Int i)           { return m_numSubLayerHrdMinus1[i]; }
     1248  Void     setNumSubLayerHrdMinus1(Int i, Int val)  { m_numSubLayerHrdMinus1[i] = val; }
     1249
     1250  TComHRD*  getBspHrd(Int i)           {return &m_bspHrd[i];}
     1251
     1252  Int      getNumSignalledPartitioningSchemes(Int  i)                    { return m_numSignalledPartitioningSchemes[i];    }
     1253  Void     setNumSignalledPartitioningSchemes(Int  i, Int  val)          { m_numSignalledPartitioningSchemes[i] = val;     }
     1254
     1255  Int      getNumPartitionsInSchemeMinus1(Int  i, Int j)  { return m_numPartitionsInSchemeMinus1[i][j];}
     1256  Void     setNumPartitionsInSchemeMinus1(Int i, Int j, Int val) { m_numPartitionsInSchemeMinus1[i][j] = val; }
     1257
     1258  Int      getLayerIncludedInPartitionFlag(Int  i, Int j, Int k, Int l)  { return m_layerIncludedInPartitionFlag[i][j][k][l];}
     1259  Void     setLayerIncludedInPartitionFlag(Int i, Int j, Int k, Int l, Int val) { m_layerIncludedInPartitionFlag[i][j][k][l] = val; }
     1260
     1261  Int      getNumBspSchedulesMinus1(Int  i, Int j, Int k)         { return m_numBspSchedulesMinus1[i][j][k];}
     1262  Void     setNumBspSchedulesMinus1(Int i, Int j, Int k, Int val) { m_numBspSchedulesMinus1[i][j][k] = val; }
     1263
     1264  Int      getBspSchedIdx(Int  i, Int j, Int k, Int l, Int m)  { return m_bspSchedIdx[i][j][k][l][m];}
     1265  Void     setBspSchedIdx(Int  i, Int j, Int k, Int l, Int m, Int val) { m_bspSchedIdx[i][j][k][l][m] = val; }
     1266
     1267  Int      getBspHrdIdx(Int  i, Int j, Int k, Int l, Int m)  { return m_bspHrdIdx[i][j][k][l][m];}
     1268  Void     setBspHrdIdx(Int  i, Int j, Int k, Int l, Int m, Int val) { m_bspHrdIdx[i][j][k][l][m] = val; }
     1269#else
    11981270  UInt     getVpsNumBspHrdParametersMinus1()                    { return m_vpsNumBspHrdParametersMinus1; }
    11991271  Void     setVpsNumBspHrdParametersMinus1(UInt i)              { m_vpsNumBspHrdParametersMinus1 = i;    }
     
    12111283  UInt     getBspCombSchedIdx(UInt h, UInt i, UInt j)           { return m_bspCombSchedIdx[h][i][j];     }
    12121284  Void     setBspCombSchedIdx(UInt h, UInt i, UInt j, UInt val) { m_bspCombSchedIdx[h][i][j] = val;      }
     1285#endif
    12131286#endif
    12141287#if P0182_VPS_VUI_PS_FLAG
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r893 r894  
    6666#define BSP_INIT_ARRIVAL_SEI             1      ///< JCTVC-R0231: Make signalling of vcl_initial_arrival_delay independent of NalHrdBpPresentFlag
    6767#define SUB_LAYERS_IN_LAYER_SET          1      ///< Move calculation of MaxSubLayerInLayerSets to a separate function
     68#define VPS_VUI_BSP_HRD_PARAMS           1      ///< JCTVC-R0231: Define the VPS VUI BSP hrd_params() as a separate function, and apply changes adopted.
    6869#define O0137_MAX_LAYERID                1      ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1
    6970
     
    493494typedef       double              Double;
    494495typedef       float               Float;
    495 
    496496// ====================================================================================================================
    497497// 64-bit integer type
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp

    r884 r894  
    251251      {
    252252        sei = new SEIDecodingUnitInfo;
     253#if VPS_VUI_BSP_HRD_PARAMS
     254        xParseSEIDecodingUnitInfo((SEIDecodingUnitInfo&) *sei, payloadSize, sps, nestingSei, bspNestingSei, vps);
     255#else
    253256        xParseSEIDecodingUnitInfo((SEIDecodingUnitInfo&) *sei, payloadSize, sps);
     257#endif
    254258      }
    255259      break;
     
    262266      {
    263267        sei = new SEIBufferingPeriod;
     268#if VPS_VUI_BSP_HRD_PARAMS
     269        xParseSEIBufferingPeriod((SEIBufferingPeriod&) *sei, payloadSize, sps, nestingSei, bspNestingSei, vps);
     270#else
    264271        xParseSEIBufferingPeriod((SEIBufferingPeriod&) *sei, payloadSize, sps);
     272#endif
    265273      }
    266274      break;
     
    273281      {
    274282        sei = new SEIPictureTiming;
     283#if VPS_VUI_BSP_HRD_PARAMS
     284        xParseSEIPictureTiming((SEIPictureTiming&)*sei, payloadSize, sps, nestingSei, bspNestingSei, vps);
     285#else
    275286        xParseSEIPictureTiming((SEIPictureTiming&)*sei, payloadSize, sps);
     287#endif
    276288      }
    277289      break;
     
    600612}
    601613
     614#if VPS_VUI_BSP_HRD_PARAMS
     615Void SEIReader::xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo& sei, UInt /*payloadSize*/, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps)
     616#else
    602617Void SEIReader::xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo& sei, UInt /*payloadSize*/, TComSPS *sps)
     618#endif
    603619{
    604620  UInt val;
     
    606622  sei.m_decodingUnitIdx = val;
    607623
     624#if VPS_VUI_BSP_HRD_PARAMS
     625  TComHRD *hrd;
     626  if( bspNestingSei )   // If DU info SEI contained inside a BSP nesting SEI message
     627  {
     628    assert( nestingSei );
     629    Int psIdx = bspNestingSei->m_seiPartitioningSchemeIdx;
     630    Int seiOlsIdx = bspNestingSei->m_seiOlsIdx;
     631    Int maxTemporalId = nestingSei->m_nestingMaxTemporalIdPlus1[0] - 1;
     632    Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1;
     633    std::vector<Int> hrdIdx(maxValues, 0);
     634    std::vector<TComHRD *> hrdVec;
     635    std::vector<Int> syntaxElemLen(maxValues, 0);
     636    for(Int i = 0; i < maxValues; i++)
     637    {
     638      hrdIdx[i] = vps->getBspHrdIdx( seiOlsIdx, psIdx, maxTemporalId, i, bspNestingSei->m_bspIdx);
     639      hrdVec.push_back(vps->getBspHrd(hrdIdx[i]));
     640   
     641      syntaxElemLen[i] = hrdVec[i]->getInitialCpbRemovalDelayLengthMinus1() + 1;
     642      if ( !(hrdVec[i]->getNalHrdParametersPresentFlag() || hrdVec[i]->getVclHrdParametersPresentFlag()) )
     643      {
     644        assert( syntaxElemLen[i] == 24 ); // Default of value init_cpb_removal_delay_length_minus1 is 23
     645      }
     646      if( i > 0 )
     647      {
     648        assert( hrdVec[i]->getSubPicCpbParamsPresentFlag()    == hrdVec[i-1]->getSubPicCpbParamsPresentFlag() );
     649        assert( hrdVec[i]->getSubPicCpbParamsInPicTimingSEIFlag()   == hrdVec[i-1]->getSubPicCpbParamsInPicTimingSEIFlag() );
     650        assert( hrdVec[i]->getDpbOutputDelayDuLengthMinus1()  == hrdVec[i-1]->getDpbOutputDelayDuLengthMinus1() );
     651        // To be done: Check CpbDpbDelaysPresentFlag
     652      }
     653    }
     654    hrd = hrdVec[0];
     655  }
     656  else
     657  {
     658    TComVUI *vui = sps->getVuiParameters();
     659    hrd = vui->getHrdParameters();
     660  }
     661#else
    608662  TComVUI *vui = sps->getVuiParameters();
    609   if(vui->getHrdParameters()->getSubPicCpbParamsInPicTimingSEIFlag())
    610   {
    611     READ_CODE( ( vui->getHrdParameters()->getDuCpbRemovalDelayLengthMinus1() + 1 ), val, "du_spt_cpb_removal_delay");
     663  TComHrd *hrd = vui->getHrdParameters();
     664#endif
     665  if(hrd->getSubPicCpbParamsInPicTimingSEIFlag())
     666  {
     667    READ_CODE( ( hrd->getDuCpbRemovalDelayLengthMinus1() + 1 ), val, "du_spt_cpb_removal_delay");
    612668    sei.m_duSptCpbRemovalDelay = val;
    613669  }
     
    619675  if(sei.m_dpbOutputDuDelayPresentFlag)
    620676  {
    621     READ_CODE(vui->getHrdParameters()->getDpbOutputDelayDuLengthMinus1() + 1, val, "pic_spt_dpb_output_du_delay");
     677    READ_CODE(hrd->getDpbOutputDelayDuLengthMinus1() + 1, val, "pic_spt_dpb_output_du_delay");
    622678    sei.m_picSptDpbOutputDuDelay = val;
    623679  }
     
    625681}
    626682
     683#if VPS_VUI_BSP_HRD_PARAMS
     684Void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, UInt /*payloadSize*/, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps)
     685#else
    627686Void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, UInt /*payloadSize*/, TComSPS *sps)
     687#endif
    628688{
    629689  Int i, nalOrVcl;
    630690  UInt code;
    631691
     692#if VPS_VUI_BSP_HRD_PARAMS
     693  TComHRD *pHRD;
     694  if( bspNestingSei )   // If BP SEI contained inside a BSP nesting SEI message
     695  {
     696    assert( nestingSei );
     697    Int psIdx = bspNestingSei->m_seiPartitioningSchemeIdx;
     698    Int seiOlsIdx = bspNestingSei->m_seiOlsIdx;
     699    Int maxTemporalId = nestingSei->m_nestingMaxTemporalIdPlus1[0] - 1;
     700    Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1;
     701    std::vector<Int> hrdIdx(maxValues, 0);
     702    std::vector<TComHRD *> hrdVec;
     703    std::vector<Int> syntaxElemLen(maxValues, 0);
     704    for(i = 0; i < maxValues; i++)
     705    {
     706      hrdIdx[i] = vps->getBspHrdIdx( seiOlsIdx, psIdx, maxTemporalId, i, bspNestingSei->m_bspIdx);
     707      hrdVec.push_back(vps->getBspHrd(hrdIdx[i]));
     708   
     709      syntaxElemLen[i] = hrdVec[i]->getInitialCpbRemovalDelayLengthMinus1() + 1;
     710      if ( !(hrdVec[i]->getNalHrdParametersPresentFlag() || hrdVec[i]->getVclHrdParametersPresentFlag()) )
     711      {
     712        assert( syntaxElemLen[i] == 24 ); // Default of value init_cpb_removal_delay_length_minus1 is 23
     713      }
     714      if( i > 0 )
     715      {
     716        assert( hrdVec[i]->getCpbRemovalDelayLengthMinus1()   == hrdVec[i-1]->getCpbRemovalDelayLengthMinus1() );
     717        assert( hrdVec[i]->getDpbOutputDelayDuLengthMinus1()  == hrdVec[i-1]->getDpbOutputDelayDuLengthMinus1() );
     718        assert( hrdVec[i]->getSubPicCpbParamsPresentFlag()    == hrdVec[i-1]->getSubPicCpbParamsPresentFlag() );
     719      }
     720    }
     721    pHRD = hrdVec[i];
     722  }
     723  else
     724  {
     725    TComVUI *vui = sps->getVuiParameters();
     726    pHRD = vui->getHrdParameters();
     727  }
     728  // To be done: When contained in an BSP HRD SEI message, the hrd structure is to be chosen differently.
     729#else
    632730  TComVUI *pVUI = sps->getVuiParameters();
    633731  TComHRD *pHRD = pVUI->getHrdParameters();
     732#endif
    634733
    635734  READ_UVLC( code, "bp_seq_parameter_set_id" );                         sei.m_bpSeqParameterSetId     = code;
     
    683782  xParseByteAlign();
    684783}
     784#if VPS_VUI_BSP_HRD_PARAMS
     785Void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, UInt /*payloadSize*/, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps)
     786#else
    685787Void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, UInt /*payloadSize*/, TComSPS *sps)
     788#endif
    686789{
    687790  Int i;
    688791  UInt code;
    689792
     793#if VPS_VUI_BSP_HRD_PARAMS
     794  TComHRD *hrd;   
     795  TComVUI *vui = sps->getVuiParameters();
     796  if( bspNestingSei )   // If BP SEI contained inside a BSP nesting SEI message
     797  {
     798    assert( nestingSei );
     799    Int psIdx = bspNestingSei->m_seiPartitioningSchemeIdx;
     800    Int seiOlsIdx = bspNestingSei->m_seiOlsIdx;
     801    Int maxTemporalId = nestingSei->m_nestingMaxTemporalIdPlus1[0] - 1;
     802    Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1;
     803    std::vector<Int> hrdIdx(maxValues, 0);
     804    std::vector<TComHRD *> hrdVec;
     805    std::vector<Int> syntaxElemLen(maxValues, 0);
     806    for(i = 0; i < maxValues; i++)
     807    {
     808      hrdIdx[i] = vps->getBspHrdIdx( seiOlsIdx, psIdx, maxTemporalId, i, bspNestingSei->m_bspIdx);
     809      hrdVec.push_back(vps->getBspHrd(hrdIdx[i]));
     810   
     811      syntaxElemLen[i] = hrdVec[i]->getInitialCpbRemovalDelayLengthMinus1() + 1;
     812      if ( !(hrdVec[i]->getNalHrdParametersPresentFlag() || hrdVec[i]->getVclHrdParametersPresentFlag()) )
     813      {
     814        assert( syntaxElemLen[i] == 24 ); // Default of value init_cpb_removal_delay_length_minus1 is 23
     815      }
     816      if( i > 0 )
     817      {
     818        assert( hrdVec[i]->getSubPicCpbParamsPresentFlag()    == hrdVec[i-1]->getSubPicCpbParamsPresentFlag() );
     819        assert( hrdVec[i]->getSubPicCpbParamsInPicTimingSEIFlag()   == hrdVec[i-1]->getSubPicCpbParamsInPicTimingSEIFlag() );
     820        assert( hrdVec[i]->getCpbRemovalDelayLengthMinus1()  == hrdVec[i-1]->getCpbRemovalDelayLengthMinus1() );
     821        assert( hrdVec[i]->getDpbOutputDelayLengthMinus1()  == hrdVec[i-1]->getDpbOutputDelayLengthMinus1() );
     822        assert( hrdVec[i]->getDpbOutputDelayDuLengthMinus1()  == hrdVec[i-1]->getDpbOutputDelayDuLengthMinus1() );
     823        assert( hrdVec[i]->getDuCpbRemovalDelayLengthMinus1()  == hrdVec[i-1]->getDuCpbRemovalDelayLengthMinus1() );
     824        // To be done: Check CpbDpbDelaysPresentFlag
     825      }
     826    }
     827    hrd = hrdVec[0];
     828  }
     829  else
     830  {
     831    hrd = vui->getHrdParameters();
     832  }
     833  // To be done: When contained in an BSP HRD SEI message, the hrd structure is to be chosen differently.
     834#else
    690835  TComVUI *vui = sps->getVuiParameters();
    691836  TComHRD *hrd = vui->getHrdParameters();
     837#endif
    692838
    693839  if( vui->getFrameFieldInfoPresentFlag() )
     
    12641410  assert(vps->getVpsVuiPresentFlag());
    12651411
     1412#if VPS_VUI_BSP_HRD_PARAMS
     1413  UInt uiCode;
     1414  Int psIdx         = bspNestingSei.m_seiPartitioningSchemeIdx;
     1415  Int seiOlsIdx     = bspNestingSei.m_seiOlsIdx;
     1416  Int maxTemporalId = nestingSei.m_nestingMaxTemporalIdPlus1[0];
     1417  Int maxValues     = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1;
     1418  std::vector<Int> hrdIdx(0, maxValues);
     1419  std::vector<TComHRD *> hrdVec;
     1420  std::vector<Int> syntaxElemLen;
     1421  for(Int i = 0; i < maxValues; i++)
     1422  {
     1423    hrdIdx[i] = vps->getBspHrdIdx( seiOlsIdx, psIdx, maxTemporalId, i, bspNestingSei.m_bspIdx);
     1424    hrdVec[i] = vps->getBspHrd(hrdIdx[i]);
     1425   
     1426    syntaxElemLen[i] = hrdVec[i]->getInitialCpbRemovalDelayLengthMinus1() + 1;
     1427    if ( !(hrdVec[i]->getNalHrdParametersPresentFlag() || hrdVec[i]->getVclHrdParametersPresentFlag()) )
     1428    {
     1429      assert( syntaxElemLen[i] == 24 ); // Default value of init_cpb_removal_delay_length_minus1 is 23
     1430    }
     1431    if( i > 0 )
     1432    {
     1433      assert( hrdVec[i]->getNalHrdParametersPresentFlag() == hrdVec[i-1]->getNalHrdParametersPresentFlag() );
     1434      assert( hrdVec[i]->getVclHrdParametersPresentFlag() == hrdVec[i-1]->getVclHrdParametersPresentFlag() );
     1435    }
     1436  }
     1437  if (hrdVec[0]->getNalHrdParametersPresentFlag())
     1438  {
     1439    for(UInt i = 0; i < maxValues; i++)
     1440    {
     1441      READ_CODE( syntaxElemLen[i], uiCode, "nal_initial_arrival_delay[i]" ); sei.m_nalInitialArrivalDelay[i] = uiCode;
     1442    }
     1443  }
     1444  if( hrdVec[0]->getVclHrdParametersPresentFlag() )
     1445  {
     1446    for(UInt i = 0; i < maxValues; i++)
     1447    {
     1448      READ_CODE( syntaxElemLen[i], uiCode, "vcl_initial_arrival_delay[i]" ); sei.m_vclInitialArrivalDelay[i] = uiCode;
     1449    }
     1450  }
     1451#else
    12661452  UInt schedCombCnt = vps->getNumBspSchedCombinations(nestingSei.m_nestingOpIdx[0]);
    12671453  UInt len;
     
    13071493    }
    13081494  }
     1495#endif
    13091496}
    13101497
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.h

    r856 r894  
    8080  Void xParseSEIuserDataUnregistered  (SEIuserDataUnregistered &sei, UInt payloadSize);
    8181  Void xParseSEIActiveParameterSets   (SEIActiveParameterSets  &sei, UInt payloadSize);
     82  Void xParseSEIDecodedPictureHash    (SEIDecodedPictureHash& sei, UInt payloadSize);
     83#if VPS_VUI_BSP_HRD_PARAMS
     84  Void xParseSEIDecodingUnitInfo      (SEIDecodingUnitInfo& sei, UInt payloadSize, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps);
     85  Void xParseSEIBufferingPeriod       (SEIBufferingPeriod& sei, UInt payloadSize, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps);
     86  Void xParseSEIPictureTiming         (SEIPictureTiming& sei, UInt payloadSize, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps);
     87#else
    8288  Void xParseSEIDecodingUnitInfo      (SEIDecodingUnitInfo& sei, UInt payloadSize, TComSPS *sps);
    83   Void xParseSEIDecodedPictureHash    (SEIDecodedPictureHash& sei, UInt payloadSize);
    8489  Void xParseSEIBufferingPeriod       (SEIBufferingPeriod& sei, UInt payloadSize, TComSPS *sps);
    8590  Void xParseSEIPictureTiming         (SEIPictureTiming& sei, UInt payloadSize, TComSPS *sps);
     91#endif
    8692  Void xParseSEIRecoveryPoint         (SEIRecoveryPoint& sei, UInt payloadSize);
    8793  Void xParseSEIFramePacking          (SEIFramePacking& sei, UInt payloadSize);
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r893 r894  
    578578      READ_CODE( 5, uiCode, "dpb_output_delay_length_minus1" );       hrd->setDpbOutputDelayLengthMinus1( uiCode );
    579579    }
     580#if VPS_VUI_BSP_HRD_PARAMS
     581    else
     582    {
     583      hrd->setInitialCpbRemovalDelayLengthMinus1( 23 );
     584      // Add inferred values for other syntax elements here.
     585    }
     586#endif
    580587  }
    581588  Int i, j, nalOrVcl;
     
    26252632  if (vps->getVpsVuiBspHrdPresentFlag())
    26262633  {
     2634#if VPS_VUI_BSP_HRD_PARAMS
     2635    parseVpsVuiBspHrdParams(vps);
     2636#else
    26272637#if R0227_VUI_BSP_HRD_FLAG
    26282638    assert (vps->getTimingInfo()->getTimingInfoPresentFlag() == 1);
     
    27032713      }
    27042714    }
    2705   }
    2706 #endif
    2707 
     2715#endif
     2716  }
     2717#endif
    27082718#if P0182_VPS_VUI_PS_FLAG
    27092719  for(i = 1; i < vps->getMaxLayers(); i++)
     
    27212731#endif
    27222732}
     2733
    27232734#endif //SVC_EXTENSION
    27242735
     
    44874498}
    44884499#endif
     4500#if VPS_VUI_BSP_HRD_PARAMS
     4501Void TDecCavlc::parseVpsVuiBspHrdParams( TComVPS *vps )
     4502{
     4503  UInt uiCode;
     4504  assert (vps->getTimingInfo()->getTimingInfoPresentFlag() == 1);
     4505  READ_UVLC( uiCode, "vps_num_add_hrd_params" ); vps->setVpsNumAddHrdParams(uiCode);
     4506  vps->createBspHrdParamBuffer(vps->getVpsNumAddHrdParams()); // Also allocates m_cprmsAddPresentFlag and m_numSubLayerHrdMinus
     4507
     4508  for( Int i = vps->getNumHrdParameters(), j = 0; i < vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams(); i++, j++ ) // j = i - vps->getNumHrdParameters()
     4509  {
     4510    if( i > 0 )
     4511    {
     4512      READ_FLAG( uiCode, "cprms_add_present_flag[i]" );   vps->setCprmsAddPresentFlag(j, uiCode ? true : false);
     4513    }
     4514    else
     4515    {
     4516      // i == 0
     4517      if( vps->getNumHrdParameters() == 0 )
     4518      {
     4519        vps->setCprmsAddPresentFlag(0, true);
     4520      }
     4521    }
     4522    READ_UVLC( uiCode, "num_sub_layer_hrd_minus1[i]" ); vps->setNumSubLayerHrdMinus1(j, uiCode );
     4523    assert( uiCode <= vps->getMaxTLayers() - 1 );
     4524   
     4525    parseHrdParameters( vps->getBspHrd(j), vps->getCprmsAddPresentFlag(j), vps->getNumSubLayerHrdMinus1(j) );
     4526    if( i > 0 && !vps->getCprmsAddPresentFlag(i) )
     4527    {
     4528      // Copy common information parameters
     4529      if( i == vps->getNumHrdParameters() )
     4530      {
     4531        vps->getBspHrd(j)->copyCommonInformation( vps->getHrdParameters( vps->getNumHrdParameters() - 1 ) );
     4532      }
     4533      else
     4534      {
     4535        vps->getBspHrd(j)->copyCommonInformation( vps->getBspHrd( j - 1 ) );
     4536      }
     4537    }
     4538  }
     4539  for (Int h = 1; h < vps->getNumOutputLayerSets(); h++)
     4540  {
     4541    Int lsIdx = vps->getOutputLayerSetIdx( h );
     4542    READ_UVLC( uiCode, "num_signalled_partitioning_schemes[h]"); vps->setNumSignalledPartitioningSchemes(h, uiCode);
     4543    for( Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++ )
     4544    {
     4545      READ_UVLC( uiCode, "num_partitions_in_scheme_minus1[h][j]" ); vps->setNumPartitionsInSchemeMinus1(h, j, uiCode);
     4546      for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++ )
     4547      {
     4548        for( Int r = 0; r < vps->getNumLayersInIdList( lsIdx ); r++ )
     4549        {
     4550          READ_FLAG( uiCode, "layer_included_in_partition_flag[h][j][k][r]" ); vps->setLayerIncludedInPartitionFlag(h, j, k, r, uiCode ? true : false);
     4551        }
     4552      }
     4553    }
     4554    for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ )
     4555    {
     4556      for( Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++ )
     4557      {
     4558        READ_UVLC( uiCode, "num_bsp_schedules_minus1[h][i][t]");              vps->setNumBspSchedulesMinus1(h, i, t, uiCode);
     4559        for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ )
     4560        {
     4561          for( Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++ )
     4562          {
     4563            READ_UVLC( uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]");      vps->setBspHrdIdx(h, i, t, j, k, uiCode);
     4564            READ_UVLC( uiCode, "bsp_comb_sched_idx[h][i][t][j][k]");    vps->setBspSchedIdx(h, i, t, j, k, uiCode);
     4565          }
     4566        }
     4567      }
     4568    }
     4569
     4570    // To be done: Check each layer included in not more than one BSP in every partitioning scheme,
     4571    // and other related checks associated with layers in bitstream partitions.
     4572
     4573  }
     4574}
     4575#endif
    44894576#endif
    44904577//! \}
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r826 r894  
    8686  Void  parseVpsDpbSizeTable( TComVPS *vps );
    8787#endif
     88#if VPS_VUI_BSP_HRD_PARAMS
     89  Void  parseVpsVuiBspHrdParams( TComVPS *vps );
     90#endif
    8891#if SPS_DPB_PARAMS
    8992  Void  parseSPS            ( TComSPS* pcSPS ); // it should be removed after macro clean up
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r884 r894  
    149149
    150150#if O0164_MULTI_LAYER_HRD
     151#if VPS_VUI_BSP_HRD_PARAMS
     152void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting* nestingSeiPtr, const SEIBspNesting* bspNestingSeiPtr)
     153#else
    151154void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting& nestingSei, const SEIBspNesting& bspNestingSei)
     155#endif
    152156#else
    153157void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps)
    154158#endif
    155159{
     160#if VPS_VUI_BSP_HRD_PARAMS
     161  SEIScalableNesting nestingSei;
     162  SEIBspNesting      bspNestingSei;
     163  if( nestingSeiPtr )
     164  {
     165    nestingSei = *nestingSeiPtr;
     166  }
     167  if( bspNestingSeiPtr )
     168  {
     169    bspNestingSei = *bspNestingSeiPtr;
     170  }
     171#endif
    156172  switch (sei.payloadType())
    157173  {
     
    162178    xWriteSEIActiveParameterSets(*static_cast<const SEIActiveParameterSets*>(& sei));
    163179    break;
     180  case SEI::DECODED_PICTURE_HASH:
     181    xWriteSEIDecodedPictureHash(*static_cast<const SEIDecodedPictureHash*>(&sei));
     182    break;
     183#if VPS_VUI_BSP_HRD_PARAMS
     184  case SEI::DECODING_UNIT_INFO:
     185    xWriteSEIDecodingUnitInfo(*static_cast<const SEIDecodingUnitInfo*>(& sei), sps, nestingSeiPtr, bspNestingSeiPtr, vps);
     186    break;
     187  case SEI::BUFFERING_PERIOD:
     188    xWriteSEIBufferingPeriod(*static_cast<const SEIBufferingPeriod*>(&sei), sps, nestingSeiPtr, bspNestingSeiPtr, vps);
     189    break;
     190  case SEI::PICTURE_TIMING:
     191    xWriteSEIPictureTiming(*static_cast<const SEIPictureTiming*>(&sei), sps, nestingSeiPtr, bspNestingSeiPtr, vps);
     192    break;
     193#else
    164194  case SEI::DECODING_UNIT_INFO:
    165195    xWriteSEIDecodingUnitInfo(*static_cast<const SEIDecodingUnitInfo*>(& sei), sps);
    166196    break;
    167   case SEI::DECODED_PICTURE_HASH:
    168     xWriteSEIDecodedPictureHash(*static_cast<const SEIDecodedPictureHash*>(&sei));
    169     break;
    170197  case SEI::BUFFERING_PERIOD:
    171198    xWriteSEIBufferingPeriod(*static_cast<const SEIBufferingPeriod*>(&sei), sps);
     
    174201    xWriteSEIPictureTiming(*static_cast<const SEIPictureTiming*>(&sei), sps);
    175202    break;
     203#endif
    176204  case SEI::RECOVERY_POINT:
    177205    xWriteSEIRecoveryPoint(*static_cast<const SEIRecoveryPoint*>(&sei));
     
    287315#endif
    288316#if O0164_MULTI_LAYER_HRD
     317#if VPS_VUI_BSP_HRD_PARAMS
     318  xWriteSEIpayloadData(bs_count, sei, vps, sps, nestingSei, bspNestingSei);
     319#else
    289320  xWriteSEIpayloadData(bs_count, sei, vps, sps, *nestingSei, *bspNestingSei);
     321#endif
    290322#else
    291323  xWriteSEIpayloadData(bs_count, sei, sps);
     
    326358
    327359#if O0164_MULTI_LAYER_HRD
     360#if VPS_VUI_BSP_HRD_PARAMS
     361  xWriteSEIpayloadData(bs, sei, vps, sps, nestingSei, bspNestingSei);
     362#else
    328363  xWriteSEIpayloadData(bs, sei, vps, sps, *nestingSei, *bspNestingSei);
     364#endif
    329365#else
    330366  xWriteSEIpayloadData(bs, sei, sps);
     
    403439}
    404440
     441#if VPS_VUI_BSP_HRD_PARAMS
     442Void SEIWriter::xWriteSEIDecodingUnitInfo(const SEIDecodingUnitInfo& sei, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps)
     443#else
    405444Void SEIWriter::xWriteSEIDecodingUnitInfo(const SEIDecodingUnitInfo& sei, TComSPS *sps)
    406 {
     445#endif
     446{
     447#if VPS_VUI_BSP_HRD_PARAMS
     448  TComHRD *hrd;
     449  if( bspNestingSei )   // If DU info SEI contained inside a BSP nesting SEI message
     450  {
     451    assert( nestingSei );
     452    Int psIdx = bspNestingSei->m_seiPartitioningSchemeIdx;
     453    Int seiOlsIdx = bspNestingSei->m_seiOlsIdx;
     454    Int maxTemporalId = nestingSei->m_nestingMaxTemporalIdPlus1[0] - 1;
     455    Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1;
     456    std::vector<Int> hrdIdx(maxValues, 0);
     457    std::vector<TComHRD *> hrdVec;
     458    std::vector<Int> syntaxElemLen(maxValues, 0);
     459    for(Int i = 0; i < maxValues; i++)
     460    {
     461      hrdIdx[i] = vps->getBspHrdIdx( seiOlsIdx, psIdx, maxTemporalId, i, bspNestingSei->m_bspIdx);
     462      hrdVec.push_back(vps->getBspHrd(hrdIdx[i]));
     463   
     464      syntaxElemLen[i] = hrdVec[i]->getInitialCpbRemovalDelayLengthMinus1() + 1;
     465      if ( !(hrdVec[i]->getNalHrdParametersPresentFlag() || hrdVec[i]->getVclHrdParametersPresentFlag()) )
     466      {
     467        assert( syntaxElemLen[i] == 24 ); // Default of value init_cpb_removal_delay_length_minus1 is 23
     468      }
     469      if( i > 0 )
     470      {
     471        assert( hrdVec[i]->getSubPicCpbParamsPresentFlag()    == hrdVec[i-1]->getSubPicCpbParamsPresentFlag() );
     472        assert( hrdVec[i]->getSubPicCpbParamsInPicTimingSEIFlag()   == hrdVec[i-1]->getSubPicCpbParamsInPicTimingSEIFlag() );
     473        assert( hrdVec[i]->getDpbOutputDelayDuLengthMinus1()  == hrdVec[i-1]->getDpbOutputDelayDuLengthMinus1() );
     474        // To be done: Check CpbDpbDelaysPresentFlag
     475      }
     476    }
     477    hrd = hrdVec[0];
     478  }
     479  else
     480  {
     481    TComVUI *vui = sps->getVuiParameters();
     482    hrd = vui->getHrdParameters();
     483  }
     484#else
    407485  TComVUI *vui = sps->getVuiParameters();
     486  TComHrd *hrd = vui->getHrdParameters();
     487#endif
    408488  WRITE_UVLC(sei.m_decodingUnitIdx, "decoding_unit_idx");
    409   if(vui->getHrdParameters()->getSubPicCpbParamsInPicTimingSEIFlag())
    410   {
    411     WRITE_CODE( sei.m_duSptCpbRemovalDelay, (vui->getHrdParameters()->getDuCpbRemovalDelayLengthMinus1() + 1), "du_spt_cpb_removal_delay");
     489  if(hrd->getSubPicCpbParamsInPicTimingSEIFlag())
     490  {
     491    WRITE_CODE( sei.m_duSptCpbRemovalDelay, (hrd->getDuCpbRemovalDelayLengthMinus1() + 1), "du_spt_cpb_removal_delay");
    412492  }
    413493  WRITE_FLAG( sei.m_dpbOutputDuDelayPresentFlag, "dpb_output_du_delay_present_flag");
    414494  if(sei.m_dpbOutputDuDelayPresentFlag)
    415495  {
    416     WRITE_CODE(sei.m_picSptDpbOutputDuDelay, vui->getHrdParameters()->getDpbOutputDelayDuLengthMinus1() + 1, "pic_spt_dpb_output_du_delay");
    417   }
    418   xWriteByteAlign();
    419 }
    420 
     496    WRITE_CODE(sei.m_picSptDpbOutputDuDelay,hrd->getDpbOutputDelayDuLengthMinus1() + 1, "pic_spt_dpb_output_du_delay");
     497  }
     498  xWriteByteAlign();
     499}
     500
     501#if VPS_VUI_BSP_HRD_PARAMS
     502Void SEIWriter::xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps)
     503#else
    421504Void SEIWriter::xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei, TComSPS *sps)
     505#endif
    422506{
    423507  Int i, nalOrVcl;
     508#if VPS_VUI_BSP_HRD_PARAMS
     509  TComHRD *hrd;
     510  if( bspNestingSei )   // If BP SEI contained inside a BSP nesting SEI message
     511  {
     512    assert( nestingSei );
     513    Int psIdx = bspNestingSei->m_seiPartitioningSchemeIdx;
     514    Int seiOlsIdx = bspNestingSei->m_seiOlsIdx;
     515    Int maxTemporalId = nestingSei->m_nestingMaxTemporalIdPlus1[0] - 1;
     516    Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1;
     517    std::vector<Int> hrdIdx(maxValues, 0);
     518    std::vector<TComHRD *> hrdVec;
     519    std::vector<Int> syntaxElemLen(maxValues, 0);
     520    for(i = 0; i < maxValues; i++)
     521    {
     522      hrdIdx[i] = vps->getBspHrdIdx( seiOlsIdx, psIdx, maxTemporalId, i, bspNestingSei->m_bspIdx);
     523      hrdVec.push_back(vps->getBspHrd(hrdIdx[i]));
     524   
     525      syntaxElemLen[i] = hrdVec[i]->getInitialCpbRemovalDelayLengthMinus1() + 1;
     526      if ( !(hrdVec[i]->getNalHrdParametersPresentFlag() || hrdVec[i]->getVclHrdParametersPresentFlag()) )
     527      {
     528        assert( syntaxElemLen[i] == 24 ); // Default of value init_cpb_removal_delay_length_minus1 is 23
     529      }
     530      if( i > 0 )
     531      {
     532        assert( hrdVec[i]->getCpbRemovalDelayLengthMinus1()   == hrdVec[i-1]->getCpbRemovalDelayLengthMinus1() );
     533        assert( hrdVec[i]->getDpbOutputDelayDuLengthMinus1()  == hrdVec[i-1]->getDpbOutputDelayDuLengthMinus1() );
     534        assert( hrdVec[i]->getSubPicCpbParamsPresentFlag()    == hrdVec[i-1]->getSubPicCpbParamsPresentFlag() );
     535      }
     536    }
     537    hrd = hrdVec[i];
     538  }
     539  else
     540  {
     541    TComVUI *vui = sps->getVuiParameters();
     542    hrd = vui->getHrdParameters();
     543  }
     544  // To be done: When contained in an BSP HRD SEI message, the hrd structure is to be chosen differently.
     545#else
    424546  TComVUI *vui = sps->getVuiParameters();
    425547  TComHRD *hrd = vui->getHrdParameters();
     548#endif
    426549
    427550  WRITE_UVLC( sei.m_bpSeqParameterSetId, "bp_seq_parameter_set_id" );
     
    462585  xWriteByteAlign();
    463586}
     587#if VPS_VUI_BSP_HRD_PARAMS
     588Void SEIWriter::xWriteSEIPictureTiming(const SEIPictureTiming& sei,  TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps)
     589#else
    464590Void SEIWriter::xWriteSEIPictureTiming(const SEIPictureTiming& sei,  TComSPS *sps)
     591#endif
    465592{
    466593  Int i;
     594#if VPS_VUI_BSP_HRD_PARAMS
     595  TComHRD *hrd;   
     596  TComVUI *vui = sps->getVuiParameters();
     597  if( bspNestingSei )   // If BP SEI contained inside a BSP nesting SEI message
     598  {
     599    assert( nestingSei );
     600    Int psIdx = bspNestingSei->m_seiPartitioningSchemeIdx;
     601    Int seiOlsIdx = bspNestingSei->m_seiOlsIdx;
     602    Int maxTemporalId = nestingSei->m_nestingMaxTemporalIdPlus1[0] - 1;
     603    Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1;
     604    std::vector<Int> hrdIdx(maxValues, 0);
     605    std::vector<TComHRD *> hrdVec;
     606    std::vector<Int> syntaxElemLen(maxValues, 0);
     607    for(i = 0; i < maxValues; i++)
     608    {
     609      hrdIdx[i] = vps->getBspHrdIdx( seiOlsIdx, psIdx, maxTemporalId, i, bspNestingSei->m_bspIdx);
     610      hrdVec.push_back(vps->getBspHrd(hrdIdx[i]));
     611   
     612      syntaxElemLen[i] = hrdVec[i]->getInitialCpbRemovalDelayLengthMinus1() + 1;
     613      if ( !(hrdVec[i]->getNalHrdParametersPresentFlag() || hrdVec[i]->getVclHrdParametersPresentFlag()) )
     614      {
     615        assert( syntaxElemLen[i] == 24 ); // Default of value init_cpb_removal_delay_length_minus1 is 23
     616      }
     617      if( i > 0 )
     618      {
     619        assert( hrdVec[i]->getSubPicCpbParamsPresentFlag()    == hrdVec[i-1]->getSubPicCpbParamsPresentFlag() );
     620        assert( hrdVec[i]->getSubPicCpbParamsInPicTimingSEIFlag()   == hrdVec[i-1]->getSubPicCpbParamsInPicTimingSEIFlag() );
     621        assert( hrdVec[i]->getCpbRemovalDelayLengthMinus1()  == hrdVec[i-1]->getCpbRemovalDelayLengthMinus1() );
     622        assert( hrdVec[i]->getDpbOutputDelayLengthMinus1()  == hrdVec[i-1]->getDpbOutputDelayLengthMinus1() );
     623        assert( hrdVec[i]->getDpbOutputDelayDuLengthMinus1()  == hrdVec[i-1]->getDpbOutputDelayDuLengthMinus1() );
     624        assert( hrdVec[i]->getDuCpbRemovalDelayLengthMinus1()  == hrdVec[i-1]->getDuCpbRemovalDelayLengthMinus1() );
     625        // To be done: Check CpbDpbDelaysPresentFlag
     626      }
     627    }
     628    hrd = hrdVec[0];
     629  }
     630  else
     631  {
     632    hrd = vui->getHrdParameters();
     633  }
     634  // To be done: When contained in an BSP HRD SEI message, the hrd structure is to be chosen differently.
     635#else
    467636  TComVUI *vui = sps->getVuiParameters();
    468637  TComHRD *hrd = vui->getHrdParameters();
    469 
    470   if( vui->getFrameFieldInfoPresentFlag() )
     638#endif
     639
     640  if( vui->getFrameFieldInfoPresentFlag() ) // To be done: Check whether this is the correct invocation of vui when PT SEI contained in BSP nesting SEI
    471641  {
    472642    WRITE_CODE( sei.m_picStruct, 4,              "pic_struct" );
     
    754924  {
    755925    WRITE_FLAG( sei.m_defaultOpFlag,                 "default_op_flag"               );
    756     WRITE_UVLC( sei.m_nestingNumOpsMinus1,           "nesting_num_ops"               );
     926    WRITE_UVLC( sei.m_nestingNumOpsMinus1,           "nesting_num_ops_minus1"        );
    757927    for (UInt i = (sei.m_defaultOpFlag ? 1 : 0); i <= sei.m_nestingNumOpsMinus1; i++)
    758928    {
    759       WRITE_CODE( sei.m_nestingNoOpMaxTemporalIdPlus1, 3, "nesting_no_op_max_temporal_id" );
    760       WRITE_CODE( sei.m_nestingMaxTemporalIdPlus1[i], 3,  "nesting_max_temporal_id"       );
     929      WRITE_CODE( sei.m_nestingMaxTemporalIdPlus1[i], 3,  "nesting_max_temporal_id_plus1" );
    761930      WRITE_UVLC( sei.m_nestingOpIdx[i],                  "nesting_op_idx"                );
    762931    }
     
    767936    if (!sei.m_allLayersFlag)
    768937    {
    769       WRITE_CODE( sei.m_nestingNoOpMaxTemporalIdPlus1, 3, "nesting_no_op_max_temporal_id" );
    770       WRITE_UVLC( sei.m_nestingNumLayersMinus1,           "nesting_num_layers"            );
     938      WRITE_CODE( sei.m_nestingNoOpMaxTemporalIdPlus1, 3, "nesting_no_op_max_temporal_id_plus1" );
     939      WRITE_UVLC( sei.m_nestingNumLayersMinus1,           "nesting_num_layers"                  );
    771940      for (UInt i = 0; i <= sei.m_nestingNumLayersMinus1; i++)
    772941      {
     
    9171086  assert(vps->getVpsVuiPresentFlag());
    9181087
     1088#if VPS_VUI_BSP_HRD_PARAMS
     1089  Int psIdx = bspNestingSei.m_seiPartitioningSchemeIdx;
     1090  Int seiOlsIdx = bspNestingSei.m_seiOlsIdx;
     1091  Int maxTemporalId = nestingSei.m_nestingMaxTemporalIdPlus1[0] - 1;
     1092  Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1;
     1093  std::vector<Int> hrdIdx(maxValues, 0);
     1094  std::vector<TComHRD *> hrdVec;
     1095  std::vector<Int> syntaxElemLen(maxValues, 0);
     1096  for(Int i = 0; i < maxValues; i++)
     1097  {
     1098    hrdIdx[i] = vps->getBspHrdIdx( seiOlsIdx, psIdx, maxTemporalId, i, bspNestingSei.m_bspIdx);
     1099    hrdVec.push_back(vps->getBspHrd(hrdIdx[i]));
     1100   
     1101    syntaxElemLen[i] = hrdVec[i]->getInitialCpbRemovalDelayLengthMinus1() + 1;
     1102    if ( !(hrdVec[i]->getNalHrdParametersPresentFlag() || hrdVec[i]->getVclHrdParametersPresentFlag()) )
     1103    {
     1104      assert( syntaxElemLen[i] == 24 ); // Default of value init_cpb_removal_delay_length_minus1 is 23
     1105    }
     1106    if( i > 0 )
     1107    {
     1108      assert( hrdVec[i]->getNalHrdParametersPresentFlag() == hrdVec[i-1]->getNalHrdParametersPresentFlag() );
     1109      assert( hrdVec[i]->getVclHrdParametersPresentFlag() == hrdVec[i-1]->getVclHrdParametersPresentFlag() );
     1110    }
     1111  }
     1112  if (hrdVec[0]->getNalHrdParametersPresentFlag())
     1113  {
     1114    for(UInt i = 0; i < maxValues; i++)
     1115    {
     1116      WRITE_CODE( sei.m_nalInitialArrivalDelay[i], syntaxElemLen[i], "nal_initial_arrival_delay[i]" );
     1117    }
     1118  }
     1119  if( hrdVec[0]->getVclHrdParametersPresentFlag() )
     1120  {
     1121    for(UInt i = 0; i < maxValues; i++)
     1122    {
     1123      WRITE_CODE( sei.m_vclInitialArrivalDelay[i], syntaxElemLen[i], "vcl_initial_arrival_delay[i]" );
     1124    }
     1125  }
     1126#else
    9191127  UInt schedCombCnt = vps->getNumBspSchedCombinations(nestingSei.m_nestingOpIdx[0]);
    9201128  UInt len;
     
    9591167    }
    9601168  }
     1169#endif
    9611170}
    9621171
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.h

    r856 r894  
    5555protected:
    5656#if O0164_MULTI_LAYER_HRD
     57#if VPS_VUI_BSP_HRD_PARAMS
     58  Void xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei);
     59#else
    5760  Void xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting& nestingSei, const SEIBspNesting& bspNestingSei);
     61#endif
    5862#else
    5963  Void xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps);
     
    6165  Void xWriteSEIuserDataUnregistered(const SEIuserDataUnregistered &sei);
    6266  Void xWriteSEIActiveParameterSets(const SEIActiveParameterSets& sei);
     67  Void xWriteSEIDecodedPictureHash(const SEIDecodedPictureHash& sei);
     68#if VPS_VUI_BSP_HRD_PARAMS
     69  Void xWriteSEIDecodingUnitInfo(const SEIDecodingUnitInfo& sei, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps);
     70  Void xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps);
     71  Void xWriteSEIPictureTiming(const SEIPictureTiming& sei, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps);
     72#else
    6373  Void xWriteSEIDecodingUnitInfo(const SEIDecodingUnitInfo& sei, TComSPS *sps);
    64   Void xWriteSEIDecodedPictureHash(const SEIDecodedPictureHash& sei);
    6574  Void xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei, TComSPS *sps);
    6675  Void xWriteSEIPictureTiming(const SEIPictureTiming& sei, TComSPS *sps);
     76#endif
    6777  TComSPS *m_pSPS;
    6878  Void xWriteSEIRecoveryPoint(const SEIRecoveryPoint& sei);
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r891 r894  
    18131813    if (vps->getVpsVuiBspHrdPresentFlag())
    18141814    {
     1815#if VPS_VUI_BSP_HRD_PARAMS
     1816      codeVpsVuiBspHrdParams(vps);
     1817#else
    18151818      WRITE_UVLC( vps->getVpsNumBspHrdParametersMinus1(), "vps_num_bsp_hrd_parameters_minus1" );
    18161819      for( i = 0; i <= vps->getVpsNumBspHrdParametersMinus1(); i++ )
     
    18561859        }
    18571860      }
     1861#endif
    18581862    }
    18591863#endif
     
    31883192}
    31893193#endif
    3190 
     3194#if VPS_VUI_BSP_HRD_PARAMS
     3195Void TEncCavlc::codeVpsVuiBspHrdParams(TComVPS * const vps)
     3196{
     3197  WRITE_UVLC( vps->getVpsNumAddHrdParams(), "vps_num_add_hrd_params" );
     3198  for( Int i = vps->getNumHrdParameters(), j = 0; i < vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams(); i++, j++ ) // j = i - vps->getNumHrdParameters()
     3199  {
     3200    if( i > 0 )
     3201    {
     3202      WRITE_FLAG( vps->getCprmsAddPresentFlag(j), "cprms_add_present_flag[i]" );
     3203    }
     3204    WRITE_UVLC( vps->getNumSubLayerHrdMinus1(j), "num_sub_layer_hrd_minus1[i]" );
     3205    codeHrdParameters(vps->getBspHrd(j), i == 0 ? true : vps->getCprmsAddPresentFlag(j), vps->getNumSubLayerHrdMinus1(j));
     3206  }
     3207  for( Int h = 1; h < vps->getNumOutputLayerSets(); h++ )
     3208  {
     3209    Int lsIdx = vps->getOutputLayerSetIdx( h );
     3210    WRITE_UVLC( vps->getNumSignalledPartitioningSchemes(h), "num_signalled_partitioning_schemes[h]");
     3211    for( Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++ )
     3212    {
     3213      WRITE_UVLC( vps->getNumPartitionsInSchemeMinus1(h, j), "num_partitions_in_scheme_minus1[h][j]" );
     3214      for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++ )
     3215      {
     3216        for( Int r = 0; r < vps->getNumLayersInIdList( lsIdx ); r++ )
     3217        {
     3218          WRITE_FLAG( vps->getLayerIncludedInPartitionFlag(h, j, k, r), "layer_included_in_partition_flag[h][j][k][r]" );
     3219        }
     3220      }
     3221    }
     3222    for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ )
     3223    {
     3224      for( Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++ )
     3225      {
     3226        WRITE_UVLC(vps->getNumBspSchedulesMinus1(h, i, t), "num_bsp_schedules_minus1[h][i][t]");
     3227        for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ )
     3228        {
     3229          for( Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++ )
     3230          {
     3231            WRITE_UVLC( vps->getBspHrdIdx(h, i, t, j, k),   "bsp_comb_hrd_idx[h][i][t][j][k]");
     3232            WRITE_UVLC( vps->getBspSchedIdx(h, i, t, j, k), "bsp_comb_sched_idx[h][i][t][j][k]");
     3233          }
     3234        }
     3235      }
     3236    }
     3237  }
     3238}
     3239#endif
    31913240#endif
    31923241//! \}
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.h

    r877 r894  
    169169  Void  codeVpsDpbSizeTable    (TComVPS *vps);
    170170#endif
     171#if VPS_VUI_BSP_HRD_PARAMS
     172  Void  codeVpsVuiBspHrdParams  (TComVPS * const);
     173#endif
    171174#if Q0048_CGS_3D_ASYMLUT
    172175#if R0179_ENC_OPT_3DLUT_SIZE
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r890 r894  
    23612361      if (pcSlice->getLayerId() == 0 && m_pcEncTop->getVPS()->getVpsVuiBspHrdPresentFlag())
    23622362      {
    2363         nalu = NALUnit(NAL_UNIT_PREFIX_SEI, 0, 1);
    2364         m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
    2365         m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
    2366         SEIScalableNesting *scalableBspNestingSei = xCreateBspNestingSEI(pcSlice);
    2367         m_seiWriter.writeSEImessage(nalu.m_Bitstream, *scalableBspNestingSei, m_pcEncTop->getVPS(), pcSlice->getSPS());
    2368         writeRBSPTrailingBits(nalu.m_Bitstream);
    2369 
    2370         UInt seiPositionInAu = xGetFirstSeiLocation(accessUnit);
    2371         UInt offsetPosition = m_activeParameterSetSEIPresentInAU
    2372           + m_bufferingPeriodSEIPresentInAU
    2373           + m_pictureTimingSEIPresentInAU
    2374           + m_nestedPictureTimingSEIPresentInAU;  // Insert SEI after APS, BP and PT SEI
    2375         AccessUnit::iterator it;
    2376         for(j = 0, it = accessUnit.begin(); j < seiPositionInAu + offsetPosition; j++)
    2377         {
    2378           it++;
    2379         }
    2380         accessUnit.insert(it, new NALUnitEBSP(nalu));
     2363#if VPS_VUI_BSP_HRD_PARAMS
     2364        TComVPS *vps = m_pcEncTop->getVPS();
     2365        for(Int i = 0; i < vps->getNumOutputLayerSets(); i++)
     2366        {
     2367          for(Int k = 0; k < vps->getNumSignalledPartitioningSchemes(i); k++)
     2368          {
     2369            for(Int l = 0; l < vps->getNumPartitionsInSchemeMinus1(i, k)+1; l++)
     2370            {
     2371#endif
     2372              nalu = NALUnit(NAL_UNIT_PREFIX_SEI, 0, 1);
     2373              m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
     2374              m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
     2375#if VPS_VUI_BSP_HRD_PARAMS
     2376              SEIScalableNesting *scalableBspNestingSei = xCreateBspNestingSEI(pcSlice, i, k, l);
     2377#else
     2378              SEIScalableNesting *scalableBspNestingSei = xCreateBspNestingSEI(pcSlice);
     2379#endif
     2380              m_seiWriter.writeSEImessage(nalu.m_Bitstream, *scalableBspNestingSei, m_pcEncTop->getVPS(), pcSlice->getSPS());
     2381              writeRBSPTrailingBits(nalu.m_Bitstream);
     2382
     2383              UInt seiPositionInAu = xGetFirstSeiLocation(accessUnit);
     2384              UInt offsetPosition = m_activeParameterSetSEIPresentInAU
     2385                + m_bufferingPeriodSEIPresentInAU
     2386                + m_pictureTimingSEIPresentInAU
     2387                + m_nestedPictureTimingSEIPresentInAU;  // Insert SEI after APS, BP and PT SEI
     2388              AccessUnit::iterator it;
     2389              for(j = 0, it = accessUnit.begin(); j < seiPositionInAu + offsetPosition; j++)
     2390              {
     2391                it++;
     2392              }
     2393              accessUnit.insert(it, new NALUnitEBSP(nalu));
     2394#if VPS_VUI_BSP_HRD_PARAMS
     2395            }
     2396          }
     2397        }
     2398#endif
    23812399      }
    23822400#endif
     
    47464764
    47474765#if O0164_MULTI_LAYER_HRD
     4766#if VPS_VUI_BSP_HRD_PARAMS
     4767SEIScalableNesting* TEncGOP::xCreateBspNestingSEI(TComSlice *pcSlice, Int olsIdx, Int partitioningSchemeIdx, Int bspIdx)
     4768#else
    47484769SEIScalableNesting* TEncGOP::xCreateBspNestingSEI(TComSlice *pcSlice)
     4770#endif
    47494771{
    47504772  SEIScalableNesting *seiScalableNesting = new SEIScalableNesting();
     
    47594781  seiScalableNesting->m_defaultOpFlag                 = 0;
    47604782  seiScalableNesting->m_nestingNumOpsMinus1           = 0;      //nesting_num_ops_minus1
     4783#if VPS_VUI_BSP_HRD_PARAMS
     4784  seiScalableNesting->m_nestingOpIdx[0]               = pcSlice->getVPS()->getOutputLayerSetIdx(olsIdx);
     4785  seiScalableNesting->m_nestingMaxTemporalIdPlus1[0]  = 6 + 1;
     4786#else
    47614787  seiScalableNesting->m_nestingOpIdx[0]               = 1;
     4788#endif
    47624789  seiScalableNesting->m_allLayersFlag                 = 0;
    47634790  seiScalableNesting->m_nestingNoOpMaxTemporalIdPlus1 = 6 + 1;  //nesting_no_op_max_temporal_id_plus1
     
    48054832  seiBspNesting->m_nestedSEIs.push_back(seiBufferingPeriod);
    48064833  seiBspNesting->m_nestedSEIs.push_back(seiBspInitialArrivalTime);
     4834#if VPS_VUI_BSP_HRD_PARAMS
     4835  seiBspNesting->m_bspIdx = bspIdx;
     4836  seiBspNesting->m_seiOlsIdx = olsIdx;
     4837  seiBspNesting->m_seiPartitioningSchemeIdx = partitioningSchemeIdx;
     4838#endif
    48074839  seiScalableNesting->m_nestedSEIs.push_back(seiBspNesting); // BSP nesting SEI is contained in scalable nesting SEI
    48084840
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h

    r856 r894  
    253253#endif
    254254#if O0164_MULTI_LAYER_HRD
     255#if VPS_VUI_BSP_HRD_PARAMS
     256  SEIScalableNesting* TEncGOP::xCreateBspNestingSEI(TComSlice *pcSlice, Int olsIdx, Int partitioningSchemeIdx, Int bspIdx);
     257#else
    255258  SEIScalableNesting* xCreateBspNestingSEI(TComSlice *pcSlice);
     259#endif
    256260#endif
    257261#if Q0048_CGS_3D_ASYMLUT
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r873 r894  
    323323  /* set the VPS profile information */
    324324  *m_cVPS.getPTL() = *m_cSPS.getPTL();
     325#if VPS_VUI_BSP_HRD_PARAMS
     326  m_cVPS.getTimingInfo()->setTimingInfoPresentFlag       ( true );
     327#else
    325328  m_cVPS.getTimingInfo()->setTimingInfoPresentFlag       ( false );
     329#endif
    326330  // initialize PPS
    327331  m_cPPS.setSPS(&m_cSPS);
Note: See TracChangeset for help on using the changeset viewer.