[x265] [PATCH] search: remove the merge candidates from the motion candidate list
gopu at multicorewareinc.com
gopu at multicorewareinc.com
Wed Apr 29 13:17:23 CEST 2015
# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1430306233 -19800
# Wed Apr 29 16:47:13 2015 +0530
# Node ID 89fc8d7c42673ceab56c06052f3e3f3e814930a0
# Parent cc6da5218a188ded2d239bb8dbf6c3399978c93f
search: remove the merge candidates from the motion candidate list
diff -r cc6da5218a18 -r 89fc8d7c4267 source/common/cudata.cpp
--- a/source/common/cudata.cpp Wed Apr 29 13:13:30 2015 +0530
+++ b/source/common/cudata.cpp Wed Apr 29 16:47:13 2015 +0530
@@ -1691,10 +1691,26 @@
for (int dir = MD_LEFT; dir <= MD_ABOVE_LEFT; dir++)
{
if (validDirect[dir] && directMV[dir].notZero())
- pmv[numMvc++] = directMV[dir];
+ {
+ if (num)
+ {
+ if (amvpCand[0] != directMV[dir] && amvpCand[1] != directMV[dir])
+ pmv[numMvc++] = directMV[dir];
+ }
+ else
+ pmv[numMvc++] = directMV[dir];
+ }
if (validIndirect[dir] && indirectMV[dir].notZero())
- pmv[numMvc++] = indirectMV[dir];
+ {
+ if (num)
+ {
+ if (amvpCand[0] != indirectMV[dir] && amvpCand[1] != indirectMV[dir])
+ pmv[numMvc++] = indirectMV[dir];
+ }
+ else
+ pmv[numMvc++] = indirectMV[dir];
+ }
}
if (num == 2)
@@ -1718,7 +1734,7 @@
int curRefPOC = m_slice->m_refPOCList[picList][refIdx];
int curPOC = m_slice->m_poc;
- pmv[numMvc++] = amvpCand[num++] = scaleMvByPOCDist(neighbours[MD_COLLOCATED].mv[picList], curPOC, curRefPOC, colPOC, colRefPOC);
+ amvpCand[num++] = scaleMvByPOCDist(neighbours[MD_COLLOCATED].mv[picList], curPOC, curRefPOC, colPOC, colRefPOC);
}
}
More information about the x265-devel
mailing list