Commit f732de68 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0266_HMVP

parent f3c66ebe
......@@ -330,10 +330,8 @@ static const int GBI_NUM = 5; ///< the
static const int GBI_DEFAULT = ((uint8_t)(GBI_NUM >> 1)); ///< Default weighting index representing for w=0.5
static const int GBI_SIZE_CONSTRAINT = 256; ///< disabling GBi if cu size is smaller than 256
#endif
#if JVET_L0266_HMVP
static const int MAX_NUM_HMVP_CANDS = 6; ///< maximum number of HMVP candidates to be stored and used in merge list
static const int MAX_NUM_HMVP_AVMPCANDS = 4; ///< maximum number of HMVP candidates to be used in AMVP list
#endif
#if W0038_DB_OPT
static const int MAX_ENCODER_DEBLOCKING_QUALITY_LAYERS = 8 ;
......
......@@ -211,11 +211,9 @@ public:
}
};
#endif
#if JVET_L0266_HMVP
struct LutMotionCand
{
MotionInfo* motionCand;
int currCnt;
};
#endif
#endif // __MOTIONINFO__
......@@ -41,9 +41,7 @@
#include "Picture.h"
#include "dtrace_next.h"
#if JVET_L0266_HMVP
#include "UnitTools.h"
#endif
//! \ingroup CommonLib
//! \{
......@@ -143,9 +141,7 @@ Slice::Slice()
, m_uiMaxTTSizeIChroma ( 0 )
#endif
, m_uiMaxBTSize ( 0 )
#if JVET_L0266_HMVP
, m_MotionCandLut (NULL)
#endif
{
for(uint32_t i=0; i<NUM_REF_PIC_LIST_01; i++)
{
......@@ -182,16 +178,12 @@ Slice::Slice()
m_saoEnabledFlag[ch] = false;
}
#if JVET_L0266_HMVP
initMotionLUTs();
#endif
}
Slice::~Slice()
{
#if JVET_L0266_HMVP
destroyMotionLUTs();
#endif
}
......@@ -228,9 +220,7 @@ void Slice::initSlice()
m_subPuMvpSubBlkSizeSliceEnable = false;
m_subPuMvpSubBlkLog2Size = 2;
#endif
#if JVET_L0266_HMVP
resetMotionLUTs();
#endif
}
void Slice::setDefaultClpRng( const SPS& sps )
......@@ -1629,7 +1619,6 @@ void Slice::stopProcessingTimer()
m_dProcessingTime += (double)(clock()-m_iProcessingStartTime) / CLOCKS_PER_SEC;
m_iProcessingStartTime = 0;
}
#if JVET_L0266_HMVP
void Slice::initMotionLUTs()
{
m_MotionCandLut = new LutMotionCand;
......@@ -1698,7 +1687,6 @@ void Slice::copyMotionLUTs(LutMotionCand* Src, LutMotionCand* Dst)
memcpy(Dst->motionCand, Src->motionCand, sizeof(MotionInfo)*(std::min(Src->currCnt, MAX_NUM_HMVP_CANDS)));
Dst->currCnt = Src->currCnt;
}
#endif
unsigned Slice::getMinPictureDistance() const
{
......
......@@ -49,10 +49,8 @@
//! \ingroup CommonLib
//! \{
#if JVET_L0266_HMVP
#include "CommonLib/MotionInfo.h"
struct MotionInfo;
#endif
struct Picture;
......@@ -1741,9 +1739,7 @@ private:
uint32_t m_uiMaxBTSize;
AlfSliceParam m_alfSliceParam;
#if JVET_L0266_HMVP
LutMotionCand* m_MotionCandLut;
#endif
public:
Slice();
......@@ -2026,7 +2022,6 @@ public:
void setAlfSliceParam( AlfSliceParam& alfSliceParam ) { m_alfSliceParam = alfSliceParam; }
AlfSliceParam& getAlfSliceParam() { return m_alfSliceParam; }
#if JVET_L0266_HMVP
void initMotionLUTs ();
void destroyMotionLUTs ();
void resetMotionLUTs();
......@@ -2039,7 +2034,6 @@ public:
void updateMotionLUTs(LutMotionCand* lutMC, CodingUnit & cu);
void copyMotionLUTs(LutMotionCand* Src, LutMotionCand* Dst);
#endif
protected:
Picture* xGetRefPic (PicList& rcListPic, int poc);
......
......@@ -60,10 +60,7 @@
#define JVET_L0285_8BIT_TRANSFORM_CORE 1 // Primary transform using 8-bit cores
#define JVET_L0266_HMVP 1 //History-based MVP
#if JVET_L0266_HMVP
#define JVET_L0158_L0106_RESET_BUFFER 1 //reset the history buffer on HMVP
#endif
#define JVET_L0265_AFF_MINIMUM4X4 1 //Affine 4x4 chroma subblock
......
......@@ -748,7 +748,6 @@ uint32_t PU::getFinalIntraMode( const PredictionUnit &pu, const ChannelType &chT
return uiIntraMode;
}
#if JVET_L0266_HMVP
bool PU::xCheckSimilarMotion(const int mergeCandIndex, const int prevCnt, const MergeCtx mergeCandList, bool hasPruned[MRG_MAX_NUM_CANDS])
{
for (uint32_t ui = 0; ui < prevCnt; ui++)
......@@ -861,7 +860,6 @@ bool PU::addMergeHMVPCand(const Slice &slice, MergeCtx& mrgCtx, bool isCandInter
}
return false;
}
#endif
void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
#if JVET_L0054_MMVD
......@@ -1428,7 +1426,6 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
return;
}
#if JVET_L0266_HMVP
int maxNumMergeCandMin1 = maxNumMergeCand - 1;
if (cnt != maxNumMergeCandMin1)
{
......@@ -1466,7 +1463,6 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
return;
}
}
#endif
#if JVET_L0090_PAIR_AVG
// pairwise-average candidates
......@@ -1561,11 +1557,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
uint32_t uiArrayAddr = cnt;
#if !JVET_L0090_PAIR_AVG
#if JVET_L0266_HMVP
uint32_t uiCutoff = std::min( uiArrayAddr, 3u );
#else
uint32_t uiCutoff = std::min( uiArrayAddr, 4u );
#endif
if (slice.isInterB())
{
static const uint32_t NUM_PRIORITY_LIST = 12;
......@@ -2158,7 +2150,6 @@ void PU::fillMvpCand(PredictionUnit &pu, const RefPicList &eRefPicList, const in
if ((C0Avail && getColocatedMVP(pu, eRefPicList, posC0, cColMv, refIdx_Col)) || getColocatedMVP(pu, eRefPicList, posC1, cColMv, refIdx_Col))
{
#if JVET_L0266_HMVP
if (pu.cu->imv != 0)
{
cColMv.roundToAmvrSignalPrecision(MV_PRECISION_INTERNAL, pu.cu->imv);
......@@ -2175,19 +2166,14 @@ void PU::fillMvpCand(PredictionUnit &pu, const RefPicList &eRefPicList, const in
{
pInfo->mvCand[pInfo->numCand++] = cColMv;
}
#else
pInfo->mvCand[pInfo->numCand++] = cColMv;
#endif
}
}
#if JVET_L0266_HMVP
if (pInfo->numCand < AMVP_MAX_NUM_CANDS)
{
const int currRefPOC = cs.slice->getRefPic(eRefPicList, refIdx)->getPOC();
const RefPicList eRefPicList2nd = (eRefPicList == REF_PIC_LIST_0) ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
addAMVPHMVPCand(pu, eRefPicList, eRefPicList2nd, currRefPOC, *pInfo, pu.cu->imv);
}
#endif
if (pInfo->numCand > AMVP_MAX_NUM_CANDS)
{
pInfo->numCand = AMVP_MAX_NUM_CANDS;
......@@ -2867,7 +2853,6 @@ bool PU::addMVPCandWithScaling( const PredictionUnit &pu, const RefPicList &eRef
return false;
}
#if JVET_L0266_HMVP
void PU::addAMVPHMVPCand(const PredictionUnit &pu, const RefPicList eRefPicList, const RefPicList eRefPicList2nd, const int currRefPOC, AMVPInfo &info, uint8_t imv)
{
const Slice &slice = *(*pu.cs).slice;
......@@ -2916,7 +2901,6 @@ void PU::addAMVPHMVPCand(const PredictionUnit &pu, const RefPicList eRefPicList,
}
}
}
#endif
bool PU::isBipredRestriction(const PredictionUnit &pu)
{
if(pu.cu->lumaSize().width == 4 && pu.cu->lumaSize().height ==4 )
......
......@@ -126,7 +126,6 @@ namespace PU
bool addMVPCandUnscaled (const PredictionUnit &pu, const RefPicList &eRefPicList, const int &iRefIdx, const Position &pos, const MvpDir &eDir, AMVPInfo &amvpInfo);
bool addMVPCandWithScaling (const PredictionUnit &pu, const RefPicList &eRefPicList, const int &iRefIdx, const Position &pos, const MvpDir &eDir, AMVPInfo &amvpInfo);
void xInheritedAffineMv ( const PredictionUnit &pu, const PredictionUnit* puNeighbour, RefPicList eRefPicList, Mv rcMv[3] );
#if JVET_L0266_HMVP
bool xCheckSimilarMotion(const int mergeCandIndex, const int prevCnt, const MergeCtx mergeCandList, bool hasPruned[MRG_MAX_NUM_CANDS]);
#if JVET_L0090_PAIR_AVG
bool addMergeHMVPCand(const Slice &slice, MergeCtx& mrgCtx, bool canFastExit, const int& mrgCandIdx, const uint32_t maxNumMergeCandMin1, int &cnt, const int prevCnt, bool isAvailableSubPu, unsigned subPuMvpPos
......@@ -142,7 +141,6 @@ namespace PU
);
#endif
void addAMVPHMVPCand(const PredictionUnit &pu, const RefPicList eRefPicList, const RefPicList eRefPicList2nd, const int currRefPOC, AMVPInfo &info, uint8_t imv);
#endif
#if JVET_L0271_AFFINE_AMVP_SIMPLIFY
bool addAffineMVPCandUnscaled( const PredictionUnit &pu, const RefPicList &refPicList, const int &refIdx, const Position &pos, const MvpDir &dir, AffineAMVPInfo &affiAmvpInfo );
#endif
......
......@@ -369,12 +369,10 @@ void DecCu::xReconInter(CodingUnit &cu)
m_pcInterPred->motionCompensation( cu );
#endif
}
#if JVET_L0266_HMVP
#if JVET_L0293_CPR
if (cu.Y().valid())
#endif
cu.slice->updateMotionLUTs(cu.slice->getMotionLUTs(), cu);
#endif
if (cu.firstPU->mhIntraFlag)
{
......
This diff is collapsed.
......@@ -98,11 +98,9 @@ private:
CodingStructure ***m_pTempCS;
CodingStructure ***m_pBestCS;
#if JVET_L0266_HMVP
LutMotionCand ***m_pTempMotLUTs;
LutMotionCand ***m_pBestMotLUTs;
LutMotionCand ***m_pSplitTempMotLUTs;
#endif
// Access channel
EncCfg* m_pcEncCfg;
IntraSearch* m_pcIntraSearch;
......@@ -195,29 +193,21 @@ public:
protected:
void xCompressCU ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm
#if JVET_L0266_HMVP
, LutMotionCand *&tempMotCandLUTs
, LutMotionCand *&bestMotCandLUTs
#endif
);
#if ENABLE_SPLIT_PARALLELISM
void xCompressCUParallel ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm );
void copyState ( EncCu* other, Partitioner& pm, const UnitArea& currArea, const bool isDist );
#endif
#if JVET_L0266_HMVP
bool
#else
void
#endif
xCheckBestMode ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode& encTestmode );
void xCheckModeSplit ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode& encTestMode
#if JVET_L0266_HMVP
, LutMotionCand* &tempMotCandLUTs
, LutMotionCand* &bestMotCandLUTs
, UnitArea parArea
#endif
);
void xCheckRDCostIntra ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode& encTestMode );
......
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