Commit 77ab4d79 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0694_AFFINE_LINEBUFFER_CLEANUP

parent 984760b8
......@@ -209,14 +209,8 @@ bool checkIdenticalMotion( const PredictionUnit &pu, bool checkAffine )
else
{
CHECK( !checkAffine, "In this case, checkAffine should be on." );
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
if ( (pu.cu->affineType == AFFINEMODEL_4PARAM && (pu.mvAffi[0][0] == pu.mvAffi[1][0]) && (pu.mvAffi[0][1] == pu.mvAffi[1][1]))
|| (pu.cu->affineType == AFFINEMODEL_6PARAM && (pu.mvAffi[0][0] == pu.mvAffi[1][0]) && (pu.mvAffi[0][1] == pu.mvAffi[1][1]) && (pu.mvAffi[0][2] == pu.mvAffi[1][2])) )
#else
const CMotionBuf &mb = pu.getMotionBuf();
if ( (pu.cu->affineType == AFFINEMODEL_4PARAM && (mb.at( 0, 0 ).mv[0] == mb.at( 0, 0 ).mv[1]) && (mb.at( mb.width - 1, 0 ).mv[0] == mb.at( mb.width - 1, 0 ).mv[1]))
|| (pu.cu->affineType == AFFINEMODEL_6PARAM && (mb.at( 0, 0 ).mv[0] == mb.at( 0, 0 ).mv[1]) && (mb.at( mb.width - 1, 0 ).mv[0] == mb.at( mb.width - 1, 0 ).mv[1]) && (mb.at( 0, mb.height - 1 ).mv[0] == mb.at( 0, mb.height - 1 ).mv[1])) )
#endif
{
return true;
}
......@@ -254,14 +248,8 @@ bool InterPrediction::xCheckIdenticalMotion( const PredictionUnit &pu )
}
else
{
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
if ( (pu.cu->affineType == AFFINEMODEL_4PARAM && (pu.mvAffi[0][0] == pu.mvAffi[1][0]) && (pu.mvAffi[0][1] == pu.mvAffi[1][1]))
|| (pu.cu->affineType == AFFINEMODEL_6PARAM && (pu.mvAffi[0][0] == pu.mvAffi[1][0]) && (pu.mvAffi[0][1] == pu.mvAffi[1][1]) && (pu.mvAffi[0][2] == pu.mvAffi[1][2])) )
#else
const CMotionBuf &mb = pu.getMotionBuf();
if ( (pu.cu->affineType == AFFINEMODEL_4PARAM && (mb.at( 0, 0 ).mv[0] == mb.at( 0, 0 ).mv[1]) && (mb.at( mb.width - 1, 0 ).mv[0] == mb.at( mb.width - 1, 0 ).mv[1]))
|| (pu.cu->affineType == AFFINEMODEL_6PARAM && (mb.at( 0, 0 ).mv[0] == mb.at( 0, 0 ).mv[1]) && (mb.at( mb.width - 1, 0 ).mv[0] == mb.at( mb.width - 1, 0 ).mv[1]) && (mb.at( 0, mb.height - 1 ).mv[0] == mb.at( 0, mb.height - 1 ).mv[1])) )
#endif
{
return true;
}
......@@ -413,16 +401,9 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
{
CHECK( iRefIdx < 0, "iRefIdx incorrect." );
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
mv[0] = pu.mvAffi[eRefPicList][0];
mv[1] = pu.mvAffi[eRefPicList][1];
mv[2] = pu.mvAffi[eRefPicList][2];
#else
const CMotionBuf &mb = pu.getMotionBuf();
mv[0] = mb.at( 0, 0 ).mv[eRefPicList];
mv[1] = mb.at( mb.width - 1, 0 ).mv[eRefPicList];
mv[2] = mb.at( 0, mb.height - 1 ).mv[eRefPicList];
#endif
}
else
{
......
......@@ -82,7 +82,6 @@
#define JVET_L0694_AFFINE_LINEBUFFER_CLEANUP 1 // L0045/L0047/L0694: Combination of affine mode clean up and line buffer reduction
#define JVET_L0632_AFFINE_MERGE 1 // L0142/L0632: Affine merge list construction
#if JVET_L0632_AFFINE_MERGE
#define JVET_L0369_SUBBLOCK_MERGE 1 // Moving ATMVP into the sub-block merge list
......
......@@ -345,12 +345,10 @@ void PredictionUnit::initData()
{
mvdAffi[i][j].setZero();
}
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
for ( uint32_t j = 0; j < 3; j++ )
{
mvAffi[i][j].setZero();
}
#endif
}
mhIntraFlag = false;
}
......@@ -389,12 +387,10 @@ PredictionUnit& PredictionUnit::operator=(const InterPredictionData& predData)
{
mvdAffi[i][j] = predData.mvdAffi[i][j];
}
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
for ( uint32_t j = 0; j < 3; j++ )
{
mvAffi[i][j] = predData.mvAffi[i][j];
}
#endif
}
mhIntraFlag = predData.mhIntraFlag;
......@@ -430,12 +426,10 @@ PredictionUnit& PredictionUnit::operator=( const PredictionUnit& other )
{
mvdAffi[i][j] = other.mvdAffi[i][j];
}
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
for ( uint32_t j = 0; j < 3; j++ )
{
mvAffi[i][j] = other.mvAffi[i][j];
}
#endif
}
mhIntraFlag = other.mhIntraFlag;
......
......@@ -361,9 +361,7 @@ struct InterPredictionData
int16_t refIdx [NUM_REF_PIC_LIST_01];
MergeType mergeType;
Mv mvdAffi [NUM_REF_PIC_LIST_01][3];
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
Mv mvAffi[NUM_REF_PIC_LIST_01][3];
#endif
bool mhIntraFlag;
#if JVET_L0293_CPR
Mv bv; // block vector for CPR
......
......@@ -2172,20 +2172,10 @@ void PU::xInheritedAffineMv( const PredictionUnit &pu, const PredictionUnit* puN
int curH = pu.Y().height;
Mv mvLT, mvRT, mvLB;
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
mvLT = puNeighbour->mvAffi[eRefPicList][0];
mvRT = puNeighbour->mvAffi[eRefPicList][1];
mvLB = puNeighbour->mvAffi[eRefPicList][2];
#else
const Position posLT = puNeighbour->Y().topLeft();
const Position posRT = puNeighbour->Y().topRight();
const Position posLB = puNeighbour->Y().bottomLeft();
mvLT = puNeighbour->getMotionInfo( posLT ).mv[eRefPicList];
mvRT = puNeighbour->getMotionInfo( posRT ).mv[eRefPicList];
mvLB = puNeighbour->getMotionInfo( posLB ).mv[eRefPicList];
#endif
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
bool isTopCtuBoundary = false;
#if JVET_L0217_L0678_SPS_CLEANUP
if ( (posNeiY + neiH) % pu.cs->sps->getCTUSize() == 0 && (posNeiY + neiH) == posCurY )
......@@ -2201,18 +2191,13 @@ void PU::xInheritedAffineMv( const PredictionUnit &pu, const PredictionUnit* puN
posNeiY += neiH;
isTopCtuBoundary = true;
}
#endif
int shift = MAX_CU_DEPTH;
int iDMvHorX, iDMvHorY, iDMvVerX, iDMvVerY;
iDMvHorX = (mvRT - mvLT).getHor() << (shift - g_aucLog2[neiW]);
iDMvHorY = (mvRT - mvLT).getVer() << (shift - g_aucLog2[neiW]);
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP // degrade to 4-parameter model
if ( puNeighbour->cu->affineType == AFFINEMODEL_6PARAM && !isTopCtuBoundary )
#else
if ( puNeighbour->cu->affineType == AFFINEMODEL_6PARAM )
#endif
{
iDMvVerX = (mvLB - mvLT).getHor() << (shift - g_aucLog2[neiH]);
iDMvVerY = (mvLB - mvLT).getVer() << (shift - g_aucLog2[neiH]);
......@@ -3447,20 +3432,9 @@ void PU::setAllAffineMv( PredictionUnit& pu, Mv affLT, Mv affRT, Mv affLB, RefPi
}
}
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
pu.mvAffi[eRefList][0] = affLT;
pu.mvAffi[eRefList][1] = affRT;
pu.mvAffi[eRefList][2] = affLB;
#else
// Set AffineMvField for affine motion compensation LT, RT, LB and RB
mb.at( 0, 0 ).mv[eRefList] = affLT;
mb.at( mb.width - 1, 0 ).mv[eRefList] = affRT;
if ( pu.cu->affineType == AFFINEMODEL_6PARAM )
{
mb.at( 0, mb.height - 1 ).mv[eRefList] = affLB;
}
#endif
}
static bool deriveScaledMotionTemporal( const Slice& slice,
......
......@@ -1993,20 +1993,11 @@ void InterSearch::predInterSearch(CodingUnit& cu, Partitioner& partitioner)
bestMvpNum[0] = pu.mvpNum[0];
bestMvpNum[1] = pu.mvpNum[1];
#if !JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
const CMotionBuf &mb = pu.getMotionBuf();
#endif
for ( int refList = 0; refList < 2; refList++ )
{
#if JVET_L0694_AFFINE_LINEBUFFER_CLEANUP
bestMv[refList][0] = pu.mvAffi[refList][0];
bestMv[refList][1] = pu.mvAffi[refList][1];
bestMv[refList][2] = pu.mvAffi[refList][2];
#else
bestMv[refList][0] = mb.at( 0, 0 ).mv[refList];
bestMv[refList][1] = mb.at( mb.width - 1, 0 ).mv[refList];
bestMv[refList][2] = mb.at( 0, mb.height - 1 ).mv[refList];
#endif
bestMvd[refList][0] = pu.mvdAffi[refList][0];
bestMvd[refList][1] = pu.mvdAffi[refList][1];
bestMvd[refList][2] = pu.mvdAffi[refList][2];
......
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