diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 7e3312b5aed5a479276b2de4c6b2fa73bcbd1060..fa69969ea0923bd138825399d92f0f6426f1f099 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -62,6 +62,8 @@ #define JVET_S_SUB_PROFILE 1 // Move signalling of ptl_num_sub_profiles +#define JVET_R0324_REORDER 1 // Reordering of syntax elements JVET-R0324/JVET-R2001-v2 + #define JVET_S0219_ASPECT2_CHANGE_ORDER_APS_PARAMS_TYPE 1 // JVET-S0219 aspect2: change the order to put the aps_params_type before the aps_adaptation_parameter_set_id. #define JVET_R0270 1 // JVET-S0270: Treating picture with mixed RASL and RADL slices as RASL picture diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index e730abf429b38dff689f74b9d12a098bc99b90b0..0fe3473854823a1bfa76dba75e91665eeaf1fddf 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -3266,7 +3266,8 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag picHeader->setPicColFromL0Flag(0); } - // mvd L1 zero flag +#if !JVET_R0324_REORDER + // mvd L1 zero flag if (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0) { READ_FLAG(uiCode, "pic_mvd_l1_zero_flag"); @@ -3276,9 +3277,10 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag uiCode = 1; } picHeader->setMvdL1ZeroFlag( uiCode != 0 ); +#endif - // merge candidate list size - // subblock merge candidate list size + // merge candidate list size + // subblock merge candidate list size if ( sps->getUseAffine() ) { picHeader->setMaxNumAffineMergeCand(sps->getMaxNumAffineMergeCand()); @@ -3299,7 +3301,20 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag picHeader->setDisFracMMVD(false); } - // picture level BDOF disable flags +#if JVET_R0324_REORDER + // mvd L1 zero flag + if (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0) + { + READ_FLAG(uiCode, "ph_mvd_l1_zero_flag"); + } + else + { + uiCode = 1; + } + picHeader->setMvdL1ZeroFlag(uiCode != 0); +#endif + + // picture level BDOF disable flags if (sps->getBdofControlPresentFlag() && (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0)) { READ_FLAG(uiCode, "ph_disable_bdof_flag"); picHeader->setDisBdofFlag(uiCode != 0); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 9a15dec97c41a0c85c450b514cc7bf9052bb8a40..0c29c2535068677faa16fc6a935bde220f331d4c 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -2038,13 +2038,16 @@ WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); picHeader->setEnableTMVPFlag(false); } - // mvd L1 zero flag +#if !JVET_R0324_REORDER + // mvd L1 zero flag if (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0) { WRITE_FLAG(picHeader->getMvdL1ZeroFlag(), "pic_mvd_l1_zero_flag"); } - // merge candidate list size - // subblock merge candidate list size +#endif + + // merge candidate list size + // subblock merge candidate list size if ( sps->getUseAffine() ) { picHeader->setMaxNumAffineMergeCand(sps->getMaxNumAffineMergeCand()); @@ -2064,7 +2067,15 @@ WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); picHeader->setDisFracMMVD(false); } - // picture level BDOF disable flags +#if JVET_R0324_REORDER + // mvd L1 zero flag + if (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0) + { + WRITE_FLAG(picHeader->getMvdL1ZeroFlag(), "ph_mvd_l1_zero_flag"); + } +#endif + + // picture level BDOF disable flags if (sps->getBdofControlPresentFlag() && (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0)) { WRITE_FLAG(picHeader->getDisBdofFlag(), "ph_disable_bdof_flag");