Changeset 90 in SHVCSoftware for branches/HM-10.0-dev-SHM/source/Lib
- Timestamp:
- 20 Mar 2013, 22:00:39 (12 years ago)
- Location:
- branches/HM-10.0-dev-SHM/source/Lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComSlice.cpp
r89 r90 44 44 //! \ingroup TLibCommon 45 45 //! \{ 46 47 #if SVC_EXTENSION 48 ParameterSetMap<TComVPS> ParameterSetManager::m_vpsMap(MAX_NUM_VPS); 49 Int ParameterSetManager::m_activeVPSId = -1; 50 #endif 46 51 47 52 TComSlice::TComSlice() … … 1904 1909 1905 1910 ParameterSetManager::ParameterSetManager() 1911 #if SVC_EXTENSION 1912 : m_spsMap(MAX_NUM_SPS) 1913 , m_ppsMap(MAX_NUM_PPS) 1914 , m_activeSPSId(-1) 1915 , m_activePPSId(-1) 1916 #else 1906 1917 : m_vpsMap(MAX_NUM_VPS) 1907 1918 , m_spsMap(MAX_NUM_SPS) … … 1910 1921 , m_activeSPSId(-1) 1911 1922 , m_activePPSId(-1) 1923 #endif 1912 1924 { 1913 1925 } … … 1946 1958 //! activate a PPS and depending on isIDR parameter also SPS and VPS 1947 1959 //! \returns true, if activation is successful 1948 #if SVC_EXTENSION1949 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIDR, UInt layerId)1950 #else1951 1960 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIDR) 1952 #endif1953 1961 { 1954 1962 TComPPS *pps = m_ppsMap.getPS(ppsId); … … 1956 1964 { 1957 1965 Int spsId = pps->getSPSId(); 1958 #if SVC_EXTENSION1959 if (!isIDR && (spsId != layerId ))1960 #else1961 1966 if (!isIDR && (spsId != m_activeSPSId)) 1962 #endif1963 1967 { 1964 1968 printf("Warning: tried to activate PPS referring to a inactive SPS at non-IDR."); -
branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComSlice.h
r76 r90 1676 1676 //! activate a PPS and depending on isIDR parameter also SPS and VPS 1677 1677 //! \returns true, if activation is successful 1678 #if SVC_EXTENSION1679 Bool activatePPS(Int ppsId, Bool isIDR, UInt layerId);1680 #else1681 1678 Bool activatePPS(Int ppsId, Bool isIDR); 1682 #endif1683 1679 1684 1680 TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; … … 1687 1683 1688 1684 protected: 1689 1685 1686 #if SVC_EXTENSION 1687 static ParameterSetMap<TComVPS> m_vpsMap; 1688 #else 1690 1689 ParameterSetMap<TComVPS> m_vpsMap; 1690 #endif 1691 1691 ParameterSetMap<TComSPS> m_spsMap; 1692 1692 ParameterSetMap<TComPPS> m_ppsMap; 1693 1693 1694 #if SVC_EXTENSION 1695 static Int m_activeVPSId; 1696 #else 1694 1697 Int m_activeVPSId; 1698 #endif 1695 1699 Int m_activeSPSId; 1696 1700 Int m_activePPSId; -
branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecSlice.cpp
r54 r90 41 41 //! \{ 42 42 43 #if SVC_EXTENSION 44 ParameterSetMap<TComVPS> ParameterSetManagerDecoder::m_vpsBuffer(MAX_NUM_VPS); 45 #endif 46 43 47 ////////////////////////////////////////////////////////////////////// 44 48 // Construction/Destruction … … 398 402 399 403 ParameterSetManagerDecoder::ParameterSetManagerDecoder() 404 #if SVC_EXTENSION 405 : m_spsBuffer(MAX_NUM_SPS) 406 , m_ppsBuffer(MAX_NUM_PPS) 407 #else 400 408 : m_vpsBuffer(MAX_NUM_VPS) 401 409 , m_spsBuffer(MAX_NUM_SPS) 402 410 , m_ppsBuffer(MAX_NUM_PPS) 411 #endif 403 412 { 404 413 } -
branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecSlice.h
r54 r90 111 111 112 112 private: 113 #if SVC_EXTENSION 114 static ParameterSetMap<TComVPS> m_vpsBuffer; 115 #else 113 116 ParameterSetMap<TComVPS> m_vpsBuffer; 117 #endif 114 118 ParameterSetMap<TComSPS> m_spsBuffer; 115 119 ParameterSetMap<TComPPS> m_ppsBuffer; -
branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.cpp
r76 r90 40 40 41 41 #if SVC_EXTENSION 42 ParameterSetManagerDecoder TDecTop::m_parameterSetManagerDecoder; // storage for parameter sets43 42 UInt TDecTop::m_prevPOC = MAX_UINT; 44 43 UInt TDecTop::m_uiPrevLayerId = MAX_UINT; … … 332 331 printf("\ninserting lost poc : %d\n",iLostPoc); 333 332 TComSlice cFillSlice; 333 #if SVC_EXTENSION 334 cFillSlice.setSPS( m_parameterSetManagerDecoder[m_layerId].getFirstSPS() ); 335 cFillSlice.setPPS( m_parameterSetManagerDecoder[m_layerId].getFirstPPS() ); 336 cFillSlice.initSlice( m_layerId ); 337 #else 334 338 cFillSlice.setSPS( m_parameterSetManagerDecoder.getFirstSPS() ); 335 339 cFillSlice.setPPS( m_parameterSetManagerDecoder.getFirstPPS() ); 336 #if SVC_EXTENSION337 cFillSlice.initSlice( m_parameterSetManagerDecoder.getFirstSPS()->getLayerId() );338 #else339 340 cFillSlice.initSlice(); 340 341 #endif 341 342 TComPic *cFillPic; 342 343 xGetNewPicBuffer(&cFillSlice,cFillPic); 344 #if SVC_EXTENSION 345 cFillPic->getSlice(0)->setSPS( m_parameterSetManagerDecoder[m_layerId].getFirstSPS() ); 346 cFillPic->getSlice(0)->setPPS( m_parameterSetManagerDecoder[m_layerId].getFirstPPS() ); 347 cFillPic->getSlice(0)->initSlice( m_layerId ); 348 #else 343 349 cFillPic->getSlice(0)->setSPS( m_parameterSetManagerDecoder.getFirstSPS() ); 344 350 cFillPic->getSlice(0)->setPPS( m_parameterSetManagerDecoder.getFirstPPS() ); 345 #if SVC_EXTENSION346 cFillPic->getSlice(0)->initSlice( cFillPic->getLayerId() );347 #else348 351 cFillPic->getSlice(0)->initSlice(); 349 352 #endif … … 388 391 Void TDecTop::xActivateParameterSets() 389 392 { 393 #if SVC_EXTENSION 394 m_parameterSetManagerDecoder[m_layerId].applyPrefetchedPS(); 395 396 TComPPS *pps = m_parameterSetManagerDecoder[m_layerId].getPPS(m_apcSlicePilot->getPPSId()); 397 assert (pps != 0); 398 399 TComSPS *sps = m_parameterSetManagerDecoder[m_layerId].getSPS(pps->getSPSId()); 400 assert (sps != 0); 401 402 if( false == m_parameterSetManagerDecoder[m_layerId].activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot->getIdrPicFlag()) ) 403 #else 390 404 m_parameterSetManagerDecoder.applyPrefetchedPS(); 391 405 … … 396 410 assert (sps != 0); 397 411 398 #if SVC_EXTENSION399 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot->getIdrPicFlag(), m_apcSlicePilot->getLayerId() ))400 #else401 412 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->getIdrPicFlag())) 402 413 #endif … … 460 471 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId); 461 472 473 #if SVC_EXTENSION 474 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder[m_layerId]); 475 #else 462 476 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); 477 #endif 463 478 if (m_apcSlicePilot->isNextSlice()) 464 479 { … … 713 728 { 714 729 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA ); 715 #if !REF_IDX_FRAMEWORK || AVC_SYNTAX716 730 // Set reference list 717 731 pcSlice->setRefPicList( m_cListPic ); 718 #endif719 732 720 733 #if SVC_EXTENSION … … 756 769 757 770 #if REF_IDX_FRAMEWORK 758 #if !AVC_SYNTAX759 // Set reference list760 pcSlice->setRefPicList( m_cListPic );761 #endif762 771 if(m_layerId > 0) 763 772 { … … 869 878 870 879 m_cEntropyDecoder.decodeVPS( vps ); 880 #if SVC_EXTENSION 881 m_parameterSetManagerDecoder[0].storePrefetchedVPS(vps); 882 #else 871 883 m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 884 #endif 872 885 } 873 886 … … 879 892 #endif 880 893 m_cEntropyDecoder.decodeSPS( sps ); 894 #if SVC_EXTENSION 895 m_parameterSetManagerDecoder[m_layerId].storePrefetchedSPS(sps); 896 #else 881 897 m_parameterSetManagerDecoder.storePrefetchedSPS(sps); 898 #endif 882 899 #if REF_IDX_MFM 883 900 m_pcSPS = sps; … … 896 913 TComPPS* pps = new TComPPS(); 897 914 m_cEntropyDecoder.decodePPS( pps ); 915 #if SVC_EXTENSION 916 m_parameterSetManagerDecoder[m_layerId].storePrefetchedPPS( pps ); 917 #else 898 918 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); 919 #endif 899 920 900 921 if( pps->getDependentSliceSegmentsEnabledFlag() ) … … 914 935 Void TDecTop::xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ) 915 936 { 937 #if SVC_EXTENSION 938 if(nalUnitType == NAL_UNIT_SEI_SUFFIX) 939 { 940 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() ); 941 } 942 else 943 { 944 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() ); 945 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); 946 if (activeParamSets.size()>0) 947 { 948 SEIActiveParameterSets *seiAps = (SEIActiveParameterSets*)(*activeParamSets.begin()); 949 m_parameterSetManagerDecoder[m_layerId].applyPrefetchedPS(); 950 assert(seiAps->activeSeqParamSetId.size()>0); 951 if (! m_parameterSetManagerDecoder[m_layerId].activateSPSWithSEI(seiAps->activeSeqParamSetId[0] )) 952 { 953 printf ("Warning SPS activation with Active parameter set SEI failed"); 954 } 955 } 956 } 957 #else 916 958 if(nalUnitType == NAL_UNIT_SEI_SUFFIX) 917 959 { … … 933 975 } 934 976 } 977 #endif 935 978 } 936 979 -
branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.h
r54 r90 73 73 TComList<TComPic*> m_cListPic; // Dynamic buffer 74 74 #if SVC_EXTENSION 75 static ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets75 ParameterSetManagerDecoder m_parameterSetManagerDecoder[MAX_LAYERS]; // storage for parameter sets 76 76 #else 77 77 ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets -
branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncGOP.cpp
r89 r90 1021 1021 #if SVC_EXTENSION 1022 1022 OutputNALUnit nalu(NAL_UNIT_VPS, 0, m_layerId); 1023 #if AVC_BASE 1024 if( m_layerId == 1 ) 1025 #else 1026 if( m_layerId == 0 ) 1027 #endif 1028 { 1023 1029 #else 1024 1030 OutputNALUnit nalu(NAL_UNIT_VPS); … … 1030 1036 #if RATE_CONTROL_LAMBDA_DOMAIN 1031 1037 actualTotalBits += UInt(accessUnit.back()->m_nalUnitData.str().size()) * 8; 1038 #endif 1039 #if SVC_EXTENSION 1040 } 1032 1041 #endif 1033 1042
Note: See TracChangeset for help on using the changeset viewer.