Changeset 1331 in 3DVCSoftware for branches/HTM-15.1-dev0-Vidyo/source/Lib/TLibDecoder
- Timestamp:
- 18 Sep 2015, 23:09:19 (10 years ago)
- Location:
- branches/HTM-15.1-dev0-Vidyo/source/Lib/TLibDecoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-dev0-Vidyo/source/Lib/TLibDecoder/SEIread.cpp
r1328 r1331 124 124 * unmarshal a single SEI message from bitstream bs 125 125 */ 126 #if NH_MV_LAYERS_NOT_PRESENT_SEI 127 Void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 128 #else 126 129 Void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 130 #endif 127 131 { 128 132 setBitstream(bs); … … 131 135 do 132 136 { 137 #if NH_MV_LAYERS_NOT_PRESENT_SEI 138 xReadSEImessage(seis, nalUnitType, vps, sps, pDecodedMessageOutputStream); 139 #else 133 140 xReadSEImessage(seis, nalUnitType, sps, pDecodedMessageOutputStream); 134 141 #endif 135 142 /* SEI messages are an integer number of bytes, something has failed 136 143 * in the parsing if bitstream not byte-aligned */ … … 142 149 } 143 150 151 #if NH_MV_LAYERS_NOT_PRESENT_SEI 152 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 153 #else 144 154 Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 155 #endif 145 156 { 146 157 #if ENC_DEC_TRACE … … 261 272 case SEI::SCALABLE_NESTING: 262 273 sei = new SEIScalableNesting; 274 #if NH_MV_LAYERS_NOT_PRESENT_SEI 275 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, vps, sps, pDecodedMessageOutputStream); 276 #else 263 277 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps, pDecodedMessageOutputStream); 278 #endif 264 279 break; 265 280 case SEI::TEMP_MOTION_CONSTRAINED_TILE_SETS: … … 290 305 break; 291 306 #else 292 #if NH_MV_ TBD307 #if NH_MV_LAYERS_NOT_PRESENT_SEI 293 308 case SEI::LAYERS_NOT_PRESENT: 294 sei = new SEILayersNotPresent; 295 xParseSEILayersNotPresent((SEILayersNotPresent&) *sei, payloadSize, pDecodedMessageOutputStream ); 309 if (!vps) 310 { 311 printf ("Warning: Found Layers not present SEI message, but no active VPS is available. Ignoring."); 312 } 313 else 314 { 315 sei = new SEILayersNotPresent; 316 xParseSEILayersNotPresent((SEILayersNotPresent&) *sei, payloadSize, vps, pDecodedMessageOutputStream); 317 } 296 318 break; 297 319 #endif … … 885 907 } 886 908 909 #if NH_MV_LAYERS_NOT_PRESENT_SEI 910 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 911 #else 887 912 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream) 913 #endif 888 914 { 889 915 UInt uiCode; … … 927 953 do 928 954 { 955 #if NH_MV_LAYERS_NOT_PRESENT_SEI 956 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, vps, sps, pDecodedMessageOutputStream); 957 #else 929 958 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps, pDecodedMessageOutputStream); 959 #endif 930 960 } while (m_pcBitstream->getNumBitsLeft() > 8); 931 961 … … 1183 1213 } 1184 1214 1185 #if NH_MV_SEI_TBD 1186 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) 1187 { 1188 UInt code; 1189 output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); 1190 1215 #if NH_MV_LAYERS_NOT_PRESENT_SEI 1216 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, const TComVPS *vps, std::ostream *pDecodedMessageOutputStream) 1217 { 1218 UInt code; 1219 UInt i = 0; 1220 1221 output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); 1191 1222 sei_read_code( pDecodedMessageOutputStream, 4, code, "lnp_sei_active_vps_id" ); sei.m_lnpSeiActiveVpsId = code; 1192 for( Int i = 0; i <= MaxLayersMinus1; i++ ) 1193 { 1194 sei_read_flag( pDecodedMessageOutputStream, code, "layer_not_present_flag" ); sei.m_layerNotPresentFlag[i] = (code == 1); 1223 assert(vps->getVPSId() == sei.m_lnpSeiActiveVpsId); 1224 1225 sei.m_lnpSeiMaxLayers = vps->getMaxLayersMinus1() + 1; 1226 sei.resizeDimI(sei.m_lnpSeiMaxLayers); 1227 for (; i < sei.m_lnpSeiMaxLayers; i++) 1228 { 1229 sei_read_flag( pDecodedMessageOutputStream, code, "layer_not_present_flag" ); 1230 sei.m_layerNotPresentFlag[i] = (code == 1); 1195 1231 } 1196 1232 }; -
branches/HTM-15.1-dev0-Vidyo/source/Lib/TLibDecoder/SEIread.h
r1328 r1331 56 56 SEIReader() {}; 57 57 virtual ~SEIReader() {}; 58 #if NH_MV_LAYERS_NOT_PRESENT_SEI 59 Void parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream); 60 #else 58 61 Void parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream); 62 #endif 59 63 #if NH_MV_SEI 60 64 Void setLayerId ( Int layerId ) { m_layerId = layerId; }; … … 62 66 #endif 63 67 protected: 68 #if NH_MV_LAYERS_NOT_PRESENT_SEI 69 Void xReadSEImessage (SEIMessages& seis, const NalUnitType nalUnitType, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream); 70 #else 64 71 Void xReadSEImessage (SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream); 72 #endif 65 73 Void xParseSEIuserDataUnregistered (SEIuserDataUnregistered &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 66 74 Void xParseSEIActiveParameterSets (SEIActiveParameterSets &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); … … 78 86 Void xParseSEIToneMappingInfo (SEIToneMappingInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 79 87 Void xParseSEISOPDescription (SEISOPDescription &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 88 #if NH_MV_LAYERS_NOT_PRESENT_SEI 89 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, const TComVPS *vps, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream); 90 #else 80 91 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream); 92 #endif 81 93 Void xParseSEITempMotionConstraintsTileSets (SEITempMotionConstrainedTileSets& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 82 94 Void xParseSEITimeCode (SEITimeCode& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); … … 90 102 #endif 91 103 #endif 92 #if NH_MV_ SEI_TBD93 Void xParseSEILayersNotPresent (SEILayersNotPresent & sei, UInt payloadSize,std::ostream *pDecodedMessageOutputStream);104 #if NH_MV_LAYERS_NOT_PRESENT_SEI 105 Void xParseSEILayersNotPresent (SEILayersNotPresent &sei, UInt payloadSize, const TComVPS *vps ,std::ostream *pDecodedMessageOutputStream); 94 106 #endif 95 107 Void xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); -
branches/HTM-15.1-dev0-Vidyo/source/Lib/TLibDecoder/TDecTop.cpp
r1328 r1331 836 836 InputNALUnit &nalu=*m_prefixSEINALUs.front(); 837 837 #if NH_MV 838 #if NH_MV_LAYERS_NOT_PRESENT_SEI 839 m_seiReader.parseSEImessage(&(nalu.getBitstream()), m_SEIs, nalu.m_nalUnitType, m_parameterSetManager.getActiveVPS(), m_parameterSetManager.getActiveSPS(getLayerId()), m_pDecodedSEIOutputStream); 840 #else 838 841 m_seiReader.parseSEImessage( &(nalu.getBitstream()), m_SEIs, nalu.m_nalUnitType, m_parameterSetManager.getActiveSPS( getLayerId() ), m_pDecodedSEIOutputStream ); 842 #endif 839 843 #else 840 844 m_seiReader.parseSEImessage( &(nalu.getBitstream()), m_SEIs, nalu.m_nalUnitType, m_parameterSetManager.getActiveSPS(), m_pDecodedSEIOutputStream ); … … 1308 1312 { 1309 1313 #if NH_MV 1310 m_seiReader.parseSEImessage( &(nalu.getBitstream()), m_pcPic->getSEIs(), nalu.m_nalUnitType, m_parameterSetManager.getActiveSPS( getLayerId() ), m_pDecodedSEIOutputStream ); 1314 #if NH_MV_LAYERS_NOT_PRESENT_SEI 1315 m_seiReader.parseSEImessage( &(nalu.getBitstream()), m_pcPic->getSEIs(), nalu.m_nalUnitType, m_parameterSetManager.getActiveVPS(), m_parameterSetManager.getActiveSPS(getLayerId()), m_pDecodedSEIOutputStream); 1316 #else 1317 m_seiReader.parseSEImessage( &(nalu.getBitstream()), m_pcPic->getSEIs(), nalu.m_nalUnitType, m_parameterSetManager.getActiveSPS( getLayerId() ), m_pDecodedSEIOutputStream ); 1318 #endif 1311 1319 #else 1312 1320 m_seiReader.parseSEImessage( &(nalu.getBitstream()), m_pcPic->getSEIs(), nalu.m_nalUnitType, m_parameterSetManager.getActiveSPS(), m_pDecodedSEIOutputStream );
Note: See TracChangeset for help on using the changeset viewer.