Commit a0a4e697 authored by Liang Zhao's avatar Liang Zhao
Browse files

enable JVET-L0283 MRLP

parent 1e3084d4
......@@ -158,6 +158,7 @@ typedef std::pair<int, int> TrCost;
#define JVET_M0409_ATMVP_FIX 1
#define ENABLE_JVET_L0283_MRL 1 // 1: Enable MRL, 0: Disable MRL
#define JVET_L0090_PAIR_AVG 1 // Add pairwise average candidates, replace HEVC combined candidates
#define REUSE_CU_RESULTS 1
#if REUSE_CU_RESULTS && JVET_M0102_INTRA_SUBPARTITIONS
......
......@@ -1283,6 +1283,10 @@ void CABACReader::xReadTruncBinCode(uint32_t& symbol, uint32_t maxSymbol)
void CABACReader::extend_ref_line(CodingUnit& cu)
{
#if !ENABLE_JVET_L0283_MRL
return;
#endif
if (!cu.Y().valid() || cu.predMode != MODE_INTRA || !isLuma(cu.chType))
{
cu.firstPU->multiRefIdx = 0;
......
......@@ -996,6 +996,10 @@ void CABACWriter::xWriteTruncBinCode(uint32_t symbol, uint32_t maxSymbol)
void CABACWriter::extend_ref_line(const PredictionUnit& pu)
{
#if !ENABLE_JVET_L0283_MRL
return;
#endif
const CodingUnit& cu = *pu.cu;
if (!cu.Y().valid() || cu.predMode != MODE_INTRA || !isLuma(cu.chType))
{
......@@ -1023,6 +1027,10 @@ void CABACWriter::extend_ref_line(const PredictionUnit& pu)
void CABACWriter::extend_ref_line(const CodingUnit& cu)
{
#if !ENABLE_JVET_L0283_MRL
return;
#endif
if (!cu.Y().valid() || cu.predMode != MODE_INTRA || !isLuma(cu.chType))
{
return;
......
......@@ -420,8 +420,10 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
{
// this should always be true
CHECK( !pu.Y().valid(), "PU is not valid" );
#if ENABLE_JVET_L0283_MRL
bool isFirstLineOfCtu = (((pu.block(COMPONENT_Y).y)&((pu.cs->sps)->getMaxCUWidth() - 1)) == 0);
int numOfPassesExtendRef = (isFirstLineOfCtu ? 1 : MRL_NUM_REF_LINES);
#endif
pu.multiRefIdx = 0;
//===== init pattern for luma prediction =====
......@@ -567,6 +569,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
std::copy_n( uiRdModeList.begin(), numModesForFullRD, m_rdModeListWithoutMrl.begin() );
}
#endif
#if ENABLE_JVET_L0283_MRL
pu.multiRefIdx = 1;
const int numMPMs = NUM_MOST_PROBABLE_MODES;
unsigned multiRefMPM [numMPMs];
......@@ -609,6 +612,7 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner )
}
}
}
#endif
CandCostList.resize(numModesForFullRD);
extendRefList.resize(numModesForFullRD);
if( m_pcEncCfg->getFastUDIUseMPMEnabled() )
......
Supports Markdown
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