Changeset 292 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibDecoder
- Timestamp:
- 18 Jun 2013, 23:11:33 (12 years ago)
- Location:
- branches/SHM-2.1-dev/source/Lib/TLibDecoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/Lib/TLibDecoder/SEIread.cpp
r191 r292 95 95 break; 96 96 #endif 97 #if M0043_LAYERS_PRESENT_SEI 98 case SEI::LAYERS_PRESENT: 99 fprintf( g_hTrace, "=========== Layers Present SEI message ===========\n"); 100 break; 101 #endif 97 102 #if L0208_SOP_DESCRIPTION_SEI 98 103 case SEI::SOP_DESCRIPTION: … … 115 120 * unmarshal a single SEI message from bitstream bs 116 121 */ 122 #if M0043_LAYERS_PRESENT_SEI 123 void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps) 124 #else 117 125 void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps) 126 #endif 118 127 { 119 128 setBitstream(bs); … … 122 131 do 123 132 { 133 #if M0043_LAYERS_PRESENT_SEI 134 xReadSEImessage(seis, nalUnitType, vps, sps); 135 #else 124 136 xReadSEImessage(seis, nalUnitType, sps); 137 #endif 125 138 /* SEI messages are an integer number of bytes, something has failed 126 139 * in the parsing if bitstream not byte-aligned */ … … 133 146 } 134 147 148 #if M0043_LAYERS_PRESENT_SEI 149 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps) 150 #else 135 151 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps) 152 #endif 136 153 { 137 154 #if ENC_DEC_TRACE … … 240 257 break; 241 258 #endif 259 #if M0043_LAYERS_PRESENT_SEI 260 case SEI::LAYERS_PRESENT: 261 if (!vps) 262 { 263 printf ("Warning: Found Layers present SEI message, but no active VPS is available. Ignoring."); 264 } 265 else 266 { 267 sei = new SEILayersPresent; 268 xParseSEILayersPresent((SEILayersPresent&) *sei, payloadSize, vps); 269 } 270 break; 271 #endif 242 272 #if L0208_SOP_DESCRIPTION_SEI 243 273 case SEI::SOP_DESCRIPTION: … … 249 279 case SEI::SCALABLE_NESTING: 250 280 sei = new SEIScalableNesting; 281 #if M0043_LAYERS_PRESENT_SEI 282 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, vps, sps); 283 #else 251 284 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps); 285 #endif 252 286 break; 253 287 #endif … … 751 785 #endif 752 786 787 #if M0043_LAYERS_PRESENT_SEI 788 Void SEIReader::xParseSEILayersPresent(SEILayersPresent &sei, UInt payloadSize, TComVPS *vps) 789 { 790 UInt uiCode; 791 UInt i = 0; 792 793 READ_UVLC( uiCode, "lp_sei_active_vps_id" ); sei.m_activeVpsId = uiCode; 794 assert(vps->getVPSId() == sei.m_activeVpsId); 795 sei.m_vpsMaxLayers = vps->getMaxLayers(); 796 for (; i < sei.m_vpsMaxLayers; i++) 797 { 798 READ_FLAG( uiCode, "layer_present_flag" ); sei.m_layerPresentFlag[i] = uiCode ? true : false; 799 } 800 for (; i < MAX_LAYERS; i++) 801 { 802 sei.m_layerPresentFlag[i] = false; 803 } 804 xParseByteAlign(); 805 } 806 #endif 807 753 808 #if L0208_SOP_DESCRIPTION_SEI 754 809 Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize) … … 777 832 #endif 778 833 834 779 835 #if K0180_SCALABLE_NESTING_SEI 836 #if M0043_LAYERS_PRESENT_SEI 837 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps) 838 #else 780 839 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps) 840 #endif 781 841 { 782 842 UInt uiCode; … … 820 880 // read nested SEI messages 821 881 do { 882 #if M0043_LAYERS_PRESENT_SEI 883 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, vps, sps); 884 #else 822 885 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps); 886 #endif 823 887 } while (m_pcBitstream->getNumBitsLeft() > 8); 824 888 -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/SEIread.h
r191 r292 56 56 SEIReader() {}; 57 57 virtual ~SEIReader() {}; 58 #if M0043_LAYERS_PRESENT_SEI 59 Void parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps); 60 #else 58 61 Void parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps); 62 #endif 59 63 protected: 64 #if M0043_LAYERS_PRESENT_SEI 65 Void xReadSEImessage (SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps); 66 #else 60 67 Void xReadSEImessage (SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps); 68 #endif 61 69 Void xParseSEIuserDataUnregistered (SEIuserDataUnregistered &sei, UInt payloadSize); 62 70 Void xParseSEIActiveParameterSets (SEIActiveParameterSets &sei, UInt payloadSize); … … 73 81 Void xParseSEIToneMappingInfo (SEIToneMappingInfo& sei, UInt payloadSize); 74 82 #endif 83 #if M0043_LAYERS_PRESENT_SEI 84 Void xParseSEILayersPresent (SEILayersPresent &sei, UInt payloadSize, TComVPS *vps); 85 #endif 75 86 #if L0208_SOP_DESCRIPTION_SEI 76 87 Void xParseSEISOPDescription (SEISOPDescription &sei, UInt payloadSize); 77 88 #endif 78 89 #if K0180_SCALABLE_NESTING_SEI 90 #if M0043_LAYERS_PRESENT_SEI 91 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps); 92 #else 79 93 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps); 94 #endif 80 95 #endif 81 96 Void xParseByteAlign(); -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r291 r292 1098 1098 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 1099 1099 { 1100 #if M0043_LAYERS_PRESENT_SEI 1101 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveVPS(), m_parameterSetManagerDecoder[m_layerId].getActiveSPS() ); 1102 #else 1100 1103 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() ); 1104 #endif 1101 1105 } 1102 1106 else 1103 1107 { 1108 #if M0043_LAYERS_PRESENT_SEI 1109 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveVPS(), m_parameterSetManagerDecoder[m_layerId].getActiveSPS() ); 1110 #else 1104 1111 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() ); 1112 #endif 1105 1113 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); 1106 1114 if (activeParamSets.size()>0) … … 1118 1126 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 1119 1127 { 1128 #if M0043_LAYERS_PRESENT_SEI 1129 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() ); 1130 #else 1120 1131 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1132 #endif 1121 1133 } 1122 1134 else 1123 1135 { 1136 #if M0043_LAYERS_PRESENT_SEI 1137 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() ); 1138 #else 1124 1139 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1140 #endif 1125 1141 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); 1126 1142 if (activeParamSets.size()>0)
Note: See TracChangeset for help on using the changeset viewer.