Skip to content
Snippets Groups Projects
Commit 15faa0a2 authored by Li's avatar Li
Browse files

L0053_L0272_DM: Modified chroma DM

parent b7ae35d1
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@
#include <cassert>
#define JVET_L0553_FIX_INITQP 1
#define JVET_L0053_L0272_DM 1 // use center position of luma block to derive DM
#define JVET_L0147_ALF_SUBSAMPLED_LAPLACIAN 1 // Subsampled Laplacian calculation
......
......@@ -390,7 +390,13 @@ void PU::getIntraChromaCandModes( const PredictionUnit &pu, unsigned modeList[NU
modeList[4] = LM_CHROMA_IDX;
modeList[5] = DM_CHROMA_IDX;
#if JVET_L0053_L0272_DM
Position topLeftPos = pu.blocks[pu.chType].lumaPos();
Position refPos = topLeftPos.offset( pu.blocks[pu.chType].width, pu.blocks[pu.chType].height );
const PredictionUnit *lumaPU = CS::isDualITree( *pu.cs ) ? pu.cs->picture->cs->getPU( refPos, CHANNEL_TYPE_LUMA ) : &pu;
#else
const PredictionUnit *lumaPU = CS::isDualITree( *pu.cs ) ? pu.cs->picture->cs->getPU( pu.blocks[pu.chType].lumaPos(), CHANNEL_TYPE_LUMA ) : &pu;
#endif
const uint32_t lumaMode = lumaPU->intraDir[CHANNEL_TYPE_LUMA];
for( int i = 0; i < 4; i++ )
{
......@@ -484,7 +490,13 @@ uint32_t PU::getFinalIntraMode( const PredictionUnit &pu, const ChannelType &chT
if( uiIntraMode == DM_CHROMA_IDX && !isLuma( chType ) )
{
#if JVET_L0053_L0272_DM
Position topLeftPos = pu.blocks[pu.chType].lumaPos();
Position refPos = topLeftPos.offset( pu.blocks[pu.chType].width, pu.blocks[pu.chType].height );
const PredictionUnit &lumaPU = CS::isDualITree( *pu.cs ) ? *pu.cs->picture->cs->getPU( refPos, CHANNEL_TYPE_LUMA ) : *pu.cs->getPU( topLeftPos, CHANNEL_TYPE_LUMA );
#else
const PredictionUnit &lumaPU = CS::isDualITree( *pu.cs ) ? *pu.cs->picture->cs->getPU( pu.blocks[chType].lumaPos(), CHANNEL_TYPE_LUMA ) : *pu.cs->getPU( pu.blocks[chType].lumaPos(), CHANNEL_TYPE_LUMA );
#endif
uiIntraMode = lumaPU.intraDir[0];
}
if( pu.chromaFormat == CHROMA_422 && !isLuma( chType ) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment