Commit 3f33c612 authored by Xiang Li's avatar Xiang Li

Merge branch 'JVET-R0371' into 'master'

JVET-R0371: set the range of max number of subblock based merge candidate to 0 to 5 – sps_sbtmvp

See merge request jvet/VVCSoftware_VTM!1553
parents 3f0d0f08 ab01a1de
......@@ -2583,7 +2583,11 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( 0 < m_maxNumGeoCand && m_maxNumGeoCand < 2, "MaxNumGeoCand must be no less than 2 unless MaxNumGeoCand is 0." );
xConfirmPara( m_maxNumIBCMergeCand < 1, "MaxNumIBCMergeCand must be 1 or greater." );
xConfirmPara( m_maxNumIBCMergeCand > IBC_MRG_MAX_NUM_CANDS, "MaxNumIBCMergeCand must be no more than IBC_MRG_MAX_NUM_CANDS." );
#if JVET_R0371_MAX_NUM_SUB_BLK_MRG_CAND
xConfirmPara( m_maxNumAffineMergeCand < (m_SubPuMvpMode ? 1 : 0), "MaxNumAffineMergeCand must be greater or equal to SubPuMvp." );
#else
xConfirmPara( m_maxNumAffineMergeCand < 1, "MaxNumAffineMergeCand must be 1 or greater." );
#endif
xConfirmPara( m_maxNumAffineMergeCand > AFFINE_MRG_MAX_NUM_CANDS, "MaxNumAffineMergeCand must be no more than AFFINE_MRG_MAX_NUM_CANDS." );
if ( m_Affine == 0 )
{
......
......@@ -63,6 +63,7 @@
#define JVET_R0143_TSRCdisableLL 1 // JVET-R0143: disable TSRC for lossless coding
#define JVET_R0371_MAX_NUM_SUB_BLK_MRG_CAND 1 // JVET-R0371: set the range of max number of subblock based merge candidate to 0 to 5 sps_sbtmvp_enabled_flag.
#define JVET_R0233_CCALF_LINE_BUFFER_REDUCTION 1 // JVET-R0233 method 2: Line buffer reduction for CCALF
......
......@@ -1675,7 +1675,12 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
if ( pcSPS->getUseAffine() )
{
READ_UVLC(uiCode, "five_minus_max_num_subblock_merge_cand");
#if JVET_R0371_MAX_NUM_SUB_BLK_MRG_CAND
CHECK(uiCode > 5 - (pcSPS->getSBTMVPEnabledFlag() ? 1 : 0), "The value of five_minus_max_num_subblock_merge_cand shall be in the range of 0 to 5 – sps_sbtmvp_enabled_flag");
CHECK(AFFINE_MRG_MAX_NUM_CANDS < uiCode, "The value of five_minus_max_num_subblock_merge_cand shall be in the range of 0 to 5 – sps_sbtmvp_enabled_flag");
#else
CHECK(AFFINE_MRG_MAX_NUM_CANDS < uiCode, "Incorrrect max number of affine merge candidates!");
#endif
pcSPS->setMaxNumAffineMergeCand(AFFINE_MRG_MAX_NUM_CANDS - uiCode);
READ_FLAG( uiCode, "sps_affine_type_flag" ); pcSPS->setUseAffineType ( uiCode != 0 );
if( pcSPS->getAMVREnabledFlag())
......
......@@ -3105,6 +3105,12 @@ void EncCu::xCheckRDCostAffineMerge2Nx2N( CodingStructure *&tempCS, CodingStruct
AffineMergeCtx affineMergeCtx;
const SPS &sps = *tempCS->sps;
#if JVET_R0371_MAX_NUM_SUB_BLK_MRG_CAND
if (sps.getMaxNumAffineMergeCand() == 0)
{
return;
}
#endif
setAFFBestSATDCost(MAX_DOUBLE);
......
Markdown is supported
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