Commit 095aed43 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0283_MULTI_REF_LINE

parent 1d872933
......@@ -106,9 +106,7 @@ enum CodingStatisticsType
STATS__CABAC_BITS__MH_INTRA_FLAG,
STATS__CABAC_BITS__TRIANGLE_FLAG,
STATS__CABAC_BITS__TRIANGLE_INDEX,
#if JVET_L0283_MULTI_REF_LINE
STATS__CABAC_BITS__MULTI_REF_LINE,
#endif
STATS__TOOL_TOTAL_FRAME,// This is a special case and is not included in the report.
STATS__TOOL_AFF,
STATS__TOOL_EMT,
......@@ -189,9 +187,7 @@ static inline const char* getName(CodingStatisticsType name)
"CABAC_BITS__MH_INTRA_FLAG",
"CABAC_BITS__TRIANGLE_FLAG",
"CABAC_BITS__TRIANGLE_INDEX",
#if JVET_L0283_MULTI_REF_LINE
"CABAC_BITS__MULTI_REF_LINE",
#endif
"TOOL_FRAME",
"TOOL_AFFINE",
"TOOL_EMT",
......
......@@ -188,11 +188,9 @@ static const int ADJ_DEQUANT_SHIFT = ( ADJ_QUANT_SHIFT + 1 );
static const int RVM_VCEGAM10_M = 4;
#if JVET_L0283_MULTI_REF_LINE
static const int MAX_REF_LINE_IDX = 3; //highest refLine offset in the list
static const int MRL_NUM_REF_LINES = 3; //number of candidates in the array
static const int MULTI_REF_LINE_IDX[4] = { 0, 1, 3, 0 };
#endif
static const int NUM_LUMA_MODE = 67; ///< Planar + DC + 65 directional mode (4*16 + 1)
static const int NUM_LMC_MODE = 1 + 2; ///< LMC + MDLM_T + MDLM_L
......
......@@ -383,7 +383,6 @@ const CtxSet ContextSetCfg::PredMode = ContextSetCfg::addCtxSet
#endif
});
#if JVET_L0283_MULTI_REF_LINE
const CtxSet ContextSetCfg::MultiRefLineIdx = ContextSetCfg::addCtxSet
({
#if TRAINED_CABAC_INIT_TABLES
......@@ -396,7 +395,6 @@ const CtxSet ContextSetCfg::MultiRefLineIdx = ContextSetCfg::addCtxSet
{ CNU, CNU, CNU },
#endif
});
#endif
const CtxSet ContextSetCfg::IPredMode[] =
{
......
......@@ -161,9 +161,7 @@ public:
static const CtxSet MergeIdx;
static const CtxSet PartSize;
static const CtxSet PredMode;
#if JVET_L0283_MULTI_REF_LINE
static const CtxSet MultiRefLineIdx;
#endif
static const CtxSet IPredMode [2]; // [ ChannelType ]
static const CtxSet PdpcFlag;
static const CtxSet DeltaQP;
......
This diff is collapsed.
......@@ -89,22 +89,16 @@ protected:
void xPredIntraDc ( const CPelBuf &pSrc, PelBuf &pDst, const ChannelType channelType, const bool enableBoundaryFilter = true );
#if HEVC_USE_HOR_VER_PREDFILTERING
void xPredIntraAng ( const CPelBuf &pSrc, PelBuf &pDst, const ChannelType channelType, const uint32_t dirMode, const ClpRng& clpRng, const bool bEnableEdgeFilters, const SPS& sps
#if JVET_L0283_MULTI_REF_LINE
, int multiRefIdx
#endif
, const bool enableBoundaryFilter = true );
#else
#if JVET_L0628_4TAP_INTRA
void xPredIntraAng ( const CPelBuf &pSrc, PelBuf &pDst, const ChannelType channelType, const uint32_t dirMode, const ClpRng& clpRng, const SPS& sps
#if JVET_L0283_MULTI_REF_LINE
, int multiRefIdx
#endif
, const bool useFilteredPredSamples );
#else
void xPredIntraAng ( const CPelBuf &pSrc, PelBuf &pDst, const ChannelType channelType, const uint32_t dirMode, const ClpRng& clpRng, const SPS& sps
#if JVET_L0283_MULTI_REF_LINE
, int multiRefIdx
#endif
, const bool enableBoundaryFilter = true );
#endif //JVET_L0628_4TAP_INTRA
#endif
......@@ -112,9 +106,7 @@ protected:
void xFillReferenceSamples ( const CPelBuf &recoBuf, Pel* refBufUnfiltered, const CompArea &area, const CodingUnit &cu );
void xFilterReferenceSamples ( const Pel* refBufUnfiltered, Pel* refBufFiltered, const CompArea &area, const SPS &sps
#if JVET_L0283_MULTI_REF_LINE
, int multiRefIdx
#endif
);
#if HEVC_USE_DC_PREDFILTERING
......
......@@ -78,7 +78,6 @@
#define L0074_SUBBLOCK_DEBLOCKING 1
#define JVET_L0283_MULTI_REF_LINE 1
#define JVET_L0256_BIO 1
......
......@@ -325,9 +325,7 @@ void PredictionUnit::initData()
// intra data - need this default initialization for PCM
intraDir[0] = DC_IDX;
intraDir[1] = PLANAR_IDX;
#if JVET_L0283_MULTI_REF_LINE
multiRefIdx = 0;
#endif
// inter data
mergeFlag = false;
......@@ -367,9 +365,7 @@ PredictionUnit& PredictionUnit::operator=(const IntraPredictionData& predData)
{
intraDir[i] = predData.intraDir[i];
}
#if JVET_L0283_MULTI_REF_LINE
multiRefIdx = predData.multiRefIdx;
#endif
return *this;
}
......@@ -415,9 +411,7 @@ PredictionUnit& PredictionUnit::operator=( const PredictionUnit& other )
{
intraDir[ i ] = other.intraDir[ i ];
}
#if JVET_L0283_MULTI_REF_LINE
multiRefIdx = other.multiRefIdx;
#endif
mergeFlag = other.mergeFlag;
mergeIdx = other.mergeIdx;
......
......@@ -346,9 +346,7 @@ struct CodingUnit : public UnitArea
struct IntraPredictionData
{
uint32_t intraDir[MAX_NUM_CHANNEL_TYPE];
#if JVET_L0283_MULTI_REF_LINE
int multiRefIdx;
#endif
};
struct InterPredictionData
......
......@@ -294,9 +294,7 @@ cTUTraverser CU::traverseTUs( const CodingUnit& cu )
int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType &channelType /*= CHANNEL_TYPE_LUMA*/ )
{
const int numMPMs = NUM_MOST_PROBABLE_MODES;
#if JVET_L0283_MULTI_REF_LINE
const int extendRefLine = (channelType == CHANNEL_TYPE_LUMA) ? pu.multiRefIdx : 0;
#endif
{
int numCand = -1;
int leftIntraDir = PLANAR_IDX, aboveIntraDir = PLANAR_IDX;
......@@ -324,7 +322,6 @@ int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType
const int offset = (int)NUM_LUMA_MODE - 6;
const int mod = offset + 3;
#if JVET_L0283_MULTI_REF_LINE
if (extendRefLine)
{
int modeIdx = 0;
......@@ -394,7 +391,6 @@ int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType
}
else
{
#endif
mpm[0] = leftIntraDir;
mpm[1] = (mpm[0] == PLANAR_IDX) ? DC_IDX : PLANAR_IDX;
mpm[2] = VER_IDX;
......@@ -445,9 +441,7 @@ int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType
mpm[5] = ((mpm[maxCandModeIdx] + offset - 1) % mod) + 2;
}
}
#if JVET_L0283_MULTI_REF_LINE
}
#endif
for (int i = 0; i < numMPMs; i++)
{
CHECK(mpm[i] >= NUM_LUMA_MODE, "Invalid MPM");
......
......@@ -215,9 +215,7 @@ uint32_t getCtuAddr (const Position& pos, const PreCalcValues &pcv);
template<typename T, size_t N>
uint32_t updateCandList(T uiMode, double uiCost, static_vector<T, N>& candModeList, static_vector<double, N>& candCostList
#if JVET_L0283_MULTI_REF_LINE
, static_vector<int, N>& extendRefList, int extendRef
#endif
, size_t uiFastCandNum = N, int* iserttPos = nullptr)
{
CHECK( std::min( uiFastCandNum, candModeList.size() ) != std::min( uiFastCandNum, candCostList.size() ), "Sizes do not match!" );
......@@ -238,21 +236,17 @@ uint32_t updateCandList(T uiMode, double uiCost, static_vector<T, N>& candModeLi
{
candModeList[currSize - i] = candModeList[currSize - 1 - i];
candCostList[currSize - i] = candCostList[currSize - 1 - i];
#if JVET_L0283_MULTI_REF_LINE
if (extendRef != -1)
{
extendRefList[currSize - i] = extendRefList[currSize - 1 - i];
}
#endif
}
candModeList[currSize - shift] = uiMode;
candCostList[currSize - shift] = uiCost;
#if JVET_L0283_MULTI_REF_LINE
if (extendRef != -1)
{
extendRefList[currSize - shift] = extendRef;
}
#endif
if (iserttPos != nullptr)
{
*iserttPos = int(currSize - shift);
......@@ -263,12 +257,10 @@ uint32_t updateCandList(T uiMode, double uiCost, static_vector<T, N>& candModeLi
{
candModeList.insert( candModeList.end() - shift, uiMode );
candCostList.insert( candCostList.end() - shift, uiCost );
#if JVET_L0283_MULTI_REF_LINE
if (extendRef != -1)
{
extendRefList.insert(extendRefList.end() - shift, extendRef);
}
#endif
if (iserttPos != nullptr)
{
*iserttPos = int(candModeList.size() - shift - 1);
......
......@@ -700,9 +700,7 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
{
const uint32_t uiChFinalMode = PU::getFinalIntraMode( pu, ChannelType( chType ) );
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::Luma_IntraMode), uiChFinalMode);
#if JVET_L0283_MULTI_REF_LINE
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, pu, GetBlockStatisticName(BlockStatistic::MultiRefIdx), pu.multiRefIdx);
#endif
}
else
{
......@@ -831,12 +829,10 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
{
DTRACE_BLOCK_SCALAR_CHROMA(g_trace_ctx, D_BLOCK_STATISTICS_CODED, pu, GetBlockStatisticName(BlockStatistic::Chroma_IntraMode), PU::getFinalIntraMode(pu, CHANNEL_TYPE_CHROMA));
}
#if JVET_L0283_MULTI_REF_LINE
if (cu.Y().valid() && isLuma(cu.chType))
{
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_CODED, pu, GetBlockStatisticName(BlockStatistic::MultiRefIdx), pu.multiRefIdx);
}
#endif
break;
}
case MODE_INTER:
......
......@@ -73,9 +73,7 @@ enum class BlockStatistic {
IPCM,
Luma_IntraMode,
Chroma_IntraMode,
#if JVET_L0283_MULTI_REF_LINE
MultiRefIdx,
#endif
// inter
SkipFlag,
RootCbf,
......@@ -188,9 +186,7 @@ static const std::map<BlockStatistic, std::tuple<std::string, BlockStatisticType
{ BlockStatistic::EMTFlag, std::tuple<std::string, BlockStatisticType, std::string>{"EMTFlag", BlockStatisticType::Flag, ""}},
{ BlockStatistic::MotionBufL0, std::tuple<std::string, BlockStatisticType, std::string>{"MotionBufL0", BlockStatisticType::Vector, "Scale: 16"}},
{ BlockStatistic::MotionBufL1, std::tuple<std::string, BlockStatisticType, std::string>{"MotionBufL1", BlockStatisticType::Vector, "Scale: 16"}},
#if JVET_L0283_MULTI_REF_LINE
{ BlockStatistic::MultiRefIdx, std::tuple<std::string, BlockStatisticType, std::string>{"MultiRefIdx", BlockStatisticType::Integer, "[0, 1]"}},
#endif
{ BlockStatistic::MMVDSkipFlag, std::tuple<std::string, BlockStatisticType, std::string>{"MMVDSkipFlag", BlockStatisticType::Flag, ""}},
{ BlockStatistic::MMVDMergeFlag, std::tuple<std::string, BlockStatisticType, std::string>{"MMVDMergeFlag", BlockStatisticType::Flag, ""}},
{ BlockStatistic::MMVDMergeIdx, std::tuple<std::string, BlockStatisticType, std::string>{"MMVDMergeIdx", BlockStatisticType::Integer, "[0, 1]"}},
......
......@@ -729,9 +729,7 @@ bool CABACReader::coding_unit( CodingUnit &cu, Partitioner &partitioner, CUCtx&
}
}
#if JVET_L0283_MULTI_REF_LINE
extend_ref_line( cu );
#endif
// prediction data ( intra prediction modes / reference indexes + motion vectors )
......@@ -951,7 +949,6 @@ void CABACReader::xReadTruncBinCode(uint32_t& symbol, uint32_t maxSymbol)
symbol -= (val - b);
}
}
#if JVET_L0283_MULTI_REF_LINE
void CABACReader::extend_ref_line(CodingUnit& cu)
{
if (!cu.Y().valid() || cu.predMode != MODE_INTRA || !isLuma(cu.chType))
......@@ -991,7 +988,6 @@ void CABACReader::extend_ref_line(CodingUnit& cu)
pu = pu->next;
}
}
#endif
void CABACReader::intra_luma_pred_modes( CodingUnit &cu )
{
......@@ -1007,14 +1003,12 @@ void CABACReader::intra_luma_pred_modes( CodingUnit &cu )
int mpmFlag[4];
for( int k = 0; k < numBlocks; k++ )
{
#if JVET_L0283_MULTI_REF_LINE
CHECK(numBlocks != 1, "not supported yet");
if (cu.firstPU->multiRefIdx)
{
mpmFlag[0] = true;
}
else
#endif
mpmFlag[k] = m_BinDecoder.decodeBin( Ctx::IPredMode[0]() );
}
......
......@@ -83,9 +83,7 @@ public:
#if JVET_L0646_GBI
void cu_gbi_flag ( CodingUnit& cu );
#endif
#if JVET_L0283_MULTI_REF_LINE
void extend_ref_line (CodingUnit& cu);
#endif
void intra_luma_pred_modes ( CodingUnit& cu );
void intra_chroma_pred_modes ( CodingUnit& cu );
bool intra_chroma_lmc_mode ( PredictionUnit& pu );
......
......@@ -644,9 +644,7 @@ void CABACWriter::coding_unit( const CodingUnit& cu, Partitioner& partitioner, C
// prediction mode and partitioning data
pred_mode ( cu );
#if JVET_L0283_MULTI_REF_LINE
extend_ref_line(cu);
#endif
// prediction data ( intra prediction modes / reference indexes + motion vectors )
......@@ -821,7 +819,6 @@ void CABACWriter::xWriteTruncBinCode(uint32_t symbol, uint32_t maxSymbol)
}
}
#if JVET_L0283_MULTI_REF_LINE
void CABACWriter::extend_ref_line(const PredictionUnit& pu)
{
const CodingUnit& cu = *pu.cu;
......@@ -883,7 +880,6 @@ void CABACWriter::extend_ref_line(const CodingUnit& cu)
pu = pu->next;
}
}
#endif
void CABACWriter::intra_luma_pred_modes( const CodingUnit& cu )
{
......@@ -919,13 +915,11 @@ void CABACWriter::intra_luma_pred_modes( const CodingUnit& cu )
break;
}
}
#if JVET_L0283_MULTI_REF_LINE
if (pu->multiRefIdx)
{
CHECK(mpm_idx >= numMPMs, "use of non-MPM");
}
else
#endif
m_BinEncoder.encodeBin( mpm_idx < numMPMs, Ctx::IPredMode[0]() );
pu = pu->next;
......@@ -1006,13 +1000,11 @@ void CABACWriter::intra_luma_pred_mode( const PredictionUnit& pu )
break;
}
}
#if JVET_L0283_MULTI_REF_LINE
if (pu.multiRefIdx)
{
CHECK(mpm_idx >= numMPMs, "use of non-MPM");
}
else
#endif
m_BinEncoder.encodeBin( mpm_idx < numMPMs, Ctx::IPredMode[0]() );
// mpm_idx / rem_intra_luma_pred_mode
......
......@@ -96,10 +96,8 @@ public:
#if JVET_L0646_GBI
void cu_gbi_flag ( const CodingUnit& cu );
#endif
#if JVET_L0283_MULTI_REF_LINE
void extend_ref_line (const PredictionUnit& pu );
void extend_ref_line (const CodingUnit& cu );
#endif
void intra_luma_pred_modes ( const CodingUnit& cu );
void intra_luma_pred_mode ( const PredictionUnit& pu );
void intra_chroma_pred_modes ( const CodingUnit& cu );
......
......@@ -1380,9 +1380,7 @@ void EncCu::xCheckRDCostIntra( CodingStructure *&tempCS, CodingStructure *&bestC
m_CABACEstimator->cu_skip_flag ( cu );
}
m_CABACEstimator->pred_mode ( cu );
#if JVET_L0283_MULTI_REF_LINE
m_CABACEstimator->extend_ref_line( cu );
#endif
m_CABACEstimator->cu_pred_data ( cu );
m_CABACEstimator->pcm_data ( cu, partitioner );
......@@ -2308,13 +2306,9 @@ void EncCu::xCheckRDCostMergeTriangle2Nx2N( CodingStructure *&tempCS, CodingStru
double cost = (double)uiSad + (double)uiBitsCand * sqrtLambdaForFirstPass;
#if JVET_L0283_MULTI_REF_LINE
static_vector<int, TRIANGLE_MAX_NUM_CANDS> * nullList = nullptr;
#endif
updateCandList( mergeCand, cost, triangleRdModeList, tianglecandCostList
#if JVET_L0283_MULTI_REF_LINE
, *nullList, -1
#endif
, triangleNumMrgSATDCand );
}
......@@ -2567,13 +2561,9 @@ void EncCu::xCheckRDCostAffineMerge2Nx2N( CodingStructure *&tempCS, CodingStruct
uiBitsCand--;
}
double cost = (double)uiSad + (double)uiBitsCand * sqrtLambdaForFirstPass;
#if JVET_L0283_MULTI_REF_LINE
static_vector<int, AFFINE_MRG_MAX_NUM_CANDS> * nullList = nullptr;
#endif
updateCandList( uiMergeCand, cost, RdModeList, candCostList
#if JVET_L0283_MULTI_REF_LINE
, *nullList, -1
#endif
, uiNumMrgSATDCand );
CHECK( std::min( uiMergeCand + 1, uiNumMrgSATDCand ) != RdModeList.size(), "" );
......@@ -2905,14 +2895,10 @@ void EncCu::xCheckRDCostCPRModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct
bitsCand--;
}
double cost = (double)sad + (double)bitsCand * sqrtLambdaForFirstPass;
#if JVET_L0283_MULTI_REF_LINE
static_vector<int, MRG_MAX_NUM_CANDS> * nullList = nullptr;
#endif
updateCandList(mergeCand, cost, RdModeList, candCostList
#if JVET_L0283_MULTI_REF_LINE
, *nullList, -1
#endif
, numMrgSATDCand);
}
......
This diff is collapsed.
......@@ -78,9 +78,7 @@ private:
double m_bestModeCostStore[4]; // RD cost of the best mode for each PU using DCT2
double m_modeCostStore [4][NUM_LUMA_MODE]; // RD cost of each mode for each PU using DCT2
uint32_t m_savedRdModeList [4][NUM_LUMA_MODE], m_savedNumRdModes[4];
#if JVET_L0283_MULTI_REF_LINE
int m_savedExtendRefList[4][NUM_LUMA_MODE];
#endif
protected:
// interface to option
......
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