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..600438cc9bf94f2911f260337126c9243fb96f41 100644 --- a/source/App/DecoderApp/DecApp.cpp +++ b/source/App/DecoderApp/DecApp.cpp @@ -164,10 +164,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 +245,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 +253,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; } @@ -382,13 +374,8 @@ uint32_t DecApp::decode() 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 +413,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 ) { diff --git a/source/App/DecoderApp/DecAppCfg.cpp b/source/App/DecoderApp/DecAppCfg.cpp index 48be8fc0656f6d5672a1df8c05269650e640b73e..14277e1804cbf7b2202ea5ed1c7f205385f975a5 100644 --- a/source/App/DecoderApp/DecAppCfg.cpp +++ b/source/App/DecoderApp/DecAppCfg.cpp @@ -88,13 +88,8 @@ 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") @@ -228,7 +223,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 +239,6 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) { m_targetOlsIdx = -1; } -#endif return true; } @@ -259,10 +252,8 @@ 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() diff --git a/source/App/DecoderApp/DecAppCfg.h b/source/App/DecoderApp/DecAppCfg.h index 687b12bba6c89ac3ac1ece3f1816a9d59cc91dd1..d7dedd27da37bf65369bd17437d8d38164aeac40 100644 --- a/source/App/DecoderApp/DecAppCfg.h +++ b/source/App/DecoderApp/DecAppCfg.h @@ -67,10 +67,8 @@ 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 diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 549984e67fcbbf3fa847a79b829b94f25922ff02..7840304278ed52abf9b3ee035709c3592eadd000 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 ); @@ -1080,7 +1076,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) { @@ -1093,7 +1088,6 @@ void EncApp::xInitLibCfg() m_cEncLib.setTargetOlsIdx (m_targetOlsIdx); } } -#endif m_cEncLib.setGopBasedTemporalFilterEnabled(m_gopBasedTemporalFilterEnabled); m_cEncLib.setNumRefLayers ( m_numRefLayers ); @@ -1439,9 +1433,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 04177fae13ccbe4215f657496eabd8e8613dae75..ed696d2348f1678850a56b7493ccd50e39f3b38c 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1403,13 +1403,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") diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index e8acc1d6ee88c3fed711445ccc6eb039750d4497..2ac4f82ad82d0a8d8a13bd647da07dd4a6e10ba9 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -720,10 +720,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; 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/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/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 10dee4c45a79c4a6545b4b8d0add9a6ec6414959..66aaf2a538f19427b0c70e48880c6e885450cbac 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -2513,7 +2513,6 @@ void VPS::deriveTargetOutputLayerSet( int targetOlsIdx ) } } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS int VPS::deriveTargetOLSIdx(void) { int lowestIdx = 0; @@ -2545,7 +2544,6 @@ uint32_t VPS::getMaxTidinTOls(int m_targetOlsIdx) return getPtlMaxTemporalId(getOlsPtlIdx(m_targetOlsIdx)); } -#endif // ------------------------------------------------------------------------------------------------ // Picture Header @@ -4539,12 +4537,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 30d64dd39496b385aede74c4e70245fff1a33128..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 { @@ -1133,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(); @@ -3112,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 25d3c6a67721c7b8c73373a9b514716d0b8a921a..f784b2d525faf057b7c7dd6591e17114bdf6312e 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -56,7 +56,6 @@ #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_S0078_NOOUTPUTPRIORPICFLAG 0 // JVET-S0078: Handling of NoOutputOfPriorPicsFlag in output process -#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 @@ -785,11 +784,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..cbf747772bd0b46d225d5957f1eb05927b7cfff3 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) @@ -2053,9 +2051,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 +2768,6 @@ void DecLib::updatePrevIRAPAndGDRSubpic() } } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void DecLib::xDecodeOPI( InputNALUnit& nalu ) { m_opi = new OPI(); @@ -2782,7 +2777,6 @@ void DecLib::xDecodeOPI( InputNALUnit& nalu ) m_HLSReader.parseOPI( m_opi ); } -#endif void DecLib::xDecodeVPS( InputNALUnit& nalu ) { @@ -2898,7 +2892,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 +2904,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 +3012,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 +3205,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 +3228,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/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 2f94aead0fa686e156fcbfa22612b89acce8d417..f1b1622f3bf4cb8ca44cc6382eebbe6ab4fde656 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -2143,7 +2143,6 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) xReadRbspTrailingBits(); } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void HLSyntaxReader::parseOPI(OPI* opi) { #if ENABLE_TRACING @@ -2178,7 +2177,6 @@ void HLSyntaxReader::parseOPI(OPI* opi) } xReadRbspTrailingBits(); } -#endif void HLSyntaxReader::parseDCI(DCI* dci) 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/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 253cd624f4e4c951247a7eec0d966f500c29f1d3..8419f0df6600c338d2c5d95a7cc80af29b453bc2 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -686,10 +686,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) @@ -1799,10 +1797,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 +1811,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; } diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 7e099132b3dbe084744f97d8f817b2ff89ece603..dc5f530eb85a96a250090b09a2fe020d572138b9 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++; } @@ -4348,11 +4334,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; } diff --git a/source/Lib/EncoderLib/EncGOP.h b/source/Lib/EncoderLib/EncGOP.h index a6c6203376bfab40fd73a5725eeedf702a05e77f..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 ); diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 7ebc2797faa51f26cbda3fddb3c136ac017ea6de..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() ) @@ -1146,7 +1144,6 @@ void EncLib::xInitVPS( const SPS& sps ) m_vps->checkVPS(); } -#if JVET_S0163_ON_TARGETOLS_SUBLAYERS void EncLib::xInitOPI(OPI& opi) { if (m_OPIEnabled && m_vps) @@ -1163,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/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index d268ff3677c744a8d66fe2be0ffc7542a528342e..dfd1a1dd9bac9f03af08f4d9da66081afb013977 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -1335,7 +1335,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 +1355,6 @@ void HLSWriter::codeOPI(const OPI *opi) WRITE_FLAG(0, "opi_extension_flag"); xWriteRbspTrailingBits(); } -#endif void HLSWriter::codeVPS(const VPS* pcVPS) { 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);