diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 1ceffd2c2fe46f8eda7f06d5e842a1789dfd7b9a..bc425bc6d6775f1d18f7343c4025894d4e09d767 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -984,10 +984,8 @@ void EncApp::xInitLibCfg() m_cEncLib.setVerPhaseDenMinus1ReducedResolution (m_piVerPhaseDenMinus1ReducedResolution); m_cEncLib.setMCTSEncConstraint ( m_MCTSEncConstraint); m_cEncLib.setMasteringDisplaySEI ( m_masteringDisplay ); -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI m_cEncLib.setSEIAlternativeTransferCharacteristicsSEIEnable ( m_preferredTransferCharacteristics>=0 ); m_cEncLib.setSEIPreferredTransferCharacteristics ( uint8_t(m_preferredTransferCharacteristics) ); -#endif // film grain charcteristics m_cEncLib.setFilmGrainCharactersticsSEIEnabled (m_fgcSEIEnabled); m_cEncLib.setFilmGrainCharactersticsSEICancelFlag (m_fgcSEICancelFlag); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 9564ee41a67f57d9d39f32f5cd622f70d96da040..679506264242829ab2f12f0ad58ba7b5fd228215 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1331,9 +1331,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("SEIMasteringDisplayMinLuminance", m_masteringDisplay.minLuminance, 0u, "Specifies the mastering display minimum luminance value in units of 1/10000 candela per square metre (32-bit code value)") ("SEIMasteringDisplayPrimaries", cfg_DisplayPrimariesCode, cfg_DisplayPrimariesCode, "Mastering display primaries for all three colour planes in CIE xy coordinates in increments of 1/50000 (results in the ranges 0 to 50000 inclusive)") ("SEIMasteringDisplayWhitePoint", cfg_DisplayWhitePointCode, cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)") -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI ("SEIPreferredTransferCharacteristics", m_preferredTransferCharacteristics, -1, "Value for the preferred_transfer_characteristics field of the Alternative transfer characteristics SEI which will override the corresponding entry in the VUI. If negative, do not produce the respective SEI message") -#endif ("SEIErpEnabled", m_erpSEIEnabled, false, "Control generation of equirectangular projection SEI messages") ("SEIErpCancelFlag", m_erpSEICancelFlag, true, "Indicate that equirectangular projection SEI message cancels the persistence or follows") @@ -4704,9 +4702,7 @@ bool EncAppCfg::xCheckParameter() xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2"); xConfirmPara(m_log2ParallelMergeLevel > m_uiCTUSize, "Log2ParallelMergeLevel should be less than or equal to CTU size"); -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI xConfirmPara(m_preferredTransferCharacteristics > 255, "transfer_characteristics_idc should not be greater than 255."); -#endif xConfirmPara( unsigned(m_ImvMode) > 1, "ImvMode exceeds range (0 to 1)" ); if (m_AffineAmvr) { diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index a9692419ac4fa5092d815e1901746d7946e6e4d1..8f34703e10c1cc095914a4f53f1f61704b587835 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -527,9 +527,7 @@ protected: int m_doSEITransformType; bool m_parameterSetsInclusionIndicationSEIEnabled; int m_selfContainedClvsFlag; -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI int m_preferredTransferCharacteristics; -#endif // film grain characterstics sei bool m_fgcSEIEnabled; diff --git a/source/Lib/CommonLib/SEI.cpp b/source/Lib/CommonLib/SEI.cpp index 201bc388e1da7749cc8e0b90df126500e68e009a..ad3758229242595a86bca7c9ba6ce0e777820d62 100644 --- a/source/Lib/CommonLib/SEI.cpp +++ b/source/Lib/CommonLib/SEI.cpp @@ -454,9 +454,7 @@ const char *SEI::getSEIMessageString(SEI::PayloadType payloadType) case SEI::DECODED_PICTURE_HASH: return "Decoded picture hash"; case SEI::DEPENDENT_RAP_INDICATION: return "Dependent RAP indication"; case SEI::MASTERING_DISPLAY_COLOUR_VOLUME: return "Mastering display colour volume"; -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: return "Alternative transfer characteristics"; -#endif case SEI::CONTENT_LIGHT_LEVEL_INFO: return "Content light level information"; case SEI::AMBIENT_VIEWING_ENVIRONMENT: return "Ambient viewing environment"; case SEI::CONTENT_COLOUR_VOLUME: return "Content colour volume"; diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 3d64f7b3a9eac989a83a0adc314ada9c446c3866..174d8b289639b254e5e1654cf45b75a583cbafac 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -840,7 +840,6 @@ void xTraceSEIHeader(); void xTraceSEIMessageType( SEI::PayloadType payloadType ); #endif -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI class SEIAlternativeTransferCharacteristics : public SEI { public: @@ -853,7 +852,6 @@ public: uint32_t m_preferredTransferCharacteristics; }; -#endif class SEIUserDataRegistered : public SEI { public: diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 75bb29d30f03e844ac5b527fe619c0c551c11b76..817f823097432d99542140a02a9fe1c33a057ff0 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -165,7 +165,6 @@ typedef std::pair<int, int> TrCost; // ==================================================================================================================== #define DECODER_CHECK_SUBSTREAM_AND_SLICE_TRAILING_BYTES 1 ///< TODO: integrate this macro into a broader conformance checking system. -#define U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 1 ///< Alternative transfer characteristics SEI message (JCTVC-U0033, with syntax naming from V1005) #define X0038_LAMBDA_FROM_QP_CAPABILITY 1 ///< This approach derives lambda from QP+QPoffset+QPoffset2. QPoffset2 is derived from QP+QPoffset using a linear model that is clipped between 0 and 3. // To use this capability enable config parameter LambdaFromQpEnable diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 402b8eb6c7b83eae3c17c8787fed4dbe8cd79f82..8a2aa27c910e60fb273fce7d8634167b5fe16ee6 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -330,12 +330,10 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType sei = new SEIMasteringDisplayColourVolume; xParseSEIMasteringDisplayColourVolume((SEIMasteringDisplayColourVolume&) *sei, payloadSize, pDecodedMessageOutputStream); break; -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: sei = new SEIAlternativeTransferCharacteristics; xParseSEIAlternativeTransferCharacteristics((SEIAlternativeTransferCharacteristics&) *sei, payloadSize, pDecodedMessageOutputStream); break; -#endif case SEI::EQUIRECTANGULAR_PROJECTION: sei = new SEIEquirectangularProjection; xParseSEIEquirectangularProjection((SEIEquirectangularProjection&) *sei, payloadSize, pDecodedMessageOutputStream); @@ -1763,7 +1761,6 @@ void SEIReader::xParseSEIMasteringDisplayColourVolume(SEIMasteringDisplayColourV sei_read_code( pDecodedMessageOutputStream, 32, code, "mdcv_min_display_mastering_luminance" ); sei.values.minLuminance = code; } -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void SEIReader::xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei, uint32_t payloadSize, std::ostream* pDecodedMessageOutputStream) { uint32_t code; @@ -1771,7 +1768,6 @@ void SEIReader::xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransf sei_read_code(pDecodedMessageOutputStream, 8, code, "preferred_transfer_characteristics"); sei.m_preferredTransferCharacteristics = code; } -#endif void SEIReader::xParseSEIUserDataRegistered(SEIUserDataRegistered& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream) { output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h index 11c8f0ff7bfc0ceb00a928576fbd55210c0cd316..a849fabfef076f3613d980e8cc6576954c10b0dd 100644 --- a/source/Lib/DecoderLib/SEIread.h +++ b/source/Lib/DecoderLib/SEIread.h @@ -79,9 +79,7 @@ protected: void xParseSEIParameterSetsInclusionIndication(SEIParameterSetsInclusionIndication& sei, uint32_t payloadSize, std::ostream* pDecodedMessageOutputStream); void xParseSEIMasteringDisplayColourVolume (SEIMasteringDisplayColourVolume& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIAnnotatedRegions (SEIAnnotatedRegions& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei, uint32_t payLoadSize, std::ostream *pDecodedMessageOutputStream); -#endif void xParseSEIEquirectangularProjection (SEIEquirectangularProjection &sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEISphereRotation (SEISphereRotation &sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIOmniViewport (SEIOmniViewport& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 4757f0d6431ff1e4921178126429bd72853d1aec..2667cf2247bdf1d720f6fdae32599bef7fcb1bb0 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -658,10 +658,8 @@ protected: int m_verPhaseDenMinus1ReducedResolution; bool m_MCTSEncConstraint; SEIMasteringDisplay m_masteringDisplay; -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI bool m_alternativeTransferCharacteristicsSEIEnabled; uint8_t m_preferredTransferCharacteristics; -#endif bool m_siiSEIEnabled; uint32_t m_siiSEINumUnitsInShutterInterval; @@ -2080,12 +2078,10 @@ public: void setMCTSEncConstraint(bool b) { m_MCTSEncConstraint = b; } bool getMCTSEncConstraint() { return m_MCTSEncConstraint; } void setMasteringDisplaySEI(const SEIMasteringDisplay &src) { m_masteringDisplay = src; } -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void setSEIAlternativeTransferCharacteristicsSEIEnable( bool b) { m_alternativeTransferCharacteristicsSEIEnabled = b; } bool getSEIAlternativeTransferCharacteristicsSEIEnable( ) const { return m_alternativeTransferCharacteristicsSEIEnabled; } void setSEIPreferredTransferCharacteristics(uint8_t v) { m_preferredTransferCharacteristics = v; } uint8_t getSEIPreferredTransferCharacteristics() const { return m_preferredTransferCharacteristics; } -#endif const SEIMasteringDisplay &getMasteringDisplaySEI() const { return m_masteringDisplay; } // film grain SEI void setFilmGrainCharactersticsSEIEnabled (bool b) { m_fgcSEIEnabled = b; } diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 17c43c8040d031d21a570c9f6525aeb0c958fc4a..857dbb834b7ece67bfb3eb519de6ee16fcc5edab 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -705,14 +705,12 @@ void EncGOP::xCreateIRAPLeadingSEIMessages (SEIMessages& seiMessages, const SPS seiMessages.push_back(sei); } -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI if(m_pcCfg->getSEIAlternativeTransferCharacteristicsSEIEnable()) { SEIAlternativeTransferCharacteristics *seiAlternativeTransferCharacteristics = new SEIAlternativeTransferCharacteristics; m_seiEncoder.initSEIAlternativeTransferCharacteristics(seiAlternativeTransferCharacteristics); seiMessages.push_back(seiAlternativeTransferCharacteristics); } -#endif if (m_pcCfg->getErpSEIEnabled()) { SEIEquirectangularProjection *sei = new SEIEquirectangularProjection; diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 807b7ffd1bb8adfbd364b32a038e29d267e14f60..2da008cf20471e89bd375dd877c01d6fe1089266 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -780,7 +780,6 @@ bool SEIEncoder::initSEIAnnotatedRegions(SEIAnnotatedRegions* SEIAnnoReg, int cu } -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void SEIEncoder::initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *seiAltTransCharacteristics) { CHECK(!(m_isInitialized), "Unspecified error"); @@ -788,7 +787,6 @@ void SEIEncoder::initSEIAlternativeTransferCharacteristics(SEIAlternativeTransfe // Set SEI message parameters read from command line options seiAltTransCharacteristics->m_preferredTransferCharacteristics = m_pcCfg->getSEIPreferredTransferCharacteristics(); } -#endif void SEIEncoder::initSEIFilmGrainCharacteristics(SEIFilmGrainCharacteristics *seiFilmGrain) { CHECK(!(m_isInitialized), "Unspecified error"); diff --git a/source/Lib/EncoderLib/SEIEncoder.h b/source/Lib/EncoderLib/SEIEncoder.h index 269c12b94fb8f0f6e8fb0cc1135e968850824918..135badf23388f2992976b09bc77d6aba145b3085 100644 --- a/source/Lib/EncoderLib/SEIEncoder.h +++ b/source/Lib/EncoderLib/SEIEncoder.h @@ -65,9 +65,7 @@ public: void initSEIDependentRAPIndication(SEIDependentRAPIndication *sei); void initSEIExtendedDrapIndication(SEIExtendedDrapIndication *sei); void initSEIBufferingPeriod(SEIBufferingPeriod *sei, bool noLeadingPictures); -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *sei); -#endif void initSEIScalableNesting(SEIScalableNesting *scalableNestingSEI, SEIMessages &nestedSEIs, const std::vector<int> &targetOLSs, const std::vector<int> &targetLayers, const std::vector<uint16_t> &subpictureIDs, uint16_t maxSubpicIdInPic); void initDecodedPictureHashSEI(SEIDecodedPictureHash *sei, PelUnitBuf& pic, std::string &rHashString, const BitDepths &bitDepths); void initSEIErp(SEIEquirectangularProjection *sei); diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 3517907dbd5c6d455a4b0fb10fb0ffc5674e83ed..fab0e1e663f0433b95f594fb7e7eff7f76c292dd 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -92,11 +92,9 @@ void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &h case SEI::MASTERING_DISPLAY_COLOUR_VOLUME: xWriteSEIMasteringDisplayColourVolume(*static_cast<const SEIMasteringDisplayColourVolume*>(&sei)); break; -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: xWriteSEIAlternativeTransferCharacteristics(*static_cast<const SEIAlternativeTransferCharacteristics*>(&sei)); break; -#endif case SEI::EQUIRECTANGULAR_PROJECTION: xWriteSEIEquirectangularProjection(*static_cast<const SEIEquirectangularProjection*>(&sei)); break; @@ -783,12 +781,10 @@ void SEIWriter::xWriteByteAlign() } } -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void SEIWriter::xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei) { WRITE_CODE(sei.m_preferredTransferCharacteristics, 8, "preferred_transfer_characteristics"); } -#endif void SEIWriter::xWriteSEIEquirectangularProjection(const SEIEquirectangularProjection &sei) { diff --git a/source/Lib/EncoderLib/SEIwrite.h b/source/Lib/EncoderLib/SEIwrite.h index 6e689440065f1323b1eccb219bc9d83877dd9195..8d3ec33cdf30a0f2af137da2b3043442869104bf 100644 --- a/source/Lib/EncoderLib/SEIwrite.h +++ b/source/Lib/EncoderLib/SEIwrite.h @@ -67,9 +67,7 @@ protected: void xWriteSEIDisplayOrientation(const SEIDisplayOrientation& sei); void xWriteSEIParameterSetsInclusionIndication(const SEIParameterSetsInclusionIndication& sei); void xWriteSEIMasteringDisplayColourVolume( const SEIMasteringDisplayColourVolume& sei); -#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei); -#endif void xWriteSEIEquirectangularProjection (const SEIEquirectangularProjection &sei); void xWriteSEISphereRotation (const SEISphereRotation &sei); void xWriteSEIOmniViewport (const SEIOmniViewport& sei);