diff --git a/source/App/DecoderApp/DecApp.cpp b/source/App/DecoderApp/DecApp.cpp index 3937fa68f29ef5a9da5561f752815a04b2ae9914..b25aa8cf0c0dc9e272fd07aa62a3cb97c0e1da18 100644 --- a/source/App/DecoderApp/DecApp.cpp +++ b/source/App/DecoderApp/DecApp.cpp @@ -346,11 +346,7 @@ bool DecApp::isNewPicture(ifstream *bitstreamFile, class InputByteStream *bytest // NUT that indicate the start of a new picture case NAL_UNIT_ACCESS_UNIT_DELIMITER: -#if JVET_Q0117_PARAMETER_SETS_CLEANUP case NAL_UNIT_DCI: -#else - case NAL_UNIT_DPS: -#endif case NAL_UNIT_VPS: case NAL_UNIT_SPS: case NAL_UNIT_PPS: diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 503569a63832cc92d8dedd11a38ab40abe77e894..9f0898573a4b44b3a608c8e1460ef9ab282a3212 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -785,11 +785,7 @@ void EncApp::xInitLibCfg() #endif m_cEncLib.setCostMode ( m_costMode ); m_cEncLib.setUseRecalculateQPAccordingToLambda ( m_recalculateQPAccordingToLambda ); -#if JVET_Q0117_PARAMETER_SETS_CLEANUP m_cEncLib.setDCIEnabled ( m_DCIEnabled ); -#else - m_cEncLib.setDecodingParameterSetEnabled ( m_decodingParameterSetEnabled ); -#endif m_cEncLib.setVuiParametersPresentFlag ( m_vuiParametersPresentFlag ); m_cEncLib.setAspectRatioInfoPresentFlag ( m_aspectRatioInfoPresentFlag); m_cEncLib.setAspectRatioIdc ( m_aspectRatioIdc ); @@ -1189,11 +1185,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_Q0117_PARAMETER_SETS_CLEANUP case NAL_UNIT_DCI: -#else - case NAL_UNIT_DPS: -#endif case NAL_UNIT_VPS: case NAL_UNIT_SPS: case NAL_UNIT_PPS: diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 5b3068342f4017831a7a3e922c3337b2ebcc3123..cbc26b9208b48cd072f8459bd1244cb5fb854fda 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -809,11 +809,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1, or none") ("Tier", m_levelTier, Level::MAIN, "Tier to use for interpretation of --Level (main or high only)") ("SubProfile", cfg_SubProfile, cfg_SubProfile, "Sub-profile idc") -#if JVET_Q0117_PARAMETER_SETS_CLEANUP ("EnableDecodingCapabilityInformation", m_DCIEnabled, false, "Enables writing of Decoding Capability Information") -#else - ("EnableDecodingParameterSet", m_decodingParameterSetEnabled, false, "Enables writing of Decoding Parameter Set") -#endif ("MaxBitDepthConstraint", m_bitDepthConstraint, 0u, "Bit depth to use for profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") ("MaxChromaFormatConstraint", tmpConstraintChromaFormat, 0, "Chroma-format to use for the profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") ("IntraConstraintFlag", m_intraConstraintFlag, false, "Value of general_intra_constraint_flag to use for RExt profiles (not used if an explicit RExt sub-profile is specified)") diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 221e54c80caa2696b0a09f7835af990ca1e8dc03..ecc8a607d61655e7313ec3419a6cc01e58e62c30 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -658,11 +658,7 @@ protected: bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value -#if JVET_Q0117_PARAMETER_SETS_CLEANUP bool m_DCIEnabled; ///< enable Decoding Capability Information (DCI) -#else - bool m_decodingParameterSetEnabled; ///< enable decoding parameter set -#endif bool m_hrdParametersPresentFlag; ///< enable generation of HRD parameters bool m_vuiParametersPresentFlag; ///< enable generation of VUI parameters bool m_aspectRatioInfoPresentFlag; ///< Signals whether aspect_ratio_idc is present diff --git a/source/App/Parcat/parcat.cpp b/source/App/Parcat/parcat.cpp index 01d70b297a219546593b3ac43f89fae40ff29da7..a2c4ac53ec6ce0520741353eb1d70899d199e8c5 100644 --- a/source/App/Parcat/parcat.cpp +++ b/source/App/Parcat/parcat.cpp @@ -392,13 +392,8 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int skip_next_sei = true; idr_found = true; } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP 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)) -#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_DPS || 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/Lib/CommonLib/ParameterSetManager.cpp b/source/Lib/CommonLib/ParameterSetManager.cpp index 5edb19b0271eed95d2182fe65d56f9273b4c6769..c57d580ee0ab51062b6c94f6825c7dd3dbbd6003 100644 --- a/source/Lib/CommonLib/ParameterSetManager.cpp +++ b/source/Lib/CommonLib/ParameterSetManager.cpp @@ -38,13 +38,7 @@ ParameterSetManager::ParameterSetManager() : m_spsMap(MAX_NUM_SPS) , m_ppsMap(MAX_NUM_PPS) , m_apsMap(MAX_NUM_APS * MAX_NUM_APS_TYPE) -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP -, m_dpsMap(MAX_NUM_DPS) -#endif , m_vpsMap(MAX_NUM_VPS) -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP -, m_activeDPSId(-1) -#endif , m_activeSPSId(-1) , m_activeVPSId(-1) { @@ -68,35 +62,6 @@ bool ParameterSetManager::activatePPS(int ppsId, bool isIRAP) if (sps) { -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - int dpsId = sps->getDecodingParameterSetId(); - if ((m_activeDPSId!=-1) && (dpsId != m_activeDPSId )) - { - msg( WARNING, "Warning: tried to activate a DPS with different ID than the currently active DPS. This should not happen within the same bitstream!"); - } - else - { - if (dpsId != 0) - { - DPS *dps =m_dpsMap.getPS(dpsId); - if (dps) - { - m_activeDPSId = dpsId; - m_dpsMap.setActive(dpsId); - } - else - { - msg( WARNING, "Warning: tried to activate a PPS that refers to a non-existing DPS."); - } - } - else - { - // set zero as active DPS ID (special reserved value, no actual DPS) - m_activeDPSId = dpsId; - m_dpsMap.setActive(dpsId); - } - } -#endif int vpsId = sps->getVPSId(); if(vpsId != 0) { @@ -139,9 +104,6 @@ bool ParameterSetManager::activatePPS(int ppsId, bool isIRAP) // Failed to activate if reach here. m_activeSPSId=-1; -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - m_activeDPSId=-1; -#endif return false; } diff --git a/source/Lib/CommonLib/ParameterSetManager.h b/source/Lib/CommonLib/ParameterSetManager.h index 697f52b0c1381bcfcf2247f24da020948beb2e50..1824d492eee203f1dd974eb5aac8540aafc75efb 100644 --- a/source/Lib/CommonLib/ParameterSetManager.h +++ b/source/Lib/CommonLib/ParameterSetManager.h @@ -227,14 +227,6 @@ public: void storeVPS(VPS *vps, const std::vector<uint8_t> &naluData) { m_vpsMap.storePS(vps->getVPSId(), vps, &naluData); } VPS* getVPS( int vpsId ) { return m_vpsMap.getPS( vpsId ); }; -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - void storeDPS(DPS *dps, const std::vector<uint8_t> &naluData) { m_dpsMap.storePS( dps->getDecodingParameterSetId(), dps, &naluData); }; - // get pointer to existing video parameter set - DPS* getDPS(int dpsId) { return m_dpsMap.getPS(dpsId); }; - bool getDPSChangedFlag(int dpsId) const { return m_dpsMap.getChangedFlag(dpsId); } - void clearDPSChangedFlag(int dpsId) { m_dpsMap.clearChangedFlag(dpsId); } - DPS* getFirstDPS() { return m_dpsMap.getFirstPS(); }; -#endif // store sequence parameter set and take ownership of it // warning: sps object cannot be used after storing (repeated parameter sets are directly deleted) void storeSPS(SPS *sps, const std::vector<uint8_t> &naluData) { m_spsMap.storePS( sps->getSPSId(), sps, &naluData); }; @@ -268,24 +260,15 @@ public: APS* getFirstAPS() { return m_apsMap.getFirstPS(); }; bool activateAPS(int apsId, int apsType); const SPS* getActiveSPS()const { return m_spsMap.getPS(m_activeSPSId); }; -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - const DPS* getActiveDPS()const { return m_dpsMap.getPS(m_activeDPSId); }; -#endif void checkAuApsContent( APS *aps, std::vector<int>& accessUnitApsNals ) { m_apsMap.checkAuApsContent( aps, accessUnitApsNals ); } protected: ParameterSetMap<SPS> m_spsMap; ParameterSetMap<PPS> m_ppsMap; ParameterSetMap<APS> m_apsMap; -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - ParameterSetMap<DPS> m_dpsMap; -#endif ParameterSetMap<VPS> m_vpsMap; APS* m_apss[ALF_CTB_MAX_NUM_APS]; -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - int m_activeDPSId; // -1 for nothing active -#endif int m_activeSPSId; // -1 for nothing active int m_activeVPSId; // -1 for nothing active }; diff --git a/source/Lib/CommonLib/Rom.cpp b/source/Lib/CommonLib/Rom.cpp index 8ec4e5f855a20ce8279cf8a02073b87a0c59faaf..6077c5916173c4d612803bf8ef55ff5c9616642c 100644 --- a/source/Lib/CommonLib/Rom.cpp +++ b/source/Lib/CommonLib/Rom.cpp @@ -70,11 +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_Q0117_PARAMETER_SETS_CLEANUP case NAL_UNIT_DCI: return "DCI"; -#else - case NAL_UNIT_DPS: return "DPS"; -#endif case NAL_UNIT_VPS: return "VPS"; case NAL_UNIT_SPS: return "SPS"; case NAL_UNIT_PPS: return "PPS"; diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index d764addb3a4f762032226e631e15aa1ea6512ef3..5188deea9eed3d2651d0ca4050097a0353e75219 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -85,9 +85,6 @@ Slice::Slice() , m_biDirPred ( false ) , m_iSliceQpDelta ( 0 ) , m_iDepth ( 0 ) -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP -, m_dps ( nullptr ) -#endif , m_pcSPS ( NULL ) , m_pcPPS ( NULL ) , m_pcPic ( NULL ) @@ -2488,9 +2485,6 @@ SPSRExt::SPSRExt() SPS::SPS() : m_SPSId ( 0) -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP -, m_decodingParameterSetId ( 0 ) -#endif , m_VPSId ( 0 ) , m_affineAmvrEnabledFlag ( false ) , m_DMVR ( false ) @@ -4109,7 +4103,6 @@ bool Slice::checkRPR() return false; } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP bool operator == (const ConstraintInfo& op1, const ConstraintInfo& op2) { if( op1.m_progressiveSourceFlag != op2.m_progressiveSourceFlag ) return false; @@ -4196,7 +4189,6 @@ bool operator != (const ProfileTierLevel& op1, const ProfileTierLeve { return !(op1 == op2); } -#endif #if ENABLE_TRACING void xTraceVPSHeader() @@ -4204,17 +4196,10 @@ void xTraceVPSHeader() DTRACE( g_trace_ctx, D_HEADER, "=========== Video Parameter Set ===========\n" ); } -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP -void xTraceDPSHeader() -{ - DTRACE( g_trace_ctx, D_HEADER, "=========== Decoding Parameter Set ===========\n" ); -} -#else void xTraceDCIHeader() { DTRACE( g_trace_ctx, D_HEADER, "=========== Decoding Capability Information ===========\n" ); } -#endif void xTraceSPSHeader() { diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 306283cb54baa77fb47a7162ea72a9aa320205b4..87f75851d660b61749ff3c76b71a589b27f5e2c3 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -477,10 +477,8 @@ public: bool getNoApsConstraintFlag() const { return m_noApsConstraintFlag; } void setNoApsConstraintFlag(bool bVal) { m_noApsConstraintFlag = bVal; } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP friend bool operator == (const ConstraintInfo& op1, const ConstraintInfo& op2); friend bool operator != (const ConstraintInfo& op1, const ConstraintInfo& op2); -#endif }; class ProfileTierLevel @@ -522,10 +520,8 @@ public: Level::Name getSubLayerLevelIdc(int i) const { return m_subLayerLevelIdc[i]; } void setSubLayerLevelIdc(int i, Level::Name x) { m_subLayerLevelIdc[i] = x; } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP friend bool operator == (const ProfileTierLevel& op1, const ProfileTierLevel& op2); friend bool operator != (const ProfileTierLevel& op1, const ProfileTierLevel& op2); -#endif }; @@ -845,7 +841,6 @@ public: }; #endif -#if JVET_Q0117_PARAMETER_SETS_CLEANUP // Rename DPS to DCI (decoding_capability_information) class DCI { private: @@ -872,33 +867,6 @@ public: return true; } }; -#else -class DPS -{ -private: - int m_decodingParameterSetId; - int m_maxSubLayersMinus1; - std::vector<ProfileTierLevel> m_profileTierLevel; - -public: - DPS() - : m_decodingParameterSetId(-1) - , m_maxSubLayersMinus1 (0) - {}; - - virtual ~DPS() {}; - - int getDecodingParameterSetId() const { return m_decodingParameterSetId; } - void setDecodingParameterSetId(int val) { m_decodingParameterSetId = val; } - int getMaxSubLayersMinus1() const { return m_maxSubLayersMinus1; } - void setMaxSubLayersMinus1(int val) { m_maxSubLayersMinus1 = val; } - - size_t getNumPTLs() const { return m_profileTierLevel.size(); } - void setProfileTierLevel(const std::vector<ProfileTierLevel> &val) { m_profileTierLevel = val; } - const ProfileTierLevel& getProfileTierLevel(int idx) const { return m_profileTierLevel[idx]; } -}; - -#endif class VPS @@ -1255,9 +1223,6 @@ class SPS { private: int m_SPSId; -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - int m_decodingParameterSetId; -#endif int m_VPSId; bool m_affineAmvrEnabledFlag; @@ -1443,10 +1408,6 @@ public: int getSPSId() const { return m_SPSId; } void setSPSId(int i) { m_SPSId = i; } -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - void setDecodingParameterSetId(int val) { m_decodingParameterSetId = val; } - int getDecodingParameterSetId() const { return m_decodingParameterSetId; } -#endif int getVPSId() const { return m_VPSId; } void setVPSId(int i) { m_VPSId = i; } @@ -2687,9 +2648,6 @@ private: // access channel -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - const DPS* m_dps; -#endif const VPS* m_pcVPS; const SPS* m_pcSPS; const PPS* m_pcPPS; @@ -2758,10 +2716,6 @@ public: const PicHeader* getPicHeader() const { return m_pcPicHeader; } int getRefIdx4MVPair( RefPicList eCurRefPicList, int nCurRefIdx ); -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - void setDPS( DPS* dps ) { m_dps = dps; } - const DPS* getDPS() const { return m_dps; } -#endif void setSPS( const SPS* pcSPS ) { m_pcSPS = pcSPS; } const SPS* getSPS() const { return m_pcSPS; } @@ -3175,11 +3129,7 @@ public: #if ENABLE_TRACING void xTraceVPSHeader(); -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP -void xTraceDPSHeader(); -#else void xTraceDCIHeader(); -#endif void xTraceSPSHeader(); void xTracePPSHeader(); void xTraceAPSHeader(); diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index d2a7bf3ab9ca03bc91af84da52d2b2224271fd61..765f80b431a3207801b0e55e196f6ccc7fc11a57 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -118,7 +118,6 @@ -#define JVET_Q0117_PARAMETER_SETS_CLEANUP 1 // JVET-Q0117: cleanups on parameter sets #define JVET_Q0751_MIXED_NAL_UNIT_TYPES 1 // JVET-Q0751: Constraints and properties of mixed nal unit types @@ -961,11 +960,7 @@ enum NalUnitType NAL_UNIT_RESERVED_IRAP_VCL_11, NAL_UNIT_RESERVED_IRAP_VCL_12, -#if JVET_Q0117_PARAMETER_SETS_CLEANUP NAL_UNIT_DCI, // 13 -#else - NAL_UNIT_DPS, // 13 -#endif NAL_UNIT_VPS, // 14 NAL_UNIT_SPS, // 15 NAL_UNIT_PPS, // 16 diff --git a/source/Lib/CommonLib/Unit.h b/source/Lib/CommonLib/Unit.h index 9d115c6b358bd551d8670f0c1047bcf50a39c057..3e2a24f6c7fb53d039b7a631b42d188eede8ccf7 100644 --- a/source/Lib/CommonLib/Unit.h +++ b/source/Lib/CommonLib/Unit.h @@ -271,11 +271,7 @@ struct UnitAreaRelative : public UnitArea class SPS; class VPS; -#if JVET_Q0117_PARAMETER_SETS_CLEANUP class DCI; -#else -class DPS; -#endif class PPS; class Slice; diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index b49b418691f5a0141c35e7e5cddaefa2b39838cf..a36480e6d20c18b4d6604b1645487c1e81a5b450 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -451,9 +451,7 @@ DecLib::DecLib() #endif , m_maxDecSubPicIdx(0) , m_maxDecSliceAddrInSubPic(-1) -#if JVET_Q0117_PARAMETER_SETS_CLEANUP , m_dci(NULL) -#endif { #if ENABLE_SIMD_OPT_BUFFER g_pelBufOP.initPelBufOpsX86(); @@ -481,13 +479,11 @@ void DecLib::destroy() delete m_apcSlicePilot; m_apcSlicePilot = NULL; -#if JVET_Q0117_PARAMETER_SETS_CLEANUP if( m_dci ) { delete m_dci; m_dci = NULL; } -#endif m_cSliceDecoder.destroy(); } @@ -1620,21 +1616,12 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl for( auto& naluTemporalId : m_accessUnitNals ) { -#if JVET_Q0117_PARAMETER_SETS_CLEANUP if ( naluTemporalId.first != NAL_UNIT_DCI && naluTemporalId.first != NAL_UNIT_VPS && naluTemporalId.first != NAL_UNIT_SPS && naluTemporalId.first != NAL_UNIT_EOS && naluTemporalId.first != NAL_UNIT_EOB) -#else - if ( - naluTemporalId.first != NAL_UNIT_DPS - && naluTemporalId.first != NAL_UNIT_VPS - && naluTemporalId.first != NAL_UNIT_SPS - && naluTemporalId.first != NAL_UNIT_EOS - && naluTemporalId.first != NAL_UNIT_EOB ) -#endif { CHECK( naluTemporalId.second < nalu.m_temporalId, "TemporalId shall be greater than or equal to the TemporalId of the layer access unit containing the NAL unit" ); @@ -2224,7 +2211,6 @@ void DecLib::xDecodeVPS( InputNALUnit& nalu ) m_parameterSetManager.storeVPS( m_vps, nalu.getBitstream().getFifo()); } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP void DecLib::xDecodeDCI(InputNALUnit& nalu) { m_HLSReader.setBitstream(&nalu.getBitstream()); @@ -2242,18 +2228,6 @@ void DecLib::xDecodeDCI(InputNALUnit& nalu) CHECK( !m_dci->IsIndenticalDCI(dupDCI), "Two signaled DCIs are different"); } } -#else -void DecLib::xDecodeDPS( InputNALUnit& nalu ) -{ - DPS* dps = new DPS(); - m_HLSReader.setBitstream( &nalu.getBitstream() ); - - CHECK( nalu.m_temporalId, "The value of TemporalId of DPS NAL units shall be equal to 0" ); - - m_HLSReader.parseDPS( dps ); - m_parameterSetManager.storeDPS( dps, nalu.getBitstream().getFifo() ); -} -#endif void DecLib::xDecodeSPS( InputNALUnit& nalu ) { @@ -2315,15 +2289,9 @@ bool DecLib::decode(InputNALUnit& nalu, int& iSkipFrame, int& iPOCLastDisplay) m_vps->m_targetOlsIdx = iTargetOlsIdx; #endif return false; -#if JVET_Q0117_PARAMETER_SETS_CLEANUP case NAL_UNIT_DCI: xDecodeDCI( nalu ); return false; -#else - case NAL_UNIT_DPS: - xDecodeDPS( nalu ); - return false; -#endif case NAL_UNIT_SPS: xDecodeSPS( nalu ); return false; @@ -2475,18 +2443,6 @@ void DecLib::checkNalUnitConstraints( uint32_t naluType ) xCheckNalUnitConstraintFlags( cInfo, naluType ); } -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - if (m_parameterSetManager.getActiveDPS() != NULL) - { - const DPS *dps = m_parameterSetManager.getActiveDPS(); - for (int i=0; i< dps->getNumPTLs(); i++) - { - ProfileTierLevel ptl = dps->getProfileTierLevel(i); - const ConstraintInfo *cInfo = ptl.getConstraintInfo(); - xCheckNalUnitConstraintFlags( cInfo, naluType ); - } - } -#endif } void DecLib::xCheckNalUnitConstraintFlags( const ConstraintInfo *cInfo, uint32_t naluType ) { diff --git a/source/Lib/DecoderLib/DecLib.h b/source/Lib/DecoderLib/DecLib.h index e37fb97655a7654c55d8924606f950f7506a6b3f..7a9248def23142f92ea3b38e1c3e584d0117fd06 100644 --- a/source/Lib/DecoderLib/DecLib.h +++ b/source/Lib/DecoderLib/DecLib.h @@ -169,9 +169,7 @@ public: int m_targetSubPicIdx; #endif -#if JVET_Q0117_PARAMETER_SETS_CLEANUP DCI* m_dci; -#endif public: DecLib(); virtual ~DecLib(); @@ -248,11 +246,7 @@ protected: void xDecodePicHeader( InputNALUnit& nalu ); bool xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDisplay); void xDecodeVPS( InputNALUnit& nalu ); -#if JVET_Q0117_PARAMETER_SETS_CLEANUP void xDecodeDCI( InputNALUnit& nalu ); -#else - void xDecodeDPS( InputNALUnit& nalu ); -#endif void xDecodeSPS( InputNALUnit& nalu ); void xDecodePPS( InputNALUnit& nalu ); void xDecodeAPS(InputNALUnit& nalu); diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 801af8ba0b6c7d4e54f00d24c349c90f53b4e8c1..add73b91e59691e1a9903e89ddf9bcbd6b167b14 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1324,11 +1324,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) xTraceSPSHeader (); #endif -#if JVET_Q0117_PARAMETER_SETS_CLEANUP READ_CODE(4, uiCode, "sps_seq_parameter_set_id"); pcSPS->setSPSId(uiCode); -#else - READ_CODE( 4, uiCode, "sps_decoding_parameter_set_id"); pcSPS->setDecodingParameterSetId( uiCode ); -#endif READ_CODE( 4, uiCode, "sps_video_parameter_set_id" ); pcSPS->setVPSId( uiCode ); READ_CODE(3, uiCode, "sps_max_sub_layers_minus1"); pcSPS->setMaxTLayers (uiCode + 1); CHECK(uiCode > 6, "Invalid maximum number of T-layer signalled"); @@ -1345,9 +1341,6 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG(uiCode, "gdr_enabled_flag"); pcSPS->setGDREnabledFlag(uiCode); -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - READ_CODE(4, uiCode, "sps_seq_parameter_set_id"); pcSPS->setSPSId(uiCode); -#endif READ_CODE(2, uiCode, "chroma_format_idc"); pcSPS->setChromaFormatIdc( ChromaFormat(uiCode) ); if( pcSPS->getChromaFormatIdc() == CHROMA_444 ) @@ -2057,7 +2050,6 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) xReadRbspTrailingBits(); } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP void HLSyntaxReader::parseDCI(DCI* dci) { #if ENABLE_TRACING @@ -2090,44 +2082,6 @@ void HLSyntaxReader::parseDCI(DCI* dci) } xReadRbspTrailingBits(); } -#else -void HLSyntaxReader::parseDPS(DPS* dps) -{ -#if ENABLE_TRACING - xTraceDPSHeader (); -#endif - uint32_t symbol; - - READ_CODE( 4, symbol, "dps_decoding_parameter_set_id" ); - CHECK(symbol == 0, "dps_decoding_parameter_set_id equal to zero is reserved and should not be use in a bitstream"); - dps->setDecodingParameterSetId( symbol ); - - READ_CODE( 3, symbol, "dps_max_sub_layers_minus1" ); dps->setMaxSubLayersMinus1( symbol ); - READ_CODE( 5, symbol, "dps_reserved_zero_5bits" ); CHECK(symbol != 0, "dps_reserved_zero_5bits must be equal to zero"); - - uint32_t numPTLs; - READ_CODE( 4, numPTLs, "dps_num_ptls_minus1" ); - numPTLs += 1; - - std::vector<ProfileTierLevel> ptls; - ptls.resize(numPTLs); - for (int i=0; i<numPTLs; i++) - { - parseProfileTierLevel(&ptls[i], true, 0); - } - dps->setProfileTierLevel(ptls); - - READ_FLAG( symbol, "dps_extension_flag" ); - if (symbol) - { - while ( xMoreRbspData() ) - { - READ_FLAG( symbol, "dps_extension_data_flag"); - } - } - xReadRbspTrailingBits(); -} -#endif void HLSyntaxReader::parseVPS(VPS* pcVPS) { diff --git a/source/Lib/DecoderLib/VLCReader.h b/source/Lib/DecoderLib/VLCReader.h index fa7c56f7308c1c89108d8af7cf5da8720e16a74b..eb9d2dc37e3597c07c69392016f1ed4decbeeaf2 100644 --- a/source/Lib/DecoderLib/VLCReader.h +++ b/source/Lib/DecoderLib/VLCReader.h @@ -157,11 +157,7 @@ protected: public: void setBitstream ( InputBitstream* p ) { m_pcBitstream = p; } void parseVPS ( VPS* pcVPS ); -#if JVET_Q0117_PARAMETER_SETS_CLEANUP void parseDCI ( DCI* dci ); -#else - void parseDPS ( DPS* dps ); -#endif void parseSPS ( SPS* pcSPS ); void parsePPS ( PPS* pcPPS ); void parseAPS ( APS* pcAPS ); diff --git a/source/Lib/EncoderLib/AnnexBwrite.h b/source/Lib/EncoderLib/AnnexBwrite.h index 8be7da54117f6ba3baea3dbe5cb8255701acaad7..15668d4a80c0eb4214129fb2582cb95361a45d7b 100644 --- a/source/Lib/EncoderLib/AnnexBwrite.h +++ b/source/Lib/EncoderLib/AnnexBwrite.h @@ -60,11 +60,7 @@ static std::vector<uint32_t> writeAnnexB(std::ostream& out, const AccessUnit& au static const uint8_t start_code_prefix[] = {0,0,0,1}; -#if JVET_Q0117_PARAMETER_SETS_CLEANUP if (it == au.begin() || nalu.m_nalUnitType == NAL_UNIT_DCI || nalu.m_nalUnitType == NAL_UNIT_SPS || nalu.m_nalUnitType == NAL_UNIT_VPS || nalu.m_nalUnitType == NAL_UNIT_PPS) -#else - if (it == au.begin() || nalu.m_nalUnitType == NAL_UNIT_DPS || nalu.m_nalUnitType == NAL_UNIT_SPS || nalu.m_nalUnitType == NAL_UNIT_VPS || nalu.m_nalUnitType == NAL_UNIT_PPS) -#endif { /* From AVC, When any of the following conditions are fulfilled, the diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index eab51712406891f8a9764ffbf941844ec9e62664..e70d6563db9956bc5562cfc5471d9d0783d2b022 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -694,13 +694,8 @@ protected: CostMode m_costMode; ///< The cost function to use, primarily when considering lossless coding. -#if JVET_Q0117_PARAMETER_SETS_CLEANUP DCI m_dci; bool m_DCIEnabled; ///< enable Decoding Capability Information (DCI) -#else - DPS m_dps; - bool m_decodingParameterSetEnabled; ///< enable decoding parameter set -#endif bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value bool m_hrdParametersPresentFlag; ///< enable generation of HRD parameters @@ -1778,13 +1773,8 @@ public: -#if JVET_Q0117_PARAMETER_SETS_CLEANUP void setDCI(DCI *p) { m_dci = *p; } DCI* getDCI() { return &m_dci; } -#else - void setDPS(DPS *p) { m_dps = *p; } - DPS* getDPS() { return &m_dps; } -#endif void setUseRecalculateQPAccordingToLambda (bool b) { m_recalculateQPAccordingToLambda = b; } bool getUseRecalculateQPAccordingToLambda () { return m_recalculateQPAccordingToLambda; } @@ -1795,13 +1785,8 @@ public: bool getHarmonizeGopFirstFieldCoupleEnabled( ) const { return m_bHarmonizeGopFirstFieldCoupleEnabled; } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP bool getDCIEnabled() { return m_DCIEnabled; } void setDCIEnabled(bool i) { m_DCIEnabled = i; } -#else - bool getDecodingParameterSetEnabled() { return m_decodingParameterSetEnabled; } - void setDecodingParameterSetEnabled(bool i) { m_decodingParameterSetEnabled = i; } -#endif bool getHrdParametersPresentFlag() { return m_hrdParametersPresentFlag; } void setHrdParametersPresentFlag(bool i) { m_hrdParametersPresentFlag = i; } bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 5aad7cba01252a51cdcc6f5adfef3bd63aad53ee..d29078078ae297ee0727f46dd8cc75e6109c1ec9 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -317,7 +317,6 @@ int EncGOP::xWriteVPS (AccessUnit &accessUnit, const VPS *vps) accessUnit.push_back(new NALUnitEBSP(nalu)); return (int)(accessUnit.back()->m_nalUnitData.str().size()) * 8; } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP int EncGOP::xWriteDCI(AccessUnit& accessUnit, const DCI* dci) { OutputNALUnit nalu(NAL_UNIT_DCI); @@ -327,24 +326,6 @@ int EncGOP::xWriteDCI(AccessUnit& accessUnit, const DCI* dci) accessUnit.push_back(new NALUnitEBSP(nalu)); return (int)(accessUnit.back()->m_nalUnitData.str().size()) * 8; } -#else -int EncGOP::xWriteDPS (AccessUnit &accessUnit, const DPS *dps) -{ - if (dps->getDecodingParameterSetId() !=0) - { - OutputNALUnit nalu(NAL_UNIT_DPS); - m_HLSWriter->setBitstream( &nalu.m_Bitstream ); - CHECK( nalu.m_temporalId, "The value of TemporalId of DPS NAL units shall be equal to 0" ); - m_HLSWriter->codeDPS( dps ); - accessUnit.push_back(new NALUnitEBSP(nalu)); - return (int)(accessUnit.back()->m_nalUnitData.str().size()) * 8; - } - else - { - return 0; - } -} -#endif int EncGOP::xWriteSPS( AccessUnit &accessUnit, const SPS *sps, const int layerId ) { @@ -390,14 +371,10 @@ int EncGOP::xWriteParameterSets(AccessUnit &accessUnit, Slice *slice, const bool { if (layerIdx == 0) { -#if JVET_Q0117_PARAMETER_SETS_CLEANUP if (m_pcCfg->getDCIEnabled()) { actualTotalBits += xWriteDCI(accessUnit, m_pcEncLib->getDCI()); } -#else - actualTotalBits += xWriteDPS(accessUnit, m_pcEncLib->getDPS()); -#endif if (slice->getSPS()->getVPSId() != 0) { actualTotalBits += xWriteVPS(accessUnit, m_pcEncLib->getVPS()); @@ -503,7 +480,6 @@ void EncGOP::xWriteLeadingSEIOrdered (SEIMessages& seiMessages, SEIMessages& duI { AccessUnit::iterator itNalu = accessUnit.begin(); -#if JVET_Q0117_PARAMETER_SETS_CLEANUP while ((itNalu != accessUnit.end()) && ((*itNalu)->m_nalUnitType == NAL_UNIT_ACCESS_UNIT_DELIMITER || (*itNalu)->m_nalUnitType == NAL_UNIT_VPS @@ -511,15 +487,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_DPS - || (*itNalu)->m_nalUnitType == NAL_UNIT_SPS - || (*itNalu)->m_nalUnitType == NAL_UNIT_PPS - )) -#endif { itNalu++; } @@ -4182,11 +4149,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_Q0117_PARAMETER_SETS_CLEANUP 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) -#else - if (it == accessUnit.begin() || (*it)->m_nalUnitType == NAL_UNIT_VPS || (*it)->m_nalUnitType == NAL_UNIT_DPS || (*it)->m_nalUnitType == NAL_UNIT_SPS || (*it)->m_nalUnitType == NAL_UNIT_PPS) -#endif { numRBSPBytes += 4; } diff --git a/source/Lib/EncoderLib/EncGOP.h b/source/Lib/EncoderLib/EncGOP.h index 8d6926f8eb8bbb003308cad5536fbe36eb564efb..609eb2bd2c295e395d5f8f37145b9e6a0426d7bc 100644 --- a/source/Lib/EncoderLib/EncGOP.h +++ b/source/Lib/EncoderLib/EncGOP.h @@ -318,11 +318,7 @@ protected: void xWriteDuSEIMessages (SEIMessages& duInfoSeiMessages, AccessUnit &accessUnit, int temporalId, const SPS *sps, std::deque<DUData> &duData); int xWriteVPS (AccessUnit &accessUnit, const VPS *vps); -#if JVET_Q0117_PARAMETER_SETS_CLEANUP int xWriteDCI (AccessUnit &accessUnit, const DCI *dci); -#else - int xWriteDPS (AccessUnit &accessUnit, const DPS *dps); -#endif int xWriteSPS( AccessUnit &accessUnit, const SPS *sps, const int layerId = 0 ); int xWritePPS( AccessUnit &accessUnit, const PPS *pps, const int layerId = 0 ); int xWriteAPS( AccessUnit &accessUnit, APS *aps, const int layerId, const bool isPrefixNUT ); diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 79e92c78c4d2faf7b23100f60a5d8dd91e34475d..831757358e561c3ad4729ecdd2b998a6ec7ea858 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -223,13 +223,7 @@ void EncLib::init( bool isFieldCoding, AUWriterIf* auWriterIf ) xInitSPS( sps0 ); xInitVPS( sps0 ); -#if JVET_Q0117_PARAMETER_SETS_CLEANUP xInitDCI(m_dci, sps0); -#else - int dpsId = getDecodingParameterSetEnabled() ? 1 : 0; - xInitDPS(m_dps, sps0, dpsId); - sps0.setDecodingParameterSetId(m_dps.getDecodingParameterSetId()); -#endif #if ENABLE_SPLIT_PARALLELISM if( omp_get_dynamic() ) { @@ -1069,7 +1063,6 @@ void EncLib::xInitVPS( const SPS& sps ) } } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP void EncLib::xInitDCI(DCI& dci, const SPS& sps) { dci.setMaxSubLayersMinus1(sps.getMaxTLayers() - 1); @@ -1078,19 +1071,6 @@ void EncLib::xInitDCI(DCI& dci, const SPS& sps) ptls[0] = *sps.getProfileTierLevel(); dci.setProfileTierLevel(ptls); } -#else -void EncLib::xInitDPS(DPS &dps, const SPS &sps, const int dpsId) -{ - // The SPS must have already been set up. - // set the DPS profile information. - dps.setDecodingParameterSetId(dpsId); - dps.setMaxSubLayersMinus1(sps.getMaxTLayers()-1); - std::vector<ProfileTierLevel> ptls; - ptls.resize(1); - ptls[0] = *sps.getProfileTierLevel(); - dps.setProfileTierLevel(ptls); -} -#endif void EncLib::xInitSPS( SPS& sps ) { diff --git a/source/Lib/EncoderLib/EncLib.h b/source/Lib/EncoderLib/EncLib.h index 50a65625ec7a5c9202180d914b5e27a58040d5b7..13244c6d4e24597765e2ac5182020892ede6b87a 100644 --- a/source/Lib/EncoderLib/EncLib.h +++ b/source/Lib/EncoderLib/EncLib.h @@ -167,11 +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_Q0117_PARAMETER_SETS_CLEANUP void xInitDCI(DCI& dci, const SPS& sps); ///< initialize Decoding Capability Information (DCI) from encoder options -#else - void xInitDPS (DPS &dps, const SPS &sps, const int dpsId); ///< initialize DPS from encoder options -#endif void xInitVPS( const SPS& sps ); ///< initialize VPS from encoder options void xInitSPS( SPS& sps ); ///< initialize SPS from encoder options void xInitPPS (PPS &pps, const SPS &sps); ///< initialize PPS from encoder options diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 27f2938af41bb68cd551361535e5e876bea0a542..03d0e142dc6eaaa3f7b53d87f6c92cc80352fd34 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -827,11 +827,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) #if ENABLE_TRACING xTraceSPSHeader (); #endif -#if JVET_Q0117_PARAMETER_SETS_CLEANUP WRITE_CODE(pcSPS->getSPSId(), 4, "sps_seq_parameter_set_id"); -#else - WRITE_CODE( pcSPS->getDecodingParameterSetId (), 4, "sps_decoding_parameter_set_id" ); -#endif WRITE_CODE( pcSPS->getVPSId(), 4, "sps_video_parameter_set_id" ); CHECK(pcSPS->getMaxTLayers() == 0, "Maximum number of temporal sub-layers is '0'"); @@ -845,9 +841,6 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) } WRITE_FLAG(pcSPS->getGDREnabledFlag(), "gdr_enabled_flag"); -#if !JVET_Q0117_PARAMETER_SETS_CLEANUP - WRITE_CODE( pcSPS->getSPSId (), 4, "sps_seq_parameter_set_id" ); -#endif WRITE_CODE(int(pcSPS->getChromaFormatIdc ()), 2, "chroma_format_idc"); const ChromaFormat format = pcSPS->getChromaFormatIdc(); @@ -1341,7 +1334,6 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) } xWriteRbspTrailingBits(); } -#if JVET_Q0117_PARAMETER_SETS_CLEANUP void HLSWriter::codeDCI(const DCI* dci) { #if ENABLE_TRACING @@ -1363,29 +1355,6 @@ void HLSWriter::codeDCI(const DCI* dci) WRITE_FLAG(0, "dci_extension_flag"); xWriteRbspTrailingBits(); } -#else -void HLSWriter::codeDPS( const DPS* dps ) -{ -#if ENABLE_TRACING - xTraceDPSHeader(); -#endif - WRITE_CODE( dps->getDecodingParameterSetId(), 4, "dps_decoding_parameter_set_id" ); - WRITE_CODE( dps->getMaxSubLayersMinus1(), 3, "dps_max_sub_layers_minus1" ); - WRITE_CODE( 0, 5, "dps_reserved_zero_5bits" ); - uint32_t numPTLs = (uint32_t) dps->getNumPTLs(); - CHECK (numPTLs<1, "At least one PTL must be available in DPS"); - - WRITE_CODE( numPTLs - 1, 4, "dps_num_ptls_minus1" ); - - for (int i=0; i< numPTLs; i++) - { - ProfileTierLevel ptl = dps->getProfileTierLevel(i); - codeProfileTierLevel( &ptl, true, 0 ); - } - WRITE_FLAG( 0, "dps_extension_flag" ); - xWriteRbspTrailingBits(); -} -#endif void HLSWriter::codeVPS(const VPS* pcVPS) { #if ENABLE_TRACING diff --git a/source/Lib/EncoderLib/VLCWriter.h b/source/Lib/EncoderLib/VLCWriter.h index 99b0046b016f6e4982c80190ff866ec369cebb59..e668c962db4ba724b76d14343715ad4bf16a669b 100644 --- a/source/Lib/EncoderLib/VLCWriter.h +++ b/source/Lib/EncoderLib/VLCWriter.h @@ -131,11 +131,7 @@ public: void codeLmcsAps ( APS* pcAPS ); void codeScalingListAps ( APS* pcAPS ); void codeVPS ( const VPS* pcVPS ); -#if JVET_Q0117_PARAMETER_SETS_CLEANUP void codeDCI ( const DCI* dci ); -#else - void codeDPS ( const DPS* dps ); -#endif #if JVET_Q0775_PH_IN_SH void codePictureHeader ( PicHeader* picHeader, bool writeRbspTrailingBits ); #else