diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp index 32201bd16dc8d968d0b656ca536edcac97d05037..360a38313bdc000f78579a6407aed7283ad7689e 100644 --- a/source/Lib/DecoderLib/CABACReader.cpp +++ b/source/Lib/DecoderLib/CABACReader.cpp @@ -4367,11 +4367,11 @@ void CABACReader::mvp_flag( PredictionUnit& pu, RefPicList eRefList ) #if JVET_Z0054_BLK_REF_PIC_REORDER else if (PU::useRefCombList(pu)) { - mvpIdx = pu.refIdxLC >= pu.cs->slice->getNumNonScaledRefPic() || PU::checkTmEnableCondition(pu.cs->sps, pu.cs->pps, pu.cu->slice->getRefPic(eRefList, pu.refIdx[eRefList])) == false ? m_BinDecoder.decodeBin(Ctx::MVPIdx()) : 0; + mvpIdx = pu.refIdxLC >= pu.cs->slice->getNumNonScaledRefPic() || !pu.cs->sps->getUseDMVDMode() ? m_BinDecoder.decodeBin(Ctx::MVPIdx()) : 0; } else if (PU::useRefPairList(pu)) { - mvpIdx = pu.refPairIdx >= pu.cs->slice->getNumNonScaledRefPicPair() || PU::checkTmEnableCondition(pu.cs->sps, pu.cs->pps, pu.cu->slice->getRefPic(eRefList, pu.refIdx[eRefList])) == false ? m_BinDecoder.decodeBin(Ctx::MVPIdx()) : 0; + mvpIdx = pu.refPairIdx >= pu.cs->slice->getNumNonScaledRefPicPair() || !pu.cs->sps->getUseDMVDMode() ? m_BinDecoder.decodeBin(Ctx::MVPIdx()) : 0; } #endif else if (PU::checkTmEnableCondition(pu.cs->sps, pu.cs->pps, pu.cu->slice->getRefPic(eRefList, pu.refIdx[eRefList])) == false) diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index 0fa042b8205fae1df9908c0de111cd755a60eff6..382c591758ca8cf3b8797309ab208754fa90ba84 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -4270,11 +4270,11 @@ void CABACWriter::mvp_flag( const PredictionUnit& pu, RefPicList eRefList ) #if JVET_Z0054_BLK_REF_PIC_REORDER else if (PU::useRefCombList(pu)) { - needToCodeMvpIdx = pu.refIdxLC >= pu.cs->slice->getNumNonScaledRefPic() || PU::checkTmEnableCondition(pu.cs->sps, pu.cs->pps, pu.cu->slice->getRefPic(eRefList, pu.refIdx[eRefList])) == false; + needToCodeMvpIdx = pu.refIdxLC >= pu.cs->slice->getNumNonScaledRefPic() || !pu.cs->sps->getUseDMVDMode(); } else if (PU::useRefPairList(pu)) { - needToCodeMvpIdx = pu.refPairIdx >= pu.cs->slice->getNumNonScaledRefPicPair() || PU::checkTmEnableCondition(pu.cs->sps, pu.cs->pps, pu.cu->slice->getRefPic(eRefList, pu.refIdx[eRefList])) == false; + needToCodeMvpIdx = pu.refPairIdx >= pu.cs->slice->getNumNonScaledRefPicPair() || !pu.cs->sps->getUseDMVDMode(); } #endif else if (PU::checkTmEnableCondition(pu.cs->sps, pu.cs->pps, pu.cu->slice->getRefPic(eRefList, pu.refIdx[eRefList])) == false)