diff --git a/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp b/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp index acd32b00d5e8bea73b785fc1bbe41b7db3739284..fdc5a03e5e204a7ba3a742fa909a44dfe310ac56 100644 --- a/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp +++ b/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp @@ -643,11 +643,7 @@ uint32_t BitstreamExtractorApp::decode() } // Remove NAL units with nal_unit_type not equal to any of VPS_NUT, DPS_NUT, and EOB_NUT and with nuh_layer_id not included in the list LayerIdInOls[targetOlsIdx]. NalUnitType t = nalu.m_nalUnitType; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS bool isSpecialNalTypes = t == NAL_UNIT_OPI || t == NAL_UNIT_VPS || t == NAL_UNIT_DCI || t == NAL_UNIT_EOB; -#else - bool isSpecialNalTypes = t == NAL_UNIT_VPS || t == NAL_UNIT_DCI || t == NAL_UNIT_EOB; -#endif vps = m_parameterSetManager.getVPS(m_vpsId); if (m_vpsId == 0) { diff --git a/source/App/DecoderApp/DecApp.cpp b/source/App/DecoderApp/DecApp.cpp index fbb611b4006c1c1664cfdc3684a0d456d05c47e6..227f27c983cd7217c564e24db8d174baec0ace5d 100644 --- a/source/App/DecoderApp/DecApp.cpp +++ b/source/App/DecoderApp/DecApp.cpp @@ -123,7 +123,6 @@ uint32_t DecApp::decode() } } -#if JVET_T0053_ANNOTATED_REGIONS_SEI // clear contents of annotated-Regions-SEI output file if (!m_annotatedRegionsSEIFileName.empty()) { @@ -134,7 +133,6 @@ uint32_t DecApp::decode() exit(EXIT_FAILURE); } } -#endif // main decoder loop bool loopFiltered[MAX_VPS_LAYERS] = { false }; @@ -164,10 +162,8 @@ uint32_t DecApp::decode() } }; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS m_cDecLib.setHTidExternalSetFlag(m_mTidExternalSet); m_cDecLib.setTOlsIdxExternalFlag(m_tOlsIdxTidExternalSet); -#endif while (!!bitstreamFile) { @@ -247,7 +243,6 @@ uint32_t DecApp::decode() } } m_cDecLib.decode(nalu, m_iSkipFrame, m_iPOCLastDisplay, m_targetOlsIdx); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if (nalu.m_nalUnitType == NAL_UNIT_OPI) { if (!m_cDecLib.getHTidExternalSetFlag() && m_cDecLib.getOPI()->getHtidInfoPresentFlag()) @@ -256,14 +251,9 @@ uint32_t DecApp::decode() } m_cDecLib.setHTidOpiSetFlag(m_cDecLib.getOPI()->getHtidInfoPresentFlag()); } -#endif if (nalu.m_nalUnitType == NAL_UNIT_VPS) { -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS m_cDecLib.deriveTargetOutputLayerSet( m_cDecLib.getVPS()->m_targetOlsIdx ); -#else - m_cDecLib.deriveTargetOutputLayerSet( m_targetOlsIdx ); -#endif m_targetDecLayerIdSet = m_cDecLib.getVPS()->m_targetLayerIdSet; m_targetOutputLayerIdSet = m_cDecLib.getVPS()->m_targetOutputLayerIdSet; } @@ -357,12 +347,10 @@ uint32_t DecApp::decode() m_cVideoIOYuvReconFile[nalu.m_nuhLayerId].setBitdepthShift(channelType, reconBitdepth - fileBitdepth); } } -#if JVET_T0053_ANNOTATED_REGIONS_SEI if (!m_annotatedRegionsSEIFileName.empty()) { xOutputAnnotatedRegions(pcListPic); } -#endif // write reconstruction to file if( bNewPicture ) { @@ -371,24 +359,17 @@ uint32_t DecApp::decode() } if (nalu.m_nalUnitType == NAL_UNIT_EOS) { -#if JVET_T0053_ANNOTATED_REGIONS_SEI if (!m_annotatedRegionsSEIFileName.empty() && bNewPicture) { xOutputAnnotatedRegions(pcListPic); } -#endif setOutputPicturePresentInStream(); xWriteOutput( pcListPic, nalu.m_temporalId ); m_cDecLib.setFirstSliceInPicture (false); } // write reconstruction to file -- for additional bumping as defined in C.5.2.3 -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if (!bNewPicture && ((nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_IRAP_VCL_11) || (nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_IDR_W_RADL && nalu.m_nalUnitType <= NAL_UNIT_CODED_SLICE_GDR))) -#else - if (!bNewPicture && ((nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_IRAP_VCL_12) - || (nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_IDR_W_RADL && nalu.m_nalUnitType <= NAL_UNIT_CODED_SLICE_GDR))) -#endif { setOutputPicturePresentInStream(); #if JVET_S0078_NOOUTPUTPRIORPICFLAG @@ -426,19 +407,11 @@ uint32_t DecApp::decode() } } #if JVET_S0078_NOOUTPUTPRIORPICFLAG -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if ((nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL && nalu.m_nalUnitType <= NAL_UNIT_OPI) || (nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_IDR_W_RADL && nalu.m_nalUnitType <= NAL_UNIT_CODED_SLICE_GDR)) { firstSliceInAU = false; } -#else - if ((nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_IRAP_VCL_12) - || (nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_IDR_W_RADL && nalu.m_nalUnitType <= NAL_UNIT_CODED_SLICE_GDR)) - { - firstSliceInAU = false; - } -#endif #endif if( bNewPicture ) { @@ -475,12 +448,10 @@ uint32_t DecApp::decode() #endif } } -#if JVET_T0053_ANNOTATED_REGIONS_SEI if (!m_annotatedRegionsSEIFileName.empty()) { xOutputAnnotatedRegions(pcListPic); } -#endif // May need to check again one more time as in case one the bitstream has only one picture, the first check may miss it setOutputPicturePresentInStream(); CHECK(!outputPicturePresentInBitstream, "It is required that there shall be at least one picture with PictureOutputFlag equal to 1 in the bitstream") @@ -913,7 +884,6 @@ void DecApp::xFlushOutput( PicList* pcListPic, const int layerId ) m_iPOCLastDisplay = -MAX_INT; } -#if JVET_T0053_ANNOTATED_REGIONS_SEI /** \param pcListPic list of pictures to be written to file */ void DecApp::xOutputAnnotatedRegions(PicList* pcListPic) @@ -1060,7 +1030,6 @@ void DecApp::xOutputAnnotatedRegions(PicList* pcListPic) iterPic++; } } -#endif /** \param nalu Input nalu to check whether its LayerId is within targetDecLayerIdSet */ diff --git a/source/App/DecoderApp/DecApp.h b/source/App/DecoderApp/DecApp.h index 2bb6ac44e6031b60f0c997d220d42ab2f23666db..d3573294b6a82715728376ca35ebcf09307625ac 100644 --- a/source/App/DecoderApp/DecApp.h +++ b/source/App/DecoderApp/DecApp.h @@ -70,11 +70,9 @@ private: bool m_newCLVS[MAX_NUM_LAYER_IDS]; ///< used to record a new CLVSS -#if JVET_T0053_ANNOTATED_REGIONS_SEI SEIAnnotatedRegions::AnnotatedRegionHeader m_arHeader; ///< AR header std::map<uint32_t, SEIAnnotatedRegions::AnnotatedRegionObject> m_arObjects; ///< AR object pool std::map<uint32_t, std::string> m_arLabels; ///< AR label pool -#endif private: bool xIsNaluWithinTargetDecLayerIdSet( const InputNALUnit* nalu ) const; ///< check whether given Nalu is within targetDecLayerIdSet @@ -99,9 +97,7 @@ private: bool isNewAccessUnit(bool newPicture, ifstream *bitstreamFile, class InputByteStream *bytestream); ///< check if next NAL unit will be the first NAL unit from a new access unit void writeLineToOutputLog(Picture * pcPic); -#if JVET_T0053_ANNOTATED_REGIONS_SEI void xOutputAnnotatedRegions(PicList* pcListPic); -#endif }; diff --git a/source/App/DecoderApp/DecAppCfg.cpp b/source/App/DecoderApp/DecAppCfg.cpp index 48be8fc0656f6d5672a1df8c05269650e640b73e..036d7f54b9b370a2a2a27ec0db9f6f845e0c90b8 100644 --- a/source/App/DecoderApp/DecAppCfg.cpp +++ b/source/App/DecoderApp/DecAppCfg.cpp @@ -88,22 +88,15 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) ("OutputBitDepth,d", m_outputBitDepth[CHANNEL_TYPE_LUMA], 0, "bit depth of YUV output luma component (default: use 0 for native depth)") ("OutputBitDepthC,d", m_outputBitDepth[CHANNEL_TYPE_CHROMA], 0, "bit depth of YUV output chroma component (default: use luma output bit-depth)") ("OutputColourSpaceConvert", outputColourSpaceConvert, string(""), "Colour space conversion to apply to input 444 video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(false)) -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS ("MaxTemporalLayer,t", m_iMaxTemporalLayer, 500, "Maximum Temporal Layer to be decoded. -1 to decode all layers") ("TargetOutputLayerSet,p", m_targetOlsIdx, 500, "Target output layer set index") -#else - ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers") - ("TargetOutputLayerSet,p", m_targetOlsIdx, -1, "Target output layer set index") -#endif ("SEIDecodedPictureHash,-dph",m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n" "\t1: check hash in SEI messages if available in the bitstream\n" "\t0: ignore SEI message") ("SEINoDisplay", m_decodedNoDisplaySEIEnabled, true, "Control handling of decoded no display SEI messages") ("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") -#if JVET_T0053_ANNOTATED_REGIONS_SEI ("SEIAnnotatedRegionsInfoFilename", m_annotatedRegionsSEIFileName, string(""), "Annotated regions output file name. If empty, no object information will be saved (ignore SEI message)\n") -#endif ("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 ("360DumpFile", m_outputDecoded360SEIMessagesFilename, string(""), "When non empty, output decoded 360 SEI messages to the indicated file.\n") @@ -228,7 +221,6 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) msg( ERROR, "File %s could not be opened. Using all LayerIds as default.\n", cfg_TargetDecLayerIdSetFile.c_str() ); } } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if (m_iMaxTemporalLayer != 500) { m_mTidExternalSet = true; @@ -245,7 +237,6 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) { m_targetOlsIdx = -1; } -#endif return true; } @@ -259,16 +250,12 @@ DecAppCfg::DecAppCfg() , m_outputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) , m_targetOlsIdx(0) , m_iMaxTemporalLayer(-1) -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS , m_mTidExternalSet(false) , m_tOlsIdxTidExternalSet(false) -#endif , m_decodedPictureHashSEIEnabled(0) , m_decodedNoDisplaySEIEnabled(false) , m_colourRemapSEIFileName() -#if JVET_T0053_ANNOTATED_REGIONS_SEI , m_annotatedRegionsSEIFileName() -#endif , m_targetDecLayerIdSet() , m_outputDecodedSEIMessagesFilename() #if JVET_S0257_DUMP_360SEI_MESSAGE diff --git a/source/App/DecoderApp/DecAppCfg.h b/source/App/DecoderApp/DecAppCfg.h index 687b12bba6c89ac3ac1ece3f1816a9d59cc91dd1..36b4699d73eb6fb9b1ef57e94757b89e94c6c59a 100644 --- a/source/App/DecoderApp/DecAppCfg.h +++ b/source/App/DecoderApp/DecAppCfg.h @@ -67,16 +67,12 @@ protected: int m_targetOlsIdx; ///< target output layer set std::vector<int> m_targetOutputLayerIdSet; ///< set of LayerIds to be outputted int m_iMaxTemporalLayer; ///< maximum temporal layer to be decoded -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS bool m_mTidExternalSet; ///< maximum temporal layer set externally bool m_tOlsIdxTidExternalSet; ///< target output layer set index externally set -#endif int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message 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 -#if JVET_T0053_ANNOTATED_REGIONS_SEI std::string m_annotatedRegionsSEIFileName; ///< annotated regions file name -#endif 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. #if JVET_S0257_DUMP_360SEI_MESSAGE diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index a7af56a37d0140d1f6c8114094830df5abbb7183..2755f729d31b1e80a80ce74e616774c314eecb4b 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -76,7 +76,6 @@ EncApp::~EncApp() void EncApp::xInitLibCfg() { VPS& vps = *m_cEncLib.getVPS(); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if (m_targetOlsIdx != 500) { vps.m_targetOlsIdx = m_targetOlsIdx; @@ -85,9 +84,6 @@ void EncApp::xInitLibCfg() { vps.m_targetOlsIdx = -1; } -#else - vps.m_targetOlsIdx = m_targetOlsIdx; -#endif vps.setMaxLayers( m_maxLayers ); @@ -128,9 +124,7 @@ void EncApp::xInitLibCfg() } } -#if JVET_R0193 m_cfgVPSParameters.m_maxTidILRefPicsPlus1.resize(vps.getMaxLayers(), std::vector<uint32_t>(vps.getMaxLayers(), MAX_TLAYER)); -#endif for (int i = 0; i < vps.getMaxLayers(); i++) { vps.setGeneralLayerIdx( m_layerId[i], i ); @@ -155,7 +149,6 @@ void EncApp::xInitLibCfg() vps.setDirectRefLayerFlag(i, j, false); } } -#if JVET_R0193 string::size_type beginStr = m_maxTidILRefPicsPlus1Str[i].find_first_not_of(" ", 0); string::size_type endStr = m_maxTidILRefPicsPlus1Str[i].find_first_of(" ", beginStr); int t = 0; @@ -165,7 +158,6 @@ void EncApp::xInitLibCfg() beginStr = m_maxTidILRefPicsPlus1Str[i].find_first_not_of(" ", endStr); endStr = m_maxTidILRefPicsPlus1Str[i].find_first_of(" ", beginStr); } -#endif } } } @@ -879,9 +871,7 @@ void EncApp::xInitLibCfg() m_cEncLib.setOmniViewportSEITiltCentre ( m_omniViewportSEITiltCentre ); m_cEncLib.setOmniViewportSEIHorRange ( m_omniViewportSEIHorRange ); m_cEncLib.setOmniViewportSEIVerRange ( m_omniViewportSEIVerRange ); -#if JVET_T0053_ANNOTATED_REGIONS_SEI m_cEncLib.setAnnotatedRegionSEIFileRoot (m_arSEIFileRoot); -#endif m_cEncLib.setRwpSEIEnabled (m_rwpSEIEnabled); m_cEncLib.setRwpSEIRwpCancelFlag (m_rwpSEIRwpCancelFlag); m_cEncLib.setRwpSEIRwpPersistenceFlag (m_rwpSEIRwpPersistenceFlag); @@ -1051,11 +1041,9 @@ void EncApp::xInitLibCfg() m_cEncLib.setForceSingleSplitThread ( m_forceSplitSequential ); #endif m_cEncLib.setUseALF ( m_alf ); -#if JVET_T0064 m_cEncLib.setALFStrength (m_alfStrength); m_cEncLib.setCCALFStrength (m_ccalfStrength); m_cEncLib.setALFAllowPredefinedFilters (m_alfAllowPredefinedFilters); -#endif m_cEncLib.setUseCCALF ( m_ccalf ); m_cEncLib.setCCALFQpThreshold ( m_ccalfQpThreshold ); m_cEncLib.setLmcs ( m_lmcsEnabled ); @@ -1084,7 +1072,6 @@ void EncApp::xInitLibCfg() m_cEncLib.setCropOffsetBottom (m_cropOffsetBottom); m_cEncLib.setCalculateHdrMetrics (m_calculateHdrMetrics); #endif -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS m_cEncLib.setOPIEnabled ( m_OPIEnabled ); if (m_OPIEnabled) { @@ -1097,7 +1084,6 @@ void EncApp::xInitLibCfg() m_cEncLib.setTargetOlsIdx (m_targetOlsIdx); } } -#endif m_cEncLib.setGopBasedTemporalFilterEnabled(m_gopBasedTemporalFilterEnabled); m_cEncLib.setNumRefLayers ( m_numRefLayers ); @@ -1443,9 +1429,7 @@ void EncApp::rateStatsAccum(const AccessUnit& au, const std::vector<uint32_t>& a case NAL_UNIT_CODED_SLICE_GDR: case NAL_UNIT_CODED_SLICE_RADL: case NAL_UNIT_CODED_SLICE_RASL: -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS case NAL_UNIT_OPI: -#endif case NAL_UNIT_DCI: case NAL_UNIT_VPS: case NAL_UNIT_SPS: diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index c3ba9725662b9b5758a839f72db4e4b4fa4bbad2..7094cf7ed3fa8a1beecb647b60b79c4cf4d93f50 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -229,9 +229,7 @@ strToLevel[] = {"6", Level::LEVEL6}, {"6.1", Level::LEVEL6_1}, {"6.2", Level::LEVEL6_2}, -#if JVET_T0065_LEVEL_6_3 {"6.3", Level::LEVEL6_3}, -#endif {"15.5", Level::LEVEL15_5}, }; @@ -487,16 +485,11 @@ static uint32_t getMaxTileColsByLevel( Level::Name level ) case Level::LEVEL6: case Level::LEVEL6_1: case Level::LEVEL6_2: -#if !JVET_T0065_LEVEL_6_3 - default: -#endif return 20; -#if JVET_T0065_LEVEL_6_3 case Level::LEVEL6_3: return 30; default: return MAX_TILE_COLS; -#endif } } @@ -522,16 +515,11 @@ static uint32_t getMaxTileRowsByLevel( Level::Name level ) case Level::LEVEL6: case Level::LEVEL6_1: case Level::LEVEL6_2: -#if !JVET_T0065_LEVEL_6_3 - default: -#endif return 22; -#if JVET_T0065_LEVEL_6_3 case Level::LEVEL6_3: return 33; default: return MAX_TILES / MAX_TILE_COLS; -#endif } } @@ -558,16 +546,11 @@ static uint32_t getMaxSlicesByLevel( Level::Name level ) case Level::LEVEL6: case Level::LEVEL6_1: case Level::LEVEL6_2: -#if !JVET_T0065_LEVEL_6_3 - default: -#endif return 600; -#if JVET_T0065_LEVEL_6_3 case Level::LEVEL6_3: return 1000; default: return MAX_SLICES; -#endif } } @@ -1327,9 +1310,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("SEISubpicLevelInfoRefLevels", cfg_sliRefLevels, cfg_sliRefLevels, "List of reference levels for Subpicture Level Information SEI messages") ("SEISubpicLevelInfoExplicitFraction", m_cfgSubpictureLevelInfoSEI.m_explicitFraction, false, "Enable sending of explicit fractions in Subpicture Level Information SEI messages") ("SEISubpicLevelInfoNumSubpics", m_cfgSubpictureLevelInfoSEI.m_numSubpictures, 1, "Number of subpictures for Subpicture Level Information SEI messages") -#if JVET_T0053_ANNOTATED_REGIONS_SEI ("SEIAnnotatedRegionsFileRoot,-ar", m_arSEIFileRoot, string(""), "Annotated region SEI parameters root file name (wo num ext); only the file name base is to be added. Underscore and POC would be automatically addded to . E.g. \"-ar ar\" will search for files ar_0.txt, ar_1.txt, ...") -#endif ("SEISubpicLevelInfoMaxSublayers", m_cfgSubpictureLevelInfoSEI.m_sliMaxSublayers, 1, "Number of sublayers for Subpicture Level Information SEI messages") ("SEISubpicLevelInfoSublayerInfoPresentFlag", m_cfgSubpictureLevelInfoSEI.m_sliSublayerInfoPresentFlag, false, "Enable sending of level information for all sublayers in Subpicture Level Information SEI messages") ("SEISubpicLevelInfoRefLevelFractions", cfg_sliFractions, cfg_sliFractions, "List of subpicture level fractions for Subpicture Level Information SEI messages") @@ -1406,11 +1387,9 @@ 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.") ("EnsureWppBitEqual", m_ensureWppBitEqual, false, "Ensure the results are equal to results with WPP-style parallelism, even if WPP is off") ( "ALF", m_alf, true, "Adaptive Loop Filter\n" ) -#if JVET_T0064 ("ALFStrength", m_alfStrength, 1.0, "Adaptive Loop Filter strength. The parameter scales the magnitudes of the ALF filter coefficients for both luma and chroma. Valid range is 0.0 <= ALFStrength <= 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") -#endif ( "CCALF", m_ccalf, true, "Cross-component Adaptive Loop Filter" ) ( "CCALFQpTh", m_ccalfQpThreshold, 37, "QP threshold above which encoder reduces CCALF usage") ( "RPR", m_rprEnabledFlag, true, "Reference Sample Resolution" ) @@ -1420,13 +1399,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ( "SwitchPocPeriod", m_switchPocPeriod, 0, "Switch POC period for RPR" ) ( "UpscaledOutput", m_upscaledOutput, 0, "Output upscaled (2), decoded but in full resolution buffer (1) or decoded cropped (0, default) picture for RPR" ) ( "MaxLayers", m_maxLayers, 1, "Max number of layers" ) -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS ( "EnableOperatingPointInformation", m_OPIEnabled, false, "Enables writing of Operating Point Information (OPI)" ) ( "MaxTemporalLayer", m_maxTemporalLayer, 500, "Maximum temporal layer to be signalled in OPI" ) ( "TargetOutputLayerSet", m_targetOlsIdx, 500, "Target output layer set index to be signalled in OPI" ) -#else - ( "TargetOutputLayerSet,p", m_targetOlsIdx, -1, "Target output layer set index" ) -#endif ; opts.addOptions() ( "MaxSublayers", m_maxSublayers, 7, "Max number of Sublayers") @@ -1442,11 +1417,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ( "OlsOutputLayer%d", m_olsOutputLayerStr, string(""), MAX_VPS_LAYERS, "Output layer index of i-th OLS") ( "NumPTLsInVPS", m_numPtlsInVps, 1, "Number of profile_tier_level structures in VPS" ) ( "AvoidIntraInDepLayers", m_avoidIntraInDepLayer, true, "Replaces I pictures in dependent layers with B pictures" ) -#if JVET_R0193 ( "MaxTidILRefPicsPlusOneLayerId%d", m_maxTidILRefPicsPlus1Str, string(""), MAX_VPS_LAYERS, "Maximum temporal ID for inter-layer reference pictures plus 1 of i-th layer, 0 for IRAP only") -#else - ( "MaxTidILRefPicsPlus1", m_cfgVPSParameters.m_maxTidILRefPicsPlus1, -1, "Maximum temporal ID for inter-layer reference pictures plus 1, 0 for IRAP only" ) -#endif ; opts.addOptions() @@ -2770,7 +2741,6 @@ bool EncAppCfg::xCheckParameter() msg( WARNING, "****************************************************************************\n"); m_dualTree = false; } -#if JVET_T0064 if (m_alf) { xConfirmPara(m_alfStrength < 0.0, "ALFStrength is less than 0. Valid range is 0.0 <= ALFStrength <= 1.0" ); @@ -2781,7 +2751,6 @@ bool EncAppCfg::xCheckParameter() xConfirmPara(m_ccalfStrength < 0.0, "CCALFStrength is less than 0. Valid range is 0.0 <= CCALFStrength <= 1.0"); xConfirmPara(m_ccalfStrength > 1.0, "CCALFStrength is greater than 1. Valid range is 0.0 <= CCALFStrength <= 1.0"); } -#endif if (m_ccalf && (m_chromaFormatIDC == CHROMA_400)) { msg( WARNING, "****************************************************************************\n"); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index b79804e8743be621dc887b1ab05fab273fb735c4..c3a7898478e7026c253c0f9ccc984bc4fc8e4d73 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -558,9 +558,7 @@ protected: std::vector<int> m_omniViewportSEITiltCentre; std::vector<uint32_t> m_omniViewportSEIHorRange; std::vector<uint32_t> m_omniViewportSEIVerRange; -#if JVET_T0053_ANNOTATED_REGIONS_SEI std::string m_arSEIFileRoot; // Annotated region SEI - initialized from external file -#endif bool m_rwpSEIEnabled; bool m_rwpSEIRwpCancelFlag; bool m_rwpSEIRwpPersistenceFlag; @@ -697,11 +695,9 @@ protected: bool m_forceDecodeBitstream1; bool m_alf; ///< Adaptive Loop Filter -#if JVET_T0064 double m_alfStrength; bool m_alfAllowPredefinedFilters; double m_ccalfStrength; -#endif bool m_ccalf; int m_ccalfQpThreshold; @@ -720,10 +716,8 @@ protected: int m_maxLayers; int m_targetOlsIdx; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS bool m_OPIEnabled; ///< enable Operating Point Information (OPI) int m_maxTemporalLayer; -#endif int m_layerId[MAX_VPS_LAYERS]; int m_layerIdx; int m_maxSublayers; @@ -737,9 +731,7 @@ protected: int m_olsModeIdc; int m_numOutputLayerSets; std::string m_olsOutputLayerStr[MAX_VPS_LAYERS]; -#if JVET_R0193 std::string m_maxTidILRefPicsPlus1Str[MAX_VPS_LAYERS]; -#endif int m_numPtlsInVps; diff --git a/source/App/Parcat/parcat.cpp b/source/App/Parcat/parcat.cpp index fa06ec2d82e43b3a54b6a21c7944c760049b96fa..5f09f4a11e97fc6f2e62106668274bae514e4109 100644 --- a/source/App/Parcat/parcat.cpp +++ b/source/App/Parcat/parcat.cpp @@ -279,11 +279,7 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int } first_idr_slice_after_ph_nal = false; } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if(inp_nalu.m_nalUnitType == NAL_UNIT_PH || (nalu_type < NAL_UNIT_CODED_SLICE_IDR_W_RADL) || (nalu_type > NAL_UNIT_CODED_SLICE_IDR_N_LP && nalu_type <= NAL_UNIT_RESERVED_IRAP_VCL_11) ) -#else - if(inp_nalu.m_nalUnitType == NAL_UNIT_PH || (nalu_type < NAL_UNIT_CODED_SLICE_IDR_W_RADL) || (nalu_type > NAL_UNIT_CODED_SLICE_IDR_N_LP && nalu_type <= NAL_UNIT_RESERVED_IRAP_VCL_12) ) -#endif { parcatHLSReader.setBitstream( &inp_nalu.getBitstream() ); if (inp_nalu.m_nalUnitType == NAL_UNIT_PH) @@ -333,14 +329,9 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int skip_next_sei = true; idr_found = true; } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if ((idx > 1 && (nalu_type == NAL_UNIT_CODED_SLICE_IDR_W_RADL || nalu_type == NAL_UNIT_CODED_SLICE_IDR_N_LP)) || ((idx > 1 && !idr_found) && (nalu_type == NAL_UNIT_OPI || nalu_type == NAL_UNIT_DCI || nalu_type == NAL_UNIT_VPS || nalu_type == NAL_UNIT_SPS || nalu_type == NAL_UNIT_PPS || nalu_type == NAL_UNIT_PREFIX_APS || nalu_type == NAL_UNIT_SUFFIX_APS || nalu_type == NAL_UNIT_PH || nalu_type == NAL_UNIT_ACCESS_UNIT_DELIMITER)) || (nalu_type == NAL_UNIT_SUFFIX_SEI && skip_next_sei)) -#else - if ((idx > 1 && (nalu_type == NAL_UNIT_CODED_SLICE_IDR_W_RADL || nalu_type == NAL_UNIT_CODED_SLICE_IDR_N_LP)) || ((idx > 1 && !idr_found) && (nalu_type == NAL_UNIT_DCI || nalu_type == NAL_UNIT_VPS || nalu_type == NAL_UNIT_SPS || nalu_type == NAL_UNIT_PPS || nalu_type == NAL_UNIT_PREFIX_APS || nalu_type == NAL_UNIT_SUFFIX_APS || nalu_type == NAL_UNIT_PH || nalu_type == NAL_UNIT_ACCESS_UNIT_DELIMITER)) - || (nalu_type == NAL_UNIT_SUFFIX_SEI && skip_next_sei)) -#endif { } else diff --git a/source/App/StreamMergeApp/StreamMergeApp.cpp b/source/App/StreamMergeApp/StreamMergeApp.cpp index 8717644d9f48cb51e8d19f22814106fe6cb183c8..f7b6acf10fd5d563440ade0c9f6dbdd02052b17b 100644 --- a/source/App/StreamMergeApp/StreamMergeApp.cpp +++ b/source/App/StreamMergeApp/StreamMergeApp.cpp @@ -239,9 +239,7 @@ bool StreamMergeApp::isNewPicture(std::ifstream *bitstreamFile, InputByteStream { // NUT that indicate the start of a new picture case NAL_UNIT_ACCESS_UNIT_DELIMITER: -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS case NAL_UNIT_OPI: -#endif case NAL_UNIT_DCI: case NAL_UNIT_VPS: case NAL_UNIT_SPS: @@ -264,9 +262,6 @@ bool StreamMergeApp::isNewPicture(std::ifstream *bitstreamFile, InputByteStream case NAL_UNIT_CODED_SLICE_CRA: case NAL_UNIT_CODED_SLICE_GDR: case NAL_UNIT_RESERVED_IRAP_VCL_11: -#if !JVET_S0163_ON_TARGETOLS_SUBLAYERS - case NAL_UNIT_RESERVED_IRAP_VCL_12: -#endif ret = checkPictureHeaderInSliceHeaderFlag(nalu); finished = true; break; diff --git a/source/App/SubpicMergeApp/SubpicMergeApp.cpp b/source/App/SubpicMergeApp/SubpicMergeApp.cpp index 3df441e3dbad2d24e690e8fc4dd8b4ebd90feb77..9c607eb0a1a2cb48993acda398640fe06eebe482 100644 --- a/source/App/SubpicMergeApp/SubpicMergeApp.cpp +++ b/source/App/SubpicMergeApp/SubpicMergeApp.cpp @@ -166,9 +166,7 @@ bool SubpicMergeApp::isNewPicture(std::ifstream *bitstreamFile, InputByteStream // NUT that indicate the start of a new picture case NAL_UNIT_ACCESS_UNIT_DELIMITER: -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS case NAL_UNIT_OPI: -#endif case NAL_UNIT_DCI: case NAL_UNIT_VPS: case NAL_UNIT_SPS: @@ -191,9 +189,6 @@ bool SubpicMergeApp::isNewPicture(std::ifstream *bitstreamFile, InputByteStream case NAL_UNIT_CODED_SLICE_CRA: case NAL_UNIT_CODED_SLICE_GDR: case NAL_UNIT_RESERVED_IRAP_VCL_11: -#if !JVET_S0163_ON_TARGETOLS_SUBLAYERS - case NAL_UNIT_RESERVED_IRAP_VCL_12: -#endif ret = checkPictureHeaderInSliceHeaderFlag(nalu); finished = true; break; diff --git a/source/Lib/CommonLib/CommonDef.h b/source/Lib/CommonLib/CommonDef.h index 3ecabab21f90775e5cb8d7ed6498645a70cd8fd7..8f0c64f42ad90608c7a43685d9c7460a56a710a7 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -205,16 +205,10 @@ static const int MAX_NUM_APS = 32; //Curren static const int NUM_APS_TYPE_LEN = 3; //Currently APS Type has 3 bits static const int MAX_NUM_APS_TYPE = 8; //Currently APS Type has 3 bits so the max type is 8 -#if JVET_T0065_LEVEL_6_3 static constexpr int MAX_TILE_COLS = 30; // Maximum number of tile columns static constexpr int MAX_TILES = 990; // Maximum number of tiles static constexpr int MAX_SLICES = 1000; // Maximum number of slices per picture -#else -static const int MAX_TILE_COLS = 20; ///< Maximum number of tile columns -static const int MAX_TILES = 440; ///< Maximum number of tiles -static const int MAX_SLICES = 600; ///< Maximum number of slices per picture -#endif static const int MLS_GRP_NUM = 1024; ///< Max number of coefficient groups, max(16, 256) static const int MLS_CG_SIZE = 4; ///< Coefficient group size of 4x4; = MLS_CG_LOG2_WIDTH + MLS_CG_LOG2_HEIGHT diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index eacad8a0840d3493ac9ceea1dbbea102a14aca47..5692aa147f1e25c861a9ed295c115deba5063a96 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -2411,7 +2411,6 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, int addX = isLuma( compID ) ? 0 : int( 1 - refPic->cs->sps->getHorCollocatedChromaFlag() ) * 8 * ( scalingRatio.first - SCALE_1X.first ); int addY = isLuma( compID ) ? 0 : int( 1 - refPic->cs->sps->getVerCollocatedChromaFlag() ) * 8 * ( scalingRatio.second - SCALE_1X.second ); -#if FIX_SUBPICS_W_RPR int boundLeft = 0; int boundRight = refPicWidth >> ::getComponentScaleX( compID, chFmt ); int boundTop = 0; @@ -2427,7 +2426,6 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, boundBottom = curSubPic.getSubPicBottom() >> ::getComponentScaleY( compID, chFmt ); } } -#endif x0Int = ( ( posX << ( 4 + ::getComponentScaleX( compID, chFmt ) ) ) + mv.getHor() ) * (int64_t)scalingRatio.first + addX; x0Int = SIGN( x0Int ) * ( ( llabs( x0Int ) + ( (long long)1 << ( 7 + ::getComponentScaleX( compID, chFmt ) ) ) ) >> ( 8 + ::getComponentScaleX( compID, chFmt ) ) ) + ( ( refPic->getScalingWindow().getWindowLeftOffset() * SPS::getWinUnitX( chFmt ) ) << ( ( posShift - ::getComponentScaleX( compID, chFmt ) ) ) ); @@ -2439,18 +2437,10 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, int vFilterSize = isLuma( compID ) ? NTAPS_LUMA : NTAPS_CHROMA; int yInt0 = ( (int32_t)y0Int + offY ) >> posShift; -#if FIX_SUBPICS_W_RPR yInt0 = std::min( std::max( boundTop - (NTAPS_LUMA / 2), yInt0 ), boundBottom + (NTAPS_LUMA / 2) ); -#else - yInt0 = std::min( std::max( -(NTAPS_LUMA / 2), yInt0 ), ( refPicHeight >> ::getComponentScaleY( compID, chFmt ) ) + (NTAPS_LUMA / 2) ); -#endif int xInt0 = ( (int32_t)x0Int + offX ) >> posShift; -#if FIX_SUBPICS_W_RPR xInt0 = std::min( std::max( boundLeft - (NTAPS_LUMA / 2), xInt0 ), boundRight + (NTAPS_LUMA / 2) ); -#else - xInt0 = std::min( std::max( -(NTAPS_LUMA / 2), xInt0 ), ( refPicWidth >> ::getComponentScaleX( compID, chFmt ) ) + (NTAPS_LUMA / 2) ); -#endif int refHeight = ((((int32_t)y0Int + (height-1) * stepY) + offY ) >> posShift) - ((((int32_t)y0Int + 0 * stepY) + offY ) >> posShift) + 1; refHeight = std::max<int>( 1, refHeight ); @@ -2465,11 +2455,7 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, { int posX = (int32_t)x0Int + col * stepX; xInt = ( posX + offX ) >> posShift; -#if FIX_SUBPICS_W_RPR xInt = std::min( std::max( boundLeft - (NTAPS_LUMA / 2), xInt ), boundRight + (NTAPS_LUMA / 2) ); -#else - xInt = std::min( std::max( -(NTAPS_LUMA / 2), xInt ), ( refPicWidth >> ::getComponentScaleX( compID, chFmt ) ) + (NTAPS_LUMA / 2) ); -#endif int xFrac = ( ( posX + offX ) >> ( posShift - shiftHor ) ) & ( ( 1 << shiftHor ) - 1 ); CHECK( xInt0 > xInt, "Wrong horizontal starting point" ); @@ -2485,11 +2471,7 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, { int posY = (int32_t)y0Int + row * stepY; yInt = ( posY + offY ) >> posShift; -#if FIX_SUBPICS_W_RPR yInt = std::min( std::max( boundTop - (NTAPS_LUMA / 2), yInt ), boundBottom + (NTAPS_LUMA / 2) ); -#else - yInt = std::min( std::max( -(NTAPS_LUMA / 2), yInt ), ( refPicHeight >> ::getComponentScaleY( compID, chFmt ) ) + (NTAPS_LUMA / 2) ); -#endif int yFrac = ( ( posY + offY ) >> ( posShift - shiftVer ) ) & ( ( 1 << shiftVer ) - 1 ); CHECK( yInt0 > yInt, "Wrong vertical starting point" ); diff --git a/source/Lib/CommonLib/PicYuvMD5.cpp b/source/Lib/CommonLib/PicYuvMD5.cpp index 5248acb9452b38a7663472abbd97c0a7688a9aed..a15f81ac5b56662a7364562f8e676088f95fb973 100644 --- a/source/Lib/CommonLib/PicYuvMD5.cpp +++ b/source/Lib/CommonLib/PicYuvMD5.cpp @@ -253,9 +253,7 @@ int calcAndPrintHashStatus(const CPelUnitBuf& pic, const SEIDecodedPictureHash* if (pictureHashSEI) { -#if FIX_TICKET_1405 CHECK ((uint32_t)pic.bufs.size() != ( pictureHashSEI->singleCompFlag ? 1 : 3 ), "The value of dph_sei_single_component_flag shall be equal to (ChromaFormatIdc == 0)."); -#endif switch (pictureHashSEI->method) { case HASHTYPE_MD5: diff --git a/source/Lib/CommonLib/ProfileLevelTier.cpp b/source/Lib/CommonLib/ProfileLevelTier.cpp index 7f71e15405b39b706ff89666491884b4bdec1127..b8287a8be9352212e597045d2886f2bf7acdecd5 100644 --- a/source/Lib/CommonLib/ProfileLevelTier.cpp +++ b/source/Lib/CommonLib/ProfileLevelTier.cpp @@ -70,9 +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_T0065_LEVEL_6_3 { 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 } }; diff --git a/source/Lib/CommonLib/Rom.cpp b/source/Lib/CommonLib/Rom.cpp index f104715f7c2ec13e4b91ae0f1e71e03241e4bd29..c2f196d0b9baea4651454e38bc7d20cdfcccf3d1 100644 --- a/source/Lib/CommonLib/Rom.cpp +++ b/source/Lib/CommonLib/Rom.cpp @@ -70,9 +70,7 @@ const char* nalUnitTypeToString(NalUnitType type) case NAL_UNIT_CODED_SLICE_IDR_N_LP: return "IDR_N_LP"; case NAL_UNIT_CODED_SLICE_CRA: return "CRA"; case NAL_UNIT_CODED_SLICE_GDR: return "GDR"; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS case NAL_UNIT_OPI: return "OPI"; -#endif case NAL_UNIT_DCI: return "DCI"; case NAL_UNIT_VPS: return "VPS"; case NAL_UNIT_SPS: return "SPS"; diff --git a/source/Lib/CommonLib/SEI.cpp b/source/Lib/CommonLib/SEI.cpp index 362711a09ebb08950d8857b4e3ad47c492ea6444..ef10af904e04a42a4e7642452373c936355d177f 100644 --- a/source/Lib/CommonLib/SEI.cpp +++ b/source/Lib/CommonLib/SEI.cpp @@ -180,9 +180,7 @@ const char *SEI::getSEIMessageString(SEI::PayloadType payloadType) case SEI::GENERALIZED_CUBEMAP_PROJECTION: return "Generalized cubemap projection"; case SEI::SAMPLE_ASPECT_RATIO_INFO: return "Sample aspect ratio information"; case SEI::SUBPICTURE_LEVEL_INFO: return "Subpicture level information"; -#if JVET_T0053_ANNOTATED_REGIONS_SEI case SEI::ANNOTATED_REGIONS: return "Annotated Region"; -#endif default: return "Unknown"; } } diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 441daf9072526a8960a9c19d4467d958a094c515..0c4e03602429756736faa1f2c30512dd852b6362 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -79,9 +79,7 @@ public: ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147, AMBIENT_VIEWING_ENVIRONMENT = 148, CONTENT_COLOUR_VOLUME = 149, -#if JVET_T0053_ANNOTATED_REGIONS_SEI ANNOTATED_REGIONS = 202, -#endif }; SEI() {} @@ -247,9 +245,7 @@ public: virtual ~SEIDecodedPictureHash() {} HashType method; -#if FIX_TICKET_1405 bool singleCompFlag; -#endif PictureHash m_pictureHash; }; @@ -670,7 +666,6 @@ public: std::vector<std::vector<std::vector<int>>> m_refLevelFraction; }; -#if JVET_T0053_ANNOTATED_REGIONS_SEI class SEIAnnotatedRegions : public SEI { public: @@ -734,7 +729,6 @@ public: std::vector<std::pair<AnnotatedRegionObjectIndex, AnnotatedRegionObject> > m_annotatedRegions; std::vector<std::pair<AnnotatedRegionLabelIndex, AnnotatedRegionLabel> > m_annotatedLabels; }; -#endif //! \} diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index ea6b4162c9a9c4d66d599a1f3b04bd984dd8984d..59b3fcf35c1562cae603b3e1dc677256eaf78e12 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -685,7 +685,6 @@ void Slice::checkRPL(const ReferencePictureList* pRPL0, const ReferencePictureLi if( m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL ) { CHECK( refPicDecodingOrderNumber < associatedIRAPDecodingOrderNumber, "RADL picture detected that violate the rule that no active entry in RefPicList[] shall precede the associated IRAP picture in decoding order" ); -#if JVET_S0084_S0110_RADL // Checking this: "When the current picture is a RADL picture, there shall be no active entry in RefPicList[ 0 ] or // RefPicList[ 1 ] that is any of the following: A RASL picture with pps_mixed_nalu_types_in_pic_flag is equal to 0 for (int i = 0; i < pcRefPic->numSlices; i++) @@ -695,13 +694,11 @@ void Slice::checkRPL(const ReferencePictureList* pRPL0, const ReferencePictureLi CHECK(pcRefPic->slices[i]->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL, "When the current picture is a RADL picture, there shall be no active entry in RefPicList[ 0 ] or RefPicList[ 1 ] that is a RASL picture with pps_mixed_nalu_types_in_pic_flag is equal to 0"); } } -#endif } CHECK( pcRefPic->temporalId > m_pcPic->temporalId, "The picture referred to by each active entry in RefPicList[ 0 ] or RefPicList[ 1 ] shall be present in the DPB and shall have TemporalId less than or equal to that of the current picture." ); } -#if JVET_R0046_IRAP_ASPECT2 // Add a constraint on an ILRP being either an IRAP picture or having TemporalId less than or equal to // Max (0, vps_max_tid_il_ref_pics_plus1[ refPicVpsLayerId ] - 1 ), with refPicVpsLayerId equal to the value of // the nuh_layer_id of the referenced picture. @@ -725,7 +722,6 @@ void Slice::checkRPL(const ReferencePictureList* pRPL0, const ReferencePictureLi "where currLayerIdx and refLayerIdx are equal to " "GeneralLayerIdx[ nuh_layer_id ] and GeneralLayerIdx[ refpicLayerId ], respectively. "); } -#endif } } } @@ -2235,9 +2231,6 @@ VPS::VPS() { m_vpsLayerId[i] = 0; m_vpsIndependentLayerFlag[i] = true; -#if !JVET_R0193 - m_vpsMaxTidIlRefPicsPlus1[i] = 7; -#endif m_generalLayerIdx[i] = 0; for (int j = 0; j < MAX_VPS_LAYERS; j++) { @@ -2331,11 +2324,7 @@ void VPS::deriveOutputLayerSets() m_numOutputLayersInOls[0] = 1; m_outputLayerIdInOls[0][0] = m_vpsLayerId[0]; -#if JVET_R0193_S0141 m_numSubLayersInLayerInOLS[0][0] = m_ptlMaxTemporalId[m_olsPtlIdx[0]] + 1; -#else - m_numSubLayersInLayerInOLS[0][0] = m_vpsMaxSubLayers; -#endif layerUsedAsOutputLayerFlag[0] = 1; for (int i = 1; i < m_maxLayers; i++) { @@ -2354,7 +2343,6 @@ void VPS::deriveOutputLayerSets() { m_numOutputLayersInOls[i] = 1; m_outputLayerIdInOls[i][0] = m_vpsLayerId[i]; -#if JVET_R0193_S0141 if (m_vpsEachLayerIsAnOlsFlag) { m_numSubLayersInLayerInOLS[i][0] = m_ptlMaxTemporalId[m_olsPtlIdx[i]] + 1; @@ -2375,13 +2363,6 @@ void VPS::deriveOutputLayerSets() } } } -#else - for(int j = 0; j < i && ( m_vpsOlsModeIdc == 0 ); j++ ) - { - m_numSubLayersInLayerInOLS[i][j] = m_vpsMaxTidIlRefPicsPlus1[i]; - } - m_numSubLayersInLayerInOLS[i][i] = m_vpsMaxSubLayers; -#endif } else if( m_vpsOlsModeIdc == 1 ) { @@ -2390,19 +2371,13 @@ void VPS::deriveOutputLayerSets() for( int j = 0; j < m_numOutputLayersInOls[i]; j++ ) { m_outputLayerIdInOls[i][j] = m_vpsLayerId[j]; -#if JVET_R0193_S0141 m_numSubLayersInLayerInOLS[i][j] = m_ptlMaxTemporalId[m_olsPtlIdx[i]] + 1; -#else - m_numSubLayersInLayerInOLS[i][j] = m_vpsMaxSubLayers; -#endif } } else if( m_vpsOlsModeIdc == 2 ) { int j = 0; -#if JVET_R0193 int highestIncludedLayer = 0; -#endif for( j = 0; j < m_maxLayers; j++ ) { m_numSubLayersInLayerInOLS[i][j] = 0; @@ -2413,17 +2388,11 @@ void VPS::deriveOutputLayerSets() if( m_vpsOlsOutputLayerFlag[i][k] ) { layerIncludedInOlsFlag[i][k] = 1; -#if JVET_R0193 highestIncludedLayer = k; -#endif layerUsedAsOutputLayerFlag[k] = 1; outputLayerIdx[i][j] = k; m_outputLayerIdInOls[i][j++] = m_vpsLayerId[k]; -#if JVET_R0193_S0141 m_numSubLayersInLayerInOLS[i][k] = m_ptlMaxTemporalId[m_olsPtlIdx[i]] + 1; -#else - m_numSubLayersInLayerInOLS[i][k] = m_vpsMaxSubLayers; -#endif } } m_numOutputLayersInOls[i] = j; @@ -2434,15 +2403,8 @@ void VPS::deriveOutputLayerSets() for( int k = 0; k < numRefLayers[idx]; k++ ) { layerIncludedInOlsFlag[i][refLayerIdx[idx][k]] = 1; -#if !JVET_R0193 - if( m_numSubLayersInLayerInOLS[i][ refLayerIdx[idx][k] ] < m_vpsMaxTidIlRefPicsPlus1[ m_outputLayerIdInOls[i][j] ] ) - { - m_numSubLayersInLayerInOLS[i][ refLayerIdx[idx][k] ] = m_vpsMaxTidIlRefPicsPlus1[ m_outputLayerIdInOls[i][j] ]; - } -#endif } } -#if JVET_R0193 for (int k = highestIncludedLayer - 1; k >= 0; k--) { if (layerIncludedInOlsFlag[i][k] && !m_vpsOlsOutputLayerFlag[i][k]) @@ -2457,7 +2419,6 @@ void VPS::deriveOutputLayerSets() } } } -#endif } } for (int i = 0; i < m_maxLayers; i++) @@ -2548,7 +2509,6 @@ void VPS::deriveTargetOutputLayerSet( int targetOlsIdx ) } } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS int VPS::deriveTargetOLSIdx(void) { int lowestIdx = 0; @@ -2580,7 +2540,6 @@ uint32_t VPS::getMaxTidinTOls(int m_targetOlsIdx) return getPtlMaxTemporalId(getOlsPtlIdx(m_targetOlsIdx)); } -#endif // ------------------------------------------------------------------------------------------------ // Picture Header @@ -4574,12 +4533,10 @@ void xTraceVPSHeader() DTRACE( g_trace_ctx, D_HEADER, "=========== Video Parameter Set ===========\n" ); } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void xTraceOPIHeader() { DTRACE(g_trace_ctx, D_HEADER, "=========== Operating Point Information ===========\n"); } -#endif void xTraceDCIHeader() { diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 70f19466f394a147aab2520dc27199beff193789..34014e30de23ff2fbad97332bf16fd866c5f0eab 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -923,7 +923,6 @@ public: } }; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS class OPI { private: @@ -952,7 +951,6 @@ public: void setOpiHtidPlus1(uint32_t val) { m_opihtidplus1 = val; } }; -#endif class VPS { @@ -967,11 +965,7 @@ private: uint32_t m_vpsCfgPredDirection[MAX_VPS_SUBLAYERS]; bool m_vpsIndependentLayerFlag[MAX_VPS_LAYERS]; bool m_vpsDirectRefLayerFlag[MAX_VPS_LAYERS][MAX_VPS_LAYERS]; -#if JVET_R0193 std::vector<std::vector<uint32_t>> m_vpsMaxTidIlRefPicsPlus1; -#else - uint32_t m_vpsMaxTidIlRefPicsPlus1[MAX_VPS_LAYERS]; -#endif bool m_vpsEachLayerIsAnOlsFlag; uint32_t m_vpsOlsModeIdc; uint32_t m_vpsNumOutputLayerSets; @@ -1045,7 +1039,6 @@ public: bool getIndependentLayerFlag(uint32_t layerIdx) const { return m_vpsIndependentLayerFlag[layerIdx]; } void setIndependentLayerFlag(uint32_t layerIdx, bool t) { m_vpsIndependentLayerFlag[layerIdx] = t; } -#if JVET_R0193 uint32_t getMaxTidIlRefPicsPlus1(const uint32_t layerIdx, const uint32_t refLayerIdx) const { CHECK(layerIdx >= m_vpsMaxTidIlRefPicsPlus1.size(), "layerIdx out of bounds"); @@ -1059,10 +1052,6 @@ public: m_vpsMaxTidIlRefPicsPlus1[layerIdx][refLayerIdx] = i; } void setMaxTidIlRefPicsPlus1(std::vector<std::vector<uint32_t>> i) { m_vpsMaxTidIlRefPicsPlus1 = i; } -#else - uint32_t getMaxTidIlRefPicsPlus1(uint32_t layerIdx) const { return m_vpsMaxTidIlRefPicsPlus1[layerIdx]; } - void setMaxTidIlRefPicsPlus1(uint32_t layerIdx, uint32_t i) { m_vpsMaxTidIlRefPicsPlus1[layerIdx] = i; } -#endif bool getDirectRefLayerFlag(uint32_t layerIdx, uint32_t refLayerIdx) const { return m_vpsDirectRefLayerFlag[layerIdx][refLayerIdx]; } void setDirectRefLayerFlag(uint32_t layerIdx, uint32_t refLayerIdx, bool t) { m_vpsDirectRefLayerFlag[layerIdx][refLayerIdx] = t; } @@ -1142,10 +1131,8 @@ public: void deriveOutputLayerSets(); void deriveTargetOutputLayerSet( int targetOlsIdx ); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS int deriveTargetOLSIdx(); uint32_t getMaxTidinTOls(int m_targetOlsIdx); -#endif void checkVPS(); @@ -3121,9 +3108,7 @@ public: #if ENABLE_TRACING void xTraceVPSHeader(); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void xTraceOPIHeader(); -#endif void xTraceDCIHeader(); void xTraceSPSHeader(); void xTracePPSHeader(); diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 693a8b41f04d8e0051a49b3cc63f903706e85616..30a7c43094eee56154db8d23c8d0a6c5d0cda74b 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -54,25 +54,7 @@ //########### place macros to be removed in next cycle below this line ############### -#define FIX_TICKET_1442_PTL_IN_VPS 1 // Fix PTL signalling in VPS such that also the sublayer with the second highest TemporalID is signalled -#define JVET_S0096_RPL_CONSTRAINT 1// JVET-S0096 aspect 1: When pps_rpl_info_in_ph_flag is equal to 1 and ph_inter_slice_allowed_flag is equal to 1, the value of num_ref_entries[ 0 ][ RplsIdx[ 0 ] ] shall be greater than 0. #define JVET_S0078_NOOUTPUTPRIORPICFLAG 0 // JVET-S0078: Handling of NoOutputOfPriorPicsFlag in output process -#define JVET_S0219_ASPECT1 1 // JVET-S0219 aspect1 : removal non-referred APS parameter set in the non-output layer. -#define JVET_R0193 1 // JVET-R0193: signalling of the number of maximum sublayers used for inter-layer prediction for each layer -#define JVET_R0193_S0141 1 // JVET-S0141 item 47 : item 47: In the general sub-bitstream extraction process, specify the conditions under which an output sub-bitstream is required to be a conforming bitstream such that the value of tIdTarget is specified to be in the range of 0 to vps_ptl_max_tid[ vps_ols_ptl_idx[ targetOlsIdx ] ], inclusive (instead of 0 to 6 inclusive). (JVET-S0158 aspect 1) -#define JVET_T0065_LEVEL_6_3 1 // JVET-T0065: Add level 6.3 -#define JVET_T0091_LMCS_ENC_OVERFLOW_FIX 1 // JVET-T0091: LMCS encoder overflow fix at high bit-depth for SDR -#define JVET_S0163_ON_TARGETOLS_SUBLAYERS 1 // JVET-S0163: On target OLS and sublayers for decoding (OPI NAL Unit) -#define JVET_R0266_GCI 1 // JVET-R0266 #5: Specify that no_gdr_constraint_flag equal to 1 specifies that sps_gdr_enabled_flag shall be equal to 0 -#define JVET_S0084_S0110_RADL 1 // When the current picture is a RADL picture, allow RASL pictures with pps_mixed_nalu_types_in_pic_flag is equal to 1 in active entries in RefPicList[ 0 ] or RefPicList[ 1 ] -#define FIX_TICKET_1405 1 // Add dph_sei_single_component_flag and dph_sei_reserved_zero_7bits syntax to decoded picture hash SEI message -#define FIX_SUBPICS_W_RPR 1 // Fix handling of RPR with subpictures (via scaling windows with no resolution change) -#define JVET_S0175_ASPECT5 1 // use u(8) instead of u(4) for (ffi_)display_elemental_periods_minus1 and pt_display_elemental_periods_minus1 -#define JVET_S0175_ASPECT6 1 // The general_nal_hrd_params_present_flag and general_vcl_hrd_params_present_flag are allowed to both be equal to 0 -#define JVET_R0046_IRAP_ASPECT2 1 // Add a constraint on an ILRP being either an IRAP picture or having TemporalId less than or equal to Max (0, vps_max_tid_il_ref_pics_plus1[ refPicVpsLayerId ] - 1 ) -#define JVET_T0064 1 // JVET-T0064: control of filter strength for ALF -#define JVET_R0264_IRAP_CONSTRAINT 1 // when max_tid_il_ref_pic_plus1[i][j] is equal to 0, it would be prohibited to have mixtures of IRAP and non-IRAP NAL units in the picture -#define JVET_T0053_ANNOTATED_REGIONS_SEI 1 //Enable/disable the annotated regions SEI //########### place macros to be be kept below this line ############### #define JVET_S0257_DUMP_360SEI_MESSAGE 1 // Software support of 360 SEI messages @@ -732,9 +714,7 @@ namespace Level LEVEL6 = 96, LEVEL6_1 = 99, LEVEL6_2 = 102, -#if JVET_T0065_LEVEL_6_3 LEVEL6_3 = 105, -#endif LEVEL15_5 = 255, }; } @@ -793,11 +773,7 @@ enum NalUnitType NAL_UNIT_CODED_SLICE_GDR, // 10 NAL_UNIT_RESERVED_IRAP_VCL_11, -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS NAL_UNIT_OPI, // 12 -#else - NAL_UNIT_RESERVED_IRAP_VCL_12, -#endif NAL_UNIT_DCI, // 13 NAL_UNIT_VPS, // 14 NAL_UNIT_SPS, // 15 diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index bd3c63a05f837ae1700c265ecc802351a1717b43..4c06188e03f700b99070515357d3c49e7e493341 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -444,13 +444,11 @@ DecLib::DecLib() , m_prefixSEINALUs() , m_debugPOC( -1 ) , m_debugCTU( -1 ) -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS , m_opi( nullptr ) , m_mTidExternalSet(false) , m_mTidOpiSet(false) , m_tOlsIdxTidExternalSet(false) , m_tOlsIdxTidOpiSet(false) -#endif , m_vps( nullptr ) , m_maxDecSubPicIdx(0) , m_maxDecSliceAddrInSubPic(-1) @@ -1824,7 +1822,6 @@ void DecLib::xCheckParameterSetConstraints(const int layerId) CHECK(curLayerChromaFormat != refLayerChromaFormat, "The chroma formats of the current layer and the reference layer are different"); int refLayerBitDepth = m_layerBitDepth[i]; CHECK(curLayerBitDepth != refLayerBitDepth, "The bit-depth of the current layer and the reference layer are different"); -#if JVET_R0264_IRAP_CONSTRAINT if (vps->getMaxTidIlRefPicsPlus1(curLayerIdx, i) == 0 && pps->getMixedNaluTypesInPicFlag() == 1) { for (int j = 0; j < m_uiSliceSegmentIdx; j++) @@ -1833,7 +1830,6 @@ void DecLib::xCheckParameterSetConstraints(const int layerId) CHECK( (preSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || preSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || preSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA), "mixed IRAP and non-IRAP NAL units in the picture when sps_video_parameter_set_id is greater than 0 and vps_max_tid_il_ref_pics_plus1[i][j] is equal to 0"); } } -#endif } } } @@ -1867,12 +1863,10 @@ void DecLib::xCheckParameterSetConstraints(const int layerId) CHECK(pps->getMixedNaluTypesInPicFlag(), "When gci_no_mixed_nalu_types_in_pic_constraint_flag equal to 1, the value of pps_mixed_nalu_types_in_pic_flag shall be equal to 0") } -#if JVET_R0266_GCI if (sps->getProfileTierLevel()->getConstraintInfo()->getNoGdrConstraintFlag()) { CHECK(sps->getGDREnabledFlag(), "gci_no_gdr_constraint_flag equal to 1 specifies that sps_gdr_enabled_flag for all pictures in OlsInScope shall be equal to 0"); } -#endif if (sps->getProfileTierLevel()->getConstraintInfo()->getNoRectSliceConstraintFlag()) { @@ -2053,9 +2047,7 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl for( auto& naluTemporalId : m_accessUnitNals ) { if ( -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS naluTemporalId.m_nalUnitType != NAL_UNIT_OPI && -#endif naluTemporalId.m_nalUnitType != NAL_UNIT_DCI && naluTemporalId.m_nalUnitType != NAL_UNIT_VPS && naluTemporalId.m_nalUnitType != NAL_UNIT_SPS @@ -2772,7 +2764,6 @@ void DecLib::updatePrevIRAPAndGDRSubpic() } } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void DecLib::xDecodeOPI( InputNALUnit& nalu ) { m_opi = new OPI(); @@ -2782,7 +2773,6 @@ void DecLib::xDecodeOPI( InputNALUnit& nalu ) m_HLSReader.parseOPI( m_opi ); } -#endif void DecLib::xDecodeVPS( InputNALUnit& nalu ) { @@ -2898,7 +2888,6 @@ bool DecLib::decode(InputNALUnit& nalu, int& iSkipFrame, int& iPOCLastDisplay, i { case NAL_UNIT_VPS: xDecodeVPS( nalu ); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if (getTOlsIdxExternalFlag()) { m_vps->m_targetOlsIdx = iTargetOlsIdx; @@ -2911,15 +2900,10 @@ bool DecLib::decode(InputNALUnit& nalu, int& iSkipFrame, int& iPOCLastDisplay, i { m_vps->m_targetOlsIdx = m_vps->deriveTargetOLSIdx(); } -#else - m_vps->m_targetOlsIdx = iTargetOlsIdx; -#endif return false; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS case NAL_UNIT_OPI: xDecodeOPI( nalu ); return false; -#endif case NAL_UNIT_DCI: xDecodeDCI( nalu ); return false; @@ -3024,9 +3008,6 @@ bool DecLib::decode(InputNALUnit& nalu, int& iSkipFrame, int& iPOCLastDisplay, i } case NAL_UNIT_RESERVED_IRAP_VCL_11: -#if !JVET_S0163_ON_TARGETOLS_SUBLAYERS - case NAL_UNIT_RESERVED_IRAP_VCL_12: -#endif msg( NOTICE, "Note: found reserved VCL NAL unit.\n"); xParsePrefixSEIsForUnknownVCLNal(); return false; @@ -3220,9 +3201,7 @@ bool DecLib::isNewPicture(std::ifstream *bitstreamFile, class InputByteStream *b // NUT that indicate the start of a new picture case NAL_UNIT_ACCESS_UNIT_DELIMITER: -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS case NAL_UNIT_OPI: -#endif case NAL_UNIT_DCI: case NAL_UNIT_VPS: case NAL_UNIT_SPS: @@ -3245,9 +3224,6 @@ bool DecLib::isNewPicture(std::ifstream *bitstreamFile, class InputByteStream *b case NAL_UNIT_CODED_SLICE_CRA: case NAL_UNIT_CODED_SLICE_GDR: case NAL_UNIT_RESERVED_IRAP_VCL_11: -#if !JVET_S0163_ON_TARGETOLS_SUBLAYERS - case NAL_UNIT_RESERVED_IRAP_VCL_12: -#endif ret = checkPictureHeaderInSliceHeaderFlag(nalu); finished = true; break; diff --git a/source/Lib/DecoderLib/DecLib.h b/source/Lib/DecoderLib/DecLib.h index 838926f84e060242e496ec1107c43f85916f10ca..4dc88e65d865867532f9168ba4fc13b96cd75b7e 100644 --- a/source/Lib/DecoderLib/DecLib.h +++ b/source/Lib/DecoderLib/DecLib.h @@ -187,13 +187,11 @@ private: std::list<InputNALUnit*> m_pictureSeiNalus; std::list<InputNALUnit*> m_suffixApsNalus; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS OPI* m_opi; bool m_mTidExternalSet; bool m_mTidOpiSet; bool m_tOlsIdxTidExternalSet; bool m_tOlsIdxTidOpiSet; -#endif VPS* m_vps; int m_maxDecSubPicIdx; int m_maxDecSliceAddrInSubPic; @@ -282,7 +280,6 @@ public: bool isNewPicture( std::ifstream *bitstreamFile, class InputByteStream *bytestream ); bool isNewAccessUnit( bool newPicture, std::ifstream *bitstreamFile, class InputByteStream *bytestream ); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS bool getHTidExternalSetFlag() const { return m_mTidExternalSet; } void setHTidExternalSetFlag(bool mTidExternalSet) { m_mTidExternalSet = mTidExternalSet; } bool getHTidOpiSetFlag() const { return m_mTidOpiSet; } @@ -292,7 +289,6 @@ public: bool getTOlsIdxOpiFlag() const { return m_tOlsIdxTidOpiSet; } void setTOlsIdxOpiFlag(bool tOlsIdxOpiSet) { m_tOlsIdxTidOpiSet = tOlsIdxOpiSet; } const OPI* getOPI() { return m_opi; } -#endif protected: void xUpdateRasInit(Slice* slice); @@ -305,9 +301,7 @@ protected: void xCheckParameterSetConstraints( const int layerId ); void xDecodePicHeader( InputNALUnit& nalu ); bool xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDisplay); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void xDecodeOPI( InputNALUnit& nalu ); -#endif void xDecodeVPS( InputNALUnit& nalu ); void xDecodeDCI( InputNALUnit& nalu ); void xDecodeSPS( InputNALUnit& nalu ); diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 4953439c8dce71622ef55ab8f3e4aeb7ac2c0950..b8ca0dec8738b88ac95f6d7263d906c4a36b30f5 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -234,12 +234,10 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType sei = new SEIFramePacking; xParseSEIFramePacking((SEIFramePacking&) *sei, payloadSize, pDecodedMessageOutputStream); break; -#if JVET_T0053_ANNOTATED_REGIONS_SEI case SEI::ANNOTATED_REGIONS: sei = new SEIAnnotatedRegions; xParseSEIAnnotatedRegions((SEIAnnotatedRegions&)*sei, payloadSize, pDecodedMessageOutputStream); break; -#endif case SEI::PARAMETER_SETS_INCLUSION_INDICATION: sei = new SEIParameterSetsInclusionIndication; xParseSEIParameterSetsInclusionIndication((SEIParameterSetsInclusionIndication&)*sei, payloadSize, pDecodedMessageOutputStream); @@ -444,14 +442,12 @@ void SEIReader::xParseSEIDecodedPictureHash(SEIDecodedPictureHash& sei, uint32_t uint32_t val; sei_read_code( pDecodedMessageOutputStream, 8, val, "dph_sei_hash_type"); sei.method = static_cast<HashType>(val); bytesRead++; -#if FIX_TICKET_1405 sei_read_code( pDecodedMessageOutputStream, 1, val, "dph_sei_single_component_flag"); sei.singleCompFlag = val; sei_read_code( pDecodedMessageOutputStream, 7, val, "dph_sei_reserved_zero_7bits"); bytesRead++; uint32_t expectedSize = ( sei.singleCompFlag ? 1 : 3 ) * (sei.method == 0 ? 16 : (sei.method == 1 ? 2 : 4)); CHECK ((payloadSize - bytesRead) != expectedSize, "The size of the decoded picture hash does not match the expected size."); -#endif const char *traceString="\0"; switch (sei.method) @@ -986,15 +982,10 @@ void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, uint32_t payloadSi sei.m_duCommonCpbRemovalDelayFlag = 0; } } -#if JVET_S0175_ASPECT5 sei_read_code( pDecodedMessageOutputStream, 8, symbol, "pt_display_elemental_periods_minus1" ); -#else - sei_read_uvlc( pDecodedMessageOutputStream, symbol, "pt_display_elemental_periods_minus1" ); -#endif sei.m_ptDisplayElementalPeriodsMinus1 = symbol; } -#if JVET_T0053_ANNOTATED_REGIONS_SEI void SEIReader::xParseSEIAnnotatedRegions(SEIAnnotatedRegions& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream) { output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); @@ -1115,7 +1106,6 @@ void SEIReader::xParseSEIAnnotatedRegions(SEIAnnotatedRegions& sei, uint32_t pay } } } -#endif void SEIReader::xParseSEIFrameFieldinfo(SEIFrameFieldInfo& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream) { output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); @@ -1144,11 +1134,7 @@ void SEIReader::xParseSEIFrameFieldinfo(SEIFrameFieldInfo& sei, uint32_t payload sei_read_flag( pDecodedMessageOutputStream, symbol, "ffi_top_field_first_flag" ); sei.m_topFieldFirstFlag = symbol; } -#if JVET_S0175_ASPECT5 sei_read_code( pDecodedMessageOutputStream, 8, symbol, "ffi_display_elemental_periods_minus1" ); -#else - sei_read_uvlc( pDecodedMessageOutputStream, symbol, "ffi_display_elemental_periods_minus1" ); -#endif sei.m_displayElementalPeriodsMinus1 = symbol; } sei_read_code( pDecodedMessageOutputStream, 2, symbol, "ffi_source_scan_type" ); diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h index 0a7529a450854279cae10e2ad2c1ac14cf34bc28..94cbd7f666ad339228ad1eb6263260657faf86c3 100644 --- a/source/Lib/DecoderLib/SEIread.h +++ b/source/Lib/DecoderLib/SEIread.h @@ -71,9 +71,7 @@ protected: void xParseSEIFramePacking (SEIFramePacking& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIParameterSetsInclusionIndication(SEIParameterSetsInclusionIndication& sei, uint32_t payloadSize, std::ostream* pDecodedMessageOutputStream); void xParseSEIMasteringDisplayColourVolume (SEIMasteringDisplayColourVolume& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); -#if JVET_T0053_ANNOTATED_REGIONS_SEI void xParseSEIAnnotatedRegions (SEIAnnotatedRegions& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); -#endif #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI void xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei, uint32_t payLoadSize, std::ostream *pDecodedMessageOutputStream); #endif diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 628c5e52815f1541e0439afb68e5900212366d3f..87e5c12eb402e5734c5006964c175f3eb8842214 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1194,12 +1194,8 @@ void HLSyntaxReader::parseGeneralHrdParameters(GeneralHrdParams *hrd) READ_CODE(32, symbol, "time_scale"); hrd->setTimeScale(symbol); READ_FLAG(symbol, "general_nal_hrd_parameters_present_flag"); hrd->setGeneralNalHrdParametersPresentFlag(symbol == 1 ? true : false); READ_FLAG(symbol, "general_vcl_hrd_parameters_present_flag"); hrd->setGeneralVclHrdParametersPresentFlag(symbol == 1 ? true : false); -#if JVET_S0175_ASPECT6 if( hrd->getGeneralNalHrdParametersPresentFlag() || hrd->getGeneralVclHrdParametersPresentFlag() ) { -#else - CHECK((hrd->getGeneralNalHrdParametersPresentFlag() == 0) && (hrd->getGeneralVclHrdParametersPresentFlag() == 0), "general_nal_hrd_params_present_flag and general_vcl_hrd_params_present_flag in each general_hrd_parameters( ) syntax structure shall not be both equal to 0."); -#endif READ_FLAG(symbol, "general_same_pic_timing_in_all_ols_flag"); hrd->setGeneralSamePicTimingInAllOlsFlag(symbol == 1 ? true : false); READ_FLAG(symbol, "general_decoding_unit_hrd_params_present_flag"); hrd->setGeneralDecodingUnitHrdParamsPresentFlag(symbol == 1 ? true : false); if (hrd->getGeneralDecodingUnitHrdParamsPresentFlag()) @@ -1214,9 +1210,7 @@ void HLSyntaxReader::parseGeneralHrdParameters(GeneralHrdParams *hrd) } READ_UVLC(symbol, "hrd_cpb_cnt_minus1"); hrd->setHrdCpbCntMinus1(symbol); CHECK(symbol > 31,"The value of hrd_cpb_cnt_minus1 shall be in the range of 0 to 31, inclusive"); -#if JVET_S0175_ASPECT6 } -#endif } void HLSyntaxReader::parseOlsHrdParameters(GeneralHrdParams * generalHrd, OlsHrdParams *olsHrd, uint32_t firstSubLayer, uint32_t maxNumSubLayersMinus1) { @@ -1241,11 +1235,7 @@ void HLSyntaxReader::parseOlsHrdParameters(GeneralHrdParams * generalHrd, OlsHrd { READ_UVLC(symbol, "elemental_duration_in_tc_minus1"); hrd->setElementDurationInTcMinus1(symbol); } -#if JVET_S0175_ASPECT6 else if((generalHrd->getGeneralNalHrdParametersPresentFlag() || generalHrd->getGeneralVclHrdParametersPresentFlag()) && generalHrd->getHrdCpbCntMinus1() == 0) -#else - else if(generalHrd->getHrdCpbCntMinus1() == 0) -#endif { READ_FLAG(symbol, "low_delay_hrd_flag"); hrd->setLowDelayHrdFlag(symbol == 1 ? true : false); } @@ -1367,12 +1357,10 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG(uiCode, "sps_gdr_enabled_flag"); pcSPS->setGDREnabledFlag(uiCode); -#if JVET_R0266_GCI if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoGdrConstraintFlag()) { CHECK(uiCode != 0, "When gci_no_gdr_constraint_flag equal to 1 , the value of sps_gdr_enabled_flag shall be equal to 0"); } -#endif READ_FLAG(uiCode, "sps_ref_pic_resampling_enabled_flag"); pcSPS->setRprEnabledFlag(uiCode); if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoRprConstraintFlag()) @@ -2143,7 +2131,6 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) xReadRbspTrailingBits(); } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void HLSyntaxReader::parseOPI(OPI* opi) { #if ENABLE_TRACING @@ -2178,7 +2165,6 @@ void HLSyntaxReader::parseOPI(OPI* opi) } xReadRbspTrailingBits(); } -#endif void HLSyntaxReader::parseDCI(DCI* dci) @@ -2246,11 +2232,9 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) pcVPS->setEachLayerIsAnOlsFlag(0); } } -#if JVET_R0193 std::vector<std::vector<uint32_t>> maxTidilRefPicsPlus1; maxTidilRefPicsPlus1.resize(pcVPS->getMaxLayers(), std::vector<uint32_t>(pcVPS->getMaxLayers(), NOT_VALID)); pcVPS->setMaxTidIlRefPicsPlus1(maxTidilRefPicsPlus1); -#endif for (uint32_t i = 0; i < pcVPS->getMaxLayers(); i++) { READ_CODE(6, uiCode, "vps_layer_id"); pcVPS->setLayerId(i, uiCode); @@ -2261,7 +2245,6 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) READ_FLAG(uiCode, "vps_independent_layer_flag"); pcVPS->setIndependentLayerFlag(i, uiCode); if (!pcVPS->getIndependentLayerFlag(i)) { -#if JVET_R0193 READ_FLAG(uiCode, "max_tid_ref_present_flag[ i ]"); bool presentFlag = uiCode; uint16_t sumUiCode = 0; @@ -2285,30 +2268,6 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) } } CHECK(sumUiCode == 0, "There has to be at least one value of j such that the value of vps_direct_dependency_flag[ i ][ j ] is equal to 1,when vps_independent_layer_flag[ i ] is equal to 0 "); -#else - uint16_t sumUiCode = 0; - for (int j = 0, k = 0; j < i; j++) - { - READ_FLAG(uiCode, "vps_direct_dependency_flag"); pcVPS->setDirectRefLayerFlag(i, j, uiCode); - if( uiCode ) - { - pcVPS->setInterLayerRefIdc( i, j, k ); - pcVPS->setDirectRefLayerIdx( i, k++, j ); - sumUiCode++; - } - } - CHECK(sumUiCode == 0, "There has to be at least one value of j such that the value of vps_direct_dependency_flag[ i ][ j ] is equal to 1,when vps_independent_layer_flag[ i ] is equal to 0 "); - READ_FLAG(uiCode, "vps_max_tid_ref_present_flag[ i ]"); - if (uiCode) - { - READ_CODE(3, uiCode, "vps_max_tid_il_ref_pics_plus1[ i ]"); - pcVPS->setMaxTidIlRefPicsPlus1(i, uiCode); - } - else - { - pcVPS->setMaxTidIlRefPicsPlus1(i, 7); - } -#endif } } } @@ -2382,11 +2341,7 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) ptls.resize(pcVPS->getNumPtls()); for (int i = 0; i < pcVPS->getNumPtls(); i++) { -#if FIX_TICKET_1442_PTL_IN_VPS parseProfileTierLevel(&ptls[i], pcVPS->getPtPresentFlag(i), pcVPS->getPtlMaxTemporalId(i)); -#else - parseProfileTierLevel(&ptls[i], pcVPS->getPtPresentFlag(i), pcVPS->getPtlMaxTemporalId(i) - 1); -#endif } pcVPS->setProfileTierLevel(ptls); for (int i = 0; i < pcVPS->getTotalNumOLSs(); i++) @@ -2951,12 +2906,10 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag *rpl = *sps->getRPLList( listIdx )->getReferencePictureList(picHeader->getRPLIdx( listIdx )); } } -#if JVET_S0096_RPL_CONSTRAINT if (picHeader->getPicInterSliceAllowedFlag() && listIdx == 0) { CHECK(picHeader->getRPL(0)->getNumRefEntries() <= 0, "When pps_rpl_info_in_ph_flag is equal to 1 and ph_inter_slice_allowed_flag is equal to 1, the value of num_ref_entries[ 0 ][ RplsIdx[ 0 ] ] shall be greater than 0"); } -#endif // POC MSB cycle signalling for LTRP for (int i = 0; i < rpl->getNumberOfLongtermPictures() + rpl->getNumberOfShorttermPictures(); i++) { diff --git a/source/Lib/DecoderLib/VLCReader.h b/source/Lib/DecoderLib/VLCReader.h index 7dda3b81545b61104c8feca9b631183113126b46..f2299e1a5bce3166fa09a437c21c78627cc233fe 100644 --- a/source/Lib/DecoderLib/VLCReader.h +++ b/source/Lib/DecoderLib/VLCReader.h @@ -156,9 +156,7 @@ protected: public: void setBitstream ( InputBitstream* p ) { m_pcBitstream = p; } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void parseOPI ( OPI* opi ); -#endif void parseVPS ( VPS* pcVPS ); void parseDCI ( DCI* dci ); void parseSPS ( SPS* pcSPS ); diff --git a/source/Lib/EncoderLib/AnnexBwrite.h b/source/Lib/EncoderLib/AnnexBwrite.h index d54abb1703b9714db49667108c3a1394493b0b07..0fb5115ccd96a0d96a9cf44b7577bea9a16f4a55 100644 --- a/source/Lib/EncoderLib/AnnexBwrite.h +++ b/source/Lib/EncoderLib/AnnexBwrite.h @@ -78,13 +78,8 @@ std::vector<uint32_t> writeAnnexBAccessUnit(std::ostream& out, const AccessUnit& for (AccessUnit::const_iterator it = au.begin(); it != au.end(); it++) { const NALUnitEBSP& nalu = **it; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS const bool useLongStartCode = (it == au.begin() || nalu.m_nalUnitType == NAL_UNIT_OPI || nalu.m_nalUnitType == NAL_UNIT_DCI || nalu.m_nalUnitType == NAL_UNIT_VPS || nalu.m_nalUnitType == NAL_UNIT_SPS || nalu.m_nalUnitType == NAL_UNIT_PPS || nalu.m_nalUnitType == NAL_UNIT_PREFIX_APS || nalu.m_nalUnitType == NAL_UNIT_SUFFIX_APS); -#else - const bool useLongStartCode = (it == au.begin() || nalu.m_nalUnitType == NAL_UNIT_DCI || nalu.m_nalUnitType == NAL_UNIT_VPS || nalu.m_nalUnitType == NAL_UNIT_SPS - || nalu.m_nalUnitType == NAL_UNIT_PPS || nalu.m_nalUnitType == NAL_UNIT_PREFIX_APS || nalu.m_nalUnitType == NAL_UNIT_SUFFIX_APS); -#endif const uint32_t size = writeAnnexBNalUnit(out, nalu, useLongStartCode); diff --git a/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp b/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp index da511357456f0a49510861c43cfa59f39623c944..0115ab523a6680daed99761ba44c028533572c0d 100644 --- a/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp +++ b/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp @@ -1834,12 +1834,10 @@ double EncAdaptiveLoopFilter::deriveCoeffQuant( int *filterClipp, int *filterCoe filterCoeffQuant[numCoeff - 1] = 0; int modified=1; -#if JVET_T0064 if( m_encCfg->getALFStrength() != 1.0 ) { modified = 0; } -#endif double errRef=cov.calcErrorForCoeffs( filterClipp, filterCoeffQuant, numCoeff, bitDepth ); while( modified ) { @@ -1883,11 +1881,7 @@ void EncAdaptiveLoopFilter::roundFiltCoeff( int *filterCoeffQuant, double *filte for( int i = 0; i < numCoeff; i++ ) { int sign = filterCoeff[i] > 0 ? 1 : -1; -#if JVET_T0064 filterCoeffQuant[i] = int((filterCoeff[i] * m_encCfg->getALFStrength()) * sign * factor + 0.5) * sign; -#else - filterCoeffQuant[i] = int( filterCoeff[i] * sign * factor + 0.5 ) * sign; -#endif } } @@ -1901,11 +1895,7 @@ void EncAdaptiveLoopFilter::roundFiltCoeffCCALF(int16_t *filterCoeffQuant, doubl int best_index = 0; for(int k = 0; k < CCALF_CANDS_COEFF_NR; k++) { -#if JVET_T0064 double err = ((filterCoeff[i] * m_encCfg->getCCALFStrength()) * sign * factor - CCALF_SMALL_TAB[k]); -#else - double err = (filterCoeff[i] * sign * factor - CCALF_SMALL_TAB[k]); -#endif err = err*err; if(err < best_err) { @@ -2734,16 +2724,12 @@ void EncAdaptiveLoopFilter::alfEncoderCtb(CodingStructure& cs, AlfParam& alfPar double costOn = MAX_DOUBLE; ctxTempStart = AlfCtx(m_CABACEstimator->getCtx()); int iBestFilterSetIdx = 0; -#if JVET_T0064 int firstFilterSetIdx = 0; if (!m_encCfg->getALFAllowPredefinedFilters()) { firstFilterSetIdx = NUM_FIXED_FILTER_SETS; } for (int filterSetIdx = firstFilterSetIdx; filterSetIdx < numFilterSet; filterSetIdx++) -#else - for (int filterSetIdx = 0; filterSetIdx < numFilterSet; filterSetIdx++) -#endif { //rate m_CABACEstimator->getCtx() = AlfCtx(ctxTempStart); @@ -3359,12 +3345,10 @@ void EncAdaptiveLoopFilter::deriveCcAlfFilterCoeff( ComponentID compID, const Pe // Refine quanitzation int modified = 1; -#if JVET_T0064 if (m_encCfg->getCCALFStrength() != 1.0) { modified = 0; } -#endif double errRef = m_alfCovarianceFrameCcAlf[compID - 1][0][filterIdx].calcErrorForCcAlfCoeffs(filterCoeffInt, size, (m_scaleBits+1)); while (modified) { diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 253cd624f4e4c951247a7eec0d966f500c29f1d3..45ffac06c30a36de51c77c4bb386dcf20b0bf1b0 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -637,9 +637,7 @@ protected: double m_ccvSEIMinLuminanceValue; double m_ccvSEIMaxLuminanceValue; double m_ccvSEIAvgLuminanceValue; -#if JVET_T0053_ANNOTATED_REGIONS_SEI std::string m_arSEIFileRoot; // Annotated region SEI - initialized from external file -#endif //====== Weighted Prediction ======== bool m_useWeightedPred; //< Use of Weighting Prediction (P_SLICE) bool m_useWeightedBiPred; //< Use of Bi-directional Weighting Prediction (B_SLICE) @@ -686,10 +684,8 @@ protected: CostMode m_costMode; ///< The cost function to use, primarily when considering lossless coding. bool m_TSRCdisableLL; ///< Disable TSRC for lossless -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS OPI m_opi; bool m_OPIEnabled; ///< enable Operating Point Information (OPI) -#endif DCI m_dci; bool m_DCIEnabled; ///< enable Decoding Capability Information (DCI) @@ -741,11 +737,9 @@ protected: #endif bool m_alf; ///< Adaptive Loop Filter -#if JVET_T0064 double m_alfStrength; bool m_alfAllowPredefinedFilters; double m_ccalfStrength; -#endif bool m_ccalf; int m_ccalfQpThreshold; #if JVET_O0756_CALCULATE_HDRMETRICS @@ -778,9 +772,7 @@ public: virtual ~EncCfg() {} -#if JVET_T0053_ANNOTATED_REGIONS_SEI std::map<uint32_t, SEIAnnotatedRegions::AnnotatedRegionObject> m_arObjects; -#endif void setProfile(Profile::Name profile) { m_profile = profile; } void setLevel(Level::Tier tier, Level::Name level) { m_levelTier = tier; m_level = level; } bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } @@ -1562,10 +1554,8 @@ public: uint32_t getOmniViewportSEIHorRange(int idx) { return m_omniViewportSEIHorRange[idx]; } void setOmniViewportSEIVerRange(const std::vector<uint32_t>& vi) { m_omniViewportSEIVerRange = vi; } uint32_t getOmniViewportSEIVerRange(int idx) { return m_omniViewportSEIVerRange[idx]; } -#if JVET_T0053_ANNOTATED_REGIONS_SEI void setAnnotatedRegionSEIFileRoot(const std::string &s) { m_arSEIFileRoot = s; m_arObjects.clear();} const std::string &getAnnotatedRegionSEIFileRoot() const { return m_arSEIFileRoot; } -#endif void setRwpSEIEnabled(bool b) { m_rwpSEIEnabled = b; } bool getRwpSEIEnabled() { return m_rwpSEIEnabled; } void setRwpSEIRwpCancelFlag(bool b) { m_rwpSEIRwpCancelFlag = b; } @@ -1799,10 +1789,8 @@ public: bool getTSRCdisableLL () { return m_TSRCdisableLL; } void setTSRCdisableLL ( bool b ) { m_TSRCdisableLL = b; } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void setOPI(OPI *p) { m_opi = *p; } OPI* getOPI() { return &m_opi; } -#endif void setDCI(DCI *p) { m_dci = *p; } DCI* getDCI() { return &m_dci; } @@ -1815,12 +1803,10 @@ public: void setHarmonizeGopFirstFieldCoupleEnabled( bool b ) { m_bHarmonizeGopFirstFieldCoupleEnabled = b; } bool getHarmonizeGopFirstFieldCoupleEnabled( ) const { return m_bHarmonizeGopFirstFieldCoupleEnabled; } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS bool getOPIEnabled() { return m_OPIEnabled; } void setOPIEnabled(bool i) { m_OPIEnabled = i; } void setHtidPlus1(int HTid) { m_opi.setHtidInfoPresentFlag(true); m_opi.setOpiHtidPlus1(HTid); } void setTargetOlsIdx(int TOlsIdx) { m_opi.setOlsInfoPresentFlag(true); m_opi.setOpiOlsIdx(TOlsIdx); } -#endif bool getDCIEnabled() { return m_DCIEnabled; } void setDCIEnabled(bool i) { m_DCIEnabled = i; } @@ -1937,14 +1923,12 @@ public: #endif void setUseALF( bool b ) { m_alf = b; } bool getUseALF() const { return m_alf; } -#if JVET_T0064 void setALFStrength( double s) { m_alfStrength = s; } double getALFStrength() const { return m_alfStrength; } void setALFAllowPredefinedFilters(bool b) { m_alfAllowPredefinedFilters = b; } bool getALFAllowPredefinedFilters() const { return m_alfAllowPredefinedFilters; } void setCCALFStrength(double s) { m_ccalfStrength = s; } double getCCALFStrength() const { return m_ccalfStrength; } -#endif void setUseCCALF( bool b ) { m_ccalf = b; } bool getUseCCALF() const { return m_ccalf; } void setCCALFQpThreshold( int b ) { m_ccalfQpThreshold = b; } diff --git a/source/Lib/EncoderLib/EncCfgParam.h b/source/Lib/EncoderLib/EncCfgParam.h index 5ea8998f749396ed318fea916f1141bb9f1202da..f83a651f2fac471fee0212fba05289acb2884eea 100644 --- a/source/Lib/EncoderLib/EncCfgParam.h +++ b/source/Lib/EncoderLib/EncCfgParam.h @@ -48,18 +48,11 @@ class CfgVPSParameters { public: CfgVPSParameters() -#if !JVET_R0193 - : m_maxTidILRefPicsPlus1(-1) -#endif {} virtual ~CfgVPSParameters(){} -#if JVET_R0193 std::vector<std::vector<uint32_t>> m_maxTidILRefPicsPlus1; -#else - int m_maxTidILRefPicsPlus1; -#endif }; class CfgSEISubpictureLevel diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 224df52403845b7edc5880a2776354a9c52d3d04..6c754a253148b8d149de3c5a45cc45a7720558f3 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -310,7 +310,6 @@ void EncGOP::init ( EncLib* pcEncLib ) #endif } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS int EncGOP::xWriteOPI (AccessUnit &accessUnit, const OPI *opi) { OutputNALUnit nalu(NAL_UNIT_OPI); @@ -320,7 +319,6 @@ int EncGOP::xWriteOPI (AccessUnit &accessUnit, const OPI *opi) accessUnit.push_back(new NALUnitEBSP(nalu)); return (int)(accessUnit.back()->m_nalUnitData.str().size()) * 8; } -#endif int EncGOP::xWriteVPS (AccessUnit &accessUnit, const VPS *vps) { @@ -385,12 +383,10 @@ int EncGOP::xWriteParameterSets(AccessUnit &accessUnit, Slice *slice, const bool { if (layerIdx == 0) { -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if (m_pcCfg->getOPIEnabled()) { actualTotalBits += xWriteOPI(accessUnit, m_pcEncLib->getOPI()); } -#endif if (m_pcCfg->getDCIEnabled()) { actualTotalBits += xWriteDCI(accessUnit, m_pcEncLib->getDCI()); @@ -514,7 +510,6 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI { AccessUnit::iterator itNalu = accessUnit.begin(); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS while ((itNalu != accessUnit.end()) && ((*itNalu)->m_nalUnitType == NAL_UNIT_ACCESS_UNIT_DELIMITER || (*itNalu)->m_nalUnitType == NAL_UNIT_OPI @@ -523,15 +518,6 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI || (*itNalu)->m_nalUnitType == NAL_UNIT_SPS || (*itNalu)->m_nalUnitType == NAL_UNIT_PPS )) -#else - while ((itNalu != accessUnit.end()) && - ((*itNalu)->m_nalUnitType == NAL_UNIT_ACCESS_UNIT_DELIMITER - || (*itNalu)->m_nalUnitType == NAL_UNIT_VPS - || (*itNalu)->m_nalUnitType == NAL_UNIT_DCI - || (*itNalu)->m_nalUnitType == NAL_UNIT_SPS - || (*itNalu)->m_nalUnitType == NAL_UNIT_PPS - )) -#endif { itNalu++; } @@ -801,7 +787,6 @@ void EncGOP::xCreatePerPictureSEIMessages (int picInGOP, SEIMessages& seiMessage seiMessages.push_back(dependentRAPIndicationSEI); } -#if JVET_T0053_ANNOTATED_REGIONS_SEI // insert one Annotated Region SEI for the picture (if the file exists) if (!m_pcCfg->getAnnotatedRegionSEIFileRoot().empty()) { @@ -817,7 +802,6 @@ void EncGOP::xCreatePerPictureSEIMessages (int picInGOP, SEIMessages& seiMessage delete seiAnnotatedRegions; } } -#endif } void EncGOP::xCreateScalableNestingSEI(SEIMessages& seiMessages, SEIMessages& nestedSeiMessages, const std::vector<int> &targetOLSs, const std::vector<int> &targetLayers, const std::vector<uint16_t>& subpicIDs) @@ -4348,11 +4332,7 @@ void EncGOP::xCalculateAddPSNR(Picture* pcPic, PelUnitBuf cPicD, const AccessUni if( ( *it )->m_nalUnitType != NAL_UNIT_PREFIX_SEI && ( *it )->m_nalUnitType != NAL_UNIT_SUFFIX_SEI ) { numRBSPBytes += numRBSPBytes_nal; -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS if (it == accessUnit.begin() || (*it)->m_nalUnitType == NAL_UNIT_OPI || (*it)->m_nalUnitType == NAL_UNIT_VPS || (*it)->m_nalUnitType == NAL_UNIT_DCI || (*it)->m_nalUnitType == NAL_UNIT_SPS || (*it)->m_nalUnitType == NAL_UNIT_PPS || (*it)->m_nalUnitType == NAL_UNIT_PREFIX_APS || (*it)->m_nalUnitType == NAL_UNIT_SUFFIX_APS) -#else - if (it == accessUnit.begin() || (*it)->m_nalUnitType == NAL_UNIT_VPS || (*it)->m_nalUnitType == NAL_UNIT_DCI || (*it)->m_nalUnitType == NAL_UNIT_SPS || (*it)->m_nalUnitType == NAL_UNIT_PPS || (*it)->m_nalUnitType == NAL_UNIT_PREFIX_APS || (*it)->m_nalUnitType == NAL_UNIT_SUFFIX_APS) -#endif { numRBSPBytes += 4; } @@ -5577,19 +5557,11 @@ void EncGOP::applyDeblockingFilterParameterSelection( Picture* pcPic, const uint } #endif -#if JVET_R0193 bool EncGOP::xCheckMaxTidILRefPics(int layerIdx, Picture* refPic, bool currentPicIsIRAP) -#else -bool EncGOP::xCheckMaxTidILRefPics(Picture* refPic, bool currentPicIsIRAP) -#endif { -#if JVET_R0193 const VPS* vps = refPic->cs->vps; int refLayerIdx = vps == nullptr ? 0 : vps->getGeneralLayerIdx(refPic->layerId); const int maxTidILRefPicsPlus1 = vps->getMaxTidIlRefPicsPlus1(layerIdx, refLayerIdx); -#else - const int maxTidILRefPicsPlus1 = m_pcCfg->getVPSParameters().m_maxTidILRefPicsPlus1; -#endif // -1 means not set if (maxTidILRefPicsPlus1 < 0) @@ -5696,11 +5668,7 @@ void EncGOP::xCreateExplicitReferencePictureSetFromReference( Slice* slice, PicL rpcPic = *( iterPic++ ); int refLayerIdx = vps->getGeneralLayerIdx( rpcPic->layerId ); if (rpcPic->referenced && rpcPic->getPOC() == pic->getPOC() && vps->getDirectRefLayerFlag(layerIdx, refLayerIdx) -#if JVET_R0193 && xCheckMaxTidILRefPics(layerIdx, rpcPic, slice->isIRAP())) -#else - && xCheckMaxTidILRefPics(rpcPic, slice->isIRAP()) ) -#endif { pLocalRPL0->setRefPicIdentifier( refPicIdxL0, 0, true, true, vps->getInterLayerRefIdc( layerIdx, refLayerIdx ) ); refPicIdxL0++; @@ -5822,11 +5790,7 @@ void EncGOP::xCreateExplicitReferencePictureSetFromReference( Slice* slice, PicL rpcPic = *( iterPic++ ); int refLayerIdx = vps->getGeneralLayerIdx( rpcPic->layerId ); if (rpcPic->referenced && rpcPic->getPOC() == pic->getPOC() && vps->getDirectRefLayerFlag(layerIdx, refLayerIdx) -#if JVET_R0193 && xCheckMaxTidILRefPics( layerIdx, rpcPic, slice->isIRAP())) -#else - && xCheckMaxTidILRefPics( rpcPic, slice->isIRAP() ) ) -#endif { pLocalRPL1->setRefPicIdentifier( refPicIdxL1, 0, true, true, vps->getInterLayerRefIdc( layerIdx, refLayerIdx ) ); refPicIdxL1++; diff --git a/source/Lib/EncoderLib/EncGOP.h b/source/Lib/EncoderLib/EncGOP.h index 1e924254a73ce77f095ca011aa087e3758dc7d0e..55616a52d836c6f72c526bbd4a254dbe37953376 100644 --- a/source/Lib/EncoderLib/EncGOP.h +++ b/source/Lib/EncoderLib/EncGOP.h @@ -316,9 +316,7 @@ protected: void xWriteTrailingSEIMessages (SEIMessages& seiMessages, AccessUnit &accessUnit, int temporalId); void xWriteDuSEIMessages (SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, std::deque<DUData> &duData); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS int xWriteOPI (AccessUnit &accessUnit, const OPI *opi); -#endif int xWriteVPS (AccessUnit &accessUnit, const VPS *vps); int xWriteDCI (AccessUnit &accessUnit, const DCI *dci); int xWriteSPS( AccessUnit &accessUnit, const SPS *sps, const int layerId = 0 ); @@ -332,11 +330,7 @@ protected: void applyDeblockingFilterParameterSelection( Picture* pcPic, const uint32_t numSlices, const int gopID ); #endif void xCreateExplicitReferencePictureSetFromReference( Slice* slice, PicList& rcListPic, const ReferencePictureList *rpl0, const ReferencePictureList *rpl1 ); -#if JVET_R0193 bool xCheckMaxTidILRefPics(int layerIdx, Picture* refPic, bool currentPicIsIRAP); -#else - bool xCheckMaxTidILRefPics(Picture* refPic, bool currentPicIsIRAP); -#endif };// END CLASS DEFINITION EncGOP //! \} diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index a224b6b0e48e0bf9f73d498cc61b973cb9e66104..34c2862a1d49d63f1eb3e798b41c1a5e7cd05a70 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -233,9 +233,7 @@ void EncLib::init( bool isFieldCoding, AUWriterIf* auWriterIf ) } xInitVPS( sps0 ); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS xInitOPI(m_opi); -#endif xInitDCI(m_dci, sps0); #if ENABLE_SPLIT_PARALLELISM if( omp_get_dynamic() ) @@ -1043,9 +1041,7 @@ void EncLib::xInitVPS( const SPS& sps ) m_vps->m_olsHrdParams.resize(m_vps->getNumOlsTimingHrdParamsMinus1(), std::vector<OlsHrdParams>(m_vps->getMaxSubLayers())); ProfileLevelTierFeatures profileLevelTierFeatures; profileLevelTierFeatures.extractPTLInformation( sps ); -#if JVET_R0193 m_vps->setMaxTidIlRefPicsPlus1(m_cfgVPSParameters.m_maxTidILRefPicsPlus1); -#endif m_vps->deriveOutputLayerSets(); m_vps->deriveTargetOutputLayerSet( m_vps->m_targetOlsIdx ); @@ -1145,19 +1141,9 @@ void EncLib::xInitVPS( const SPS& sps ) m_vps->setHrdMaxTid(i, m_vps->getMaxSubLayers() - 1); } -#if !JVET_R0193 - if (m_cfgVPSParameters.m_maxTidILRefPicsPlus1 >= 0) - { - for (int i = 0; i < m_vps->getMaxLayers(); i++) - { - m_vps->setMaxTidIlRefPicsPlus1(i, m_cfgVPSParameters.m_maxTidILRefPicsPlus1); - } - } -#endif m_vps->checkVPS(); } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void EncLib::xInitOPI(OPI& opi) { if (m_OPIEnabled && m_vps) @@ -1174,7 +1160,6 @@ void EncLib::xInitOPI(OPI& opi) } } } -#endif void EncLib::xInitDCI(DCI& dci, const SPS& sps) { diff --git a/source/Lib/EncoderLib/EncLib.h b/source/Lib/EncoderLib/EncLib.h index c23c074bb50c1c0177b48df0dc7b3f017cc1dbe4..a87bdf133d96df18209509e497d629a1b8520a89 100644 --- a/source/Lib/EncoderLib/EncLib.h +++ b/source/Lib/EncoderLib/EncLib.h @@ -167,9 +167,7 @@ public: protected: void xGetNewPicBuffer ( std::list<PelUnitBuf*>& rcListPicYuvRecOut, Picture*& rpcPic, int ppsId ); ///< get picture buffer which will be processed. If ppsId<0, then the ppsMap will be queried for the first match. -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void xInitOPI(OPI& opi); ///< initialize Operating point Information (OPI) from encoder options -#endif void xInitDCI(DCI& dci, const SPS& sps); ///< initialize Decoding Capability Information (DCI) from encoder options void xInitVPS( const SPS& sps ); ///< initialize VPS from encoder options void xInitSPS( SPS& sps ); ///< initialize SPS from encoder options diff --git a/source/Lib/EncoderLib/EncReshape.cpp b/source/Lib/EncoderLib/EncReshape.cpp index 1a4291cd1f6cd35e3d467360ea7c66815883a024..a4de78ad223a20c6d52f90bf9cbdb32da15291b4 100644 --- a/source/Lib/EncoderLib/EncReshape.cpp +++ b/source/Lib/EncoderLib/EncReshape.cpp @@ -228,11 +228,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) { for (bx = x1; bx <= x2; bx++) { -#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX tempSq = (int64_t)pWinY[bx] * (int64_t)pWinY[bx]; -#else - tempSq = pWinY[bx] * pWinY[bx]; -#endif leftSum += pWinY[bx]; leftSumSq += tempSq; leftColSum[bx] += pWinY[bx]; @@ -259,11 +255,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) for (bx = x1; bx <= x2; bx++) { topRowSum[y + winLens] += pWinY[bx]; -#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX topRowSumSq[y + winLens] += (int64_t)pWinY[bx] * (int64_t)pWinY[bx]; -#else - topRowSumSq[y + winLens] += pWinY[bx] * pWinY[bx]; -#endif } topSum += topRowSum[y + winLens]; topSumSq += topRowSumSq[y + winLens]; @@ -282,11 +274,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) for (bx = x1; bx <= x2; bx++) { leftColSum[bx] += pWinY[bx]; -#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX leftColSumSq[bx] += (int64_t)pWinY[bx] * (int64_t)pWinY[bx]; -#else - leftColSumSq[bx] += pWinY[bx] * pWinY[bx]; -#endif } pWinY += stride; } @@ -307,11 +295,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) for (by = y1; by <= y2; by++) { leftColSum[x + winLens] += pWinY[x + winLens]; -#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX leftColSumSq[x + winLens] += (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens]; -#else - leftColSumSq[x + winLens] += pWinY[x + winLens] * pWinY[x + winLens]; -#endif pWinY += stride; } } @@ -324,22 +308,14 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) pWinY = &picY.buf[0]; pWinY += winLens * stride; leftColSum[x + winLens] += pWinY[x + winLens]; -#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX leftColSumSq[x + winLens] += (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens]; -#else - leftColSumSq[x + winLens] += pWinY[x + winLens] * pWinY[x + winLens]; -#endif } if (y > winLens) { pWinY = &picY.buf[0]; pWinY -= (winLens + 1) * stride; leftColSum[x + winLens] -= pWinY[x + winLens]; -#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX leftColSumSq[x + winLens] -= (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens]; -#else - leftColSumSq[x + winLens] -= pWinY[x + winLens] * pWinY[x + winLens]; -#endif } } topColSum[x + winLens] = leftColSum[x + winLens]; @@ -423,11 +399,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) for (int x = 0; x < width; x++) { avgY += picY.buf[x]; -#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX varY += (double)picY.buf[x] * (double)picY.buf[x]; -#else - varY += picY.buf[x] * picY.buf[x]; -#endif } picY.buf += stride; } @@ -449,13 +421,8 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) { avgU += picU.buf[x]; avgV += picV.buf[x]; -#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX varU += (int64_t)picU.buf[x] * (int64_t)picU.buf[x]; varV += (int64_t)picV.buf[x] * (int64_t)picV.buf[x]; -#else - varU += picU.buf[x] * picU.buf[x]; - varV += picV.buf[x] * picV.buf[x]; -#endif } picU.buf += strideC; picV.buf += strideC; diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 030d5e97c29330b1602ef843187e826fde5a05e6..9f0f1978952a1cce8490916b44ce7705c74bbbe2 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -461,9 +461,7 @@ void SEIEncoder::initDecodedPictureHashSEI(SEIDecodedPictureHash *decodedPicture CHECK(!(decodedPictureHashSEI!=NULL), "Unspecified error"); decodedPictureHashSEI->method = m_pcCfg->getDecodedPictureHashSEIType(); -#if FIX_TICKET_1405 decodedPictureHashSEI->singleCompFlag = (m_pcCfg->getChromaFormatIdc() == 0); -#endif switch (m_pcCfg->getDecodedPictureHashSEIType()) { case HASHTYPE_MD5: @@ -563,7 +561,6 @@ static void readTokenValueAndValidate(T &returnedValue, /// value ret } } -#if JVET_T0053_ANNOTATED_REGIONS_SEI void SEIEncoder::readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, bool &failed) { readTokenValue(seiAnnoRegion->m_hdr.m_cancelFlag, failed, fic, "SEIArCancelFlag"); @@ -699,7 +696,6 @@ bool SEIEncoder::initSEIAnnotatedRegions(SEIAnnotatedRegions* SEIAnnoReg, int cu } return true; } -#endif #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI diff --git a/source/Lib/EncoderLib/SEIEncoder.h b/source/Lib/EncoderLib/SEIEncoder.h index 9dc7adb18a3bd8a2c502bf1511d20487f3efc36d..c6cebbb1a034b863b145ae46ec854dc53ccbb62b 100644 --- a/source/Lib/EncoderLib/SEIEncoder.h +++ b/source/Lib/EncoderLib/SEIEncoder.h @@ -86,10 +86,8 @@ public: void initSEIContentLightLevel(SEIContentLightLevelInfo *sei); void initSEIAmbientViewingEnvironment(SEIAmbientViewingEnvironment *sei); void initSEIContentColourVolume(SEIContentColourVolume *sei); -#if JVET_T0053_ANNOTATED_REGIONS_SEI bool initSEIAnnotatedRegions(SEIAnnotatedRegions *sei, int currPOC); void readAnnotatedRegionSEI(std::istream &fic, SEIAnnotatedRegions *seiAnnoRegion, bool &failed); -#endif private: EncCfg* m_pcCfg; EncLib* m_pcEncLib; diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 31ecfa2dbbfaeaefc7b1d8b156bae2b391b8ffb5..da182af0c8dc7a4590ac157047c8b62db0aa4ae1 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -127,11 +127,9 @@ void SEIWriter::xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &h case SEI::SAMPLE_ASPECT_RATIO_INFO: xWriteSEISampleAspectRatioInfo(*static_cast<const SEISampleAspectRatioInfo*>(&sei)); break; -#if JVET_T0053_ANNOTATED_REGIONS_SEI case SEI::ANNOTATED_REGIONS: xWriteSEIAnnotatedRegions(*static_cast<const SEIAnnotatedRegions*>(&sei)); break; -#endif default: THROW("Trying to write unhandled SEI message"); break; @@ -233,10 +231,8 @@ void SEIWriter::xWriteSEIDecodedPictureHash(const SEIDecodedPictureHash& sei) if (traceString != 0) //use of this variable is needed to avoid a compiler error with G++ 4.6.1 { WRITE_CODE(sei.method, 8, "dph_sei_hash_type"); -#if FIX_TICKET_1405 WRITE_CODE(sei.singleCompFlag, 1, "dph_sei_single_component_flag"); WRITE_CODE(0, 7, "dph_sei_reserved_zero_7bits"); -#endif for(uint32_t i=0; i<uint32_t(sei.m_pictureHash.hash.size()); i++) { WRITE_CODE(sei.m_pictureHash.hash[i], 8, traceString); @@ -458,11 +454,7 @@ void SEIWriter::xWriteSEIPictureTiming(const SEIPictureTiming& sei, const SEIBuf } } } -#if !JVET_S0175_ASPECT5 - WRITE_UVLC( sei.m_ptDisplayElementalPeriodsMinus1, "pt_display_elemental_periods_minus1" ); -#else WRITE_CODE( sei.m_ptDisplayElementalPeriodsMinus1, 8, "pt_display_elemental_periods_minus1" ); -#endif } void SEIWriter::xWriteSEIFrameFieldInfo(const SEIFrameFieldInfo& sei) @@ -484,11 +476,7 @@ void SEIWriter::xWriteSEIFrameFieldInfo(const SEIFrameFieldInfo& sei) { WRITE_FLAG( sei.m_topFieldFirstFlag ? 1 : 0, "ffi_top_field_first_flag" ); } -#if !JVET_S0175_ASPECT5 - WRITE_UVLC( sei.m_displayElementalPeriodsMinus1, "ffi_display_elemental_periods_minus1" ); -#else WRITE_CODE( sei.m_displayElementalPeriodsMinus1, 8, "ffi_display_elemental_periods_minus1" ); -#endif } WRITE_CODE( sei.m_sourceScanType, 2, "ffi_source_scan_type" ); WRITE_FLAG( sei.m_duplicateFlag ? 1 : 0, "ffi_duplicate_flag" ); @@ -613,7 +601,6 @@ void SEIWriter::xWriteSEIMasteringDisplayColourVolume(const SEIMasteringDisplayC WRITE_CODE( sei.values.minLuminance, 32, "mdcv_min_display_mastering_luminance" ); } -#if JVET_T0053_ANNOTATED_REGIONS_SEI void SEIWriter::xWriteSEIAnnotatedRegions(const SEIAnnotatedRegions &sei) { WRITE_FLAG(sei.m_hdr.m_cancelFlag, "ar_cancel_flag"); @@ -704,7 +691,6 @@ void SEIWriter::xWriteSEIAnnotatedRegions(const SEIAnnotatedRegions &sei) } } } -#endif void SEIWriter::xWriteByteAlign() { if( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0) diff --git a/source/Lib/EncoderLib/SEIwrite.h b/source/Lib/EncoderLib/SEIwrite.h index 956bc7ed03b69b67de34a46bb1c8f273fd5bab5b..ef3f9b4adb01e41d0b83b1c3e4096ea504737bb2 100644 --- a/source/Lib/EncoderLib/SEIwrite.h +++ b/source/Lib/EncoderLib/SEIwrite.h @@ -79,9 +79,7 @@ protected: void xWriteSEIContentLightLevelInfo(const SEIContentLightLevelInfo& sei); void xWriteSEIAmbientViewingEnvironment(const SEIAmbientViewingEnvironment& sei); void xWriteSEIContentColourVolume(const SEIContentColourVolume &sei); -#if JVET_T0053_ANNOTATED_REGIONS_SEI void xWriteSEIAnnotatedRegions (const SEIAnnotatedRegions& sei); -#endif void xWriteSEIpayloadData(OutputBitstream &bs, const SEI& sei, HRD &hrd, const uint32_t temporalId); void xWriteByteAlign(); protected: diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 3e228a6959b4d26bdd49f298c62ce6aead4a6920..c4bf74615977e75ea16d0cb7aecf348c33df5f09 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -715,10 +715,8 @@ void HLSWriter::codeGeneralHrdparameters(const GeneralHrdParams * hrd) WRITE_CODE(hrd->getTimeScale(), 32, "time_scale"); WRITE_FLAG(hrd->getGeneralNalHrdParametersPresentFlag() ? 1 : 0, "general_nal_hrd_parameters_present_flag"); WRITE_FLAG(hrd->getGeneralVclHrdParametersPresentFlag() ? 1 : 0, "general_vcl_hrd_parameters_present_flag"); -#if JVET_S0175_ASPECT6 if( hrd->getGeneralNalHrdParametersPresentFlag() || hrd->getGeneralVclHrdParametersPresentFlag() ) { -#endif WRITE_FLAG(hrd->getGeneralSamePicTimingInAllOlsFlag() ? 1 : 0, "general_same_pic_timing_in_all_ols_flag"); WRITE_FLAG(hrd->getGeneralDecodingUnitHrdParamsPresentFlag() ? 1 : 0, "general_decoding_unit_hrd_params_present_flag"); if (hrd->getGeneralDecodingUnitHrdParamsPresentFlag()) @@ -732,9 +730,7 @@ void HLSWriter::codeGeneralHrdparameters(const GeneralHrdParams * hrd) WRITE_CODE(hrd->getCpbSizeDuScale(), 4, "cpb_size_du_scale"); } WRITE_UVLC(hrd->getHrdCpbCntMinus1(), "hrd_cpb_cnt_minus1"); -#if JVET_S0175_ASPECT6 } -#endif } void HLSWriter::codeOlsHrdParameters(const GeneralHrdParams * generalHrd, const OlsHrdParams *olsHrd, const uint32_t firstSubLayer, const uint32_t maxNumSubLayersMinus1) { @@ -752,11 +748,7 @@ void HLSWriter::codeOlsHrdParameters(const GeneralHrdParams * generalHrd, const { WRITE_UVLC(hrd->getElementDurationInTcMinus1(), "elemental_duration_in_tc_minus1"); } -#if JVET_S0175_ASPECT6 else if ( (generalHrd->getGeneralNalHrdParametersPresentFlag() || generalHrd->getGeneralVclHrdParametersPresentFlag()) && generalHrd->getHrdCpbCntMinus1() == 0) -#else - else if (generalHrd->getHrdCpbCntMinus1() == 0) -#endif { WRITE_FLAG(hrd->getLowDelayHrdFlag() ? 1 : 0, "low_delay_hrd_flag"); } @@ -1335,7 +1327,6 @@ void HLSWriter::codeDCI(const DCI* dci) xWriteRbspTrailingBits(); } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void HLSWriter::codeOPI(const OPI *opi) { #if ENABLE_TRACING @@ -1356,7 +1347,6 @@ void HLSWriter::codeOPI(const OPI *opi) WRITE_FLAG(0, "opi_extension_flag"); xWriteRbspTrailingBits(); } -#endif void HLSWriter::codeVPS(const VPS* pcVPS) { @@ -1382,7 +1372,6 @@ void HLSWriter::codeVPS(const VPS* pcVPS) WRITE_FLAG(pcVPS->getIndependentLayerFlag(i), "vps_independent_layer_flag"); if (!pcVPS->getIndependentLayerFlag(i)) { -#if JVET_R0193 bool presentFlag = false; for (int j = 0; j < i; j++) { @@ -1397,18 +1386,6 @@ void HLSWriter::codeVPS(const VPS* pcVPS) WRITE_CODE(pcVPS->getMaxTidIlRefPicsPlus1(i, j), 3, "max_tid_il_ref_pics_plus1[ i ][ j ]"); } } -#else - for (int j = 0; j < i; j++) - { - WRITE_FLAG(pcVPS->getDirectRefLayerFlag(i, j), "vps_direct_dependency_flag"); - } - bool presentFlag = ( pcVPS->getMaxTidIlRefPicsPlus1(i) != 7 ); - WRITE_FLAG(presentFlag, "vps_max_tid_ref_present_flag[ i ]"); - if (presentFlag) - { - WRITE_CODE(pcVPS->getMaxTidIlRefPicsPlus1(i), 3, "vps_max_tid_il_ref_pics_plus1[ i ]"); - } -#endif } } } @@ -1462,11 +1439,7 @@ void HLSWriter::codeVPS(const VPS* pcVPS) CHECK(cnt>=8, "More than '8' alignment bytes written"); for (int i = 0; i < pcVPS->getNumPtls(); i++) { -#if FIX_TICKET_1442_PTL_IN_VPS codeProfileTierLevel(&pcVPS->getProfileTierLevel(i), pcVPS->getPtPresentFlag(i), pcVPS->getPtlMaxTemporalId(i)); -#else - codeProfileTierLevel(&pcVPS->getProfileTierLevel(i), pcVPS->getPtPresentFlag(i), pcVPS->getPtlMaxTemporalId(i) - 1); -#endif } for (int i = 0; i < totalNumOlss; i++) { diff --git a/source/Lib/EncoderLib/VLCWriter.h b/source/Lib/EncoderLib/VLCWriter.h index 4a574b851dee51d99cdbff32078850de279da621..8b95e8e2efb779bebf35d3f38eef216c1e7c9213 100644 --- a/source/Lib/EncoderLib/VLCWriter.h +++ b/source/Lib/EncoderLib/VLCWriter.h @@ -141,9 +141,7 @@ public: void codeDCI ( const DCI* dci ); void codePictureHeader ( PicHeader* picHeader, bool writeRbspTrailingBits, Slice *slice = 0 ); void codeSliceHeader ( Slice* pcSlice, PicHeader *picheader = 0 ); -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void codeOPI ( const OPI* opi ); -#endif void codeConstraintInfo ( const ConstraintInfo* cinfo ); void codeProfileTierLevel ( const ProfileTierLevel* ptl, bool profileTierPresentFlag, int maxNumSubLayersMinus1 ); void codeOlsHrdParameters(const GeneralHrdParams * generalHrd, const OlsHrdParams *olsHrd , const uint32_t firstSubLayer, const uint32_t maxNumSubLayersMinus1);