Commit bb26a6a6 authored by Xiang Li's avatar Xiang Li

Merge branch 'clean5b' into 'master'

Remove macros from N meeting cycle and more

See merge request !638
parents cc2a3e03 7817ad84
Pipeline #1794 passed with stage
...@@ -153,11 +153,7 @@ uint32_t DecApp::decode() ...@@ -153,11 +153,7 @@ uint32_t DecApp::decode()
{ {
read(nalu); read(nalu);
#if JVET_N0278_HLS
if ((m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || !isNaluTheTargetLayer(&nalu)) if ((m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || !isNaluTheTargetLayer(&nalu))
#else
if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) )
#endif
{ {
bNewPicture = false; bNewPicture = false;
} }
...@@ -237,16 +233,8 @@ uint32_t DecApp::decode() ...@@ -237,16 +233,8 @@ uint32_t DecApp::decode()
m_cDecLib.setNoOutputPriorPicsFlag (false); m_cDecLib.setNoOutputPriorPicsFlag (false);
} }
if ( bNewPicture && if ( bNewPicture &&
#if !JVET_M0101_HLS
( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
|| nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
|| nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
|| nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL
|| nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP ) )
#else
( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
|| nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP) ) || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP) )
#endif
{ {
xFlushOutput( pcListPic ); xFlushOutput( pcListPic );
} }
...@@ -256,16 +244,8 @@ uint32_t DecApp::decode() ...@@ -256,16 +244,8 @@ uint32_t DecApp::decode()
m_cDecLib.setFirstSliceInPicture (false); m_cDecLib.setFirstSliceInPicture (false);
} }
// write reconstruction to file -- for additional bumping as defined in C.5.2.3 // write reconstruction to file -- for additional bumping as defined in C.5.2.3
#if JVET_N0067_NAL_Unit_Header
if (!bNewPicture && ((nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_VCL_15) if (!bNewPicture && ((nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_VCL_15)
|| (nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_IDR_W_RADL && nalu.m_nalUnitType <= NAL_UNIT_CODED_SLICE_GRA))) || (nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_IDR_W_RADL && nalu.m_nalUnitType <= NAL_UNIT_CODED_SLICE_GRA)))
#else
#if !JVET_M0101_HLS
if(!bNewPicture && nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL_N && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_VCL31)
#else
if (!bNewPicture && nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_VCL15)
#endif
#endif
{ {
xWriteOutput( pcListPic, nalu.m_temporalId ); xWriteOutput( pcListPic, nalu.m_temporalId );
} }
...@@ -313,9 +293,7 @@ void DecApp::xCreateDecLib() ...@@ -313,9 +293,7 @@ void DecApp::xCreateDecLib()
); );
m_cDecLib.setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); m_cDecLib.setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
#if JVET_N0278_HLS
m_cDecLib.setTargetDecLayer(m_iTargetLayer); m_cDecLib.setTargetDecLayer(m_iTargetLayer);
#endif
if (!m_outputDecodedSEIMessagesFilename.empty()) if (!m_outputDecodedSEIMessagesFilename.empty())
{ {
...@@ -409,9 +387,6 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId ) ...@@ -409,9 +387,6 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId )
if ( !m_reconFileName.empty() ) if ( !m_reconFileName.empty() )
{ {
const Window &conf = pcPicTop->cs->sps->getConformanceWindow(); const Window &conf = pcPicTop->cs->sps->getConformanceWindow();
#if !JVET_N0063_VUI
const Window defDisp = (m_respectDefDispWindow && pcPicTop->cs->sps->getVuiParametersPresentFlag()) ? pcPicTop->cs->sps->getVuiParameters()->getDefaultDisplayWindow() : Window();
#endif
const bool isTff = pcPicTop->topField; const bool isTff = pcPicTop->topField;
bool display = true; bool display = true;
...@@ -430,17 +405,10 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId ) ...@@ -430,17 +405,10 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId )
m_cVideoIOYuvReconFile.write( pcPicTop->getRecoBuf(), pcPicBottom->getRecoBuf(), m_cVideoIOYuvReconFile.write( pcPicTop->getRecoBuf(), pcPicBottom->getRecoBuf(),
m_outputColourSpaceConvert, m_outputColourSpaceConvert,
false, // TODO: m_packedYUVMode, false, // TODO: m_packedYUVMode,
#if JVET_N0063_VUI
conf.getWindowLeftOffset(), conf.getWindowLeftOffset(),
conf.getWindowRightOffset(), conf.getWindowRightOffset(),
conf.getWindowTopOffset(), conf.getWindowTopOffset(),
conf.getWindowBottomOffset(), conf.getWindowBottomOffset(),
#else
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
#endif
NUM_CHROMA_FORMAT, isTff ); NUM_CHROMA_FORMAT, isTff );
} }
} }
...@@ -484,24 +452,14 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId ) ...@@ -484,24 +452,14 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId )
if (!m_reconFileName.empty()) if (!m_reconFileName.empty())
{ {
const Window &conf = pcPic->cs->sps->getConformanceWindow(); const Window &conf = pcPic->cs->sps->getConformanceWindow();
#if !JVET_N0063_VUI
const Window defDisp = (m_respectDefDispWindow && pcPic->cs->sps->getVuiParametersPresentFlag()) ? pcPic->cs->sps->getVuiParameters()->getDefaultDisplayWindow() : Window();
#endif
m_cVideoIOYuvReconFile.write( pcPic->getRecoBuf(), m_cVideoIOYuvReconFile.write( pcPic->getRecoBuf(),
m_outputColourSpaceConvert, m_outputColourSpaceConvert,
m_packedYUVMode, m_packedYUVMode,
#if JVET_N0063_VUI
conf.getWindowLeftOffset(), conf.getWindowLeftOffset(),
conf.getWindowRightOffset(), conf.getWindowRightOffset(),
conf.getWindowTopOffset(), conf.getWindowTopOffset(),
conf.getWindowBottomOffset(), conf.getWindowBottomOffset(),
#else
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
#endif
NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range ); NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range );
} }
...@@ -556,25 +514,15 @@ void DecApp::xFlushOutput( PicList* pcListPic ) ...@@ -556,25 +514,15 @@ void DecApp::xFlushOutput( PicList* pcListPic )
if ( !m_reconFileName.empty() ) if ( !m_reconFileName.empty() )
{ {
const Window &conf = pcPicTop->cs->sps->getConformanceWindow(); const Window &conf = pcPicTop->cs->sps->getConformanceWindow();
#if !JVET_N0063_VUI
const Window defDisp = (m_respectDefDispWindow && pcPicTop->cs->sps->getVuiParametersPresentFlag()) ? pcPicTop->cs->sps->getVuiParameters()->getDefaultDisplayWindow() : Window();
#endif
const bool isTff = pcPicTop->topField; const bool isTff = pcPicTop->topField;
m_cVideoIOYuvReconFile.write( pcPicTop->getRecoBuf(), pcPicBottom->getRecoBuf(), m_cVideoIOYuvReconFile.write( pcPicTop->getRecoBuf(), pcPicBottom->getRecoBuf(),
m_outputColourSpaceConvert, m_outputColourSpaceConvert,
false, // TODO: m_packedYUVMode, false, // TODO: m_packedYUVMode,
#if JVET_N0063_VUI
conf.getWindowLeftOffset(), conf.getWindowLeftOffset(),
conf.getWindowRightOffset(), conf.getWindowRightOffset(),
conf.getWindowTopOffset(), conf.getWindowTopOffset(),
conf.getWindowBottomOffset(), conf.getWindowBottomOffset(),
#else
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
#endif
NUM_CHROMA_FORMAT, isTff ); NUM_CHROMA_FORMAT, isTff );
} }
...@@ -621,24 +569,14 @@ void DecApp::xFlushOutput( PicList* pcListPic ) ...@@ -621,24 +569,14 @@ void DecApp::xFlushOutput( PicList* pcListPic )
if (!m_reconFileName.empty()) if (!m_reconFileName.empty())
{ {
const Window &conf = pcPic->cs->sps->getConformanceWindow(); const Window &conf = pcPic->cs->sps->getConformanceWindow();
#if !JVET_N0063_VUI
const Window defDisp = (m_respectDefDispWindow && pcPic->cs->sps->getVuiParametersPresentFlag()) ? pcPic->cs->sps->getVuiParameters()->getDefaultDisplayWindow() : Window();
#endif
m_cVideoIOYuvReconFile.write( pcPic->getRecoBuf(), m_cVideoIOYuvReconFile.write( pcPic->getRecoBuf(),
m_outputColourSpaceConvert, m_outputColourSpaceConvert,
m_packedYUVMode, m_packedYUVMode,
#if JVET_N0063_VUI
conf.getWindowLeftOffset(), conf.getWindowLeftOffset(),
conf.getWindowRightOffset(), conf.getWindowRightOffset(),
conf.getWindowTopOffset(), conf.getWindowTopOffset(),
conf.getWindowBottomOffset(), conf.getWindowBottomOffset(),
#else
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
#endif
NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range ); NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range );
} }
...@@ -688,7 +626,6 @@ bool DecApp::isNaluWithinTargetDecLayerIdSet( InputNALUnit* nalu ) ...@@ -688,7 +626,6 @@ bool DecApp::isNaluWithinTargetDecLayerIdSet( InputNALUnit* nalu )
return false; return false;
} }
#if JVET_N0278_HLS
/** \param nalu Input nalu to check whether its LayerId is the specified target layer /** \param nalu Input nalu to check whether its LayerId is the specified target layer
*/ */
bool DecApp::isNaluTheTargetLayer(InputNALUnit* nalu) bool DecApp::isNaluTheTargetLayer(InputNALUnit* nalu)
...@@ -698,6 +635,5 @@ bool DecApp::isNaluTheTargetLayer(InputNALUnit* nalu) ...@@ -698,6 +635,5 @@ bool DecApp::isNaluTheTargetLayer(InputNALUnit* nalu)
return false; return false;
} }
#endif
//! \} //! \}
...@@ -81,9 +81,7 @@ private: ...@@ -81,9 +81,7 @@ private:
void xWriteOutput ( PicList* pcListPic , uint32_t tId); ///< write YUV to file void xWriteOutput ( PicList* pcListPic , uint32_t tId); ///< write YUV to file
void xFlushOutput ( PicList* pcListPic ); ///< flush all remaining decoded pictures to file void xFlushOutput ( PicList* pcListPic ); ///< flush all remaining decoded pictures to file
bool isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet bool isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
#if JVET_N0278_HLS
bool isNaluTheTargetLayer(InputNALUnit* nalu); ///< check whether given Nalu is within targetDecLayerIdSet bool isNaluTheTargetLayer(InputNALUnit* nalu); ///< check whether given Nalu is within targetDecLayerIdSet
#endif
}; };
//! \} //! \}
......
...@@ -87,9 +87,7 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) ...@@ -87,9 +87,7 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] )
("OutputBitDepthC,d", m_outputBitDepth[CHANNEL_TYPE_CHROMA], 0, "bit depth of YUV output chroma component (default: use luma output bit-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)) ("OutputColourSpaceConvert", outputColourSpaceConvert, string(""), "Colour space conversion to apply to input 444 video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(false))
("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers") ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers")
#if JVET_N0278_HLS
("TargetLayer,p", m_iTargetLayer, -1, "Target bitstream Layer to be decoded.") ("TargetLayer,p", m_iTargetLayer, -1, "Target bitstream Layer to be decoded.")
#endif
("SEIDecodedPictureHash,-dph",m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n" ("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" "\t1: check hash in SEI messages if available in the bitstream\n"
"\t0: ignore SEI message") "\t0: ignore SEI message")
...@@ -225,9 +223,7 @@ DecAppCfg::DecAppCfg() ...@@ -225,9 +223,7 @@ DecAppCfg::DecAppCfg()
, m_iSkipFrame(0) , m_iSkipFrame(0)
// m_outputBitDepth array initialised below // m_outputBitDepth array initialised below
, m_outputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) , m_outputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED)
#if JVET_N0278_HLS
, m_iTargetLayer(0) , m_iTargetLayer(0)
#endif
, m_iMaxTemporalLayer(-1) , m_iMaxTemporalLayer(-1)
, m_decodedPictureHashSEIEnabled(0) , m_decodedPictureHashSEIEnabled(0)
, m_decodedNoDisplaySEIEnabled(false) , m_decodedNoDisplaySEIEnabled(false)
......
...@@ -61,9 +61,7 @@ protected: ...@@ -61,9 +61,7 @@ protected:
int m_iSkipFrame; ///< counter for frames prior to the random access point to skip int m_iSkipFrame; ///< counter for frames prior to the random access point to skip
int m_outputBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit depth used for writing output int m_outputBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit depth used for writing output
InputColourSpaceConversion m_outputColourSpaceConvert; InputColourSpaceConversion m_outputColourSpaceConvert;
#if JVET_N0278_HLS
int m_iTargetLayer; ///< target stream layer to be decoded int m_iTargetLayer; ///< target stream layer to be decoded
#endif
int m_iMaxTemporalLayer; ///< maximum temporal layer to be decoded int m_iMaxTemporalLayer; ///< maximum temporal layer to be decoded
int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
......
...@@ -85,7 +85,7 @@ void EncApp::xInitLibCfg() ...@@ -85,7 +85,7 @@ void EncApp::xInitLibCfg()
vps.setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i ); vps.setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i );
} }
m_cEncLib.setVPS(&vps); m_cEncLib.setVPS(&vps);
#elif JVET_N0278_HLS #else
VPS vps; VPS vps;
vps.setMaxLayers ( 1 ); vps.setMaxLayers ( 1 );
...@@ -98,9 +98,7 @@ void EncApp::xInitLibCfg() ...@@ -98,9 +98,7 @@ void EncApp::xInitLibCfg()
#endif #endif
m_cEncLib.setProfile ( m_profile); m_cEncLib.setProfile ( m_profile);
m_cEncLib.setLevel ( m_levelTier, m_level); m_cEncLib.setLevel ( m_levelTier, m_level);
#if JVET_N0276_CONSTRAINT_FLAGS
m_cEncLib.setSubProfile ( m_subProfile ); m_cEncLib.setSubProfile ( m_subProfile );
#endif
m_cEncLib.setProgressiveSourceFlag ( m_progressiveSourceFlag); m_cEncLib.setProgressiveSourceFlag ( m_progressiveSourceFlag);
m_cEncLib.setInterlacedSourceFlag ( m_interlacedSourceFlag); m_cEncLib.setInterlacedSourceFlag ( m_interlacedSourceFlag);
m_cEncLib.setNonPackedConstraintFlag ( m_nonPackedConstraintFlag); m_cEncLib.setNonPackedConstraintFlag ( m_nonPackedConstraintFlag);
...@@ -131,9 +129,7 @@ void EncApp::xInitLibCfg() ...@@ -131,9 +129,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setMaxChromaFormatConstraintIdc ( m_chromaFormatConstraint ); m_cEncLib.setMaxChromaFormatConstraintIdc ( m_chromaFormatConstraint );
m_cEncLib.setFrameConstraintFlag ( m_bFrameConstraintFlag ); m_cEncLib.setFrameConstraintFlag ( m_bFrameConstraintFlag );
m_cEncLib.setNoQtbttDualTreeIntraConstraintFlag ( !m_dualTree ); m_cEncLib.setNoQtbttDualTreeIntraConstraintFlag ( !m_dualTree );
#if JVET_N0276_CONSTRAINT_FLAGS
m_cEncLib.setNoPartitionConstraintsOverrideConstraintFlag ( !m_SplitConsOverrideEnabledFlag ); m_cEncLib.setNoPartitionConstraintsOverrideConstraintFlag ( !m_SplitConsOverrideEnabledFlag );
#endif
m_cEncLib.setNoSaoConstraintFlag ( !m_bUseSAO ); m_cEncLib.setNoSaoConstraintFlag ( !m_bUseSAO );
m_cEncLib.setNoAlfConstraintFlag ( !m_alf ); m_cEncLib.setNoAlfConstraintFlag ( !m_alf );
m_cEncLib.setNoPcmConstraintFlag ( !m_usePCM ); m_cEncLib.setNoPcmConstraintFlag ( !m_usePCM );
...@@ -142,31 +138,18 @@ void EncApp::xInitLibCfg() ...@@ -142,31 +138,18 @@ void EncApp::xInitLibCfg()
m_cEncLib.setNoSbtmvpConstraintFlag ( m_SubPuMvpMode ? false : true ); m_cEncLib.setNoSbtmvpConstraintFlag ( m_SubPuMvpMode ? false : true );
m_cEncLib.setNoAmvrConstraintFlag ( m_bNoAmvrConstraintFlag ); m_cEncLib.setNoAmvrConstraintFlag ( m_bNoAmvrConstraintFlag );
m_cEncLib.setNoBdofConstraintFlag ( !m_BIO ); m_cEncLib.setNoBdofConstraintFlag ( !m_BIO );
#if JVET_N0276_CONSTRAINT_FLAGS
m_cEncLib.setNoDmvrConstraintFlag ( !m_DMVR ); m_cEncLib.setNoDmvrConstraintFlag ( !m_DMVR );
#endif
m_cEncLib.setNoCclmConstraintFlag ( m_LMChroma ? false : true ); m_cEncLib.setNoCclmConstraintFlag ( m_LMChroma ? false : true );
m_cEncLib.setNoMtsConstraintFlag ( (m_MTS || m_MTSImplicit) ? false : true ); m_cEncLib.setNoMtsConstraintFlag ( (m_MTS || m_MTSImplicit) ? false : true );
#if JVET_N0276_CONSTRAINT_FLAGS
m_cEncLib.setNoSbtConstraintFlag ( !m_SBT ); m_cEncLib.setNoSbtConstraintFlag ( !m_SBT );
#endif
m_cEncLib.setNoAffineMotionConstraintFlag ( !m_Affine ); m_cEncLib.setNoAffineMotionConstraintFlag ( !m_Affine );
m_cEncLib.setNoGbiConstraintFlag ( !m_GBi ); m_cEncLib.setNoGbiConstraintFlag ( !m_GBi );
#if JVET_N0276_CONSTRAINT_FLAGS
m_cEncLib.setNoIbcConstraintFlag ( m_IBCMode ? false : true ); m_cEncLib.setNoIbcConstraintFlag ( m_IBCMode ? false : true );
#endif
m_cEncLib.setNoMhIntraConstraintFlag ( !m_MHIntra ); m_cEncLib.setNoMhIntraConstraintFlag ( !m_MHIntra );
#if JVET_N0276_CONSTRAINT_FLAGS
m_cEncLib.setNoFPelMmvdConstraintFlag ( !(m_MMVD && m_allowDisFracMMVD) ); m_cEncLib.setNoFPelMmvdConstraintFlag ( !(m_MMVD && m_allowDisFracMMVD) );
#endif
m_cEncLib.setNoTriangleConstraintFlag ( !m_Triangle ); m_cEncLib.setNoTriangleConstraintFlag ( !m_Triangle );
m_cEncLib.setNoLadfConstraintFlag ( !m_LadfEnabed ); m_cEncLib.setNoLadfConstraintFlag ( !m_LadfEnabed );
#if JVET_N0276_CONSTRAINT_FLAGS
m_cEncLib.setNoTransformSkipConstraintFlag ( !m_useTransformSkip ); m_cEncLib.setNoTransformSkipConstraintFlag ( !m_useTransformSkip );
#endif
#if !JVET_N0276_CONSTRAINT_FLAGS
m_cEncLib.setNoCurrPicRefConstraintFlag ( !m_IBCMode );
#endif
m_cEncLib.setNoQpDeltaConstraintFlag ( m_bNoQpDeltaConstraintFlag ); m_cEncLib.setNoQpDeltaConstraintFlag ( m_bNoQpDeltaConstraintFlag );
m_cEncLib.setNoDepQuantConstraintFlag ( !m_depQuantEnabledFlag); m_cEncLib.setNoDepQuantConstraintFlag ( !m_depQuantEnabledFlag);
m_cEncLib.setNoSignDataHidingConstraintFlag ( !m_signDataHidingEnabledFlag ); m_cEncLib.setNoSignDataHidingConstraintFlag ( !m_signDataHidingEnabledFlag );
...@@ -175,19 +158,10 @@ void EncApp::xInitLibCfg() ...@@ -175,19 +158,10 @@ void EncApp::xInitLibCfg()
m_cEncLib.setIntraPeriod ( m_iIntraPeriod ); m_cEncLib.setIntraPeriod ( m_iIntraPeriod );
m_cEncLib.setDecodingRefreshType ( m_iDecodingRefreshType ); m_cEncLib.setDecodingRefreshType ( m_iDecodingRefreshType );
m_cEncLib.setGOPSize ( m_iGOPSize ); m_cEncLib.setGOPSize ( m_iGOPSize );
#if JCTVC_Y0038_PARAMS
m_cEncLib.setReWriteParamSets ( m_rewriteParamSets ); m_cEncLib.setReWriteParamSets ( m_rewriteParamSets );
#endif
#if JVET_M0128
m_cEncLib.setRPLList0 ( m_RPLList0); m_cEncLib.setRPLList0 ( m_RPLList0);
m_cEncLib.setRPLList1 ( m_RPLList1); m_cEncLib.setRPLList1 ( m_RPLList1);
#endif
#if !JVET_M0128
m_cEncLib.setExtraRPSs ( m_extraRPSs );
#endif
#if JVET_N0047_Merge_IDR_Non_IDR
m_cEncLib.setIDRRefParamListPresent ( m_idrRefParamList ); m_cEncLib.setIDRRefParamListPresent ( m_idrRefParamList );
#endif
m_cEncLib.setGopList ( m_GOPList ); m_cEncLib.setGopList ( m_GOPList );
for(int i = 0; i < MAX_TLAYER; i++) for(int i = 0; i < MAX_TLAYER; i++)
...@@ -245,10 +219,8 @@ void EncApp::xInitLibCfg() ...@@ -245,10 +219,8 @@ void EncApp::xInitLibCfg()
m_cEncLib.setChromaCrQpOffset ( m_crQpOffset ); m_cEncLib.setChromaCrQpOffset ( m_crQpOffset );
m_cEncLib.setChromaCbQpOffsetDualTree ( m_cbQpOffsetDualTree ); m_cEncLib.setChromaCbQpOffsetDualTree ( m_cbQpOffsetDualTree );
m_cEncLib.setChromaCrQpOffsetDualTree ( m_crQpOffsetDualTree ); m_cEncLib.setChromaCrQpOffsetDualTree ( m_crQpOffsetDualTree );
#if JVET_N0054_JOINT_CHROMA
m_cEncLib.setChromaCbCrQpOffset ( m_cbCrQpOffset ); m_cEncLib.setChromaCbCrQpOffset ( m_cbCrQpOffset );
m_cEncLib.setChromaCbCrQpOffsetDualTree ( m_cbCrQpOffsetDualTree ); m_cEncLib.setChromaCbCrQpOffsetDualTree ( m_cbCrQpOffsetDualTree );
#endif
#if ER_CHROMA_QP_WCG_PPS #if ER_CHROMA_QP_WCG_PPS
m_cEncLib.setWCGChromaQpControl ( m_wcgChromaQpControl ); m_cEncLib.setWCGChromaQpControl ( m_wcgChromaQpControl );
#endif #endif
...@@ -291,10 +263,8 @@ void EncApp::xInitLibCfg() ...@@ -291,10 +263,8 @@ void EncApp::xInitLibCfg()
m_cEncLib.setMinQTSizes ( m_uiMinQT ); m_cEncLib.setMinQTSizes ( m_uiMinQT );
m_cEncLib.setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma ); m_cEncLib.setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma );
m_cEncLib.setDualITree ( m_dualTree ); m_cEncLib.setDualITree ( m_dualTree );
#if JVET_N0193_LFNST
m_cEncLib.setLFNST ( m_LFNST ); m_cEncLib.setLFNST ( m_LFNST );
m_cEncLib.setUseFastLFNST ( m_useFastLFNST ); m_cEncLib.setUseFastLFNST ( m_useFastLFNST );
#endif
m_cEncLib.setSubPuMvpMode ( m_SubPuMvpMode ); m_cEncLib.setSubPuMvpMode ( m_SubPuMvpMode );
m_cEncLib.setAffine ( m_Affine ); m_cEncLib.setAffine ( m_Affine );
m_cEncLib.setAffineType ( m_AffineType ); m_cEncLib.setAffineType ( m_AffineType );
...@@ -308,9 +278,7 @@ void EncApp::xInitLibCfg() ...@@ -308,9 +278,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setImplicitMTS ( m_MTSImplicit ); m_cEncLib.setImplicitMTS ( m_MTSImplicit );
m_cEncLib.setUseSBT ( m_SBT ); m_cEncLib.setUseSBT ( m_SBT );
m_cEncLib.setUseCompositeRef ( m_compositeRefEnabled ); m_cEncLib.setUseCompositeRef ( m_compositeRefEnabled );
#if JVET_N0235_SMVD_SPS
m_cEncLib.setUseSMVD ( m_SMVD ); m_cEncLib.setUseSMVD ( m_SMVD );
#endif
m_cEncLib.setUseGBi ( m_GBi ); m_cEncLib.setUseGBi ( m_GBi );
m_cEncLib.setUseGBiFast ( m_GBiFast ); m_cEncLib.setUseGBiFast ( m_GBiFast );
#if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET
...@@ -333,15 +301,9 @@ void EncApp::xInitLibCfg() ...@@ -333,15 +301,9 @@ void EncApp::xInitLibCfg()
m_cEncLib.setUseAffineAmvr ( m_AffineAmvr ); m_cEncLib.setUseAffineAmvr ( m_AffineAmvr );
m_cEncLib.setUseAffineAmvrEncOpt ( m_AffineAmvrEncOpt ); m_cEncLib.setUseAffineAmvrEncOpt ( m_AffineAmvrEncOpt );
m_cEncLib.setDMVR ( m_DMVR ); m_cEncLib.setDMVR ( m_DMVR );
#if JVET_N0127_MMVD_SPS_FLAG
m_cEncLib.setMMVD ( m_MMVD ); m_cEncLib.setMMVD ( m_MMVD );
#endif
#if JVET_N0449_MMVD_SIMP
m_cEncLib.setMmvdDisNum (m_MmvdDisNum); m_cEncLib.setMmvdDisNum (m_MmvdDisNum);
#endif
#if JVET_N0413_RDPCM
m_cEncLib.setRDPCM ( m_RdpcmMode ); m_cEncLib.setRDPCM ( m_RdpcmMode );
#endif
m_cEncLib.setIBCMode ( m_IBCMode ); m_cEncLib.setIBCMode ( m_IBCMode );
m_cEncLib.setIBCLocalSearchRangeX ( m_IBCLocalSearchRangeX ); m_cEncLib.setIBCLocalSearchRangeX ( m_IBCLocalSearchRangeX );
m_cEncLib.setIBCLocalSearchRangeY ( m_IBCLocalSearchRangeY ); m_cEncLib.setIBCLocalSearchRangeY ( m_IBCLocalSearchRangeY );
...@@ -355,7 +317,6 @@ void EncApp::xInitLibCfg() ...@@ -355,7 +317,6 @@ void EncApp::xInitLibCfg()
// ADD_NEW_TOOL : (encoder app) add setting of tool enabling flags and associated parameters here // ADD_NEW_TOOL : (encoder app) add setting of tool enabling flags and associated parameters here
#if JVET_N0438_LOOP_FILTER_DISABLED_ACROSS_VIR_BOUND
m_cEncLib.setLoopFilterAcrossVirtualBoundariesDisabledFlag ( m_loopFilterAcrossVirtualBoundariesDisabledFlag ); m_cEncLib.setLoopFilterAcrossVirtualBoundariesDisabledFlag ( m_loopFilterAcrossVirtualBoundariesDisabledFlag );
m_cEncLib.setNumVerVirtualBoundaries ( m_numVerVirtualBoundaries ); m_cEncLib.setNumVerVirtualBoundaries ( m_numVerVirtualBoundaries );
m_cEncLib.setNumHorVirtualBoundaries ( m_numHorVirtualBoundaries ); m_cEncLib.setNumHorVirtualBoundaries ( m_numHorVirtualBoundaries );
...@@ -367,7 +328,6 @@ void EncApp::xInitLibCfg() ...@@ -367,7 +328,6 @@ void EncApp::xInitLibCfg()
{ {
m_cEncLib.setVirtualBoundariesPosY ( m_virtualBoundariesPosY[ i ], i ); m_cEncLib.setVirtualBoundariesPosY ( m_virtualBoundariesPosY[ i ], i );
} }
#endif
m_cEncLib.setMaxCUWidth ( m_uiCTUSize ); m_cEncLib.setMaxCUWidth ( m_uiCTUSize );
m_cEncLib.setMaxCUHeight ( m_uiCTUSize ); m_cEncLib.setMaxCUHeight ( m_uiCTUSize );
...@@ -388,14 +348,10 @@ void EncApp::xInitLibCfg() ...@@ -388,14 +348,10 @@ void EncApp::xInitLibCfg()
m_cEncLib.setUseAMaxBT ( m_useAMaxBT ); m_cEncLib.setUseAMaxBT ( m_useAMaxBT );
m_cEncLib.setUseE0023FastEnc ( m_e0023FastEnc ); m_cEncLib.setUseE0023FastEnc ( m_e0023FastEnc );
m_cEncLib.setUseContentBasedFastQtbt ( m_contentBasedFastQtbt ); m_cEncLib.setUseContentBasedFastQtbt ( m_contentBasedFastQtbt );
#if JVET_N0242_NON_LINEAR_ALF
m_cEncLib.setUseNonLinearAlfLuma ( m_useNonLinearAlfLuma ); m_cEncLib.setUseNonLinearAlfLuma ( m_useNonLinearAlfLuma );
m_cEncLib.setUseNonLinearAlfChroma ( m_useNonLinearAlfChroma ); m_cEncLib.setUseNonLinearAlfChroma ( m_useNonLinearAlfChroma );
#endif
#if JVET_N0217_MATRIX_INTRAPRED
m_cEncLib.setUseMIP ( m_MIP ); m_cEncLib.setUseMIP ( m_MIP );
m_cEncLib.setUseFastMIP ( m_useFastMIP ); m_cEncLib.setUseFastMIP ( m_useFastMIP );
#endif
m_cEncLib.setCrossComponentPredictionEnabledFlag ( m_crossComponentPredictionEnabledFlag ); m_cEncLib.setCrossComponentPredictionEnabledFlag ( m_crossComponentPredictionEnabledFlag );
m_cEncLib.setUseReconBasedCrossCPredictionEstimate ( m_reconBasedCrossCPredictionEstimate ); m_cEncLib.setUseReconBasedCrossCPredictionEstimate ( m_reconBasedCrossCPredictionEstimate );
m_cEncLib.setLog2SaoOffsetScale ( CHANNEL_TYPE_LUMA , m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] ); m_cEncLib.setLog2SaoOffsetScale ( CHANNEL_TYPE_LUMA , m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA] );
...@@ -433,9 +389,7 @@ void EncApp::xInitLibCfg() ...@@ -433,9 +389,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setPCMLog2MaxSize ( m_pcmLog2MaxSize); m_cEncLib.setPCMLog2MaxSize ( m_pcmLog2MaxSize);
m_cEncLib.setMaxNumMergeCand ( m_maxNumMergeCand ); m_cEncLib.setMaxNumMergeCand ( m_maxNumMergeCand );
m_cEncLib.setMaxNumAffineMergeCand ( m_maxNumAffineMergeCand ); m_cEncLib.setMaxNumAffineMergeCand ( m_maxNumAffineMergeCand );
#if JVET_N0400_SIGNAL_TRIANGLE_CAND_NUM
m_cEncLib.setMaxNumTriangleCand ( m_maxNumTriangleCand ); m_cEncLib.setMaxNumTriangleCand ( m_maxNumTriangleCand );
#endif
//====== Weighted Prediction ======== //====== Weighted Prediction ========
m_cEncLib.setUseWP ( m_useWeightedPred ); m_cEncLib.setUseWP ( m_useWeightedPred );
...@@ -555,22 +509,15 @@ void EncApp::xInitLibCfg() ...@@ -555,22 +509,15 @@ void EncApp::xInitLibCfg()
m_cEncLib.setColumnWidth ( m_tileColumnWidth ); m_cEncLib.setColumnWidth ( m_tileColumnWidth );
m_cEncLib.setRowHeight ( m_tileRowHeight ); m_cEncLib.setRowHeight ( m_tileRowHeight );
} }
#if JVET_N0857_TILES_BRICKS
m_cEncLib.setRectSliceFlag ( m_rectSliceFlag ); m_cEncLib.