diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index f936073664c377502fd4b168aed2fab2370d4e11..3390d259bb1a90f23dc4e23158656af6d80f933b 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -615,27 +615,15 @@ class SEISubpicureLevelInfo : public SEI public: PayloadType payloadType() const { return SUBPICTURE_LEVEL_INFO; } SEISubpicureLevelInfo() -#if !JVET_Q0630_SUBPIC_LEVEL - : m_sliSeqParameterSetId(0) - , m_numRefLevels(0) -#else : m_numRefLevels(0) -#endif , m_explicitFractionPresentFlag (false) -#if JVET_Q0630_SUBPIC_LEVEL , m_numSubpics(0) -#endif {} virtual ~SEISubpicureLevelInfo() {} -#if !JVET_Q0630_SUBPIC_LEVEL - int m_sliSeqParameterSetId; -#endif int m_numRefLevels; bool m_explicitFractionPresentFlag; -#if JVET_Q0630_SUBPIC_LEVEL int m_numSubpics; -#endif std::vector<Level::Name> m_refLevelIdc; std::vector<std::vector<int>> m_refLevelFraction; }; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 6969db8c105495c2d1294abcccc6848fd346cb75..8d0740656c618cfdb08def5aff0deee3427498fd 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -172,7 +172,6 @@ -#define JVET_Q0630_SUBPIC_LEVEL 1 // JVET-Q0630 parsing dependency fix for subpicture level info SEI #define JVET_SUBPIC_LEVEL_CFG 1 // improved configuration of subpicture level info SEI diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 2269cd4d661f13697c67909184cd58cdf71f7346..1dc77be207825338c9f76718ecbc00a6fc8ce3dd 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -262,11 +262,7 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType break; case SEI::SUBPICTURE_LEVEL_INFO: sei = new SEISubpicureLevelInfo; -#if JVET_Q0630_SUBPIC_LEVEL xParseSEISubpictureLevelInfo((SEISubpicureLevelInfo&) *sei, payloadSize, pDecodedMessageOutputStream); -#else - xParseSEISubpictureLevelInfo((SEISubpicureLevelInfo&) *sei, sps, payloadSize, pDecodedMessageOutputStream); -#endif break; case SEI::SAMPLE_ASPECT_RATIO_INFO: sei = new SEISampleAspectRatioInfo; @@ -1224,27 +1220,12 @@ void SEIReader::xParseSEIGeneralizedCubemapProjection(SEIGeneralizedCubemapProje } } -#if JVET_Q0630_SUBPIC_LEVEL void SEIReader::xParseSEISubpictureLevelInfo(SEISubpicureLevelInfo& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream) -#else -void SEIReader::xParseSEISubpictureLevelInfo(SEISubpicureLevelInfo& sei, const SPS *sps, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream) -#endif { output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); -#if !JVET_Q0630_SUBPIC_LEVEL - if (sps == nullptr) - { - fprintf (stderr, "no SPS available, not parsing Subpicture level information SEI"); - return; - } -#endif uint32_t val; -#if !JVET_Q0630_SUBPIC_LEVEL - sei_read_code( pDecodedMessageOutputStream, 4, val, "sli_seq_parameter_set_id" ); sei.m_sliSeqParameterSetId = val; -#endif sei_read_code( pDecodedMessageOutputStream, 3, val, "num_ref_levels_minus1" ); sei.m_numRefLevels = val + 1; sei_read_flag( pDecodedMessageOutputStream, val, "explicit_fraction_present_flag" ); sei.m_explicitFractionPresentFlag = val; -#if JVET_Q0630_SUBPIC_LEVEL if (sei.m_explicitFractionPresentFlag) { sei_read_uvlc(pDecodedMessageOutputStream, val, "sli_num_subpics_minus1"); sei.m_numSubpics = val + 1; @@ -1253,7 +1234,6 @@ void SEIReader::xParseSEISubpictureLevelInfo(SEISubpicureLevelInfo& sei, const S sei_read_flag( pDecodedMessageOutputStream, val, "sli_alignment_zero_bit" ); CHECK (val != 0, "sli_alignment_zero_bit not equal to zero" ); } } -#endif sei.m_refLevelIdc.resize(sei.m_numRefLevels); if (sei.m_explicitFractionPresentFlag) @@ -1266,16 +1246,9 @@ void SEIReader::xParseSEISubpictureLevelInfo(SEISubpicureLevelInfo& sei, const S sei_read_code( pDecodedMessageOutputStream, 8, val, "ref_level_idc[i]" ); sei.m_refLevelIdc[i] = (Level::Name) val; if( sei.m_explicitFractionPresentFlag ) { -#if !JVET_Q0630_SUBPIC_LEVEL - int numSubPics = sps->getNumSubPics(); - sei.m_refLevelFraction[i].resize(numSubPics); - - for( int j = 0; j < numSubPics; j++ ) -#else sei.m_refLevelFraction[i].resize(sei.m_numSubpics); for( int j = 0; j < sei.m_numSubpics; j++ ) -#endif { sei_read_code( pDecodedMessageOutputStream, 8, val, "ref_level_fraction_minus1[i][j]" ); sei.m_refLevelFraction[i][j]= val; } diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h index 990cc4789b794cc08cb7292a253439c548b9cdfa..a7fc5140db697088870c0a1674178868a10428e5 100644 --- a/source/Lib/DecoderLib/SEIread.h +++ b/source/Lib/DecoderLib/SEIread.h @@ -79,11 +79,7 @@ protected: void xParseSEIOmniViewport (SEIOmniViewport& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIRegionWisePacking (SEIRegionWisePacking& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIGeneralizedCubemapProjection (SEIGeneralizedCubemapProjection &sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); -#if JVET_Q0630_SUBPIC_LEVEL void xParseSEISubpictureLevelInfo (SEISubpicureLevelInfo& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); -#else - void xParseSEISubpictureLevelInfo (SEISubpicureLevelInfo& sei, const SPS *sps, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); -#endif void xParseSEISampleAspectRatioInfo (SEISampleAspectRatioInfo& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIUserDataRegistered (SEIUserDataRegistered& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIFilmGrainCharacteristics (SEIFilmGrainCharacteristics& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index a7c9e4d3c60b3cccdc67c7b34a142070a678136b..5f3c800ec22af48f1b79028249796d3c3638f3c4 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -642,11 +642,7 @@ void SEIEncoder::initSEISubpictureLevelInfo(SEISubpicureLevelInfo *sei, const SP // TODO: implement config file parameters and intialization fprintf(stderr, "SEISubpicureLevelInfo depends on subpictures! Initializing to dummy values!\n"); -#if !JVET_Q0630_SUBPIC_LEVEL - sei->m_sliSeqParameterSetId = sps->getSPSId(); -#else sei->m_numSubpics = sps->getNumSubPics(); -#endif sei->m_numRefLevels = 2; sei->m_refLevelIdc.resize(2); sei->m_refLevelIdc[0] = Level::LEVEL4; diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 9ffbc2fc7e59345e2b7c5ab0a6125215a57cc16c..907a61805ebe2332a44b14c4a30d063ecf2701bd 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -121,11 +121,7 @@ void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, const xWriteSEIContentColourVolume(*static_cast<const SEIContentColourVolume*>(&sei)); break; case SEI::SUBPICTURE_LEVEL_INFO: -#if JVET_Q0630_SUBPIC_LEVEL xWriteSEISubpictureLevelInfo(*static_cast<const SEISubpicureLevelInfo*>(&sei)); -#else - xWriteSEISubpictureLevelInfo(*static_cast<const SEISubpicureLevelInfo*>(&sei), sps); -#endif break; case SEI::SAMPLE_ASPECT_RATIO_INFO: xWriteSEISampleAspectRatioInfo(*static_cast<const SEISampleAspectRatioInfo*>(&sei)); @@ -675,15 +671,8 @@ void SEIWriter::xWriteSEIGeneralizedCubemapProjection(const SEIGeneralizedCubema } } -#if JVET_Q0630_SUBPIC_LEVEL void SEIWriter::xWriteSEISubpictureLevelInfo(const SEISubpicureLevelInfo &sei) -#else -void SEIWriter::xWriteSEISubpictureLevelInfo(const SEISubpicureLevelInfo &sei, const SPS* sps) -#endif { -#if !JVET_Q0630_SUBPIC_LEVEL - WRITE_CODE( (uint32_t)sei.m_sliSeqParameterSetId, 4, "sli_seq_parameter_set_id"); -#endif CHECK(sei.m_numRefLevels < 1, "SEISubpicureLevelInfo: numRefLevels must be greater than zero"); CHECK(sei.m_numRefLevels != (int)sei.m_refLevelIdc.size(), "SEISubpicureLevelInfo: numRefLevels must be equal to the number of levels"); if (sei.m_explicitFractionPresentFlag) @@ -692,7 +681,6 @@ void SEIWriter::xWriteSEISubpictureLevelInfo(const SEISubpicureLevelInfo &sei, c } WRITE_CODE( (uint32_t)sei.m_numRefLevels - 1, 3, "num_ref_levels_minus1"); WRITE_FLAG( sei.m_explicitFractionPresentFlag, "explicit_fraction_present_flag"); -#if JVET_Q0630_SUBPIC_LEVEL if (sei.m_explicitFractionPresentFlag) { WRITE_UVLC( sei.m_numSubpics -1 , "sli_num_subpics_minus1"); @@ -701,20 +689,14 @@ void SEIWriter::xWriteSEISubpictureLevelInfo(const SEISubpicureLevelInfo &sei, c WRITE_FLAG( 0, "sli_alignment_zero_bit"); } } -#endif for (int i=0; i<sei.m_numRefLevels; i++) { WRITE_CODE( (uint32_t)sei.m_refLevelIdc[i], 8, "ref_level_idc[i]"); if (sei.m_explicitFractionPresentFlag) { -#if !JVET_Q0630_SUBPIC_LEVEL - CHECK(sps->getNumSubPics() != (int)sei.m_refLevelFraction[i].size(), "SEISubpicureLevelInfo: number of fractions differs from number of subpictures"); - for (int j = 0; j < sps->getNumSubPics(); j++) -#else CHECK(sei.m_numSubpics != (int)sei.m_refLevelFraction[i].size(), "SEISubpicureLevelInfo: number of fractions differs from number of subpictures"); for (int j = 0; j < sei.m_numSubpics; j++) -#endif { WRITE_CODE( (uint32_t)sei.m_refLevelFraction[i][j], 8, "ref_level_fraction_minus1[i][j]"); } diff --git a/source/Lib/EncoderLib/SEIwrite.h b/source/Lib/EncoderLib/SEIwrite.h index fe174dbda888accb199b08e3c40002f8775467e1..07278426d64d39c320f877936d6a67b30ecc0f46 100644 --- a/source/Lib/EncoderLib/SEIwrite.h +++ b/source/Lib/EncoderLib/SEIwrite.h @@ -72,11 +72,7 @@ protected: void xWriteSEIOmniViewport (const SEIOmniViewport& sei); void xWriteSEIRegionWisePacking (const SEIRegionWisePacking &sei); void xWriteSEIGeneralizedCubemapProjection (const SEIGeneralizedCubemapProjection &sei); -#if JVET_Q0630_SUBPIC_LEVEL void xWriteSEISubpictureLevelInfo (const SEISubpicureLevelInfo &sei); -#else - void xWriteSEISubpictureLevelInfo (const SEISubpicureLevelInfo &sei, const SPS* sps); -#endif void xWriteSEISampleAspectRatioInfo (const SEISampleAspectRatioInfo &sei); void xWriteSEIUserDataRegistered(const SEIUserDataRegistered& sei);