Commit 24ae3fbd authored by Karsten Suehring's avatar Karsten Suehring

Merge branch 'fix_ticket_366' into 'master'

Fix for Ticket #366 Dual-Tree I-slices within P/B Frames

See merge request jvet/VVCSoftware_VTM!682
parents eb04a0a1 c99a462e
......@@ -177,6 +177,8 @@ void LoopFilter::loopFilterPic( CodingStructure& cs
m_ctuYLumaSamples = y << pcv.maxCUHeightLog2;
const UnitArea ctuArea( pcv.chrFormat, Area( x << pcv.maxCUWidthLog2, y << pcv.maxCUHeightLog2, pcv.maxCUWidth, pcv.maxCUWidth ) );
CodingUnit* firstCU = cs.getCU( ctuArea.lumaPos(), CH_L);
cs.slice = firstCU->slice;
// CU-based deblocking
for( auto &currCU : cs.traverseCUs( CS::getArea( cs, ctuArea, CH_L ), CH_L ) )
......@@ -214,6 +216,8 @@ void LoopFilter::loopFilterPic( CodingStructure& cs
m_ctuYLumaSamples = y << pcv.maxCUHeightLog2;
const UnitArea ctuArea( pcv.chrFormat, Area( x << pcv.maxCUWidthLog2, y << pcv.maxCUHeightLog2, pcv.maxCUWidth, pcv.maxCUWidth ) );
CodingUnit* firstCU = cs.getCU( ctuArea.lumaPos(), CH_L);
cs.slice = firstCU->slice;
// CU-based deblocking
for( auto &currCU : cs.traverseCUs( CS::getArea( cs, ctuArea, CH_L ), CH_L ) )
......@@ -1140,7 +1144,8 @@ void LoopFilter::xEdgeFilterChroma(const CodingUnit& cu, const DeblockEdgeDir ed
if (bS[0] > 0 || bS[1] > 0)
{
const CodingUnit& cuQ = cu;
const CodingUnit& cuP = *cu.cs->getCU( recalcPosition( cu.chromaFormat, CHANNEL_TYPE_LUMA, cu.chType, pos.offset( xoffset - uiNumPelsLuma, yoffset - uiNumPelsLuma ) ), cu.chType );
CodingUnit& cuP1 = *cu.cs->getCU( recalcPosition( cu.chromaFormat, CHANNEL_TYPE_LUMA, cu.chType, pos.offset( xoffset - uiNumPelsLuma, yoffset - uiNumPelsLuma ) ), cu.chType );
CodingUnit& cuP = *cu.cs->getCU( recalcPosition( cu.chromaFormat, CHANNEL_TYPE_LUMA, ((!cuP1.cs->pcv->ISingleTree && cuP1.slice->isIntra()) ? CHANNEL_TYPE_CHROMA : cu.chType), pos.offset( xoffset - uiNumPelsLuma, yoffset - uiNumPelsLuma ) ), ((!cuP1.cs->pcv->ISingleTree && cuP1.slice->isIntra()) ? CHANNEL_TYPE_CHROMA : cu.chType));
if (edgeDir == EDGE_VER)
{
......
......@@ -687,13 +687,17 @@ void SampleAdaptiveOffset::xPCMLFDisableProcess(CodingStructure& cs)
void SampleAdaptiveOffset::xPCMCURestoration(CodingStructure& cs, const UnitArea &ctuArea)
{
const SPS& sps = *cs.sps;
uint32_t numComponents = CS::isDualITree(cs) ? 1 : m_numberOfComponents;
uint32_t numComponents;
bool anyDualTree = false;
for( auto &cu : cs.traverseCUs( ctuArea, CH_L ) )
{
// restore PCM samples
if( ( cu.ipcm && sps.getPCMFilterDisableFlag() ) || CU::isLosslessCoded( cu ) )
{
cs.slice = cu.slice;
anyDualTree |= CS::isDualITree(cs);
numComponents = CS::isDualITree(cs) ? 1 : m_numberOfComponents;
for( uint32_t comp = 0; comp < numComponents; comp++ )
{
xPCMSampleRestoration( cu, ComponentID( comp ) );
......@@ -701,10 +705,15 @@ void SampleAdaptiveOffset::xPCMCURestoration(CodingStructure& cs, const UnitArea
}
}
numComponents = m_numberOfComponents;
if (CS::isDualITree(cs) && numComponents)
if (anyDualTree && numComponents)
{
for (auto &cu : cs.traverseCUs(ctuArea, CH_C))
{
if (cu.slice->isIntra() == false)
{
continue;
}
// restore PCM samples
if ((cu.ipcm && sps.getPCMFilterDisableFlag()) || CU::isLosslessCoded(cu))
{
......
......@@ -1601,8 +1601,8 @@ bool PU::checkDMVRCondition(const PredictionUnit& pu)
WPScalingParam *wp1;
int refIdx0 = pu.refIdx[REF_PIC_LIST_0];
int refIdx1 = pu.refIdx[REF_PIC_LIST_1];
pu.cs->slice->getWpScaling(REF_PIC_LIST_0, refIdx0, wp0);
pu.cs->slice->getWpScaling(REF_PIC_LIST_1, refIdx1, wp1);
pu.cu->slice->getWpScaling(REF_PIC_LIST_0, refIdx0, wp0);
pu.cu->slice->getWpScaling(REF_PIC_LIST_1, refIdx1, wp1);
if (pu.cs->sps->getUseDMVR())
{
return pu.mergeFlag
......
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