Commit 3b238092 authored by Zhipin Deng's avatar Zhipin Deng
Browse files

Bug fix for M0451

parent c9825e17
Pipeline #1055 passed with stage
......@@ -112,6 +112,52 @@ void EncApp::xInitLibCfg()
m_cEncLib.setConformanceWindow ( m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );
m_cEncLib.setFramesToBeEncoded ( m_framesToBeEncoded );
//====== SPS constraint flags =======
m_cEncLib.setIntraOnlyConstraintFlag ( m_intraConstraintFlag );
m_cEncLib.setMaxBitDepthConstraintIdc ( m_bitDepthConstraint - 8 );
m_cEncLib.setMaxChromaFormatConstraintIdc ( m_chromaFormatConstraint );
m_cEncLib.setFrameConstraintFlag ( m_bFrameConstraintFlag );
m_cEncLib.setNoQtbttDualTreeIntraConstraintFlag ( !m_dualTree );
m_cEncLib.setNoSaoConstraintFlag ( !m_bUseSAO );
m_cEncLib.setNoAlfConstraintFlag ( !m_alf );
m_cEncLib.setNoPcmConstraintFlag ( !m_usePCM );
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
m_cEncLib.setNoRefWraparoundConstraintFlag ( m_bNoRefWraparoundConstraintFlag );
#endif
m_cEncLib.setNoTemporalMvpConstraintFlag ( m_TMVPModeId ? false : true );
m_cEncLib.setNoSbtmvpConstraintFlag ( m_SubPuMvpMode ? false : true );
m_cEncLib.setNoAmvrConstraintFlag ( m_bNoAmvrConstraintFlag );
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
m_cEncLib.setNoBdofConstraintFlag ( !m_BIO );
#endif
m_cEncLib.setNoCclmConstraintFlag ( m_LMChroma ? false : true );
#if JVET_M0464_UNI_MTS
#if JVET_M0303_IMPLICIT_MTS
m_cEncLib.setNoMtsConstraintFlag ( (m_MTS || m_MTSImplicit) ? false : true );
#else
m_cEncLib.setNoMtsConstraintFlag ( m_MTS ? false : true );
#endif
#else
#if JVET_M0303_IMPLICIT_MTS
m_cEncLib.setNoMtsConstraintFlag ( (m_EMT || m_MTSImplicit) ? false : true );
#else
m_cEncLib.setNoMtsConstraintFlag ( m_EMT ? false : true );
#endif
#endif
m_cEncLib.setNoAffineMotionConstraintFlag ( !m_Affine );
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
m_cEncLib.setNoGbiConstraintFlag ( !m_GBi );
m_cEncLib.setNoMhIntraConstraintFlag ( !m_MHIntra );
m_cEncLib.setNoTriangleConstraintFlag ( !m_Triangle );
#endif
m_cEncLib.setNoLadfConstraintFlag ( !m_LadfEnabed );
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
m_cEncLib.setNoCurrPicRefConstraintFlag ( !m_IBCMode );
m_cEncLib.setNoQpDeltaConstraintFlag ( m_bNoQpDeltaConstraintFlag );
#endif
m_cEncLib.setNoDepQuantConstraintFlag ( !m_depQuantEnabledFlag);
m_cEncLib.setNoSignDataHidingConstraintFlag ( !m_signDataHidingEnabledFlag );
//====== Coding Structure ========
m_cEncLib.setIntraPeriod ( m_iIntraPeriod );
m_cEncLib.setDecodingRefreshType ( m_iDecodingRefreshType );
......
......@@ -108,6 +108,38 @@ EncAppCfg::EncAppCfg()
, m_snrInternalColourSpace(false)
, m_outputInternalColourSpace(false)
, m_packedYUVMode(false)
, m_bIntraOnlyConstraintFlag(false)
, m_maxBitDepthConstraintIdc(0)
, m_maxChromaFormatConstraintIdc(CHROMA_420)
, m_bFrameConstraintFlag(false)
, m_bNoQtbttDualTreeIntraConstraintFlag(false)
, m_bNoSaoConstraintFlag(false)
, m_bNoAlfConstraintFlag(false)
, m_bNoPcmConstraintFlag(false)
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
, m_bNoRefWraparoundConstraintFlag(false)
#endif
, m_bNoTemporalMvpConstraintFlag(false)
, m_bNoSbtmvpConstraintFlag(false)
, m_bNoAmvrConstraintFlag(false)
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
, m_bNoBdofConstraintFlag(false)
#endif
, m_bNoCclmConstraintFlag(false)
, m_bNoMtsConstraintFlag(false)
, m_bNoAffineMotionConstraintFlag(false)
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
, m_bNoGbiConstraintFlag(false)
, m_bNoMhIntraConstraintFlag(false)
, m_bNoTriangleConstraintFlag(false)
#endif
, m_bNoLadfConstraintFlag(false)
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
, m_bNoCurrPicRefConstraintFlag(false)
, m_bNoQpDeltaConstraintFlag(false)
#endif
, m_bNoDepQuantConstraintFlag(false)
, m_bNoSignDataHidingConstraintFlag(false)
#if EXTENSION_360_VIDEO
, m_ext360(*this)
#endif
......
......@@ -117,6 +117,39 @@ protected:
bool m_bClipOutputVideoToRec709Range;
bool m_packedYUVMode; ///< If true, output 10-bit and 12-bit YUV data as 5-byte and 3-byte (respectively) packed YUV data
bool m_bIntraOnlyConstraintFlag;
uint32_t m_maxBitDepthConstraintIdc;
uint32_t m_maxChromaFormatConstraintIdc;
bool m_bFrameConstraintFlag;
bool m_bNoQtbttDualTreeIntraConstraintFlag;
bool m_bNoSaoConstraintFlag;
bool m_bNoAlfConstraintFlag;
bool m_bNoPcmConstraintFlag;
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
bool m_bNoRefWraparoundConstraintFlag;
#endif
bool m_bNoTemporalMvpConstraintFlag;
bool m_bNoSbtmvpConstraintFlag;
bool m_bNoAmvrConstraintFlag;
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
bool m_bNoBdofConstraintFlag;
#endif
bool m_bNoCclmConstraintFlag;
bool m_bNoMtsConstraintFlag;
bool m_bNoAffineMotionConstraintFlag;
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
bool m_bNoGbiConstraintFlag;
bool m_bNoMhIntraConstraintFlag;
bool m_bNoTriangleConstraintFlag;
#endif
bool m_bNoLadfConstraintFlag;
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
bool m_bNoCurrPicRefConstraintFlag;
bool m_bNoQpDeltaConstraintFlag;
#endif
bool m_bNoDepQuantConstraintFlag;
bool m_bNoSignDataHidingConstraintFlag;
// profile/level
Profile::Name m_profile;
Level::Tier m_levelTier;
......
......@@ -822,50 +822,39 @@ void EncLib::xInitVPS(VPS &vps, const SPS &sps)
void EncLib::xInitSPS(SPS &sps)
{
sps.setIntraOnlyConstraintFlag(m_intraConstraintFlag);
sps.setMaxBitDepthConstraintIdc(m_bitDepthConstraintValue - 8);
sps.setMaxChromaFormatConstraintIdc(m_chromaFormatConstraintValue);
sps.setIntraOnlyConstraintFlag(m_bIntraOnlyConstraintFlag);
sps.setMaxBitDepthConstraintIdc(m_maxBitDepthConstraintIdc);
sps.setMaxChromaFormatConstraintIdc(m_maxChromaFormatConstraintIdc);
sps.setFrameConstraintFlag(m_frameOnlyConstraintFlag);
sps.setNoQtbttDualTreeIntraConstraintFlag(!m_dualITree);
sps.setNoSaoConstraintFlag(!m_bUseSAO);
sps.setNoAlfConstraintFlag(!m_alf);
sps.setNoPcmConstraintFlag(!m_usePCM);
sps.setNoQtbttDualTreeIntraConstraintFlag(m_bNoQtbttDualTreeIntraConstraintFlag);
sps.setNoSaoConstraintFlag(m_bNoSaoConstraintFlag);
sps.setNoAlfConstraintFlag(m_bNoAlfConstraintFlag);
sps.setNoPcmConstraintFlag(m_bNoPcmConstraintFlag);
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
sps.setNoRefWraparoundConstraintFlag(!m_bNoRefWraparoundConstraintFlag);
sps.setNoRefWraparoundConstraintFlag(m_bNoRefWraparoundConstraintFlag);
#endif
sps.setNoTemporalMvpConstraintFlag(m_TMVPModeId ? false : true);
sps.setNoSbtmvpConstraintFlag(m_SubPuMvpMode ? false : true);
sps.setNoAmvrConstraintFlag(!m_bNoAmvrConstraintFlag);
sps.setNoTemporalMvpConstraintFlag(m_bNoTemporalMvpConstraintFlag);
sps.setNoSbtmvpConstraintFlag(m_bNoSbtmvpConstraintFlag);
sps.setNoAmvrConstraintFlag(m_bNoAmvrConstraintFlag);
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
sps.setNoBdofConstraintFlag(!m_BIO);
sps.setNoBdofConstraintFlag(m_bNoBdofConstraintFlag);
#endif
sps.setNoCclmConstraintFlag(m_LMChroma ? false : true);
#if JVET_M0464_UNI_MTS
#if JVET_M0303_IMPLICIT_MTS
sps.setNoMtsConstraintFlag((m_IntraMTS || m_InterMTS || m_ImplicitMTS) ? false : true);
#else
sps.setNoMtsConstraintFlag((m_IntraMTS || m_InterMTS) ? false : true);
#endif
#else
#if JVET_M0303_IMPLICIT_MTS
sps.setNoMtsConstraintFlag((m_IntraEMT || m_InterEMT || m_ImplicitMTS) ? false : true);
#else
sps.setNoMtsConstraintFlag((m_IntraEMT || m_InterEMT) ? false : true);
#endif
#endif
sps.setNoAffineMotionConstraintFlag(!m_Affine);
sps.setNoCclmConstraintFlag(m_bNoCclmConstraintFlag);
sps.setNoMtsConstraintFlag(m_bNoMtsConstraintFlag);
sps.setNoAffineMotionConstraintFlag(m_bNoAffineMotionConstraintFlag);
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
sps.setNoGbiConstraintFlag(!m_GBi);
sps.setNoMhIntraConstraintFlag(!m_MHIntra);
sps.setNoTriangleConstraintFlag(!m_Triangle);
sps.setNoGbiConstraintFlag(m_bNoGbiConstraintFlag);
sps.setNoMhIntraConstraintFlag(m_bNoMhIntraConstraintFlag);
sps.setNoTriangleConstraintFlag(m_bNoTriangleConstraintFlag);
#endif
sps.setNoLadfConstraintFlag(!m_LadfEnabled);
sps.setNoLadfConstraintFlag(m_bNoLadfConstraintFlag);
#if JVET_M0451_INTEROPERABILITY_POINT_SYNTAX
sps.setNoCurrPicRefConstraintFlag(!m_IBCMode);
sps.setNoQpDeltaConstraintFlag(!m_bNoQpDeltaConstraintFlag);
sps.setNoCurrPicRefConstraintFlag(m_bNoCurrPicRefConstraintFlag);
sps.setNoQpDeltaConstraintFlag(m_bNoQpDeltaConstraintFlag);
#endif
sps.setNoDepQuantConstraintFlag(!m_DepQuantEnabledFlag);
sps.setNoSignDataHidingConstraintFlag(!m_SignDataHidingEnabledFlag);
sps.setNoDepQuantConstraintFlag(m_bNoDepQuantConstraintFlag);
sps.setNoSignDataHidingConstraintFlag(m_bNoSignDataHidingConstraintFlag);
ProfileTierLevel& profileTierLevel = *sps.getPTL()->getGeneralPTL();
profileTierLevel.setLevelIdc (m_level);
profileTierLevel.setTierFlag (m_levelTier);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment