Changeset 1235 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp
- Timestamp:
- 13 Jul 2015, 20:38:11 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp
r1218 r1235 106 106 */ 107 107 #if LAYERS_NOT_PRESENT_SEI 108 Void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps,TComSPS *sps, std::ostream *pDecodedMessageOutputStream)109 #else 110 Void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps, std::ostream *pDecodedMessageOutputStream)108 Void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 109 #else 110 Void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 111 111 #endif 112 112 { … … 133 133 #if O0164_MULTI_LAYER_HRD 134 134 #if LAYERS_NOT_PRESENT_SEI 135 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps,TComSPS *sps, std::ostream *pDecodedMessageOutputStream, const SEIScalableNesting *nestingSei, const SEIBspNesting *bspNestingSei)136 #else 137 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps, std::ostream *pDecodedMessageOutputStream, const SEIScalableNesting *nestingSei)135 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream, const SEIScalableNesting *nestingSei, const SEIBspNesting *bspNestingSei) 136 #else 137 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream, const SEIScalableNesting *nestingSei) 138 138 #endif 139 139 #else 140 140 #if LAYERS_NOT_PRESENT_SEI 141 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps,TComSPS *sps, std::ostream *pDecodedMessageOutputStream)142 #else 143 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps, std::ostream *pDecodedMessageOutputStream)141 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 142 #else 143 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 144 144 #endif 145 145 #endif … … 557 557 558 558 #if SVC_EXTENSION 559 Void SEIReader::xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo& sei, UInt payloadSize, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, TComVPS *vps,std::ostream *pDecodedMessageOutputStream)560 #else 561 Void SEIReader::xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo& sei, UInt payloadSize, TComSPS *sps, std::ostream *pDecodedMessageOutputStream)559 Void SEIReader::xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo& sei, UInt payloadSize, const TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, const TComVPS *vps, std::ostream *pDecodedMessageOutputStream) 560 #else 561 Void SEIReader::xParseSEIDecodingUnitInfo(SEIDecodingUnitInfo& sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 562 562 #endif 563 563 { … … 568 568 569 569 #if SVC_EXTENSION 570 TComHRD *hrd;570 const TComHRD *hrd; 571 571 if( bspNestingSei ) // If DU info SEI contained inside a BSP nesting SEI message 572 572 { … … 577 577 Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1; 578 578 std::vector<Int> hrdIdx(maxValues, 0); 579 std::vector< TComHRD*> hrdVec;579 std::vector<const TComHRD*> hrdVec; 580 580 std::vector<Int> syntaxElemLen(maxValues, 0); 581 581 for(Int i = 0; i < maxValues; i++) … … 601 601 else 602 602 { 603 TComVUI *vui = sps->getVuiParameters();603 const TComVUI *vui = sps->getVuiParameters(); 604 604 hrd = vui->getHrdParameters(); 605 605 } … … 621 621 } 622 622 #else 623 TComVUI *vui = sps->getVuiParameters();623 const TComVUI *vui = sps->getVuiParameters(); 624 624 625 625 if(vui->getHrdParameters()->getSubPicCpbParamsInPicTimingSEIFlag()) … … 642 642 643 643 #if SVC_EXTENSION 644 Void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, UInt payloadSize, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei,TComVPS *vps, std::ostream *pDecodedMessageOutputStream)645 #else 646 Void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, UInt payloadSize, TComSPS *sps, std::ostream *pDecodedMessageOutputStream)644 Void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, UInt payloadSize, const TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, const TComVPS *vps, std::ostream *pDecodedMessageOutputStream) 645 #else 646 Void SEIReader::xParseSEIBufferingPeriod(SEIBufferingPeriod& sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 647 647 #endif 648 648 { … … 651 651 652 652 #if SVC_EXTENSION 653 TComHRD *pHRD;653 const TComHRD *pHRD; 654 654 if( bspNestingSei ) // If BP SEI contained inside a BSP nesting SEI message 655 655 { … … 660 660 Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1; 661 661 std::vector<Int> hrdIdx(maxValues, 0); 662 std::vector< TComHRD*> hrdVec;662 std::vector<const TComHRD*> hrdVec; 663 663 std::vector<Int> syntaxElemLen(maxValues, 0); 664 664 for(i = 0; i < maxValues; i++) … … 683 683 else 684 684 { 685 TComVUI *vui = sps->getVuiParameters();685 const TComVUI *vui = sps->getVuiParameters(); 686 686 pHRD = vui->getHrdParameters(); 687 687 } 688 688 // To be done: When contained in an BSP HRD SEI message, the hrd structure is to be chosen differently. 689 689 #else 690 TComVUI *pVUI = sps->getVuiParameters();691 TComHRD *pHRD = pVUI->getHrdParameters();690 const TComVUI *pVUI = sps->getVuiParameters(); 691 const TComHRD *pHRD = pVUI->getHrdParameters(); 692 692 #endif 693 693 … … 746 746 747 747 #if SVC_EXTENSION 748 Void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, UInt payloadSize, TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei,TComVPS *vps, std::ostream *pDecodedMessageOutputStream)749 #else 750 Void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, UInt payloadSize, TComSPS *sps, std::ostream *pDecodedMessageOutputStream)748 Void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, UInt payloadSize, const TComSPS *sps, const SEIScalableNesting* nestingSei, const SEIBspNesting* bspNestingSei, const TComVPS *vps, std::ostream *pDecodedMessageOutputStream) 749 #else 750 Void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 751 751 #endif 752 752 { … … 755 755 756 756 #if SVC_EXTENSION 757 TComHRD *hrd;758 TComVUI *vui = sps->getVuiParameters();757 const TComHRD *hrd; 758 const TComVUI *vui = sps->getVuiParameters(); 759 759 if( bspNestingSei ) // If BP SEI contained inside a BSP nesting SEI message 760 760 { … … 765 765 Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1; 766 766 std::vector<Int> hrdIdx(maxValues, 0); 767 std::vector< TComHRD*> hrdVec;767 std::vector<const TComHRD*> hrdVec; 768 768 std::vector<Int> syntaxElemLen(maxValues, 0); 769 769 for(i = 0; i < maxValues; i++) … … 796 796 // To be done: When contained in an BSP HRD SEI message, the hrd structure is to be chosen differently. 797 797 #else 798 TComVUI *vui = sps->getVuiParameters();799 TComHRD *hrd = vui->getHrdParameters();798 const TComVUI *vui = sps->getVuiParameters(); 799 const TComHRD *hrd = vui->getHrdParameters(); 800 800 #endif 801 801 output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); … … 1061 1061 1062 1062 #if LAYERS_NOT_PRESENT_SEI 1063 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps,TComSPS *sps, std::ostream *pDecodedMessageOutputStream)1064 #else 1065 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps, std::ostream *pDecodedMessageOutputStream)1063 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 1064 #else 1065 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 1066 1066 #endif 1067 1067 { … … 1423 1423 #if SVC_EXTENSION 1424 1424 #if LAYERS_NOT_PRESENT_SEI 1425 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps, std::ostream *pDecodedMessageOutputStream)1425 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, const TComVPS *vps, std::ostream *pDecodedMessageOutputStream) 1426 1426 { 1427 1427 UInt uiCode; … … 1485 1485 1486 1486 #if SUB_BITSTREAM_PROPERTY_SEI 1487 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei, TComVPS *vps, std::ostream *pDecodedMessageOutputStream)1487 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei, const TComVPS *vps, std::ostream *pDecodedMessageOutputStream) 1488 1488 { 1489 1489 UInt uiCode; … … 1510 1510 #if O0164_MULTI_LAYER_HRD 1511 1511 #if LAYERS_NOT_PRESENT_SEI 1512 Void SEIReader::xParseSEIBspNesting(SEIBspNesting &sei, const NalUnitType nalUnitType, TComVPS *vps,TComSPS *sps, const SEIScalableNesting &nestingSei, std::ostream *pDecodedMessageOutputStream)1513 #else 1514 Void SEIReader::xParseSEIBspNesting(SEIBspNesting &sei, const NalUnitType nalUnitType, TComSPS *sps, const SEIScalableNesting &nestingSei, std::ostream *pDecodedMessageOutputStream)1512 Void SEIReader::xParseSEIBspNesting(SEIBspNesting &sei, const NalUnitType nalUnitType, const TComVPS *vps, const TComSPS *sps, const SEIScalableNesting &nestingSei, std::ostream *pDecodedMessageOutputStream) 1513 #else 1514 Void SEIReader::xParseSEIBspNesting(SEIBspNesting &sei, const NalUnitType nalUnitType, const TComSPS *sps, const SEIScalableNesting &nestingSei, std::ostream *pDecodedMessageOutputStream) 1515 1515 #endif 1516 1516 { … … 1537 1537 } 1538 1538 1539 Void SEIReader::xParseSEIBspInitialArrivalTime(SEIBspInitialArrivalTime &sei, TComVPS *vps,TComSPS *sps, const SEIScalableNesting &nestingSei, const SEIBspNesting &bspNestingSei, std::ostream *pDecodedMessageOutputStream)1539 Void SEIReader::xParseSEIBspInitialArrivalTime(SEIBspInitialArrivalTime &sei, const TComVPS *vps, const TComSPS *sps, const SEIScalableNesting &nestingSei, const SEIBspNesting &bspNestingSei, std::ostream *pDecodedMessageOutputStream) 1540 1540 { 1541 1541 assert(vps->getVpsVuiPresentFlag()); 1542 1542 1543 #if SVC_EXTENSION1544 1543 UInt uiCode; 1545 1544 Int psIdx = bspNestingSei.m_seiPartitioningSchemeIdx; … … 1548 1547 Int maxValues = vps->getNumBspSchedulesMinus1(seiOlsIdx, psIdx, maxTemporalId) + 1; 1549 1548 std::vector<Int> hrdIdx(0, maxValues); 1550 std::vector< TComHRD*> hrdVec;1549 std::vector<const TComHRD*> hrdVec; 1551 1550 std::vector<Int> syntaxElemLen; 1552 1551 for(Int i = 0; i < maxValues; i++) … … 1580 1579 } 1581 1580 } 1582 #else1583 UInt schedCombCnt = vps->getNumBspSchedCombinations(nestingSei.m_nestingOpIdx[0]);1584 UInt len;1585 UInt hrdIdx;1586 UInt uiCode;1587 1588 if (schedCombCnt > 0)1589 {1590 hrdIdx = vps->getBspCombHrdIdx(nestingSei.m_nestingOpIdx[0], 0, bspNestingSei.m_bspIdx);1591 }1592 else1593 {1594 hrdIdx = 0;1595 }1596 1597 TComHRD *hrd = vps->getBspHrd(hrdIdx);1598 1599 if (hrd->getNalHrdParametersPresentFlag() || hrd->getVclHrdParametersPresentFlag())1600 {1601 len = hrd->getInitialCpbRemovalDelayLengthMinus1() + 1;1602 }1603 else1604 {1605 len = 23 + 1;1606 }1607 1608 if (hrd->getNalHrdParametersPresentFlag())1609 {1610 for(UInt i = 0; i < schedCombCnt; i++)1611 {1612 sei_read_code( pDecodedMessageOutputStream, len, uiCode, "nal_initial_arrival_delay" ); sei.m_nalInitialArrivalDelay[i] = uiCode;1613 }1614 }1615 #if BSP_INIT_ARRIVAL_SEI1616 if( hrd->getVclHrdParametersPresentFlag() )1617 #else1618 else1619 #endif1620 {1621 for(UInt i = 0; i < schedCombCnt; i++)1622 {1623 sei_read_code( pDecodedMessageOutputStream, len, uiCode, "vcl_initial_arrival_delay" ); sei.m_vclInitialArrivalDelay[i] = uiCode;1624 }1625 }1626 #endif1627 1581 } 1628 1582
Note: See TracChangeset for help on using the changeset viewer.