Commit 859c574b authored by Shelly Chiang's avatar Shelly Chiang

update the codebase

parent 694008b4
......@@ -259,7 +259,11 @@ uint32_t updateCandList( T uiMode, double uiCost, static_vector<T, N>& candModeL
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
template<typename T, size_t N>
#if JVET_L0054_MMVD
uint32_t updateDoubleCandList(T mode, double cost, static_vector<T, N>& candModeList, static_vector<double, N>& candCostList, static_vector<T, N>& candModeList2, T mode2, size_t fastCandNum = N, int* iserttPos = nullptr)
#else
uint32_t updateDoubleCandList(T mode, double cost, static_vector<T, N>& candModeList, static_vector<double, N>& candCostList, static_vector<T, N>& candModeList2, T mode2, size_t fastCandNum = N)
#endif
{
CHECK(std::min(fastCandNum, candModeList.size()) != std::min(fastCandNum, candCostList.size()), "Sizes do not match!");
CHECK(fastCandNum > candModeList.capacity(), "The vector is to small to hold all the candidates!");
......@@ -284,6 +288,12 @@ uint32_t updateDoubleCandList(T mode, double cost, static_vector<T, N>& candMode
candModeList[currSize - shift] = mode;
candModeList2[currSize - shift] = mode2;
candCostList[currSize - shift] = cost;
#if JVET_L0054_MMVD
if (iserttPos != nullptr)
{
*iserttPos = int(currSize - shift);
}
#endif
return 1;
}
else if (currSize < fastCandNum)
......@@ -291,9 +301,21 @@ uint32_t updateDoubleCandList(T mode, double cost, static_vector<T, N>& candMode
candModeList.insert(candModeList.end() - shift, mode);
candModeList2.insert(candModeList2.end() - shift, mode2);
candCostList.insert(candCostList.end() - shift, cost);
#if JVET_L0054_MMVD
if (iserttPos != nullptr)
{
*iserttPos = int(candModeList.size() - shift - 1);
}
#endif
return 1;
}
#if JVET_L0054_MMVD
if (iserttPos != nullptr)
{
*iserttPos = -1;
}
#endif
return 0;
}
#endif
......
......@@ -1522,6 +1522,13 @@ void CABACReader::MHIntra_flag(PredictionUnit& pu)
return;
}
#if JVET_L0054_MMVD
if (pu.mmvdMergeFlag)
{
pu.MHIntraFlag = false;
return;
}
#endif
if (pu.cu->lwidth() * pu.cu->lheight() < 64 || pu.cu->lwidth() >= MAX_CU_SIZE || pu.cu->lheight() >= MAX_CU_SIZE)
{
pu.MHIntraFlag = false;
......
......@@ -433,6 +433,9 @@ void DecCu::xDeriveCUMV( CodingUnit &cu )
#if JVET_L0054_MMVD
if (pu.mmvdMergeFlag || pu.cu->mmvdSkip)
{
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
CHECK(pu.MHIntraFlag == true, "invalid MHIntra");
#endif
if (pu.cs->sps->getSpsNext().getUseSubPuMvp())
{
Size bufSize = g_miScaling.scale(pu.lumaSize());
......
......@@ -1455,6 +1455,13 @@ void CABACWriter::MHIntra_flag(const PredictionUnit& pu)
CHECK(pu.MHIntraFlag == true, "invalid MHIntra and skip");
return;
}
#if JVET_L0054_MMVD
if (pu.mmvdMergeFlag)
{
CHECK(pu.MHIntraFlag == true, "invalid MHIntra and mmvd");
return;
}
#endif
if (pu.cu->lwidth() * pu.cu->lheight() < 64 || pu.cu->lwidth() >= MAX_CU_SIZE || pu.cu->lheight() >= MAX_CU_SIZE)
{
CHECK(pu.MHIntraFlag == true, "invalid MHIntra and blk");
......
This diff is collapsed.
......@@ -114,6 +114,9 @@ private:
EncModeCtrl *m_modeCtrl;
#if JVET_L0054_MMVD
PelStorage m_acMergeBuffer[MMVD_MRG_MAX_RD_BUF_NUM];
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
PelStorage m_acRealMergeBuffer[MRG_MAX_NUM_CANDS];
#endif
#else
PelStorage m_acMergeBuffer[MRG_MAX_NUM_CANDS];
#endif
......@@ -239,10 +242,6 @@ protected:
|| abs(cu.slice->getPOC() - cu.slice->getRefPOC(REF_PIC_LIST_1, cu.refIdxBi[1])) == 1))));
}
#endif
#if JVET_L0100_MULTI_HYPOTHESIS_INTRA
template<typename T, size_t N>
void getMHIntraLCCand (PredictionUnit &pu, static_vector<T, N>& RdModeList, static_vector<double, N>& candCostList, static_vector<T, N>& RdModeList2, uint32_t uiNumMrgSATDCand, const double sqrtLambdaForFirstPass, const double sqrtLambdaForFirstPassIntra, DistParam distParam, const UnitArea localUnitArea);
#endif
};
//! \}
......
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