Opened 10 years ago

Closed 10 years ago

#292 closed defect (fixed)

Chroma scan type in NxN intra prediction units

Reported by: bheng Owned by:
Priority: minor Milestone: HM-6.0
Component: HM Version: HM-5.1
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

Description

The chroma scan type can be set incorrectly when all of the following are true:

  • Intra CU.
  • Four NxN luma prediction units.
  • Chroma prediction mode copied from luma prediction mode (e.g. intra_chroma_pred_mode=5).

The actual intra chroma prediction mode for the CU is determined from Luma Partition 0 only. See the following:

  if( uiChromaPredMode == DM_CHROMA_IDX )
  {
    uiChromaPredMode = pcCU->getLumaIntraDir( 0 );
  }

However, for purposes of scan type derivation (diagonal, horizontal, vertical), the HM software can end up using four independent chroma scan types per CU. It incorrectly uses the luma intra prediction mode from Luma Partition 0, Partition 1, Partition 2, and Partition 3.

The chroma scan type should based only on the actual chroma prediction mode used in each block. Therefore, the luma modes from Partitions 1-3 should not be used to determine the chroma scan type.

I believe the relevant code causing this behaviour is in TComDataCU::getCoefScanIdx

    if( uiDirMode == DM_CHROMA_IDX )
    {
      uiDirMode = getLumaIntraDir(uiAbsPartIdx);
    }

Change History (3)

comment:1 Changed 10 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf jct-vc@… added

comment:2 Changed 10 years ago by bheng

  • Version changed from HM-5.0 to HM-5.1

The problem can be fixed by making the following change.

In TComDataCU::getCoefScanIdx( ). Replace this:

    if( uiDirMode == DM_CHROMA_IDX )
    {
      uiDirMode = getLumaIntraDir(uiAbsPartIdx);
    }

with this:

    if( uiDirMode == DM_CHROMA_IDX )
    {
       // get number of partitions in current CU
        UInt uiDepth = getDepth(uiAbsPartIdx);
        UInt uiNumParts = getPic()->getNumPartInCU() >> (uiDepth << 1);

        // get luma mode from upper-left corner of current CU
        uiDirMode = getLumaIntraDir((uiAbsPartIdx/uiNumParts)*uiNumParts);
    }

comment:3 Changed 10 years ago by fbossen

  • Milestone set to HM-6.0
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber, Participant

  • Brian Heng(Reporter, Participant)
  • David Flynn(Subscriber)
  • Frank Bossen(Subscriber, Participant)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Always)