diff --git a/doc/software-manual.pdf b/doc/software-manual.pdf index f5e228c5d51fc520377531994ea111853b0cb95b..fa9fba1b0ca835944b0f3f0041ed6e10413ff5e3 100644 Binary files a/doc/software-manual.pdf and b/doc/software-manual.pdf differ diff --git a/doc/software-manual.tex b/doc/software-manual.tex index f6dbde2e62b906719486344096b271e396dc4e75..400706a62a5387654fdfd0c49150cdfe07a41523 100644 --- a/doc/software-manual.tex +++ b/doc/software-manual.tex @@ -1167,6 +1167,13 @@ Specifies the level to signal in the i-th PTL of the VPS (with i an integer grea \Default{0} & Specifies the index of the PTL that applies to the i-th OLS (with i an integer greater than 0) \\ + +\Option{SamePicTimingInAllOLS} & +%\ShortOption{\None} & +\Default{1} & +Indicates that all OLSs are using the same (not nested) picture timing SEI message, i.e. picture timing SEI will not +be included in scalable nesting SEI messages (if scalable nesting SEI is enabled). +\\ \end{OptionTableNoShorthand} diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 80abf2b4206d9c3969b5211abf2707ab7ddf0078..ee51cd13e37407f33cf5908822a7fc3fb38c528d 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -790,6 +790,9 @@ void EncApp::xInitLibCfg() m_cEncLib.setUseRecalculateQPAccordingToLambda ( m_recalculateQPAccordingToLambda ); m_cEncLib.setDCIEnabled ( m_DCIEnabled ); m_cEncLib.setVuiParametersPresentFlag ( m_vuiParametersPresentFlag ); +#if JVET_Q0394_TIMING_SEI + m_cEncLib.setSamePicTimingInAllOLS (m_samePicTimingInAllOLS); +#endif m_cEncLib.setAspectRatioInfoPresentFlag ( m_aspectRatioInfoPresentFlag); m_cEncLib.setAspectRatioIdc ( m_aspectRatioIdc ); m_cEncLib.setSarWidth ( m_sarWidth ); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index a14705b41d4e31bbd9c090b7fb8004110cba58a4..3b5e2bac74675eee35a125a402fa609db7ff98f5 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1177,6 +1177,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("RecalculateQPAccordingToLambda", m_recalculateQPAccordingToLambda, false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case") ("HrdParametersPresent,-hrd", m_hrdParametersPresentFlag, false, "Enable generation of hrd_parameters()") ("VuiParametersPresent,-vui", m_vuiParametersPresentFlag, false, "Enable generation of vui_parameters()") +#if JVET_Q0394_TIMING_SEI + ("SamePicTimingInAllOLS", m_samePicTimingInAllOLS, true, "Indicates that the same picture timing SEI message is used in all OLS") +#endif ("AspectRatioInfoPresent", m_aspectRatioInfoPresentFlag, false, "Signals whether aspect_ratio_idc is present") ("AspectRatioIdc", m_aspectRatioIdc, 0, "aspect_ratio_idc") ("SarWidth", m_sarWidth, 0, "horizontal size of the sample aspect ratio") diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 8e1cb2b0934a0e29ba28b7a48c0e00bc5e307e99..0762b6d85bd86daff670ca9dcf6d1ce2328748e0 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -658,6 +658,9 @@ protected: bool m_DCIEnabled; ///< enable Decoding Capability Information (DCI) bool m_hrdParametersPresentFlag; ///< enable generation of HRD parameters bool m_vuiParametersPresentFlag; ///< enable generation of VUI parameters +#if JVET_Q0394_TIMING_SEI + bool m_samePicTimingInAllOLS; ///< same picture timing SEI message is used in all OLS +#endif bool m_aspectRatioInfoPresentFlag; ///< Signals whether aspect_ratio_idc is present int m_aspectRatioIdc; ///< aspect_ratio_idc int m_sarWidth; ///< horizontal size of the sample aspect ratio diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 1a66a5aac371f79737a48575d664235039e4dbc0..e0efc55a8f48527ed37dd694b10e2cc0079116dd 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -159,7 +159,7 @@ #define JVET_R0045_TS_MIN_QP_CLEANUP 1 // JVET-R0045: Cleanup for signalling of minimum QP of transform skip -#define JVET_Q0394_TIMING_SEI +#define JVET_Q0394_TIMING_SEI 1 // JVET_Q0394: Picture timing for OLSs #define JVET_R0100 1 // JVET-R0100: Proposal 1 DUI Signalling and inference diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 8323d74c5d0038085ea2dc9db99c147cccda57d7..0ec6d88d8c8111eabd34e2f3e27b5c2e8c63c2ac 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -689,6 +689,9 @@ protected: bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value bool m_hrdParametersPresentFlag; ///< enable generation of HRD parameters bool m_vuiParametersPresentFlag; ///< enable generation of VUI parameters +#if JVET_Q0394_TIMING_SEI + bool m_samePicTimingInAllOLS; ///< same picture timing SEI message is used in all OLS +#endif bool m_aspectRatioInfoPresentFlag; ///< Signals whether aspect_ratio_idc is present int m_aspectRatioIdc; ///< aspect_ratio_idc int m_sarWidth; ///< horizontal size of the sample aspect ratio @@ -1785,6 +1788,10 @@ public: void setHrdParametersPresentFlag(bool i) { m_hrdParametersPresentFlag = i; } bool getVuiParametersPresentFlag() { return m_vuiParametersPresentFlag; } void setVuiParametersPresentFlag(bool i) { m_vuiParametersPresentFlag = i; } +#if JVET_Q0394_TIMING_SEI + bool getSamePicTimingInAllOLS() const { return m_samePicTimingInAllOLS; } + void setSamePicTimingInAllOLS(bool b) { m_samePicTimingInAllOLS = b; } +#endif bool getAspectRatioInfoPresentFlag() { return m_aspectRatioInfoPresentFlag; } void setAspectRatioInfoPresentFlag(bool i) { m_aspectRatioInfoPresentFlag = i; } int getAspectRatioIdc() { return m_aspectRatioIdc; } diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 1d508ce9b06fff3460b4e9fe34adb8aae1969849..1777bb2174bcc4e4ee91f0b3133cb88cb4ac5601 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -999,7 +999,11 @@ void EncGOP::xCreatePictureTimingSEI (int IRAPGOPid, SEIMessages& seiMessages, { seiMessages.push_back(pictureTimingSEI); +#if JVET_Q0394_TIMING_SEI + if (m_pcCfg->getScalableNestingSEIEnabled() && !m_pcCfg->getSamePicTimingInAllOLS()) +#else if (m_pcCfg->getScalableNestingSEIEnabled()) +#endif { SEIPictureTiming *pictureTimingSEIcopy = new SEIPictureTiming(); pictureTimingSEI->copyTo(*pictureTimingSEIcopy); diff --git a/source/Lib/EncoderLib/EncHRD.cpp b/source/Lib/EncoderLib/EncHRD.cpp index dcfb0ebab88e46de4cbb09b0eecac271210539a5..c28dc0d4c473e7e1f728ddafd27293bb6de19139 100644 --- a/source/Lib/EncoderLib/EncHRD.cpp +++ b/source/Lib/EncoderLib/EncHRD.cpp @@ -108,8 +108,11 @@ void EncHRD::initHRDParameters(EncCfg* encCfg) m_generalHrdParams.setGeneralNalHrdParametersPresentFlag(rateCnt); m_generalHrdParams.setGeneralVclHrdParametersPresentFlag(rateCnt); - useSubCpbParams &= (m_generalHrdParams.getGeneralNalHrdParametersPresentFlag() || m_generalHrdParams.getGeneralVclHrdParametersPresentFlag()); +#if JVET_Q0394_TIMING_SEI + m_generalHrdParams.setGeneralSamePicTimingInAllOlsFlag(encCfg->getSamePicTimingInAllOLS()); +#endif + useSubCpbParams &= (m_generalHrdParams.getGeneralNalHrdParametersPresentFlag() || m_generalHrdParams.getGeneralVclHrdParametersPresentFlag()); m_generalHrdParams.setGeneralDecodingUnitHrdParamsPresentFlag(useSubCpbParams); if (m_generalHrdParams.getGeneralDecodingUnitHrdParamsPresentFlag())