Commit ff293e69 authored by Xiang Li's avatar Xiang Li

Merge branch 'JVET-O0162' into 'master'

JVET-O0162/O0331/O0480/O0574: IBC mvp flag conditioned on MaxNumMergeCand>1

See merge request !653
parents 6a5bca0b 9f18ae3b
Pipeline #1846 passed with stage
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#define JVET_O0164_REMOVE_AMVP_SPATIAL_SCALING 1 // JVET-O0164/JVET-O0587: remove spatial AMVP candidate scaling #define JVET_O0164_REMOVE_AMVP_SPATIAL_SCALING 1 // JVET-O0164/JVET-O0587: remove spatial AMVP candidate scaling
#define JVET_O0162_IBC_MVP_FLAG 1 // JVET-O0162/O0331/O0480/O0574: IBC mvp flag conditioned on MaxNumMergeCand>1
#define JVET_O0055_INT_DMVR_DIS_BDOF 1 // integer-distance DMVR cost to disable BDOF and disable BDOF early termination #define JVET_O0055_INT_DMVR_DIS_BDOF 1 // integer-distance DMVR cost to disable BDOF and disable BDOF early termination
......
...@@ -1509,6 +1509,13 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx ) ...@@ -1509,6 +1509,13 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx )
pu.cu->affine = false; pu.cu->affine = false;
pu.refIdx[REF_PIC_LIST_0] = MAX_NUM_REF; pu.refIdx[REF_PIC_LIST_0] = MAX_NUM_REF;
mvd_coding(pu.mvd[REF_PIC_LIST_0]); mvd_coding(pu.mvd[REF_PIC_LIST_0]);
#if JVET_O0162_IBC_MVP_FLAG
if ( pu.cu->slice->getMaxNumMergeCand() == 1 )
{
pu.mvpIdx[REF_PIC_LIST_0] = 0;
}
else
#endif
mvp_flag(pu, REF_PIC_LIST_0); mvp_flag(pu, REF_PIC_LIST_0);
} }
else else
......
...@@ -773,6 +773,12 @@ void DecCu::xDeriveCUMV( CodingUnit &cu ) ...@@ -773,6 +773,12 @@ void DecCu::xDeriveCUMV( CodingUnit &cu )
{ {
mvd.changeIbcPrecAmvr2Internal(pu.cu->imv); mvd.changeIbcPrecAmvr2Internal(pu.cu->imv);
} }
#if JVET_O0162_IBC_MVP_FLAG
if ( pu.cu->slice->getMaxNumMergeCand() == 1 )
{
CHECK( pu.mvpIdx[REF_PIC_LIST_0], "mvpIdx for IBC mode should be 0" );
}
#endif
pu.mv[REF_PIC_LIST_0] = amvpInfo.mvCand[pu.mvpIdx[REF_PIC_LIST_0]] + mvd; pu.mv[REF_PIC_LIST_0] = amvpInfo.mvCand[pu.mvpIdx[REF_PIC_LIST_0]] + mvd;
pu.mv[REF_PIC_LIST_0].mvCliptoStorageBitDepth(); pu.mv[REF_PIC_LIST_0].mvCliptoStorageBitDepth();
} }
......
...@@ -1415,6 +1415,13 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu ) ...@@ -1415,6 +1415,13 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu )
Mv mvd = pu.mvd[REF_PIC_LIST_0]; Mv mvd = pu.mvd[REF_PIC_LIST_0];
mvd.changeIbcPrecInternal2Amvr(pu.cu->imv); mvd.changeIbcPrecInternal2Amvr(pu.cu->imv);
mvd_coding(mvd, 0); // already changed to signaling precision mvd_coding(mvd, 0); // already changed to signaling precision
#if JVET_O0162_IBC_MVP_FLAG
if ( pu.cu->slice->getMaxNumMergeCand() == 1 )
{
CHECK( pu.mvpIdx[REF_PIC_LIST_0], "mvpIdx for IBC mode should be 0" );
}
else
#endif
mvp_flag(pu, REF_PIC_LIST_0); mvp_flag(pu, REF_PIC_LIST_0);
} }
else else
......
...@@ -1431,6 +1431,14 @@ bool InterSearch::predIBCSearch(CodingUnit& cu, Partitioner& partitioner, const ...@@ -1431,6 +1431,14 @@ bool InterSearch::predIBCSearch(CodingUnit& cu, Partitioner& partitioner, const
cMv.setZero(); cMv.setZero();
Distortion cost = 0; Distortion cost = 0;
#if JVET_O0162_IBC_MVP_FLAG
if ( pu.cu->slice->getMaxNumMergeCand() == 1 )
{
iBvpNum = 1;
cMvPred[1] = cMvPred[0];
}
#endif
if (m_pcEncCfg->getIBCHashSearch()) if (m_pcEncCfg->getIBCHashSearch())
{ {
xxIBCHashSearch(pu, cMvPred, iBvpNum, cMv, bvpIdxBest, ibcHashMap); xxIBCHashSearch(pu, cMvPred, iBvpNum, cMv, bvpIdxBest, ibcHashMap);
......
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