Skip to content
Snippets Groups Projects
Commit b547cbc4 authored by Yi-Wen Chen's avatar Yi-Wen Chen
Browse files
parents 7f8e0458 e39b7c5a
No related branches found
No related tags found
No related merge requests found
......@@ -447,11 +447,43 @@ void MergeCtx::setMmvdMergeCandiInfo(PredictionUnit& pu, int candIdx)
{
const int scale = PU::getDistScaleFactor(currPoc, poc0, currPoc, poc1);
tempMv[1] = tempMv[0];
#if MMVD_LTRP
const bool bIsL0RefLongTerm = slice.getRefPic(REF_PIC_LIST_0, refList0)->longTerm;
const bool bIsL1RefLongTerm = slice.getRefPic(REF_PIC_LIST_1, refList1)->longTerm;
if (bIsL0RefLongTerm || bIsL1RefLongTerm)
{
if ((poc1 - currPoc)*(poc0 - currPoc) > 0)
{
tempMv[0] = tempMv[1];
}
else
{
tempMv[0].set(-1 * tempMv[1].getHor(), -1 * tempMv[1].getVer());
}
}
else
#endif
tempMv[0] = tempMv[1].scaleMv(scale);
}
else
{
const int scale = PU::getDistScaleFactor(currPoc, poc1, currPoc, poc0);
#if MMVD_LTRP
const bool bIsL0RefLongTerm = slice.getRefPic(REF_PIC_LIST_0, refList0)->longTerm;
const bool bIsL1RefLongTerm = slice.getRefPic(REF_PIC_LIST_1, refList1)->longTerm;
if (bIsL0RefLongTerm || bIsL1RefLongTerm)
{
if ((poc1 - currPoc)*(poc0 - currPoc) > 0)
{
tempMv[1] = tempMv[0];
}
else
{
tempMv[1].set(-1 * tempMv[0].getHor(), -1 * tempMv[0].getVer());
}
}
else
#endif
tempMv[1] = tempMv[0].scaleMv(scale);
}
......
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define MMVD_LTRP 1 // MVD scaling for MMVD considering LTRP from JVET-N0332
#define JCTVC_Y0038_PARAMS 1
#define JVET_MMVD_OFF_MACRO 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment