diff --git a/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp b/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp index 7a34a185f4263904d34dfed5ee7956ceca42c654..e5d7fd3e091ea7885e115b47616857f118612aaa 100644 --- a/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp +++ b/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp @@ -274,10 +274,8 @@ void BitstreamExtractorApp::xRewritePPS(PPS &targetPPS, const PPS &sourcePPS, co targetPPS.setPicWidthInLumaSamples(subPic.getSubPicWidthInLumaSample()); targetPPS.setPicHeightInLumaSamples(subPic.getSubPicHeightInLumaSample()); // todo: Conformance window (conf window rewriting is not needed per JVET-S0117) -#if JVET_X0143_EXTRACTOR_FIXES if (sourcePPS.getScalingWindow().getWindowEnabledFlag()) { -#endif int subWidthC = SPS::getWinUnitX(sourceSPS.getChromaFormatIdc()); int subHeightC = SPS::getWinUnitY(sourceSPS.getChromaFormatIdc()); int subpicScalWinLeftOffset = sourcePPS.getScalingWindow().getWindowLeftOffset() - (int)subPic.getSubPicCtuTopLeftX() * sourceSPS.getCTUSize() / subWidthC; @@ -289,9 +287,7 @@ void BitstreamExtractorApp::xRewritePPS(PPS &targetPPS, const PPS &sourcePPS, co Window scalingWindow; scalingWindow.setWindow(subpicScalWinLeftOffset, subpicScalWinRightOffset, subpicScalWinTopOffset, subpicScalWinBotOffset); targetPPS.setScalingWindow(scalingWindow); -#if JVET_X0143_EXTRACTOR_FIXES } -#endif // Tiles int numTileCols = 1; int numTileRows = 1; diff --git a/source/App/DecoderApp/DecApp.cpp b/source/App/DecoderApp/DecApp.cpp index d9867bea98455cc09689789a0aaa5f2dd218974b..5dbb8e1de4394fe5ec3bdae5cd473ac4fe117750 100644 --- a/source/App/DecoderApp/DecApp.cpp +++ b/source/App/DecoderApp/DecApp.cpp @@ -410,7 +410,6 @@ uint32_t DecApp::decode() } } -#if JVET_X0048_X0103_FILM_GRAIN if (!m_SEIFGSFileName.empty() && !m_videoIOYuvSEIFGSFile[nalu.m_nuhLayerId].isOpen()) { const BitDepths &bitDepths = pcListPic->front()->cs->sps->getBitDepths(); // use bit depths of first reconstructed picture. @@ -457,7 +456,6 @@ uint32_t DecApp::decode() m_videoIOYuvSEIFGSFile[nalu.m_nuhLayerId].setBitdepthShift(channelType, reconBitdepth - fileBitdepth); } } -#endif if (!m_SEICTIFileName.empty() && !m_cVideoIOYuvSEICTIFile[nalu.m_nuhLayerId].isOpen()) { @@ -655,7 +653,6 @@ void DecApp::xDestroyDecLib() recFile.second.close(); } } -#if JVET_X0048_X0103_FILM_GRAIN if (!m_SEIFGSFileName.empty()) { for (auto &recFile: m_videoIOYuvSEIFGSFile) @@ -663,7 +660,6 @@ void DecApp::xDestroyDecLib() recFile.second.close(); } } -#endif if (!m_SEICTIFileName.empty()) { for (auto& recFile : m_cVideoIOYuvSEICTIFile) @@ -829,7 +825,6 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId ) NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range ); } } -#if JVET_X0048_X0103_FILM_GRAIN // Perform FGS on decoded frame and write to output FGS file if (!m_SEIFGSFileName.empty()) { @@ -851,7 +846,6 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId ) NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range); } } -#endif // Perform CTI on decoded frame and write to output CTI file if (!m_SEICTIFileName.empty()) { @@ -1005,7 +999,6 @@ void DecApp::xFlushOutput( PicList* pcListPic, const int layerId ) NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range ); } } -#if JVET_X0048_X0103_FILM_GRAIN // Perform FGS on decoded frame and write to output FGS file if (!m_SEIFGSFileName.empty()) { @@ -1027,7 +1020,6 @@ void DecApp::xFlushOutput( PicList* pcListPic, const int layerId ) NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range); } } -#endif // Perform CTI on decoded frame and write to output CTI file if (!m_SEICTIFileName.empty()) { diff --git a/source/App/DecoderApp/DecApp.h b/source/App/DecoderApp/DecApp.h index fa6fd4d9b01877d3bcf8dc0547fb6d939a046152..e4a5ff97ca7319016c2290a7c4c1b9b89523f327 100644 --- a/source/App/DecoderApp/DecApp.h +++ b/source/App/DecoderApp/DecApp.h @@ -61,9 +61,7 @@ private: // class interface DecLib m_cDecLib; ///< decoder class std::unordered_map<int, VideoIOYuv> m_cVideoIOYuvReconFile; ///< reconstruction YUV class -#if JVET_X0048_X0103_FILM_GRAIN std::unordered_map<int, VideoIOYuv> m_videoIOYuvSEIFGSFile; ///< reconstruction YUV with FGS class -#endif std::unordered_map<int, VideoIOYuv> m_cVideoIOYuvSEICTIFile; ///< reconstruction YUV with CTI class // for output control diff --git a/source/App/DecoderApp/DecAppCfg.cpp b/source/App/DecoderApp/DecAppCfg.cpp index 5e702600efa466fde2b97ab38d5bb6d3bb3ce0b3..d34ec4c60edd5904ac70f4309fb945fc4c2f943c 100644 --- a/source/App/DecoderApp/DecAppCfg.cpp +++ b/source/App/DecoderApp/DecAppCfg.cpp @@ -97,9 +97,7 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) ("TarDecLayerIdSetFile,l", cfg_TargetDecLayerIdSetFile, string(""), "targetDecLayerIdSet file name. The file should include white space separated LayerId values to be decoded. Omitting the option or a value of -1 in the file decodes all layers.") ("SEIColourRemappingInfoFilename", m_colourRemapSEIFileName, string(""), "Colour Remapping YUV output file name. If empty, no remapping is applied (ignore SEI message)\n") ("SEICTIFilename", m_SEICTIFileName, string(""), "CTI YUV output file name. If empty, no Colour Transform is applied (ignore SEI message)\n") -#if JVET_X0048_X0103_FILM_GRAIN ("SEIFGSFilename", m_SEIFGSFileName, string(""), "FGS YUV output file name. If empty, no film grain is applied (ignore SEI message)\n") -#endif ("SEIAnnotatedRegionsInfoFilename", m_annotatedRegionsSEIFileName, string(""), "Annotated regions output file name. If empty, no object information will be saved (ignore SEI message)\n") ("OutputDecodedSEIMessagesFilename", m_outputDecodedSEIMessagesFilename, string(""), "When non empty, output decoded SEI messages to the indicated file. If file is '-', then output to stdout\n") #if JVET_S0257_DUMP_360SEI_MESSAGE @@ -263,9 +261,7 @@ DecAppCfg::DecAppCfg() , m_decodedNoDisplaySEIEnabled(false) , m_colourRemapSEIFileName() , m_SEICTIFileName() -#if JVET_X0048_X0103_FILM_GRAIN , m_SEIFGSFileName() -#endif , m_annotatedRegionsSEIFileName() , m_targetDecLayerIdSet() , m_outputDecodedSEIMessagesFilename() diff --git a/source/App/DecoderApp/DecAppCfg.h b/source/App/DecoderApp/DecAppCfg.h index 897b85a17cf168d2bcfe818e5a4401bb633b220a..b34d1e7d62efca70de6c8b5ac9f566c26b02ca72 100644 --- a/source/App/DecoderApp/DecAppCfg.h +++ b/source/App/DecoderApp/DecAppCfg.h @@ -73,9 +73,7 @@ protected: bool m_decodedNoDisplaySEIEnabled; ///< Enable(true)/disable(false) writing only pictures that get displayed based on the no display SEI message std::string m_colourRemapSEIFileName; ///< output Colour Remapping file name std::string m_SEICTIFileName; ///< output Recon with CTI file name -#if JVET_X0048_X0103_FILM_GRAIN std::string m_SEIFGSFileName; ///< output file name for reconstructed sequence with film grain -#endif std::string m_annotatedRegionsSEIFileName; ///< annotated regions file name std::vector<int> m_targetDecLayerIdSet; ///< set of LayerIds to be included in the sub-bitstream extraction process. std::string m_outputDecodedSEIMessagesFilename; ///< filename to output decoded SEI messages to. If '-', then use stdout. If empty, do not output details. diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index af6001159ffe7fba15f126189d7f047300bc99bb..cb9ed720aecbf80ababd2575b0dd764c230e9853 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -453,16 +453,7 @@ void EncApp::xInitLibCfg() CHECK(m_noVirtualBoundaryConstraintFlag && m_virtualBoundariesEnabledFlag, "Virtuall boundaries shall be deactivated when m_noVirtualBoundaryConstraintFlag is equal to 1"); m_cEncLib.setNoChromaQpOffsetConstraintFlag(m_noChromaQpOffsetConstraintFlag); CHECK(m_noChromaQpOffsetConstraintFlag && m_cuChromaQpOffsetSubdiv, "Chroma Qp offset shall be 0 when m_noChromaQpOffsetConstraintFlag is equal to 1"); -#if JVET_X0079_MODIFIED_BITRATE m_cEncLib.setAllRapPicturesFlag(m_allRapPicturesFlag); -#else - m_cEncLib.setGeneralLowerBitRateConstraintFlag(m_generalLowerBitRateConstraintFlag); - if (m_profile == Profile::MAIN_12 || m_profile == Profile::MAIN_12_444 || m_profile == Profile::MAIN_16_444) - { - CHECK(m_generalLowerBitRateConstraintFlag==0, "generalLowerBitRateConstraintFlag shall be 1 when non-Intra/Still Picture operation range extension profiles are used"); - } -#endif -#if JVET_X0076_X0095_V2_GCI m_cEncLib.setNoExtendedPrecisionProcessingConstraintFlag(m_noExtendedPrecisionProcessingConstraintFlag); CHECK(m_noExtendedPrecisionProcessingConstraintFlag && m_extendedPrecisionProcessingFlag, "ExtendedPrecision shall be deactivated when m_noExtendedPrecisionProcessingConstraintFlag is equal to 1"); m_cEncLib.setNoTsResidualCodingRiceConstraintFlag(m_noTsResidualCodingRiceConstraintFlag); @@ -473,7 +464,6 @@ void EncApp::xInitLibCfg() CHECK(m_noPersistentRiceAdaptationConstraintFlag && m_persistentRiceAdaptationEnabledFlag, "GolombRiceParameterAdaptation shall be deactivated when m_noPersistentRiceAdaptationConstraintFlag is equal to 1"); m_cEncLib.setNoReverseLastSigCoeffConstraintFlag(m_noReverseLastSigCoeffConstraintFlag); CHECK(m_noReverseLastSigCoeffConstraintFlag && m_reverseLastSigCoeffEnabledFlag, "ReverseLastSigCoeff shall be deactivated when m_noReverseLastSigCoeffConstraintFlag is equal to 1"); -#endif } else { @@ -539,18 +529,12 @@ void EncApp::xInitLibCfg() m_cEncLib.setNoActConstraintFlag(false); m_cEncLib.setNoLmcsConstraintFlag(false); m_cEncLib.setNoChromaQpOffsetConstraintFlag(false); -#if JVET_X0079_MODIFIED_BITRATE m_cEncLib.setAllRapPicturesFlag(false); -#else - m_cEncLib.setGeneralLowerBitRateConstraintFlag(false); -#endif -#if JVET_X0076_X0095_V2_GCI m_cEncLib.setNoExtendedPrecisionProcessingConstraintFlag(false); m_cEncLib.setNoTsResidualCodingRiceConstraintFlag(false); m_cEncLib.setNoRrcRiceExtensionConstraintFlag(false); m_cEncLib.setNoPersistentRiceAdaptationConstraintFlag(false); m_cEncLib.setNoReverseLastSigCoeffConstraintFlag(false); -#endif } //====== Coding Structure ======== @@ -1001,13 +985,10 @@ void EncApp::xInitLibCfg() m_cEncLib.setFilmGrainCharactersticsSEISepColourDescPresent (m_fgcSEISepColourDescPresentFlag); m_cEncLib.setFilmGrainCharactersticsSEIBlendingModeID ((uint8_t)m_fgcSEIBlendingModeID); m_cEncLib.setFilmGrainCharactersticsSEILog2ScaleFactor ((uint8_t)m_fgcSEILog2ScaleFactor); -#if JVET_X0048_X0103_FILM_GRAIN m_cEncLib.setFilmGrainAnalysisEnabled (m_fgcSEIAnalysisEnabled); m_cEncLib.setFilmGrainCharactersticsSEIPerPictureSEI (m_fgcSEIPerPictureSEI); -#endif for (int i = 0; i < MAX_NUM_COMPONENT; i++) { m_cEncLib.setFGCSEICompModelPresent (m_fgcSEICompModelPresent[i], i); -#if JVET_X0048_X0103_FILM_GRAIN if (m_fgcSEICompModelPresent[i]) { m_cEncLib.setFGCSEINumIntensityIntervalMinus1 ((uint8_t)m_fgcSEINumIntensityIntervalMinus1[i], i); m_cEncLib.setFGCSEINumModelValuesMinus1 ((uint8_t)m_fgcSEINumModelValuesMinus1[i], i); @@ -1019,7 +1000,6 @@ void EncApp::xInitLibCfg() } } } -#endif } // content light level m_cEncLib.setCLLSEIEnabled (m_cllSEIEnabled); @@ -1220,10 +1200,8 @@ void EncApp::xInitLibCfg() m_cEncLib.setReshapeIntraCMD ( m_intraCMD ); m_cEncLib.setReshapeCW ( m_reshapeCW ); m_cEncLib.setReshapeCSoffset ( m_CSoffset ); -#if JVET_X0143_ALF_APS_CHANGES m_cEncLib.setMaxNumALFAPS (m_maxNumAlfAps); m_cEncLib.setConstantJointCbCrSignFlag (m_constantJointCbCrSignFlag); -#endif #if JVET_O0756_CALCULATE_HDRMETRICS for (int i=0; i<hdrtoolslib::NB_REF_WHITE; i++) { @@ -1344,13 +1322,11 @@ void EncApp::createLib( const int layerIdx ) m_filteredOrgPic = new PelStorage; m_filteredOrgPic->create( unitArea ); } -#if JVET_X0048_X0103_FILM_GRAIN if ( m_fgcSEIAnalysisEnabled ) { m_filteredOrgPicForFG = new PelStorage; m_filteredOrgPicForFG->create( unitArea ); } -#endif if( !m_bitstream.is_open() ) { @@ -1380,7 +1356,6 @@ void EncApp::createLib( const int layerIdx ) m_inputColourSpaceConvert, m_iQP, m_gopBasedTemporalFilterStrengths, m_gopBasedTemporalFilterFutureReference ); } -#if JVET_X0048_X0103_FILM_GRAIN if ( m_fgcSEIAnalysisEnabled ) { bool temporalFilterFutureReference = 1; @@ -1398,7 +1373,6 @@ void EncApp::createLib( const int layerIdx ) m_chromaFormatIDC, m_inputColourSpaceConvert, m_iQP, filteredFramesAndStrengths, temporalFilterFutureReference ); } - #endif } void EncApp::destroyLib() @@ -1432,14 +1406,12 @@ void EncApp::destroyLib() m_filteredOrgPic->destroy(); delete m_filteredOrgPic; } -#if JVET_X0048_X0103_FILM_GRAIN if (m_fgcSEIAnalysisEnabled) { m_filteredOrgPicForFG->destroy(); delete m_filteredOrgPicForFG; m_filteredOrgPicForFG = nullptr; } -#endif #if EXTENSION_360_VIDEO delete m_ext360; #endif @@ -1467,7 +1439,6 @@ bool EncApp::encodePrep( bool& eos ) m_cVideoIOYuvInputFile.read( *m_orgPic, *m_trueOrgPic, ipCSC, m_sourcePadding, m_InputChromaFormatIDC, m_bClipInputVideoToRec709Range ); #endif -#if JVET_X0048_X0103_FILM_GRAIN if (m_fgcSEIAnalysisEnabled) { m_filteredOrgPicForFG->copyFrom(*m_orgPic); @@ -1481,13 +1452,6 @@ bool EncApp::encodePrep( bool& eos ) { m_temporalFilterForFG.filter(m_filteredOrgPicForFG, m_iFrameRcvd); } -#else - if (m_gopBasedTemporalFilterEnabled) - { - m_temporalFilter.filter(m_orgPic, m_iFrameRcvd); - m_filteredOrgPic->copyFrom(*m_orgPic); - } -#endif // increase number of received frames m_iFrameRcvd++; @@ -1512,11 +1476,7 @@ bool EncApp::encodePrep( bool& eos ) } else { -#if JVET_X0048_X0103_FILM_GRAIN keepDoing = m_cEncLib.encodePrep( eos, m_flush ? 0 : m_orgPic, m_flush ? 0 : m_trueOrgPic, m_flush ? 0 : m_filteredOrgPic, m_flush ? 0 : m_filteredOrgPicForFG, snrCSC, m_recBufList, m_numEncoded ); -#else - keepDoing = m_cEncLib.encodePrep( eos, m_flush ? 0 : m_orgPic, m_flush ? 0 : m_trueOrgPic, m_flush ? 0 : m_filteredOrgPic, snrCSC, m_recBufList, m_numEncoded ); -#endif } return keepDoing; diff --git a/source/App/EncoderApp/EncApp.h b/source/App/EncoderApp/EncApp.h index a4763d3cf0f8d0607af12da08ec08a035970e374..4c459ad726e070dc9cc6930ea10db9476a01efcf 100644 --- a/source/App/EncoderApp/EncApp.h +++ b/source/App/EncoderApp/EncApp.h @@ -102,10 +102,8 @@ private: TExt360AppEncTop* m_ext360; #endif EncTemporalFilter m_temporalFilter; -#if JVET_X0048_X0103_FILM_GRAIN PelStorage* m_filteredOrgPicForFG; EncTemporalFilter m_temporalFilterForFG; -#endif bool m_flush; public: diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index fe7ea3b8d3453a5abf1ed579b34d37426098d791..af7176059f5fbda61712b4e02c0a679f2e3f1d47 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -262,21 +262,12 @@ strToLevel[] = }; #if U0132_TARGET_BITS_SATURATION -#if JVET_X0079_MODIFIED_BITRATE uint32_t g_uiMaxCpbSize[2][28] = { // LEVEL1, LEVEL2, LEVEL2_1, LEVEL3, LEVEL3_1, LEVEL4, LEVEL4_1, LEVEL5, LEVEL5_1, LEVEL5_2, LEVEL6, LEVEL6_1, LEVEL6_2 LEVEL6_3 { 0, 0, 0, 0, 350000, 0, 0, 0, 1500000, 3000000, 0, 0, 6000000, 10000000, 0, 0, 12000000, 20000000, 0, 0, 25000000, 40000000, 60000000, 0, 80000000, 120000000, 240000000, 240000000 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30000000, 50000000, 0, 0, 100000000, 160000000, 240000000, 0, 240000000, 480000000, 800000000, 1600000000 } }; -#else -uint32_t g_uiMaxCpbSize[2][21] = -{ - // LEVEL1, LEVEL2,LEVEL2_1, LEVEL3, LEVEL3_1, LEVEL4, LEVEL4_1, LEVEL5, LEVEL5_1, LEVEL5_2, LEVEL6, LEVEL6_1, LEVEL6_2 - { 0, 0, 0, 350000, 0, 0, 1500000, 3000000, 0, 6000000, 10000000, 0, 12000000, 20000000, 0, 25000000, 40000000, 60000000, 60000000, 120000000, 240000000 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30000000, 50000000, 0, 100000000, 160000000, 240000000, 240000000, 480000000, 800000000 } -}; -#endif #endif static const struct MapStrToCostMode @@ -370,31 +361,6 @@ static inline istream& operator >> (istream &in, ScalingListMode &mode) return readStrToEnum(strToScalingListMode, sizeof(strToScalingListMode)/sizeof(*strToScalingListMode), in, mode); } -#if !JVET_X0048_X0103_FILM_GRAIN -template <class T> -struct SMultiValueInput -{ - static_assert(!std::is_same<T, uint8_t>::value, "SMultiValueInput<uint8_t> is not supported"); - static_assert(!std::is_same<T, int8_t>::value, "SMultiValueInput<int8_t> is not supported"); - const T minValIncl; - const T maxValIncl; - const std::size_t minNumValuesIncl; - const std::size_t maxNumValuesIncl; // Use 0 for unlimited - std::vector<T> values; - SMultiValueInput() : minValIncl(0), maxValIncl(0), minNumValuesIncl(0), maxNumValuesIncl(0), values() { } - SMultiValueInput(std::vector<T> &defaults) : minValIncl(0), maxValIncl(0), minNumValuesIncl(0), maxNumValuesIncl(0), values(defaults) { } - SMultiValueInput(const T &minValue, const T &maxValue, std::size_t minNumberValues=0, std::size_t maxNumberValues=0) - : minValIncl(minValue), maxValIncl(maxValue), minNumValuesIncl(minNumberValues), maxNumValuesIncl(maxNumberValues), values() { } - SMultiValueInput(const T &minValue, const T &maxValue, std::size_t minNumberValues, std::size_t maxNumberValues, const T* defValues, const uint32_t numDefValues) - : minValIncl(minValue), maxValIncl(maxValue), minNumValuesIncl(minNumberValues), maxNumValuesIncl(maxNumberValues), values(defValues, defValues+numDefValues) { } - SMultiValueInput<T> &operator=(const std::vector<T> &userValues) { values=userValues; return *this; } - SMultiValueInput<T> &operator=(const SMultiValueInput<T> &userValues) { values=userValues.values; return *this; } - - T readValue(const char *&pStr, bool &bSuccess); - - istream& readValues(std::istream &in); -}; -#endif template <class T> static inline istream& operator >> (std::istream &in, SMultiValueInput<T> &values) @@ -761,7 +727,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) int warnUnknowParameter = 0; -#if JVET_X0048_X0103_FILM_GRAIN SMultiValueInput<uint32_t> cfg_FgcSEIIntensityIntervalLowerBoundComp0 (0, 255, 0, 256); SMultiValueInput<uint32_t> cfg_FgcSEIIntensityIntervalLowerBoundComp1 (0, 255, 0, 256); SMultiValueInput<uint32_t> cfg_FgcSEIIntensityIntervalLowerBoundComp2 (0, 255, 0, 256); @@ -771,7 +736,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) SMultiValueInput<uint32_t> cfg_FgcSEICompModelValueComp0 (0, 65535, 0, 256 * 6); SMultiValueInput<uint32_t> cfg_FgcSEICompModelValueComp1 (0, 65535, 0, 256 * 6); SMultiValueInput<uint32_t> cfg_FgcSEICompModelValueComp2 (0, 65535, 0, 256 * 6); -#endif #if ENABLE_TRACING string sTracingRule; @@ -945,18 +909,12 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("NoLmcsConstraintFlag", m_noLmcsConstraintFlag, false, "Indicate that LMCS is deactivated") ("NoLadfConstraintFlag", m_noLadfConstraintFlag, false, "Indicate that LADF is deactivated") ("NoVirtualBoundaryConstraintFlag", m_noVirtualBoundaryConstraintFlag, false, "Indicate that virtual boundary is deactivated") -#if JVET_X0079_MODIFIED_BITRATE ("AllRapPicturesFlag", m_allRapPicturesFlag, false, "Indicate that all pictures in OlsInScope are IRAP pictures or GDR pictures with ph_recovery_poc_cnt equal to 0") -#else - ("GeneralLowerBitRateConstraintFlag", m_generalLowerBitRateConstraintFlag, false, "Indicate whether lower bitrate constraint is used") -#endif -#if JVET_X0076_X0095_V2_GCI ("NoExtendedPrecisionProcessingConstraintFlag", m_noExtendedPrecisionProcessingConstraintFlag, false, "Indicate that ExtendedPrecision is deactivated") ("NoTsResidualCodingRiceConstraintFlag", m_noTsResidualCodingRiceConstraintFlag, false, "Indicate that TSRCRicePresent is deactivated") ("NoRrcRiceExtensionConstraintFlag", m_noRrcRiceExtensionConstraintFlag, false, "Indicate that ExtendedRiceRRC is deactivated") ("NoPersistentRiceAdaptationConstraintFlag", m_noPersistentRiceAdaptationConstraintFlag, false, "Indicate that GolombRiceParameterAdaptation is deactivated") ("NoReverseLastSigCoeffConstraintFlag", m_noReverseLastSigCoeffConstraintFlag, false, "Indicate that ReverseLastSigCoeff is deactivated") -#endif ("CTUSize", m_uiCTUSize, 128u, "CTUSize (specifies the CTU size if QTBT is on) [default: 128]") ("Log2MinCuSize", m_log2MinCuSize, 2u, "Log2 min CU size") @@ -1468,7 +1426,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("SEIFGCCompModelPresentComp0", m_fgcSEICompModelPresent[0], false, "Specifies the presence of film grain modelling on colour component 0.") ("SEIFGCCompModelPresentComp1", m_fgcSEICompModelPresent[1], false, "Specifies the presence of film grain modelling on colour component 1.") ("SEIFGCCompModelPresentComp2", m_fgcSEICompModelPresent[2], false, "Specifies the presence of film grain modelling on colour component 2.") -#if JVET_X0048_X0103_FILM_GRAIN ("SEIFGCAnalysisEnabled", m_fgcSEIAnalysisEnabled, false, "Control adaptive film grain parameter estimation - film grain analysis") ("SEIFGCPerPictureSEI", m_fgcSEIPerPictureSEI, false, "Film Grain SEI is added for each picture as speciffied in RDD5 to ensure bit accurate synthesis in tricky mode") ("SEIFGCNumIntensityIntervalMinus1Comp0", m_fgcSEINumIntensityIntervalMinus1[0], 0u, "Specifies the number of intensity intervals minus1 on colour component 0.") @@ -1486,7 +1443,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("SEIFGCCompModelValuesComp0", cfg_FgcSEICompModelValueComp0, cfg_FgcSEICompModelValueComp0, "Specifies the component model values on colour component 0.") ("SEIFGCCompModelValuesComp1", cfg_FgcSEICompModelValueComp1, cfg_FgcSEICompModelValueComp1, "Specifies the component model values on colour component 1.") ("SEIFGCCompModelValuesComp2", cfg_FgcSEICompModelValueComp2, cfg_FgcSEICompModelValueComp2, "Specifies the component model values on colour component 2.") -#endif // content light level SEI ("SEICLLEnabled", m_cllSEIEnabled, false, "Control generation of the content light level SEI message") ("SEICLLMaxContentLightLevel", m_cllSEIMaxContentLevel, 0u, "When not equal to 0, specifies an upper bound on the maximum light level among all individual samples in a 4:4:4 representation " @@ -1612,10 +1568,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("DebugCTU", m_debugCTU, -1, "If DebugBitstream is present, load frames up to this POC from this bitstream. Starting with DebugPOC-frame at CTUline containin debug CTU.") ("AlfTrueOrg", m_alfTrueOrg, true, "Using true original samples for ALF optimization when MCTF is enabled\n") ( "ALF", m_alf, true, "Adaptive Loop Filter\n" ) -#if JVET_X0143_ALF_APS_CHANGES ("MaxNumALFAPS", m_maxNumAlfAps, 8, "Maximum number of ALF APSs" ) ("ConstantJointCbCrSignFlag", m_constantJointCbCrSignFlag, 0, "Constant JointCbCr sign flag" ) -#endif ("ALFStrengthLuma", m_alfStrengthLuma, 1.0, "Adaptive Loop Filter strength for luma. The parameter scales the magnitudes of the ALF filter coefficients for luma. Valid range is 0.0 <= ALFStrengthLuma <= 1.0") ("ALFAllowPredefinedFilters", m_alfAllowPredefinedFilters, true, "Allow use of predefined filters for ALF") ("CCALFStrength", m_ccalfStrength, 1.0, "Cross-component Adaptive Loop Filter strength. The parameter scales the magnitudes of the CCALF filter coefficients. Valid range is 0.0 <= CCALFStrength <= 1.0") @@ -2238,12 +2192,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) m_profile == Profile::MAIN_16_444 || m_profile == Profile::MAIN_16_444_INTRA || m_profile == Profile::MAIN_16_444_STILL_PICTURE) { m_gciPresentFlag = true; -#if !JVET_X0079_MODIFIED_BITRATE - if (m_profile == Profile::MAIN_12 || m_profile == Profile::MAIN_12_444 || m_profile == Profile::MAIN_16_444) - { - CHECK(m_generalLowerBitRateConstraintFlag == 0, "GeneralLowerBitRateConstraintFlag setting must be 1 for non-Intra/Still Picture operation range extension profiles.") - } -#endif } if (m_profile == Profile::MAIN_12_INTRA || m_profile == Profile::MAIN_12_444_INTRA || m_profile == Profile::MAIN_16_444_INTRA) { @@ -2641,7 +2589,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) m_masteringDisplay.whitePoint[idx] = uint16_t((cfg_DisplayWhitePointCode.values.size() > idx) ? cfg_DisplayWhitePointCode.values[idx] : 0); } } -#if JVET_X0048_X0103_FILM_GRAIN // set sei film grain parameters. CHECK(!m_fgcSEIEnabled && m_fgcSEIAnalysisEnabled, "FGC SEI must be enabled in order to perform film grain analysis!"); if (m_fgcSEIEnabled) @@ -2725,7 +2672,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) } m_fgcSEILog2ScaleFactor = m_fgcSEILog2ScaleFactor ? m_fgcSEILog2ScaleFactor : 2; } -#endif if (m_ctiSEIEnabled) { CHECK(!m_ctiSEICrossComponentFlag && m_ctiSEICrossComponentInferred, "CTI CrossComponentFlag is 0, but CTI CrossComponentInferred is 1 (must be 0 for CrossComponentFlag 0)"); @@ -3125,18 +3071,11 @@ int EncAppCfg::xAutoDetermineProfile() default: return 1; } -#if JVET_X0079_MODIFIED_BITRATE if (m_profile == Profile::MAIN_12_INTRA || m_profile == Profile::MAIN_12_444_INTRA || m_profile == Profile::MAIN_16_444_INTRA || m_profile == Profile::MAIN_12_STILL_PICTURE || m_profile == Profile::MAIN_12_444_STILL_PICTURE || m_profile == Profile::MAIN_16_444_STILL_PICTURE) { m_allRapPicturesFlag = 1; } -#else - if (m_profile == Profile::MAIN_12 || m_profile == Profile::MAIN_12_444 || m_profile == Profile::MAIN_16_444) - { - m_generalLowerBitRateConstraintFlag = 1; // GeneralLowerBitRateConstraintFlag setting must be 1 for non-Intra/Still Picture operation range extension profiles.") - } -#endif return 0; } @@ -3167,9 +3106,7 @@ bool EncAppCfg::xCheckParameter() bool check_failed = false; /* abort if there is a fatal configuration problem */ #define xConfirmPara(a,b) check_failed |= confirmPara(a,b) -#if JVET_X0143_ALF_APS_CHANGES xConfirmPara(m_maxNumAlfAps > ALF_CTB_MAX_NUM_APS, "The number of ALF APSs should not be more than ALF_CTB_MAX_NUM_APS"); -#endif if( m_depQuantEnabledFlag ) { @@ -3525,12 +3462,10 @@ bool EncAppCfg::xCheckParameter() xConfirmPara( m_ccalf, "CCALF cannot be enabled when ALF is disabled" ); } -#if JVET_X0143_ALF_APS_CHANGES if (m_maxNumAlfAps == 0) { xConfirmPara(m_ccalf, "CCALF cannot be enabled when ALF APS is disabled"); } -#endif xConfirmPara( m_sourceWidth % SPS::getWinUnitX(m_chromaFormatIDC) != 0, "Picture width must be an integer multiple of the specified chroma subsampling"); xConfirmPara( m_sourceHeight % SPS::getWinUnitY(m_chromaFormatIDC) != 0, "Picture height must be an integer multiple of the specified chroma subsampling"); @@ -4270,11 +4205,7 @@ bool EncAppCfg::xCheckParameter() #if U0132_TARGET_BITS_SATURATION if ((m_RCCpbSaturationEnabled) && (m_level!=Level::NONE) && (m_profile!=Profile::NONE)) { -#if JVET_X0079_MODIFIED_BITRATE uint32_t uiLevelIdx = (m_level / 16) * 4 + (uint32_t)((m_level % 16) / 3); -#else - uint32_t uiLevelIdx = (m_level / 10) + (uint32_t)((m_level % 10) / 3); // (m_level / 30)*3 + ((m_level % 10) / 3); -#endif xConfirmPara(m_RCCpbSize > g_uiMaxCpbSize[m_levelTier][uiLevelIdx], "RCCpbSize should be smaller than or equal to Max CPB size according to tier and level"); xConfirmPara(m_RCInitialCpbFullness > 1, "RCInitialCpbFullness should be smaller than or equal to 1"); } @@ -4487,11 +4418,7 @@ void EncAppCfg::xPrintParameter() { msg( DETAILS, "Profile : %s\n", profileToString(m_profile) ); } -#if JVET_X0079_MODIFIED_BITRATE msg( DETAILS,"AllRapPicturesFlag : %d\n", m_allRapPicturesFlag ); -#else - msg( DETAILS,"GeneralLowerBitRateConstraintFlag : %d\n", m_generalLowerBitRateConstraintFlag ); -#endif msg(DETAILS, "CTU size / min CU size : %d / %d \n", m_uiMaxCUWidth, 1 << m_log2MinCuSize); msg(DETAILS, "subpicture info present flag : %s\n", m_subPicInfoPresentFlag ? "Enabled" : "Disabled"); @@ -4657,10 +4584,8 @@ void EncAppCfg::xPrintParameter() msg( VERBOSE, "SAO:%d ", (m_bUseSAO)?(1):(0)); msg( VERBOSE, "ALF:%d ", m_alf ? 1 : 0 ); msg( VERBOSE, "CCALF:%d ", m_ccalf ? 1 : 0 ); -#if JVET_X0143_ALF_APS_CHANGES msg(VERBOSE, "MaxNumALFAPS", m_maxNumAlfAps); msg(VERBOSE, "ConstantJointCbCrSignFlag", m_constantJointCbCrSignFlag); -#endif msg( VERBOSE, "WPP:%d ", (int)m_useWeightedPred); msg( VERBOSE, "WPB:%d ", (int)m_useWeightedBiPred); msg( VERBOSE, "PME:%d ", m_log2ParallelMergeLevel); @@ -4802,12 +4727,10 @@ void EncAppCfg::xPrintParameter() if( m_constrainedRaslEncoding ) { msg(VERBOSE, "\n\nWarning: with SEIConstrainedRASL enabled, LMChroma estimation is skipped in RASL frames" ); -#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT if( m_wrapAround ) { msg(VERBOSE, "\n and wrap-around motion compensation is disabled in RASL frames" ); } -#endif } msg( VERBOSE, "\n\n"); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index dd82b5ea8d97a36c4f8c4ed0e393ae309775add0..843d162823b24cb4dc3f80492a3df4cde88346cb 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -189,18 +189,12 @@ protected: bool m_noCraConstraintFlag; bool m_noGdrConstraintFlag; bool m_noApsConstraintFlag; -#if JVET_X0079_MODIFIED_BITRATE bool m_allRapPicturesFlag; -#else - bool m_generalLowerBitRateConstraintFlag; -#endif -#if JVET_X0076_X0095_V2_GCI bool m_noExtendedPrecisionProcessingConstraintFlag; bool m_noTsResidualCodingRiceConstraintFlag; bool m_noRrcRiceExtensionConstraintFlag; bool m_noPersistentRiceAdaptationConstraintFlag; bool m_noReverseLastSigCoeffConstraintFlag; -#endif // profile/level Profile::Name m_profile; @@ -548,7 +542,6 @@ protected: uint32_t m_fgcSEIBlendingModeID; uint32_t m_fgcSEILog2ScaleFactor; bool m_fgcSEICompModelPresent[MAX_NUM_COMPONENT]; -#if JVET_X0048_X0103_FILM_GRAIN bool m_fgcSEIAnalysisEnabled; bool m_fgcSEIPerPictureSEI; uint32_t m_fgcSEINumModelValuesMinus1 [MAX_NUM_COMPONENT]; @@ -556,7 +549,6 @@ protected: uint32_t m_fgcSEIIntensityIntervalLowerBound [MAX_NUM_COMPONENT][MAX_NUM_INTENSITIES]; uint32_t m_fgcSEIIntensityIntervalUpperBound [MAX_NUM_COMPONENT][MAX_NUM_INTENSITIES]; uint32_t m_fgcSEICompModelValue [MAX_NUM_COMPONENT][MAX_NUM_INTENSITIES][MAX_NUM_MODEL_VALUES]; -#endif // content light level SEI bool m_cllSEIEnabled; uint32_t m_cllSEIMaxContentLevel; @@ -820,10 +812,8 @@ protected: bool m_bs2ModPOCAndType; bool m_forceDecodeBitstream1; -#if JVET_X0143_ALF_APS_CHANGES int m_maxNumAlfAps; int m_constantJointCbCrSignFlag; -#endif bool m_alf; ///< Adaptive Loop Filter bool m_alfTrueOrg; double m_alfStrengthLuma; diff --git a/source/App/SEIFilmGrainApp/SEIFilmGrainApp.cpp b/source/App/SEIFilmGrainApp/SEIFilmGrainApp.cpp index 15a07861569ba75b45526a22503f6712c2cb5932..e30823b2c91fe969e7a1eb2557283130b8b59822 100644 --- a/source/App/SEIFilmGrainApp/SEIFilmGrainApp.cpp +++ b/source/App/SEIFilmGrainApp/SEIFilmGrainApp.cpp @@ -44,7 +44,6 @@ #include "DecoderLib/AnnexBread.h" #include "EncoderLib/AnnexBwrite.h" -#if JVET_X0048_X0103_FILM_GRAIN //! \ingroup SEIFilmGrainApp //! \{ @@ -279,4 +278,3 @@ uint32_t SEIFilmGrainApp::process() } //! \} -#endif diff --git a/source/App/SEIFilmGrainApp/SEIFilmGrainApp.h b/source/App/SEIFilmGrainApp/SEIFilmGrainApp.h index 54d25dc225ef98da24303b933e6df5a2c2f894e0..4bb2ba7d03b26c26f41886bf1ee5d226fdc6880f 100644 --- a/source/App/SEIFilmGrainApp/SEIFilmGrainApp.h +++ b/source/App/SEIFilmGrainApp/SEIFilmGrainApp.h @@ -56,7 +56,6 @@ using namespace std; -#if JVET_X0048_X0103_FILM_GRAIN // ==================================================================================================================== // Class definition // ==================================================================================================================== @@ -82,7 +81,6 @@ protected: void setSEIFilmGrainCharacteristics ( SEIFilmGrainCharacteristics *pFgcParameters ); void printSEIFilmGrainCharacteristics( SEIFilmGrainCharacteristics *pFgcParameters ); }; -#endif #endif // __SEIFILMGRAINAPP__ diff --git a/source/App/SEIFilmGrainApp/SEIFilmGrainAppCfg.cpp b/source/App/SEIFilmGrainApp/SEIFilmGrainAppCfg.cpp index 16534cc611d0d729a6e586594566124737453dc0..5e74d5fb8eac183b7e90fbbbeb83191a925da810 100644 --- a/source/App/SEIFilmGrainApp/SEIFilmGrainAppCfg.cpp +++ b/source/App/SEIFilmGrainApp/SEIFilmGrainAppCfg.cpp @@ -47,7 +47,6 @@ using namespace std; namespace po = df::program_options_lite; -#if JVET_X0048_X0103_FILM_GRAIN //! \ingroup SEIFilmGrainApp //! \{ @@ -329,4 +328,3 @@ SEIFilmGrainAppCfg::~SEIFilmGrainAppCfg() } //! \} -#endif \ No newline at end of file diff --git a/source/App/SEIFilmGrainApp/SEIFilmGrainAppCfg.h b/source/App/SEIFilmGrainApp/SEIFilmGrainAppCfg.h index a51f14321aa7ff857845231ffb31e3f669beef63..3b7bb577f9eb45c073d277be32738c82901f0ff8 100644 --- a/source/App/SEIFilmGrainApp/SEIFilmGrainAppCfg.h +++ b/source/App/SEIFilmGrainApp/SEIFilmGrainAppCfg.h @@ -45,7 +45,6 @@ #include "CommonLib/CommonDef.h" #include <vector> -#if JVET_X0048_X0103_FILM_GRAIN //! \ingroup SEIFilmGrainApp //! \{ @@ -86,7 +85,6 @@ public: }; //! \} -#endif #endif // __SEIFILMGRAINAPPCFG__ diff --git a/source/App/SEIFilmGrainApp/SEIFilmGrainMain.cpp b/source/App/SEIFilmGrainApp/SEIFilmGrainMain.cpp index 995434858e61f329298f0991e6bd0fafbec4d9c6..58a47000e1f26f2d430efa50fb16d333301432c8 100644 --- a/source/App/SEIFilmGrainApp/SEIFilmGrainMain.cpp +++ b/source/App/SEIFilmGrainApp/SEIFilmGrainMain.cpp @@ -51,7 +51,6 @@ int main(int argc, char* argv[]) { int returnCode = EXIT_SUCCESS; -#if JVET_X0048_X0103_FILM_GRAIN // print information fprintf( stdout, "\n" ); fprintf( stdout, "VVCSoftware: SEIFilmGrainApp Version %s ", VTM_VERSION ); @@ -112,7 +111,6 @@ int main(int argc, char* argv[]) printf("\n Total Time: %12.3f sec.\n", dResult); delete pcSEIApp; -#endif return returnCode; } diff --git a/source/App/SubpicMergeApp/SubpicMergeApp.cpp b/source/App/SubpicMergeApp/SubpicMergeApp.cpp index 0c6bd4eb9544637ae442d451704ff3d556956554..bfd4a24359c230ae0ac80c6f92dfe62dfdf5dfcb 100644 --- a/source/App/SubpicMergeApp/SubpicMergeApp.cpp +++ b/source/App/SubpicMergeApp/SubpicMergeApp.cpp @@ -521,11 +521,7 @@ void SubpicMergeApp::generateMergedStreamSPSes(std::vector<SPS*> &spsList) { for (auto spsId : subpic.spsIds) { -#if JVET_X0143_MERGER_FIXES CHECK(subpic.psManager.getSPS(spsId)->getSubPicInfoPresentFlag() && subpic.psManager.getSPS(spsId)->getNumSubPics() > 1, "Input streams containing subpictures not supported"); -#else - CHECK(subpic.psManager.getSPS(spsId)->getSubPicInfoPresentFlag(), "Input streams containing subpictures not supported") -#endif } } @@ -1011,9 +1007,7 @@ void SubpicMergeApp::generateMergedPic(ParameterSetManager &psManager, bool mixe updateSliceHeadersForMergedStream(psManager); // Code merged stream prefix APS NAL units -#if JVET_X0143_MERGER_FIXES std::vector<int> usedApsIds; -#endif for (auto &subpic : *m_subpics) { auto apsIdIt = subpic.apsIds.begin(); @@ -1021,19 +1015,15 @@ void SubpicMergeApp::generateMergedPic(ParameterSetManager &psManager, bool mixe { if (nalu.m_nalUnitType == NAL_UNIT_PREFIX_APS) { -#if JVET_X0143_MERGER_FIXES if (std::find(usedApsIds.begin(), usedApsIds.end(), apsIdIt->first) == usedApsIds.end()) { -#endif OutputNALUnit naluOut(NAL_UNIT_PREFIX_APS, nalu.m_nuhLayerId, nalu.m_temporalId); hlsWriter.setBitstream( &naluOut.m_Bitstream ); hlsWriter.codeAPS(subpic.psManager.getAPS(apsIdIt->first, apsIdIt->second)); accessUnit.push_back(new NALUnitEBSP(naluOut)); apsIdIt++; -#if JVET_X0143_MERGER_FIXES usedApsIds.push_back(apsIdIt->first); } -#endif } } } diff --git a/source/Lib/CommonLib/CodingStructure.h b/source/Lib/CommonLib/CodingStructure.h index 61829c87aa31a176b99bf2d39c8810cee6605a86..9a736ed2629950ac2d62be736a418d2df6f2fb0d 100644 --- a/source/Lib/CommonLib/CodingStructure.h +++ b/source/Lib/CommonLib/CodingStructure.h @@ -55,9 +55,7 @@ enum PictureType PIC_ORIGINAL, PIC_TRUE_ORIGINAL, PIC_FILTERED_ORIGINAL, -#if JVET_X0048_X0103_FILM_GRAIN PIC_FILTERED_ORIGINAL_FG, -#endif PIC_PREDICTION, PIC_RESIDUAL, PIC_ORG_RESI, diff --git a/source/Lib/CommonLib/CommonDef.h b/source/Lib/CommonLib/CommonDef.h index e166a89d7d1167b838348ddf052ceafd090ba9de..541fd516a58944eea66892cff863fed0ab1ed49a 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -473,7 +473,6 @@ static const int DELTA_QP_ACT[4] = { -5, 1, 3, 1 }; static const int MAX_TSRC_RICE = 8; ///<Maximum supported TSRC Rice parameter static const int MIN_TSRC_RICE = 1; ///<Minimum supported TSRC Rice parameter static const int MAX_CTI_LUT_SIZE = 64; ///<Maximum colour transform LUT size for CTI SEI -#if JVET_X0048_X0103_FILM_GRAIN static const int MAX_NUM_INTENSITIES = 256; ///<Maximum number of intensity intervals supported in FGC SEI static const int MAX_NUM_MODEL_VALUES = 6; ///<Maximum number of model values supported in FGC SEI static const int MAX_ALLOWED_MODEL_VALUES = 3; @@ -484,7 +483,6 @@ static const int BLK_8 = 8; static const int BLK_16 = 16; static const int BLK_32 = 32; static const int BIT_DEPTH_8 = 8; -#endif // ==================================================================================================================== // Macro functions // ==================================================================================================================== diff --git a/source/Lib/CommonLib/Mv.cpp b/source/Lib/CommonLib/Mv.cpp index 61ebeff86acdbe2216a540c4e4a0b5c9d1b9552b..61e95aa47530550889e99e3901d88e989ac3315c 100644 --- a/source/Lib/CommonLib/Mv.cpp +++ b/source/Lib/CommonLib/Mv.cpp @@ -55,11 +55,7 @@ void (*clipMv) ( Mv& rcMv, const struct Position& pos, const struct Size& size, void clipMvInPic ( Mv& rcMv, const struct Position& pos, const struct Size& size, const class SPS& sps, const class PPS& pps ) { -#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT if (pps.getWrapAroundEnabledFlag()) -#else - if (sps.getWrapAroundEnabledFlag()) -#endif { wrapClipMv(rcMv, pos, size, &sps, &pps); return; @@ -79,11 +75,7 @@ void clipMvInPic ( Mv& rcMv, const struct Position& pos, const struct Size& size void clipMvInSubpic ( Mv& rcMv, const struct Position& pos, const struct Size& size, const class SPS& sps, const class PPS& pps ) { -#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT if (pps.getWrapAroundEnabledFlag()) -#else - if (sps.getWrapAroundEnabledFlag()) -#endif { wrapClipMv(rcMv, pos, size, &sps, &pps); return; diff --git a/source/Lib/CommonLib/Picture.cpp b/source/Lib/CommonLib/Picture.cpp index c1fe07791a75a6bfee085ae2956f98c27f058ce9..d1c32d74b544e64623057dae821edc7eef16bff2 100644 --- a/source/Lib/CommonLib/Picture.cpp +++ b/source/Lib/CommonLib/Picture.cpp @@ -75,18 +75,12 @@ Picture::Picture() layerId = NOT_VALID; numSlices = 1; unscaledPic = nullptr; -#if JVET_X0048_X0103_FILM_GRAIN m_isMctfFiltered = false; m_grainCharacteristic = NULL; m_grainBuf = NULL; -#endif } -#if JVET_X0048_X0103_FILM_GRAIN void Picture::create( const ChromaFormat &_chromaFormat, const Size &size, const unsigned _maxCUSize, const unsigned _margin, const bool _decoder, const int _layerId, const bool gopBasedTemporalFilterEnabled, const bool fgcSEIAnalysisEnabled ) -#else -void Picture::create( const ChromaFormat &_chromaFormat, const Size &size, const unsigned _maxCUSize, const unsigned _margin, const bool _decoder, const int _layerId, const bool gopBasedTemporalFilterEnabled ) -#endif { layerId = _layerId; UnitArea::operator=( UnitArea( _chromaFormat, Area( Position{ 0, 0 }, size ) ) ); @@ -103,12 +97,10 @@ void Picture::create( const ChromaFormat &_chromaFormat, const Size &size, const { M_BUFS( 0, PIC_FILTERED_ORIGINAL ). create( _chromaFormat, a ); } -#if JVET_X0048_X0103_FILM_GRAIN if ( fgcSEIAnalysisEnabled ) { M_BUFS( 0, PIC_FILTERED_ORIGINAL_FG ).create( _chromaFormat, a ); } -#endif } #if !KEEP_PRED_AND_RESI_SIGNALS m_ctuArea = UnitArea( _chromaFormat, Area( Position{ 0, 0 }, Size( _maxCUSize, _maxCUSize ) ) ); @@ -155,9 +147,7 @@ void Picture::destroy() m_spliceIdx = NULL; } m_invColourTransfBuf = NULL; -#if JVET_X0048_X0103_FILM_GRAIN m_grainBuf = NULL; -#endif } void Picture::createTempBuffers( const unsigned _maxCUSize ) @@ -1240,7 +1230,6 @@ void Picture::addPictureToHashMapForInter() } } -#if JVET_X0048_X0103_FILM_GRAIN void Picture::createGrainSynthesizer(bool firstPictureInSequence, SEIFilmGrainSynthesizer *grainCharacteristics, PelStorage *grainBuf, int width, int height, ChromaFormat fmt, int bitDepth) { m_grainCharacteristic = grainCharacteristics; @@ -1300,7 +1289,6 @@ PelUnitBuf Picture::getDisplayBufFG(bool wrap) return M_BUFS(scheduler.getSplitPicId(), wrap ? PIC_RECON_WRAP : PIC_RECONSTRUCTION); } } -#endif void Picture::createColourTransfProcessor(bool firstPictureInSequence, SEIColourTransformApply* ctiCharacteristics, PelStorage* ctiBuf, int width, int height, ChromaFormat fmt, int bitDepth) { diff --git a/source/Lib/CommonLib/Picture.h b/source/Lib/CommonLib/Picture.h index f68a8959d144e3631cf306b4927c04d8a4ed3b63..aa05440a1f21aa116172c7695bbc295b192152d8 100644 --- a/source/Lib/CommonLib/Picture.h +++ b/source/Lib/CommonLib/Picture.h @@ -50,9 +50,7 @@ #include "MCTS.h" #include "SEIColourTransform.h" #include <deque> -#if JVET_X0048_X0103_FILM_GRAIN #include "SEIFilmGrainSynthesizer.h" -#endif class SEI; class AQpLayer; @@ -66,24 +64,18 @@ struct Picture : public UnitArea uint32_t margin; Picture(); -#if JVET_X0048_X0103_FILM_GRAIN void create(const ChromaFormat &_chromaFormat, const Size &size, const unsigned _maxCUSize, const unsigned margin, const bool bDecoder, const int layerId, const bool gopBasedTemporalFilterEnabled = false, const bool fgcSEIAnalysisEnabled = false); -#else - void create(const ChromaFormat &_chromaFormat, const Size &size, const unsigned _maxCUSize, const unsigned margin, const bool bDecoder, const int layerId, const bool gopBasedTemporalFilterEnabled = false); -#endif void destroy(); void createTempBuffers( const unsigned _maxCUSize ); void destroyTempBuffers(); -#if JVET_X0048_X0103_FILM_GRAIN int m_padValue; bool m_isMctfFiltered; SEIFilmGrainSynthesizer* m_grainCharacteristic; PelStorage* m_grainBuf; void createGrainSynthesizer(bool firstPictureInSequence, SEIFilmGrainSynthesizer* grainCharacteristics, PelStorage* grainBuf, int width, int height, ChromaFormat fmt, int bitDepth); PelUnitBuf getDisplayBufFG (bool wrap = false); -#endif SEIColourTransformApply* m_colourTranfParams; PelStorage* m_invColourTransfBuf; diff --git a/source/Lib/CommonLib/ProfileLevelTier.cpp b/source/Lib/CommonLib/ProfileLevelTier.cpp index 087cd4e3999b33c479f3a30873f1b68fbbbe899a..dc4f53e2430422e3fb1f623ce0a1fdc7d8f57a19 100644 --- a/source/Lib/CommonLib/ProfileLevelTier.cpp +++ b/source/Lib/CommonLib/ProfileLevelTier.cpp @@ -70,11 +70,7 @@ static const LevelTierFeatures mainLevelTierInfo[] = { Level::LEVEL6 , 35651584, { 80000, 240000 }, 600, 440, 20, 1069547520ULL, { 60000, 240000 }, { 8, 4} }, { Level::LEVEL6_1, 35651584, { 120000, 480000 }, 600, 440, 20, 2139095040ULL, { 120000, 480000 }, { 8, 4} }, { Level::LEVEL6_2, 35651584, { 180000, 800000 }, 600, 440, 20, 4278190080ULL, { 240000, 800000 }, { 8, 4} }, -#if JVET_X0079_MODIFIED_BITRATE { Level::LEVEL6_3, 80216064, { 240000, 1600000 }, 1000, 990, 30, 4812963840ULL, { 320000, 1600000 }, { 8, 4} }, -#else - { Level::LEVEL6_3, 80216064, { 240000, 800000 }, 1000, 990, 30, 4812963840ULL, { 320000, 800000 }, { 8, 4} }, -#endif { Level::LEVEL15_5, MAX_UINT,{ MAX_UINT, MAX_UINT }, MAX_UINT, MAX_UINT, MAX_UINT, MAX_CNFUINT64, {MAX_UINT, MAX_UINT }, { 0, 0} }, { Level::NONE } }; @@ -96,7 +92,6 @@ static const ProfileFeatures validProfiles[] = { { Profile::MAIN_10_444, "Main_444_10", 10, CHROMA_444, false, 2500, 2750, 3750, 75, mainLevelTierInfo, false }, { Profile::MULTILAYER_MAIN_10_444, "Multilayer_Main_444_10", 10, CHROMA_444, false, 2500, 2750, 3750, 75, mainLevelTierInfo, false }, -#if JVET_X0079_MODIFIED_BITRATE { Profile::MAIN_12, "Main_12", 12, CHROMA_420, true, 1200, 1320, 1875, 100, mainLevelTierInfo, false }, { Profile::MAIN_12_INTRA, "Main_12_Intra", 12, CHROMA_420, true, 2400, 2640, 1875, 100, mainLevelTierInfo, false }, { Profile::MAIN_12_STILL_PICTURE, "Main_12_Still_Picture", 12, CHROMA_420, true, 2400, 2640, 1875, 100, mainLevelTierInfo, false }, @@ -106,17 +101,6 @@ static const ProfileFeatures validProfiles[] = { { Profile::MAIN_16_444, "Main_16_444", 16, CHROMA_444, true, 4000, 4400, 6000, 75, mainLevelTierInfo, false }, { Profile::MAIN_16_444_INTRA, "Main_16_444_Intra", 16, CHROMA_444, true, 8000, 8800, 6000, 75, mainLevelTierInfo, false }, { Profile::MAIN_16_444_STILL_PICTURE, "Main_16_444_Still_Picture", 16, CHROMA_444, true, 8000, 8800, 6000, 75, mainLevelTierInfo, false }, -#else - { Profile::MAIN_12, "Main_12", 12, CHROMA_420, true, 1500, 1650, 2250, 100, mainLevelTierInfo, false }, - { Profile::MAIN_12_INTRA, "Main_12_Intra", 12, CHROMA_420, true, 1500, 1650, 2250, 100, mainLevelTierInfo, false }, - { Profile::MAIN_12_STILL_PICTURE, "Main_12_Still_Picture", 12, CHROMA_420, true, 1500, 1650, 2250, 100, mainLevelTierInfo, false }, - { Profile::MAIN_12_444, "Main_12_444", 12, CHROMA_444, true, 3000, 3300, 4500, 50, mainLevelTierInfo, false }, - { Profile::MAIN_12_444_INTRA, "Main_12_444_Intra", 12, CHROMA_444, true, 3000, 3300, 4500, 50, mainLevelTierInfo, false }, - { Profile::MAIN_12_444_STILL_PICTURE, "Main_12_444_Still_Picture", 12, CHROMA_444, true, 3000, 3300, 4500, 50, mainLevelTierInfo, false }, - { Profile::MAIN_16_444, "Main_16_444", 16, CHROMA_444, true, 4000, 4400, 6000, 50, mainLevelTierInfo, false }, - { Profile::MAIN_16_444_INTRA, "Main_16_444_Intra", 16, CHROMA_444, true, 4000, 4400, 6000, 50, mainLevelTierInfo, false }, - { Profile::MAIN_16_444_STILL_PICTURE, "Main_16_444_Still_Picture", 16, CHROMA_444, true, 4000, 4400, 6000, 50, mainLevelTierInfo, false }, -#endif { Profile::NONE, 0 }, }; @@ -172,7 +156,6 @@ ProfileLevelTierFeatures::extractPTLInformation(const SPS &sps) if (m_pProfile) { Profile::Name profile = m_pProfile->profile; -#if JVET_X0079_MODIFIED_BITRATE if (profile == Profile::MAIN_10 || profile == Profile::MAIN_10_444 || profile == Profile::MULTILAYER_MAIN_10 || profile == Profile::MULTILAYER_MAIN_10_444) { @@ -182,18 +165,6 @@ ProfileLevelTierFeatures::extractPTLInformation(const SPS &sps) { m_hbrFactor = 1 + sps.getProfileTierLevel()->getTierFlag(); } -#else - if (profile == Profile::MAIN_10 || profile == Profile::MAIN_10_444 || - profile == Profile::MULTILAYER_MAIN_10 || profile == Profile::MULTILAYER_MAIN_10_444 || - profile == Profile::MAIN_12 || profile == Profile::MAIN_12_444 || profile == Profile::MAIN_16_444) - { - m_hbrFactor = 1; - } - else - { - m_hbrFactor = 2 - sps.getProfileTierLevel()->getConstraintInfo()->getLowerBitRateConstraintFlag(); - } -#endif } } diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 932123e2a1192f73378f6ba34b137ec4e70614cf..9ef494c5305c1faa8ff0d02f23e9157083b540e5 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -801,9 +801,7 @@ public: { bool presentFlag; uint8_t numModelValues; -#if JVET_X0048_X0103_FILM_GRAIN uint8_t numIntensityIntervals; -#endif std::vector<CompModelIntensityValues> intensityValues; }; diff --git a/source/Lib/CommonLib/SEIFilmGrainAnalyzer.cpp b/source/Lib/CommonLib/SEIFilmGrainAnalyzer.cpp index e9efe946928fdc71e2a78523467b43f2fc1a6d40..7bbf06e8a734de248bb491ec6264e69bd6b4e7df 100644 --- a/source/Lib/CommonLib/SEIFilmGrainAnalyzer.cpp +++ b/source/Lib/CommonLib/SEIFilmGrainAnalyzer.cpp @@ -37,7 +37,6 @@ #include "SEIFilmGrainAnalyzer.h" -#if JVET_X0048_X0103_FILM_GRAIN // ==================================================================================================================== // Edge detection - Canny @@ -1870,4 +1869,3 @@ void FGAnalyser::extend_points(std::vector<int> &data_x, std::vector<int> &data_ } } -#endif \ No newline at end of file diff --git a/source/Lib/CommonLib/SEIFilmGrainAnalyzer.h b/source/Lib/CommonLib/SEIFilmGrainAnalyzer.h index d0d4ce490a2f7eade94967efb444287b5d5b8e83..eb5f0e0606e5779e5a1da9ec1e0d72b43d7d6ac3 100644 --- a/source/Lib/CommonLib/SEIFilmGrainAnalyzer.h +++ b/source/Lib/CommonLib/SEIFilmGrainAnalyzer.h @@ -51,7 +51,6 @@ #include <cmath> #include <algorithm> -#if JVET_X0048_X0103_FILM_GRAIN static const int MAX_REAL_SCALE = 32; static const double PI = 3.14159265358979323846; @@ -199,7 +198,6 @@ private: }; // END CLASS DEFINITION //! \} -#endif #endif // __SEIFILMGRAINANALYZER__ diff --git a/source/Lib/CommonLib/SEIFilmGrainSynthesizer.cpp b/source/Lib/CommonLib/SEIFilmGrainSynthesizer.cpp index 72cc0f2a482e0e6cfe1d2db0f5e4bf7f18739252..fffa1fac9ea04800f18bd0fa3fe6b77b4d476c22 100644 --- a/source/Lib/CommonLib/SEIFilmGrainSynthesizer.cpp +++ b/source/Lib/CommonLib/SEIFilmGrainSynthesizer.cpp @@ -40,7 +40,6 @@ #include <stdio.h> #include <cmath> -#if JVET_X0048_X0103_FILM_GRAIN /* static look up table definitions */ static const int8_t gaussianLUT[2048] = @@ -1265,4 +1264,3 @@ uint32_t SEIFilmGrainSynthesizer::fgsSimulationBlending_32x32(fgsProcessArgs *in return FGS_SUCCESS; } -#endif diff --git a/source/Lib/CommonLib/SEIFilmGrainSynthesizer.h b/source/Lib/CommonLib/SEIFilmGrainSynthesizer.h index 0436a12235c1b301144605e64262f2e7b27804f9..015c9e852da9802c2bb90c421d037825ebdf28eb 100644 --- a/source/Lib/CommonLib/SEIFilmGrainSynthesizer.h +++ b/source/Lib/CommonLib/SEIFilmGrainSynthesizer.h @@ -45,7 +45,6 @@ #include "TrQuant_EMT.h" -#if JVET_X0048_X0103_FILM_GRAIN //! \ingroup SEIFilmGrainSynthesizer //! \{ @@ -229,7 +228,6 @@ private: };// END CLASS DEFINITION SEIFilmGrainSynthesizer //! \} -#endif #endif // __SEIFILMGRAINSYNTHESIZER__ diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 99e26fd7c673824aa70e348ff38e509c3846cf40..b2fceb2138eeaf3f88606d5b9bd3a8e9978c8468 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -4572,17 +4572,10 @@ bool operator == (const ConstraintInfo& op1, const ConstraintInfo& o { return false; } -#if JVET_X0079_MODIFIED_BITRATE if (op1.m_allRapPicturesFlag != op2.m_allRapPicturesFlag) { return false; } -#else - if (op1.m_lowerBitRateConstraintFlag != op2.m_lowerBitRateConstraintFlag) - { - return false; - } -#endif if (op1.m_allLayersIndependentConstraintFlag != op2.m_allLayersIndependentConstraintFlag) { return false; diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index c685d028091d3a220839f6660e23da6288850adc..94df36998eb58260ff2ffd3ad38504f5c89b86a2 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -249,9 +249,6 @@ class ConstraintInfo uint32_t m_maxBitDepthConstraintIdc; int m_maxChromaFormatConstraintIdc; bool m_onePictureOnlyConstraintFlag; -#if !JVET_X0079_MODIFIED_BITRATE - bool m_lowerBitRateConstraintFlag; -#endif bool m_allLayersIndependentConstraintFlag; bool m_noMrlConstraintFlag; bool m_noIspConstraintFlag; @@ -306,16 +303,12 @@ class ConstraintInfo bool m_noCraConstraintFlag; bool m_noGdrConstraintFlag; bool m_noApsConstraintFlag; -#if JVET_X0079_MODIFIED_BITRATE bool m_allRapPicturesFlag; -#endif -#if JVET_X0076_X0095_V2_GCI bool m_noExtendedPrecisionProcessingConstraintFlag; bool m_noTsResidualCodingRiceConstraintFlag; bool m_noRrcRiceExtensionConstraintFlag; bool m_noPersistentRiceAdaptationConstraintFlag; bool m_noReverseLastSigCoeffConstraintFlag; -#endif public: ConstraintInfo() @@ -333,9 +326,6 @@ public: , m_maxBitDepthConstraintIdc ( 16) , m_maxChromaFormatConstraintIdc(CHROMA_444) , m_onePictureOnlyConstraintFlag (false) -#if !JVET_X0079_MODIFIED_BITRATE - , m_lowerBitRateConstraintFlag (false ) -#endif , m_allLayersIndependentConstraintFlag(false) , m_noMrlConstraintFlag(false) , m_noIspConstraintFlag(false) @@ -389,16 +379,12 @@ public: , m_noCraConstraintFlag (false) , m_noGdrConstraintFlag (false) , m_noApsConstraintFlag (false) -#if JVET_X0079_MODIFIED_BITRATE , m_allRapPicturesFlag (false) -#endif -#if JVET_X0076_X0095_V2_GCI , m_noExtendedPrecisionProcessingConstraintFlag (false) , m_noTsResidualCodingRiceConstraintFlag (false) , m_noRrcRiceExtensionConstraintFlag (false) , m_noPersistentRiceAdaptationConstraintFlag (false) , m_noReverseLastSigCoeffConstraintFlag (false) -#endif {} @@ -445,10 +431,6 @@ public: bool getOnePictureOnlyConstraintFlag() const { return m_onePictureOnlyConstraintFlag; } void setOnePictureOnlyConstraintFlag(bool b) { m_onePictureOnlyConstraintFlag = b; } -#if !JVET_X0079_MODIFIED_BITRATE - bool getLowerBitRateConstraintFlag() const { return m_lowerBitRateConstraintFlag; } - void setLowerBitRateConstraintFlag(bool b) { m_lowerBitRateConstraintFlag = b; } -#endif bool getAllLayersIndependentConstraintFlag() const { return m_allLayersIndependentConstraintFlag; } void setAllLayersIndependentConstraintFlag(bool b) { m_allLayersIndependentConstraintFlag = b; } bool getNoMrlConstraintFlag() const { return m_noMrlConstraintFlag; } @@ -555,11 +537,8 @@ public: void setNoGdrConstraintFlag(bool bVal) { m_noGdrConstraintFlag = bVal; } bool getNoApsConstraintFlag() const { return m_noApsConstraintFlag; } void setNoApsConstraintFlag(bool bVal) { m_noApsConstraintFlag = bVal; } -#if JVET_X0079_MODIFIED_BITRATE bool getAllRapPicturesFlag() const { return m_allRapPicturesFlag; } void setAllRapPicturesFlag(bool bVal) { m_allRapPicturesFlag = bVal; } -#endif -#if JVET_X0076_X0095_V2_GCI bool getNoExtendedPrecisionProcessingConstraintFlag() const { return m_noExtendedPrecisionProcessingConstraintFlag; } void setNoExtendedPrecisionProcessingConstraintFlag(bool val) { m_noExtendedPrecisionProcessingConstraintFlag = val; } bool getNoTsResidualCodingRiceConstraintFlag() const { return m_noTsResidualCodingRiceConstraintFlag; } @@ -570,7 +549,6 @@ public: void setNoPersistentRiceAdaptationConstraintFlag(bool val) { m_noPersistentRiceAdaptationConstraintFlag = val; } bool getNoReverseLastSigCoeffConstraintFlag() const { return m_noReverseLastSigCoeffConstraintFlag; } void setNoReverseLastSigCoeffConstraintFlag(bool val) { m_noReverseLastSigCoeffConstraintFlag = val; } -#endif friend bool operator == (const ConstraintInfo& op1, const ConstraintInfo& op2); friend bool operator != (const ConstraintInfo& op1, const ConstraintInfo& op2); diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 86771dec7db7c31d4a5b65c5763590b0ce5a1611..791574f8259a9a512b5267ca85c3ddb8f1f84d7f 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -53,25 +53,8 @@ // clang-format off //########### place macros to be removed in next cycle below this line ############### -#define JVET_X0143_ALF_APS_CHANGES 1 -#define JVET_X0143_ALF_APS_ID_OFFSET 0 // A value between 0 to 7 inclusive. This macro should be kept, or to be defined as a configuration parameter if possible. -#define JVET_X0143_MERGER_FIXES 1 -#define JVET_X0143_EXTRACTOR_FIXES 1 - -#define JVET_X0128_V2_WPP 1 // JVET-X0128 method 2, VVC v2 WPP -#define JVET_X0073_V2_PROFILE_IDC 1 // JVET-X0073 decrease profile_idc for 16 bit profiles by 1 - -#define JVET_X0079_MODIFIED_BITRATE 1 // JVET-X0079v3 (changes to JVET-W2005) - -#define JVET_X0106_INTRA_CONSTRAINT 1 // JVET-X0106 Constraint on non I=frames in Intra profiles - -#define JVET_X0137_ETSRC_RLSCP_DETERMINATION 1 // JVET-X0137 Determine signalled parameters for ETSRC and RLSCP using estimated residual - -#define JVET_X0076_X0095_V2_GCI 1 // JVET-X0076/X0095 GCI flags for VVC V2 tools -#define JVET_X0101_ADD_WRAPAROUND_CONSTRAINT 1 // JVET-X0101 add WrapAround constraint for Constrained RASL Encoding SEI message - -#define JVET_X0048_X0103_FILM_GRAIN 1 // JVET-X0048-X0103: SMPTE RDD-5 based film grain analysis and synthesis model for film grain characterstics (FGC) SEI +#define JVET_X0143_ALF_APS_ID_OFFSET 0 // A value between 0 to 7 inclusive. This macro should be kept, or to be defined as a configuration parameter if possible. //########### place macros to be be kept below this line ############### #define GDR_ENABLED 1 @@ -704,11 +687,7 @@ namespace Profile MULTILAYER_MAIN_10_444_STILL_PICTURE = MULTILAYER_MAIN_10_444 | STILL_PICTURE, MAIN_12 = 2, MAIN_12_444 = 34, -#if JVET_X0073_V2_PROFILE_IDC MAIN_16_444 = 35, -#else - MAIN_16_444 = 36, -#endif MAIN_12_INTRA = MAIN_12 | INTRA, MAIN_12_444_INTRA = MAIN_12_444 | INTRA, MAIN_16_444_INTRA = MAIN_16_444 | INTRA, @@ -912,9 +891,7 @@ private: struct BitDepths { -#if JVET_X0048_X0103_FILM_GRAIN const int &operator[](const ChannelType ch) const { return recon[ch]; } -#endif int recon[MAX_NUM_CHANNEL_TYPE]; ///< the bit depth as indicated in the SPS }; diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 801dd97a96b8a8e7093e368d8a749f0649e131ac..5e5e597916e818a58e9186232fa803d10791e5ed 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -430,10 +430,8 @@ DecLib::DecLib() , m_prevTid0POC(0) , m_bFirstSliceInPicture(true) , m_firstPictureInSequence(true) -#if JVET_X0048_X0103_FILM_GRAIN , m_grainCharacteristic() , m_grainBuf() -#endif , m_colourTranfParams() , m_firstSliceInBitstream(true) , m_isFirstAuInCvs( true ) @@ -1757,9 +1755,7 @@ void DecLib::xActivateParameterSets( const InputNALUnit nalu ) #else m_pcPic->finalInit( vps, *sps, *pps, &m_picHeader, apss, lmcsAPS, scalinglistAPS ); #endif -#if JVET_X0048_X0103_FILM_GRAIN m_pcPic->createGrainSynthesizer(m_firstPictureInSequence, &m_grainCharacteristic, &m_grainBuf, pps->getPicWidthInLumaSamples(), pps->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getBitDepth(CHANNEL_TYPE_LUMA)); -#endif m_pcPic->createColourTransfProcessor(m_firstPictureInSequence, &m_colourTranfParams, &m_invColourTransfBuf, pps->getPicWidthInLumaSamples(), pps->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getBitDepth(CHANNEL_TYPE_LUMA)); m_firstPictureInSequence = false; m_pcPic->createTempBuffers( m_pcPic->cs->pps->pcv->maxCUWidth ); diff --git a/source/Lib/DecoderLib/DecLib.h b/source/Lib/DecoderLib/DecLib.h index 0ec2a4c245bd038dc660343f0bec8064c4dd1639..ff7ed1b09aff1cbbeabbbbeeba82b05a097abc28 100644 --- a/source/Lib/DecoderLib/DecLib.h +++ b/source/Lib/DecoderLib/DecLib.h @@ -131,10 +131,8 @@ private: int m_prevTid0POC; bool m_bFirstSliceInPicture; bool m_firstPictureInSequence; -#if JVET_X0048_X0103_FILM_GRAIN SEIFilmGrainSynthesizer m_grainCharacteristic; PelStorage m_grainBuf; -#endif SEIColourTransformApply m_colourTranfParams; PelStorage m_invColourTransfBuf; bool m_firstSliceInSequence[MAX_VPS_LAYERS]; diff --git a/source/Lib/DecoderLib/DecSlice.cpp b/source/Lib/DecoderLib/DecSlice.cpp index 81bca9782dd50076e1ff85d51eed64aece92b17d..bd14459d9cf4d590756a912aa24aa1ad0f3e7293 100644 --- a/source/Lib/DecoderLib/DecSlice.cpp +++ b/source/Lib/DecoderLib/DecSlice.cpp @@ -203,9 +203,7 @@ void DecSlice::decompressSlice( Slice* slice, InputBitstream* bitstream, int deb { // Top is available, so use it. cabacReader.getCtx() = m_entropyCodingSyncContextState; -#if JVET_X0128_V2_WPP cabacReader.getCtx().riceStatReset(slice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), slice->getSPS()->getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag()); -#endif cs.setPrevPLT(m_palettePredictorSyncState); } pic->m_prevQP[0] = pic->m_prevQP[1] = slice->getSliceQp(); diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 4195a7e7c745504708ed0aa69f0505a457ce92b4..e4c835f9f995c9aa86f015c21e0e925e6db74bf2 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -1343,20 +1343,10 @@ void SEIReader::xParseSEIFilmGrainCharacteristics(SEIFilmGrainCharacteristics& s SEIFilmGrainCharacteristics::CompModel &cm = sei.m_compModel[c]; if (cm.presentFlag) { -#if JVET_X0048_X0103_FILM_GRAIN sei_read_code(pDecodedMessageOutputStream, 8, code, "fg_num_intensity_intervals_minus1[c]"); cm.numIntensityIntervals = code + 1; -#else - uint32_t numIntensityIntervals; - sei_read_code(pDecodedMessageOutputStream, 8, code, "fg_num_intensity_intervals_minus1[c]"); numIntensityIntervals = code + 1; -#endif sei_read_code(pDecodedMessageOutputStream, 3, code, "fg_num_model_values_minus1[c]"); cm.numModelValues = code + 1; -#if JVET_X0048_X0103_FILM_GRAIN cm.intensityValues.resize(cm.numIntensityIntervals); for (uint32_t interval = 0; interval < cm.numIntensityIntervals; interval++) -#else - cm.intensityValues.resize(numIntensityIntervals); - for (uint32_t interval = 0; interval < numIntensityIntervals; interval++) -#endif { SEIFilmGrainCharacteristics::CompModelIntensityValues &cmiv = cm.intensityValues[interval]; sei_read_code(pDecodedMessageOutputStream, 8, code, "fg_intensity_interval_lower_bound[c][i]"); cmiv.intensityIntervalLowerBound = code; diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 0cc5dc0c788bd575ae5895e237c317e495a66db3..3b3cbca1391b3b24b2b002f7c80b35a76ebba7e0 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -2594,26 +2594,20 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag picHeader->setRecoveryPocCnt( -1 ); } -#if JVET_X0079_MODIFIED_BITRATE || JVET_X0106_INTRA_CONSTRAINT bool isIrapOrGdrWRecoveryPocCnt0 = (picHeader->getGdrOrIrapPicFlag() && !picHeader->getGdrPicFlag()) || (picHeader->getGdrPicFlag() && picHeader->getRecoveryPocCnt() == 0); if (!isIrapOrGdrWRecoveryPocCnt0) { -#if JVET_X0106_INTRA_CONSTRAINT const Profile::Name profile = sps->getProfileTierLevel()->getProfileIdc(); bool isIntraProfile = profile == Profile::MAIN_12_INTRA || profile == Profile::MAIN_12_444_INTRA || profile == Profile::MAIN_16_444_INTRA; CHECK(isIntraProfile && !isIrapOrGdrWRecoveryPocCnt0, "Invalid non-irap pictures or gdr pictures with ph_recovery_poc_cnt!=0 for Intra profile"); -#endif -#if JVET_X0079_MODIFIED_BITRATE CHECK(sps->getProfileTierLevel()->getConstraintInfo()->getAllRapPicturesFlag() == 1 && !isIrapOrGdrWRecoveryPocCnt0, "gci_all_rap_pictures_flag equal to 1 specifies that all pictures in OlsInScope are IRAP pictures or GDR pictures with ph_recovery_poc_cnt equal to 0"); } -#endif -#endif std::vector<bool> phExtraBitsPresent = sps->getExtraPHBitPresentFlags(); for (int i=0; i< sps->getNumExtraPHBytes() * 8; i++) @@ -4596,47 +4590,24 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo, const ProfileTie READ_FLAG(symbol, "gci_no_lmcs_constraint_flag"); cinfo->setNoLmcsConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "gci_no_ladf_constraint_flag"); cinfo->setNoLadfConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "gci_no_virtual_boundaries_constraint_flag"); cinfo->setNoVirtualBoundaryConstraintFlag(symbol > 0 ? true : false); -#if JVET_X0079_MODIFIED_BITRATE READ_CODE(8, symbol, "gci_num_additional_bits"); uint32_t const numAdditionalBits = symbol; int numAdditionalBitsUsed; if (numAdditionalBits > 0) { READ_FLAG(symbol, "gci_all_rap_pictures_flag"); cinfo->setAllRapPicturesFlag(symbol > 0 ? true : false); -#if JVET_X0076_X0095_V2_GCI READ_FLAG(symbol, "gci_no_extended_precision_processing_constraint_flag"); cinfo->setNoExtendedPrecisionProcessingConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "gci_no_ts_residual_coding_rice_constraint_flag"); cinfo->setNoTsResidualCodingRiceConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "gci_no_rrc_rice_extension_constraint_flag"); cinfo->setNoRrcRiceExtensionConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "gci_no_persistent_rice_adaptation_constraint_flag"); cinfo->setNoPersistentRiceAdaptationConstraintFlag(symbol > 0 ? true : false); READ_FLAG(symbol, "gci_no_reverse_last_sig_coeff_constraint_flag"); cinfo->setNoReverseLastSigCoeffConstraintFlag(symbol > 0 ? true : false); numAdditionalBitsUsed = 6; -#else - numAdditionalBitsUsed = 1; -#endif } else { numAdditionalBitsUsed = 0; } for (int i = 0; i < numAdditionalBits - numAdditionalBitsUsed; i++) -#else - READ_CODE(8, symbol, "gci_num_reserved_bits"); - uint32_t const numReservedBits = symbol; - int numReservedBitsUsed; - if (numReservedBits > 0) - { - READ_FLAG(symbol, "general_lower_bit_rate_constraint_flag"); cinfo->setLowerBitRateConstraintFlag(symbol > 0 ? true : false); - numReservedBitsUsed = 1; - Profile::Name profile = ptl->getProfileIdc(); - CHECK((profile == Profile::MAIN_12 || profile == Profile::MAIN_12_444 || profile == Profile::MAIN_16_444) && - symbol == 0, "general_lower_bitrate_constraint_flag shall be equal to 1 for non-Intra/Still Picture operation range extension profiles."); - } - else - { - numReservedBitsUsed = 0; - } - for (int i = 0; i < numReservedBits - numReservedBitsUsed; i++) -#endif { READ_FLAG(symbol, "gci_reserved_zero_bit"); CHECK(symbol != 0, "gci_reserved_zero_bit not equal to zero"); } diff --git a/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp b/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp index 480aa23e340f3f6106b2998a1dea1d09ab83e188..07235faf3442b62a4cbdaa160bf138196e64e90f 100644 --- a/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp +++ b/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp @@ -884,11 +884,7 @@ void EncAdaptiveLoopFilter::ALFProcess(CodingStructure& cs, const double *lambda if( !layerIdx && ( cs.slice->getPendingRasInit() || cs.slice->isIDRorBLA() || ( cs.slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_encCfg->getCraAPSreset() ) ) ) { memset(cs.slice->getAlfAPSs(), 0, sizeof(*cs.slice->getAlfAPSs())*ALF_CTB_MAX_NUM_APS); -#if JVET_X0143_ALF_APS_CHANGES m_apsIdStart = m_encCfg->getMaxNumALFAPS(); -#else - m_apsIdStart = ALF_CTB_MAX_NUM_APS; -#endif m_apsMap->clearActive(); for (int i = 0; i < ALF_CTB_MAX_NUM_APS; i++) @@ -1021,11 +1017,7 @@ void EncAdaptiveLoopFilter::ALFProcess(CodingStructure& cs, const double *lambda ); // derive filter (chroma) -#if JVET_X0143_ALF_APS_CHANGES if (!(m_encCfg->getMaxNumALFAPS() == 0) && isChromaEnabled(cs.pcv->chrFormat)) // Find ALF parameters for chroma if ALF APS is enabled -#else - if (isChromaEnabled(cs.pcv->chrFormat)) -#endif { alfEncoder( cs, alfParam, orgYuv, recYuv, cs.getRecoBuf(), CHANNEL_TYPE_CHROMA #if ENABLE_QPA @@ -2555,30 +2547,17 @@ void EncAdaptiveLoopFilter::setCtuEnableFlag( uint8_t** ctuFlags, ChannelType ch std::vector<int> EncAdaptiveLoopFilter::getAvaiApsIdsLuma(CodingStructure& cs, int &newApsId) { APS** apss = cs.slice->getAlfAPSs(); -#if JVET_X0143_ALF_APS_CHANGES for (int i = 0; i < m_encCfg->getMaxNumALFAPS(); i++) -#else - for (int i = 0; i < ALF_CTB_MAX_NUM_APS; i++) -#endif { apss[i] = m_apsMap->getPS((i << NUM_APS_TYPE_LEN) + ALF_APS); } std::vector<int> result; int apsIdChecked = 0, curApsId = m_apsIdStart; -#if JVET_X0143_ALF_APS_CHANGES if (curApsId < m_encCfg->getMaxNumALFAPS()) -#else - if (curApsId < ALF_CTB_MAX_NUM_APS) -#endif { -#if JVET_X0143_ALF_APS_CHANGES while ((apsIdChecked < m_encCfg->getMaxNumALFAPS()) && !cs.slice->isIRAP() && (result.size() < m_encCfg->getMaxNumALFAPS()) && !cs.slice->getPendingRasInit()) -#else - while (apsIdChecked < ALF_CTB_MAX_NUM_APS && !cs.slice->isIRAP() && result.size() < ALF_CTB_MAX_NUM_APS - && !cs.slice->getPendingRasInit()) -#endif { APS* curAPS = cs.slice->getAlfAPSs()[curApsId]; @@ -2587,11 +2566,7 @@ std::vector<int> EncAdaptiveLoopFilter::getAvaiApsIdsLuma(CodingStructure& cs, i result.push_back(curApsId); } apsIdChecked++; -#if JVET_X0143_ALF_APS_CHANGES curApsId = (curApsId + 1) % m_encCfg->getMaxNumALFAPS(); -#else - curApsId = (curApsId + 1) % ALF_CTB_MAX_NUM_APS; -#endif } } cs.slice->setNumAlfApsIdsLuma((int)result.size()); @@ -2599,17 +2574,9 @@ std::vector<int> EncAdaptiveLoopFilter::getAvaiApsIdsLuma(CodingStructure& cs, i newApsId = m_apsIdStart - 1; if (newApsId < 0) { -#if JVET_X0143_ALF_APS_CHANGES newApsId = m_encCfg->getMaxNumALFAPS() - 1; -#else - newApsId = ALF_CTB_MAX_NUM_APS - 1; -#endif } -#if JVET_X0143_ALF_APS_CHANGES CHECK(newApsId >= m_encCfg->getMaxNumALFAPS(), "Wrong APS index assignment in getAvaiApsIdsLuma"); -#else - CHECK(newApsId >= ALF_CTB_MAX_NUM_APS, "Wrong APS index assignment in getAvaiApsIdsLuma"); -#endif return result; } void EncAdaptiveLoopFilter::initDistortion() @@ -2684,17 +2651,11 @@ void EncAdaptiveLoopFilter::alfEncoderCtb(CodingStructure& cs, AlfParam& alfPar int numIter = useNewFilter ? 2 : 1; for (int numTemporalAps = 0; numTemporalAps <= apsIds.size(); numTemporalAps++) { -#if JVET_X0143_ALF_APS_CHANGES if ((m_encCfg->getMaxNumALFAPS()==0) && ((numTemporalAps + useNewFilter) > 0)) { continue; } -#endif -#if JVET_X0143_ALF_APS_CHANGES if (numTemporalAps + useNewFilter > std::min(ALF_CTB_MAX_NUM_APS - 1, m_encCfg->getMaxNumALFAPS())) -#else - if (numTemporalAps + useNewFilter >= ALF_CTB_MAX_NUM_APS) -#endif { continue; } @@ -2939,11 +2900,7 @@ void EncAdaptiveLoopFilter::alfEncoderCtb(CodingStructure& cs, AlfParam& alfPar } //chroma -#if JVET_X0143_ALF_APS_CHANGES if (!(m_encCfg->getMaxNumALFAPS() == 0) && isChromaEnabled(cs.pcv->chrFormat)) // Find ALF parameters for chroma if ALF APS is enabled. -#else - if (isChromaEnabled(cs.pcv->chrFormat)) -#endif { m_alfParamTemp = alfParamNewFiltersBest; if (m_alfParamTemp.numAlternativesChroma < 1) @@ -2968,21 +2925,13 @@ void EncAdaptiveLoopFilter::alfEncoderCtb(CodingStructure& cs, AlfParam& alfPar int curId = m_apsIdStart; // Do not assign ALF APS for chroma if any new APS ID is not avaiable -#if JVET_X0143_ALF_APS_CHANGES int counter = m_encCfg->getMaxNumALFAPS(); while ((newApsIdChroma < 0) && ((counter--))) -#else - while (newApsIdChroma < 0) -#endif { curId--; if (curId < 0) { -#if JVET_X0143_ALF_APS_CHANGES curId = m_encCfg->getMaxNumALFAPS() - 1; -#else - curId = ALF_CTB_MAX_NUM_APS - 1; -#endif } if (std::find(bestApsIds.begin(), bestApsIds.end(), curId) == bestApsIds.end()) { @@ -2990,11 +2939,7 @@ void EncAdaptiveLoopFilter::alfEncoderCtb(CodingStructure& cs, AlfParam& alfPar } } } -#if JVET_X0143_ALF_APS_CHANGES for (int curApsId = 0; curApsId < m_encCfg->getMaxNumALFAPS(); curApsId++) -#else - for (int curApsId = 0; curApsId < ALF_CTB_MAX_NUM_APS; curApsId++) -#endif { const bool reuseExistingAPS = curApsId != newApsIdChroma; @@ -3643,28 +3588,17 @@ void EncAdaptiveLoopFilter::determineControlIdcValues(CodingStructure &cs, const std::vector<int> EncAdaptiveLoopFilter::getAvailableCcAlfApsIds(CodingStructure& cs, ComponentID compID) { APS** apss = cs.slice->getAlfAPSs(); -#if JVET_X0143_ALF_APS_CHANGES for (int i = 0; i < m_encCfg->getMaxNumALFAPS(); i++) -#else - for (int i = 0; i < ALF_CTB_MAX_NUM_APS; i++) -#endif { apss[i] = m_apsMap->getPS((i << NUM_APS_TYPE_LEN) + ALF_APS); } std::vector<int> result; int apsIdChecked = 0, curApsId = m_apsIdStart; -#if JVET_X0143_ALF_APS_CHANGES if (curApsId < m_encCfg->getMaxNumALFAPS()) { while ((apsIdChecked < m_encCfg->getMaxNumALFAPS()) && !cs.slice->isIRAP() && (result.size() < m_encCfg->getMaxNumALFAPS()) && !cs.slice->getPendingRasInit()) -#else - if (curApsId < ALF_CTB_MAX_NUM_APS) - { - while (apsIdChecked < ALF_CTB_MAX_NUM_APS && !cs.slice->isIRAP() && result.size() < ALF_CTB_MAX_NUM_APS - && !cs.slice->getPendingRasInit()) -#endif { APS* curAPS = cs.slice->getAlfAPSs()[curApsId]; if (curAPS && curAPS->getLayerId() == cs.slice->getPic()->layerId @@ -3673,11 +3607,7 @@ std::vector<int> EncAdaptiveLoopFilter::getAvailableCcAlfApsIds(CodingStructure& result.push_back(curApsId); } apsIdChecked++; -#if JVET_X0143_ALF_APS_CHANGES curApsId = (curApsId + 1) % m_encCfg->getMaxNumALFAPS(); -#else - curApsId = (curApsId + 1) % ALF_CTB_MAX_NUM_APS; -#endif } } return result; diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index b56139655f100b406848476f114072183ea02fa8..1909bc6695fe7e8b59d0df8ae87c4d21d6ca881c 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -235,18 +235,12 @@ protected: bool m_noCraConstraintFlag; bool m_noGdrConstraintFlag; bool m_noApsConstraintFlag; -#if JVET_X0079_MODIFIED_BITRATE bool m_allRapPicturesFlag; -#else - bool m_generalLowerBitRateConstraintFlag; -#endif -#if JVET_X0076_X0095_V2_GCI bool m_noExtendedPrecisionProcessingConstraintFlag; bool m_noTsResidualCodingRiceConstraintFlag; bool m_noRrcRiceExtensionConstraintFlag; bool m_noPersistentRiceAdaptationConstraintFlag; bool m_noReverseLastSigCoeffConstraintFlag; -#endif /* profile & level */ Profile::Name m_profile; @@ -658,7 +652,6 @@ protected: uint8_t m_fgcSEIBlendingModeID; uint8_t m_fgcSEILog2ScaleFactor; bool m_fgcSEICompModelPresent[MAX_NUM_COMPONENT]; -#if JVET_X0048_X0103_FILM_GRAIN bool m_fgcSEIAnalysisEnabled; bool m_fgcSEIPerPictureSEI; uint8_t m_fgcSEINumModelValuesMinus1 [MAX_NUM_COMPONENT]; @@ -666,7 +659,6 @@ protected: uint8_t m_fgcSEIIntensityIntervalLowerBound [MAX_NUM_COMPONENT][MAX_NUM_INTENSITIES]; uint8_t m_fgcSEIIntensityIntervalUpperBound [MAX_NUM_COMPONENT][MAX_NUM_INTENSITIES]; uint32_t m_fgcSEICompModelValue [MAX_NUM_COMPONENT][MAX_NUM_INTENSITIES][MAX_NUM_MODEL_VALUES]; -#endif // cll SEI bool m_cllSEIEnabled; uint16_t m_cllSEIMaxContentLevel; @@ -863,10 +855,8 @@ protected: CfgVPSParameters m_cfgVPSParameters; -#if JVET_X0143_ALF_APS_CHANGES int m_maxNumAlfAps; bool m_constantJointCbCrSignFlag; -#endif bool m_alf; ///< Adaptive Loop Filter bool m_alfTrueOrg; double m_alfStrengthLuma; @@ -1035,14 +1025,8 @@ public: void setNoGdrConstraintFlag(bool val) { m_noGdrConstraintFlag = val; } bool getNoApsConstraintFlag() const { return m_noApsConstraintFlag; } void setNoApsConstraintFlag(bool val) { m_noApsConstraintFlag = val; } -#if JVET_X0079_MODIFIED_BITRATE bool getAllRapPicturesFlag() const { return m_allRapPicturesFlag; } void setAllRapPicturesFlag(bool val) { m_allRapPicturesFlag = val; } -#else - bool getGeneralLowerBitRateConstraintFlag() const { return m_generalLowerBitRateConstraintFlag; } - void setGeneralLowerBitRateConstraintFlag(bool val) { m_generalLowerBitRateConstraintFlag = val; } -#endif -#if JVET_X0076_X0095_V2_GCI bool getNoExtendedPrecisionProcessingConstraintFlag() const { return m_noExtendedPrecisionProcessingConstraintFlag; } void setNoExtendedPrecisionProcessingConstraintFlag(bool val) { m_noExtendedPrecisionProcessingConstraintFlag = val; } bool getNoTsResidualCodingRiceConstraintFlag() const { return m_noTsResidualCodingRiceConstraintFlag; } @@ -1053,7 +1037,6 @@ public: void setNoPersistentRiceAdaptationConstraintFlag(bool val) { m_noPersistentRiceAdaptationConstraintFlag = val; } bool getNoReverseLastSigCoeffConstraintFlag() const { return m_noReverseLastSigCoeffConstraintFlag; } void setNoReverseLastSigCoeffConstraintFlag(bool val) { m_noReverseLastSigCoeffConstraintFlag = val; } -#endif void setFrameRate ( int i ) { m_iFrameRate = i; } void setFrameSkip ( uint32_t i ) { m_FrameSkip = i; } @@ -1890,7 +1873,6 @@ public: uint8_t getFilmGrainCharactersticsSEILog2ScaleFactor() { return m_fgcSEILog2ScaleFactor; } void setFGCSEICompModelPresent(bool b, int index) { m_fgcSEICompModelPresent[index] = b; } bool getFGCSEICompModelPresent(int index) { return m_fgcSEICompModelPresent[index]; } -#if JVET_X0048_X0103_FILM_GRAIN bool* getFGCSEICompModelPresent () { return m_fgcSEICompModelPresent; } void setFilmGrainAnalysisEnabled (bool b) { m_fgcSEIAnalysisEnabled = b; } bool getFilmGrainAnalysisEnabled () { return m_fgcSEIAnalysisEnabled; } @@ -1906,7 +1888,6 @@ public: uint8_t getFGCSEIIntensityIntervalUpperBound(int index, int ctr) { return m_fgcSEIIntensityIntervalUpperBound[index][ctr]; } void setFGCSEICompModelValue (uint32_t v, int index, int ctr, int modelCtr) { m_fgcSEICompModelValue[index][ctr][modelCtr] = v; } uint32_t getFGCSEICompModelValue (int index, int ctr, int modelCtr) { return m_fgcSEICompModelValue[index][ctr][modelCtr]; } -#endif // cll SEI void setCLLSEIEnabled(bool b) { m_cllSEIEnabled = b; } bool getCLLSEIEnabled() { return m_cllSEIEnabled; } @@ -2303,12 +2284,10 @@ public: void setDebugCTU( int i ) { m_debugCTU = i; } int getDebugCTU() const { return m_debugCTU; } -#if JVET_X0143_ALF_APS_CHANGES void setMaxNumALFAPS(int n) { m_maxNumAlfAps = n; } int getMaxNumALFAPS() const { return m_maxNumAlfAps; } void setConstantJointCbCrSignFlag(bool b) { m_constantJointCbCrSignFlag = b; } int getConstantJointCbCrSignFlag() const { return m_constantJointCbCrSignFlag; } -#endif void setUseALF( bool b ) { m_alf = b; } bool getUseALF() const { return m_alf; } diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index a39bfbf010134c8eaa41fd3712e6c69111f1ce6c..6d58f94c94fe7b92f2b09c53975a40831d474629 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -207,12 +207,10 @@ void EncGOP::destroy() delete m_picOrig; m_picOrig = NULL; } -#if JVET_X0048_X0103_FILM_GRAIN if (m_pcCfg->getFilmGrainAnalysisEnabled()) { m_FGAnalyser.destroy(); } -#endif } void EncGOP::init ( EncLib* pcEncLib ) @@ -233,12 +231,10 @@ void EncGOP::init ( EncLib* pcEncLib ) m_AUWriterIf = pcEncLib->getAUWriterIf(); - #if JVET_X0048_X0103_FILM_GRAIN if (m_pcCfg->getFilmGrainAnalysisEnabled()) { m_FGAnalyser.init(m_pcCfg->getSourceWidth(), m_pcCfg->getSourceHeight(), m_pcCfg->getChromaFormatIdc(), *(BitDepths *) pcEncLib->getBitDepth(), m_pcCfg->getFGCSEICompModelPresent()); } -#endif #if WCG_EXT if (m_pcCfg->getLmcs()) @@ -381,9 +377,7 @@ int EncGOP::xWritePPS( AccessUnit &accessUnit, const PPS *pps, const int layerId OutputNALUnit nalu(NAL_UNIT_PPS); m_HLSWriter->setBitstream( &nalu.m_Bitstream ); nalu.m_nuhLayerId = layerId; -#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT nalu.m_temporalId = accessUnit.temporalId; -#endif CHECK( nalu.m_temporalId < accessUnit.temporalId, "TemporalId shall be greater than or equal to the TemporalId of the layer access unit containing the NAL unit" ); m_HLSWriter->codePPS( pps ); accessUnit.push_back(new NALUnitEBSP(nalu)); @@ -752,15 +746,10 @@ void EncGOP::xCreateIRAPLeadingSEIMessages (SEIMessages& seiMessages, const SPS seiMessages.push_back(seiSampleAspectRatioInfo); } // film grain -#if JVET_X0048_X0103_FILM_GRAIN if (m_pcCfg->getFilmGrainCharactersticsSEIEnabled() && !m_pcCfg->getFilmGrainCharactersticsSEIPerPictureSEI()) -#else - if (m_pcCfg->getFilmGrainCharactersticsSEIEnabled()) -#endif { SEIFilmGrainCharacteristics *sei = new SEIFilmGrainCharacteristics; m_seiEncoder.initSEIFilmGrainCharacteristics(sei); -#if JVET_X0048_X0103_FILM_GRAIN if (m_pcCfg->getFilmGrainAnalysisEnabled()) { sei->m_log2ScaleFactor = m_FGAnalyser.getLog2scaleFactor(); @@ -772,7 +761,6 @@ void EncGOP::xCreateIRAPLeadingSEIMessages (SEIMessages& seiMessages, const SPS } } } -#endif seiMessages.push_back(sei); } @@ -916,7 +904,6 @@ void EncGOP::xCreatePerPictureSEIMessages (int picInGOP, SEIMessages& seiMessage } } -#if JVET_X0048_X0103_FILM_GRAIN if (m_pcCfg->getFilmGrainCharactersticsSEIEnabled() && m_pcCfg->getFilmGrainCharactersticsSEIPerPictureSEI()) { SEIFilmGrainCharacteristics *fgcSEI = new SEIFilmGrainCharacteristics; @@ -934,7 +921,6 @@ void EncGOP::xCreatePerPictureSEIMessages (int picInGOP, SEIMessages& seiMessage } seiMessages.push_back(fgcSEI); } -#endif } void EncGOP::xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages, const std::vector<int> &targetOLSs, const std::vector<int> &targetLayers, const std::vector<uint16_t>& subpicIDs, uint16_t maxSubpicIdInPic) @@ -2149,7 +2135,6 @@ void EncGOP::xPicInitLMCS(Picture *pic, PicHeader *picHeader, Slice *slice) } } -#if JVET_X0137_ETSRC_RLSCP_DETERMINATION void EncGOP::computeSignalling(Picture* pcPic, Slice* pcSlice) const { bool deriveETSRC = (!pcSlice->getTSResidualCodingDisabledFlag() && pcSlice->getSPS()->getSpsRangeExtension().getTSRCRicePresentFlag()); @@ -2229,7 +2214,6 @@ void EncGOP::computeSignalling(Picture* pcPic, Slice* pcSlice) const } } -#endif // ==================================================================================================================== // Public member functions // ==================================================================================================================== @@ -2333,7 +2317,6 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, iNumPicRcvd, iTimeOffset, pcPic, pocCurr, isField ); picHeader = pcPic->cs->picHeader; picHeader->setSPSId( pcPic->cs->pps->getSPSId() ); -#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT if( getNalUnitType(pocCurr, m_iLastIDR, isField) == NAL_UNIT_CODED_SLICE_RASL && m_pcCfg->getRprRASLtoolSwitch() && m_pcCfg->getUseWrapAround() ) { picHeader->setPPSId( 4 ); @@ -2343,9 +2326,6 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, { picHeader->setPPSId( pcPic->cs->pps->getPPSId() ); } -#else - picHeader->setPPSId( pcPic->cs->pps->getPPSId() ); -#endif picHeader->setSplitConsOverrideFlag(false); // initial two flags to be false picHeader->setPicInterSliceAllowedFlag(false); @@ -3062,9 +3042,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, pcSlice->setDisableLmChromaCheck( true ); picHeader->setDmvrDisabledFlag( true ); xUpdateRPRtmvp( picHeader, pcSlice ); -#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT CHECK( pcSlice->getPPS()->getWrapAroundEnabledFlag(), "pps_ref_wraparound_enabled_flag should be 0 with constrained RASL encoding" ); -#endif } double lambda = 0.0; @@ -3161,11 +3139,9 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, } if (pcSlice->getSPS()->getJointCbCrEnabledFlag()) { -#if JVET_X0143_ALF_APS_CHANGES if (m_pcCfg->getConstantJointCbCrSignFlag()) pcPic->cs->picHeader->setJointCbCrSignFlag(m_pcCfg->getConstantJointCbCrSignFlag()-1); else -#endif m_pcSliceEncoder->setJointCbCrModes(*pcPic->cs, Position(0, 0), pcPic->cs->area.lumaSize()); } if (!pcSlice->getSPS()->getSpsRangeExtension().getReverseLastSigCoeffEnabledFlag() || pcSlice->getSliceQp() > 12) @@ -3320,12 +3296,10 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, m_pcEncLib->getInterSearch()->setClipMvInSubPic(false); } -#if JVET_X0137_ETSRC_RLSCP_DETERMINATION if ( pcSlice->isIntra() && (iPOCLast == 0 || m_pcCfg->getIntraPeriod() > 1)) { computeSignalling(pcPic, pcSlice); } -#endif m_pcSliceEncoder->precompressSlice( pcPic ); m_pcSliceEncoder->compressSlice ( pcPic, false, false ); @@ -3566,20 +3540,12 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, // Get active ALF APSs from picture/slice header const std::vector<int> sliceApsIdsLuma = pcSlice->getAlfApsIdsLuma(); -#if JVET_X0143_ALF_APS_CHANGES m_pcALF->setApsIdStart(m_pcCfg->getMaxNumALFAPS()); -#else - m_pcALF->setApsIdStart( ALF_CTB_MAX_NUM_APS ); -#endif ParameterSetMap<APS>* apsMap = m_pcEncLib->getApsMap(); apsMap->clearActive(); -#if JVET_X0143_ALF_APS_CHANGES for (int apsId = 0; apsId < m_pcCfg->getMaxNumALFAPS(); apsId++) -#else - for( int apsId = 0; apsId < ALF_CTB_MAX_NUM_APS; apsId++ ) -#endif { int psId = ( apsId << NUM_APS_TYPE_LEN ) + ALF_APS; APS* aps = apsMap->getPS( psId ); @@ -3621,11 +3587,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, // Assign tne correct APS to slice and emulate the setting of ALF start APS ID int changedApsId = -1; -#if JVET_X0143_ALF_APS_CHANGES for (int apsId = m_pcCfg->getMaxNumALFAPS() - 1; apsId >= 0; apsId--) -#else - for (int apsId = ALF_CTB_MAX_NUM_APS - 1; apsId >= 0; apsId--) -#endif { ParameterSetMap<APS>* apsMap = m_pcEncLib->getApsMap(); int psId = ( apsId << NUM_APS_TYPE_LEN ) + ALF_APS; @@ -3664,7 +3626,6 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, } } -#if JVET_X0048_X0103_FILM_GRAIN if (m_pcCfg->getFilmGrainAnalysisEnabled()) { int picPoc = pcPic->getPOC(); @@ -3694,7 +3655,6 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, m_FGAnalyser.estimate_grain(pcPic); } } -#endif if( encPic || decPic ) { @@ -3796,11 +3756,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, if (pcSlice->getSPS()->getALFEnabledFlag() && (pcSlice->getAlfEnabledFlag(COMPONENT_Y) || pcSlice->getCcAlfCbEnabledFlag() || pcSlice->getCcAlfCrEnabledFlag())) { -#if JVET_X0143_ALF_APS_CHANGES for (int apsId = 0; apsId < m_pcCfg->getMaxNumALFAPS(); apsId++) -#else - for (int apsId = 0; apsId < ALF_CTB_MAX_NUM_APS; apsId++) -#endif { ParameterSetMap<APS> *apsMap = m_pcEncLib->getApsMap(); diff --git a/source/Lib/EncoderLib/EncGOP.h b/source/Lib/EncoderLib/EncGOP.h index 9db6e9f0575aa61f20723979fa974ca84f5f189b..a0c206b4873e213c7198b59974e95570fac877ec 100644 --- a/source/Lib/EncoderLib/EncGOP.h +++ b/source/Lib/EncoderLib/EncGOP.h @@ -56,9 +56,7 @@ #if EXTENSION_360_VIDEO #include "AppEncHelper360/TExt360EncGop.h" #endif -#if JVET_X0048_X0103_FILM_GRAIN #include "CommonLib/SEIFilmGrainAnalyzer.h" -#endif #include "Analyze.h" #include "RateCtrl.h" @@ -151,9 +149,7 @@ private: SEIWriter m_seiWriter; -#if JVET_X0048_X0103_FILM_GRAIN FGAnalyser m_FGAnalyser; -#endif Picture * m_picBg; Picture * m_picOrig; @@ -360,9 +356,7 @@ protected: #endif void xCreateExplicitReferencePictureSetFromReference( Slice* slice, PicList& rcListPic, const ReferencePictureList *rpl0, const ReferencePictureList *rpl1 ); bool xCheckMaxTidILRefPics(int layerIdx, Picture* refPic, bool currentPicIsIRAP); -#if JVET_X0137_ETSRC_RLSCP_DETERMINATION void computeSignalling(Picture* pcPic, Slice* pcSlice) const; -#endif };// END CLASS DEFINITION EncGOP //! \} diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index edd78f26e85abe8a4ffc5e01a34f60d8f916f46e..e887671efd3e8c219618bb9e357b24a4309d640e 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -293,7 +293,6 @@ void EncLib::init(AUWriterIf *auWriterIf) xInitPPS(pps2, sps0); xInitPPSforLT(pps2); } -#if JVET_X0101_ADD_WRAPAROUND_CONSTRAINT if( this->m_rprRASLtoolSwitch && m_wrapAround ) { PPS &pps4 = *(m_ppsMap.allocatePS(4)); @@ -304,7 +303,6 @@ void EncLib::init(AUWriterIf *auWriterIf) pps4.setPicWidthMinusWrapAroundOffset( 0 ); pps4.setWrapAroundOffset ( 0 ); } -#endif xInitPicHeader(m_picHeader, sps0, pps0); // initialize processing unit classes @@ -476,11 +474,7 @@ void EncLib::deletePicBuffer() m_cListPic.clear(); } -#if JVET_X0048_X0103_FILM_GRAIN bool EncLib::encodePrep( bool flush, PelStorage* pcPicYuvOrg, PelStorage* cPicYuvTrueOrg, PelStorage* pcPicYuvFilteredOrg, PelStorage* pcPicYuvFilteredOrgForFG, const InputColourSpaceConversion snrCSC, std::list<PelUnitBuf*>& rcListPicYuvRecOut, int& iNumEncoded ) -#else -bool EncLib::encodePrep( bool flush, PelStorage* pcPicYuvOrg, PelStorage* cPicYuvTrueOrg, PelStorage* pcPicYuvFilteredOrg, const InputColourSpaceConversion snrCSC, std::list<PelUnitBuf*>& rcListPicYuvRecOut, int& iNumEncoded ) -#endif { if( m_compositeRefEnabled && m_cGOPEncoder.getPicBg()->getSpliceFull() && m_iPOCLast >= 10 && m_iNumPicRcvd == 0 && m_cGOPEncoder.getEncodedLTRef() == false ) { @@ -613,12 +607,10 @@ bool EncLib::encodePrep( bool flush, PelStorage* pcPicYuvOrg, PelStorage* cPicYu { pcPicCurr->M_BUFS( 0, PIC_FILTERED_ORIGINAL ).swap( *pcPicYuvFilteredOrg ); } -#if JVET_X0048_X0103_FILM_GRAIN if (m_fgcSEIAnalysisEnabled) { pcPicCurr->M_BUFS( 0, PIC_FILTERED_ORIGINAL_FG ).swap( *pcPicYuvFilteredOrgForFG ); } -#endif } #if GDR_ENABLED PicHeader *picHeader = new PicHeader(); @@ -901,9 +893,7 @@ void EncLib::xGetNewPicBuffer ( std::list<PelUnitBuf*>& rcListPicYuvRecOut, Pict { rpcPic = new Picture; rpcPic->create( sps.getChromaFormatIdc(), Size( pps.getPicWidthInLumaSamples(), pps.getPicHeightInLumaSamples() ), sps.getMaxCUWidth(), sps.getMaxCUWidth() + 16, false, m_layerId, m_gopBasedTemporalFilterEnabled -#if JVET_X0048_X0103_FILM_GRAIN , m_fgcSEIAnalysisEnabled -#endif ); if (m_resChangeInClvsEnabled) { @@ -1144,18 +1134,12 @@ void EncLib::xInitSPS( SPS& sps ) cinfo->setNoCraConstraintFlag(m_noCraConstraintFlag); cinfo->setNoGdrConstraintFlag(m_noGdrConstraintFlag); cinfo->setNoApsConstraintFlag(m_noApsConstraintFlag); -#if JVET_X0079_MODIFIED_BITRATE cinfo->setAllRapPicturesFlag(m_allRapPicturesFlag); -#else - cinfo->setLowerBitRateConstraintFlag(m_generalLowerBitRateConstraintFlag); -#endif -#if JVET_X0076_X0095_V2_GCI cinfo->setNoExtendedPrecisionProcessingConstraintFlag(m_noExtendedPrecisionProcessingConstraintFlag); cinfo->setNoTsResidualCodingRiceConstraintFlag(m_noTsResidualCodingRiceConstraintFlag); cinfo->setNoRrcRiceExtensionConstraintFlag(m_noRrcRiceExtensionConstraintFlag); cinfo->setNoPersistentRiceAdaptationConstraintFlag(m_noPersistentRiceAdaptationConstraintFlag); cinfo->setNoReverseLastSigCoeffConstraintFlag(m_noReverseLastSigCoeffConstraintFlag); -#endif profileTierLevel->setLevelIdc (m_level); profileTierLevel->setTierFlag (m_levelTier); diff --git a/source/Lib/EncoderLib/EncLib.h b/source/Lib/EncoderLib/EncLib.h index 24119cc12d790f9b72da701a78dca7d206f97b28..6b8e800669c3b80ac9870f039280c4d699a8d336 100644 --- a/source/Lib/EncoderLib/EncLib.h +++ b/source/Lib/EncoderLib/EncLib.h @@ -208,7 +208,6 @@ public: // ------------------------------------------------------------------------------------------------------------------- /// encode several number of pictures until end-of-sequence -#if JVET_X0048_X0103_FILM_GRAIN bool encodePrep( bool bEos, PelStorage* pcPicYuvOrg, PelStorage* pcPicYuvTrueOrg, @@ -217,15 +216,6 @@ public: const InputColourSpaceConversion snrCSC, // used for SNR calculations. Picture in original colour space. std::list<PelUnitBuf*>& rcListPicYuvRecOut, int& iNumEncoded ); -#else - bool encodePrep( bool bEos, - PelStorage* pcPicYuvOrg, - PelStorage* pcPicYuvTrueOrg, - PelStorage* pcPicYuvFilteredOrg, - const InputColourSpaceConversion snrCSC, // used for SNR calculations. Picture in original colour space. - std::list<PelUnitBuf*>& rcListPicYuvRecOut, - int& iNumEncoded ); -#endif bool encode( const InputColourSpaceConversion snrCSC, // used for SNR calculations. Picture in original colour space. std::list<PelUnitBuf*>& rcListPicYuvRecOut, diff --git a/source/Lib/EncoderLib/EncSlice.cpp b/source/Lib/EncoderLib/EncSlice.cpp index 3cc7f917dd497435639a9ff1216be661a6795d02..2a360e96dfa468c1881878c832e7ebf4af9211b5 100644 --- a/source/Lib/EncoderLib/EncSlice.cpp +++ b/source/Lib/EncoderLib/EncSlice.cpp @@ -1774,11 +1774,9 @@ void EncSlice::encodeCtus( Picture* pcPic, const bool bCompressEntireSlice, cons { // Top is available, we use it. pCABACWriter->getCtx() = pEncLib->m_entropyCodingSyncContextState; -#if JVET_X0128_V2_WPP pCABACWriter->getCtx().riceStatReset( pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), pcSlice->getSPS()->getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag()); -#endif cs.setPrevPLT(pEncLib->m_palettePredictorSyncState); } prevQP[0] = prevQP[1] = pcSlice->getSliceQp(); @@ -2059,11 +2057,9 @@ void EncSlice::encodeSlice ( Picture* pcPic, OutputBitstream* pcSubstreams, ui { // Top is available, so use it. m_CABACWriter->getCtx() = m_entropyCodingSyncContextState; -#if JVET_X0128_V2_WPP m_CABACWriter->getCtx().riceStatReset( pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), pcSlice->getSPS()->getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag()); -#endif cs.setPrevPLT(m_palettePredictorSyncState); } } diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 0a4732be4b7adaec0dffd8aa7bb4019e6fcd1a6f..1eeb5a6d4693a2267bd272178cdfa1fa23bbdf90 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -742,7 +742,6 @@ void SEIEncoder::initSEIFilmGrainCharacteristics(SEIFilmGrainCharacteristics *se for (int i = 0; i < MAX_NUM_COMPONENT; i++) { seiFilmGrain->m_compModel[i].presentFlag = m_pcCfg->getFGCSEICompModelPresent(i); -#if JVET_X0048_X0103_FILM_GRAIN if (seiFilmGrain->m_compModel[i].presentFlag) { seiFilmGrain->m_compModel[i].numModelValues = 1 + m_pcCfg->getFGCSEINumModelValuesMinus1(i); @@ -759,7 +758,6 @@ void SEIEncoder::initSEIFilmGrainCharacteristics(SEIFilmGrainCharacteristics *se } } } -#endif } } diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index d73b196064472b63851aa81b3c1dce14137615fb..b8f98f7cc4608f085813d6b3a567f1fd1c108095 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -1219,22 +1219,14 @@ void SEIWriter::xWriteSEIFilmGrainCharacteristics(const SEIFilmGrainCharacterist for (int c = 0; c<3; c++) { const SEIFilmGrainCharacteristics::CompModel &cm = sei.m_compModel[c]; -#if JVET_X0048_X0103_FILM_GRAIN const uint32_t numIntensityIntervals = (uint32_t) cm.numIntensityIntervals; -#else - const uint32_t numIntensityIntervals = (uint32_t) cm.intensityValues.size(); -#endif const uint32_t numModelValues = cm.numModelValues; WRITE_FLAG(sei.m_compModel[c].presentFlag && numIntensityIntervals>0 && numModelValues>0, "fg_comp_model_present_flag[c]"); } for (uint32_t c = 0; c<3; c++) { const SEIFilmGrainCharacteristics::CompModel &cm = sei.m_compModel[c]; -#if JVET_X0048_X0103_FILM_GRAIN const uint32_t numIntensityIntervals = (uint32_t) cm.numIntensityIntervals; -#else - const uint32_t numIntensityIntervals = (uint32_t) cm.intensityValues.size(); -#endif const uint32_t numModelValues = cm.numModelValues; if (cm.presentFlag && numIntensityIntervals>0 && numModelValues>0) { @@ -1247,9 +1239,6 @@ void SEIWriter::xWriteSEIFilmGrainCharacteristics(const SEIFilmGrainCharacterist const SEIFilmGrainCharacteristics::CompModelIntensityValues &cmiv = cm.intensityValues[interval]; WRITE_CODE(cmiv.intensityIntervalLowerBound, 8, "fg_intensity_interval_lower_bound[c][i]"); WRITE_CODE(cmiv.intensityIntervalUpperBound, 8, "fg_intensity_interval_upper_bound[c][i]"); -#if !JVET_X0048_X0103_FILM_GRAIN - assert(cmiv.compModelValue.size() == numModelValues); -#endif for (uint32_t j = 0; j<cm.numModelValues; j++) { WRITE_SVLC(cmiv.compModelValue[j], "fg_comp_model_value[c][i]"); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 5a7b39339efffea89ff488a9d95340cdf8b520e9..cadea7c835c0f0c96ed6425e51a3e86b8e264ec9 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -2726,34 +2726,18 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo, const Profil profile == Profile::MAIN_12_444 || profile == Profile::MAIN_12_444_INTRA || profile == Profile::MAIN_12_444_STILL_PICTURE || profile == Profile::MAIN_16_444 || profile == Profile::MAIN_16_444_INTRA || profile == Profile::MAIN_16_444_STILL_PICTURE) { -#if JVET_X0079_MODIFIED_BITRATE -#if JVET_X0076_X0095_V2_GCI int numAdditionalBits = 6; -#else - int numAdditionalBits = 1; -#endif WRITE_CODE(numAdditionalBits, 8, "gci_num_additional_bits"); WRITE_FLAG(cinfo->getAllRapPicturesFlag() ? 1 : 0, "gci_all_rap_pictures_flag"); -#if JVET_X0076_X0095_V2_GCI WRITE_FLAG(cinfo->getNoExtendedPrecisionProcessingConstraintFlag() ? 1 : 0, "gci_no_extended_precision_processing_constraint_flag"); WRITE_FLAG(cinfo->getNoTsResidualCodingRiceConstraintFlag() ? 1 : 0, "gci_no_ts_residual_coding_rice_constraint_flag"); WRITE_FLAG(cinfo->getNoRrcRiceExtensionConstraintFlag() ? 1 : 0, "gci_no_rrc_rice_extension_constraint_flag"); WRITE_FLAG(cinfo->getNoPersistentRiceAdaptationConstraintFlag() ? 1 : 0, "gci_no_persistent_rice_adaptation_constraint_flag"); WRITE_FLAG(cinfo->getNoReverseLastSigCoeffConstraintFlag() ? 1 : 0, "gci_no_reverse_last_sig_coeff_constraint_flag"); -#endif -#else - int numReservedBits = 1; - WRITE_CODE(numReservedBits, 8, "gci_num_reserved_bits"); - WRITE_FLAG(cinfo->getLowerBitRateConstraintFlag() ? 1 : 0, "general_lower_bit_rate_constraint_flag"); -#endif } else { -#if JVET_X0079_MODIFIED_BITRATE WRITE_CODE(0, 8, "gci_num_additional_bits"); -#else - WRITE_CODE(0, 8, "gci_num_reserved_bits"); -#endif } } diff --git a/source/Lib/Utilities/program_options_lite.h b/source/Lib/Utilities/program_options_lite.h index 2b01e5eeec9afe501d35d29888fc1578b6299aae..93e754232e4f65ec08b3e1ff717fc64220934c53 100644 --- a/source/Lib/Utilities/program_options_lite.h +++ b/source/Lib/Utilities/program_options_lite.h @@ -38,17 +38,13 @@ #define JVET_O0549_ENCODER_ONLY_FILTER_POL 1 // JVET-O0549: Encoder-only GOP-based temporal filter. Program Options Lite related changes. -#define JVET_X0048_X0103_FILM_GRAIN 1 // JVET-X0048-X0103: SMPTE RDD-5 based film grain analysis and synthesis model for film grain characterstics (FGC) SEI -#if JVET_X0048_X0103_FILM_GRAIN #include <vector> -#endif #ifndef __PROGRAM_OPTIONS_LITE__ #define __PROGRAM_OPTIONS_LITE__ //! \ingroup TAppCommon //! \{ -#if JVET_X0048_X0103_FILM_GRAIN using namespace std; template <class T> @@ -74,7 +70,6 @@ struct SMultiValueInput istream& readValues(std::istream &in); }; -#endif namespace df {