Opened 5 years ago

Closed 5 years ago

#887 closed defect (fixed)

SW/Spec mismatch on CclmEnable

Reported by: hobingzhang Owned by:
Priority: minor Milestone:
Component: spec Version:
Keywords: CclmEnable Cc: ksuehring, bbross, XiangLi, fbossen, jvet@…, jvet@…

Description

In the current spec Q-2001vC, the luma conditions (When CclmEnabled is equal to 1 ) are constrainedly checked when cclmEnable equal to 1 finally.

8.4.4 cross-component chroma intra prediction mode checking process

If sps_cclm_enabled_flag is equal to 0, CclmEnabled is set equal to 0.
Otherwise, if one or more of the following conditions are true, CclmEnabled is set equal to 1:
    qtbtt_dual_tree_intra_flag is equal to 0.
    slice_type is not equal to I.
    CtbLog2SizeY is less than 6.
Otherwise the following applies:
    If one or more of the following conditions are true, the variable CclmEnabled is set equal to 1:
       CbWidth[ 1 ][ xCb64 ][ yCb64 ] is equal to 64 and CbHeight[ 1 ][ xCb64 ][ yCb64 ] is equal to 64.
       CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6, MttSplitMode[ xCb64 ][ yCb64 ][ 0 ] is equal to SPLIT_BT_HOR, CbWidth[ 1 ][ xCb64 ][ yCb32 ] is equal to 64 and CbHeight[ 1 ][ xCb64 ][ yCb32 ] is equal to 32.
       CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is greater than CtbLog2SizeY − 6.
       CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6, MttSplitMode[ xCb64 ][ yCb64 ][ 0 ] is equal to SPLIT_BT_HOR, and MttSplitMode[ xCb64 ][ yCb32 ][ 1 ] is equal to SPLIT_BT_VER.
   Otherwise, the variable CclmEnabled is set equal to 0.

When CclmEnabled is equal to 1 and one of the following conditions is true, CclmEnabled is set equal to 0:
    CbWidth[ 0 ][ xCb64 ][ yCb64 ] and CbHeight[ 0 ][ xCb64 ][ yCb64 ] are both equal to 64, and intra_subpartitions_mode_flag[ xCb64 ][ yCb64 ] is equal to 1.
    CbWidth[ 0 ][ xCb64 ][ yCb64 ] or CbHeight[ 0 ][ xCb64 ][ yCb64 ] is less than 64, and CqtDepth[ 0 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6.

Meanwhile, the luma condition is checked in software when CclmEnable equal to 1 only for dual tree, CTU size 64 and 128 case.

const bool CodingUnit::checkCCLMAllowed() const
{
   ...
  else //dual tree, CTU size 64 or 128
  {
   ...
    //further check luma conditions
    if( allowCCLM )
    {
      const CodingUnit* colLumaCu = cs->picture->cs->getCU( lumaRefPos, CHANNEL_TYPE_LUMA );

      if( colLumaCu->lwidth() < 64 || colLumaCu->lheight() < 64 ) //further split at 64x64 luma node
      {
        const PartSplit cuSplitTypeDepth1Luma = CU::getSplitAtDepth( *colLumaCu, depthFor64x64Node );
        CHECK( !(cuSplitTypeDepth1Luma >= CU_QUAD_SPLIT && cuSplitTypeDepth1Luma <= CU_TRIV_SPLIT), "split mode shall be BT, TT or QT" );
        if( cuSplitTypeDepth1Luma != CU_QUAD_SPLIT )
        {
          allowCCLM = false;
        }
      }
      else if( colLumaCu->lwidth() == 64 && colLumaCu->lheight() == 64 && colLumaCu->ispMode ) //not split at 64x64 luma node and use ISP mode
      {
        allowCCLM = false;
      }
    }
  }

  return allowCCLM;
}

It seems that the indention is missing on luma condition part in spec. The luma condition should be under "Otherwise the following applies".

Suggestion: Aligning spec with software.

Change history (4)

comment:1 Changed 5 years ago by chiaming

The same issue had been reported in #706, but was not fixed into spec.
Suggest to fix the issue by using the (2) method in #706. For example:

8.4.4 cross-component chroma intra prediction mode checking process
...
– Otherwise the following applies:

– The variables xCb64, yCb64, yCb32 are derived as follows:

...

- If one of the following conditions is true, the variable CclmEnabled is set equal to 0:

– CbWidth[ 0 ][ xCb64 ][ yCb64 ] and CbHeight[ 0 ][ xCb64 ][ yCb64 ] are both equal to 64, and intra_subpartitions_mode_flag[ xCb64 ][ yCb64 ] is equal to 1.
– CbWidth[ 0 ][ xCb64 ][ yCb64 ] or CbHeight[ 0 ][ xCb64 ][ yCb64 ] is less than 64, and CqtDepth[ 0 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6.

– Otherwise, if one or more of the following conditions are true, the variable CclmEnabled is set equal to 1:

– CbWidth[ 1 ][ xCb64 ][ yCb64 ] is equal to 64 and CbHeight[ 1 ][ xCb64 ][ yCb64 ] is equal to 64.
– CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6, MttSplitMode[ xCb64 ][ yCb64 ][ 0 ] is equal to SPLIT_BT_HOR, CbWidth[ 1 ][ xCb64 ][ yCb32 ] is equal to 64 and CbHeight[ 1 ][ xCb64 ][ yCb32 ] is equal to 32.
– CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is greater than CtbLog2SizeY − 6.
– CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6, MttSplitMode[ xCb64 ][ yCb64 ][ 0 ] is equal to SPLIT_BT_HOR, and MttSplitMode[ xCb64 ][ yCb32 ][ 1 ] is equal to SPLIT_BT_VER.

– Otherwise, the variable CclmEnabled is set equal to 0.

When CclmEnabled is equal to 1 and one of the following conditions is true, CclmEnabled is set equal to 0:
– CbWidth[ 0 ][ xCb64 ][ yCb64 ] and CbHeight[ 0 ][ xCb64 ][ yCb64 ] are both equal to 64, and intra_subpartitions_mode_flag[ xCb64 ][ yCb64 ] is equal to 1.
– CbWidth[ 0 ][ xCb64 ][ yCb64 ] or CbHeight[ 0 ][ xCb64 ][ yCb64 ] is less than 64, and CqtDepth[ 0 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6.

Last edited 5 years ago by chiaming (previous) (diff)

comment:2 Changed 5 years ago by zhaoyin

I think Chia-Ming's suggestion for spec fix in comment 1 is correct. Sorry for the late reply.

The indentation of the last paragraph (i.e., the luma condition marked by the strikethrough in comment 1) is wrong, as mentioned in #706 (however the issue has been closed). Because if one or more of the following conditions are true (which means not in the dual tree I slice with CTU size >= 64 case), CclmEnabled is set equal to 1, and no need to further check the luma conditions.
– qtbtt_dual_tree_intra_flag is equal to 0.
– slice_type is not equal to I.
– CtbLog2SizeY is less than 6.

Both ways of the suggested fix in #706 work. The second way seems to make the spec more concise.

comment:3 Changed 5 years ago by jangwon.choi

Current VVC spec and software (VVC draft 9 and VTM9.0) still have the mismatch problem raised in this ticket.
Considering the original intention of CCLM enable conditions, I believe that the solution of Chia-Ming's suggestion seems reasonable.
Or, if someone want to solve this mismatch problem with the minimal spec change, it can be modified as:

– Otherwise the following applies:

– The variables xCb64, yCb64, yCb32 are derived as follows:

xCb64 = ( xCb >> 6) << 6 (238)
yCb64 = ( yCb >> 6 ) << 6 (239)
yCb32 = ( yCb >> 5 ) << 5 (240)

– If one or more of the following conditions are true, the variable CclmEnabled is set equal to 1:

– CbWidth[ 1 ][ xCb64 ][ yCb64 ] is equal to 64 and CbHeight[ 1 ][ xCb64 ][ yCb64 ] is equal to 64.
– CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6, MttSplitMode[ xCb64 ][ yCb64 ][ 0 ] is equal to SPLIT_BT_HOR, CbWidth[ 1 ][ xCb64 ][ yCb32 ] is equal to 64 and CbHeight[ 1 ][ xCb64 ][ yCb32 ] is equal to 32.
– CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is greater than CtbLog2SizeY − 6.
– CqtDepth[ 1 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6, MttSplitMode[ xCb64 ][ yCb64 ][ 0 ] is equal to SPLIT_BT_HOR, and MttSplitMode[ xCb64 ][ yCb32 ][ 1 ] is equal to SPLIT_BT_VER.

– Otherwise, the variable CclmEnabled is set equal to 0.
– When CclmEnabled is equal to 1 and one of the following conditions is true, CclmEnabled is set equal to 0:

– CbWidth[ 0 ][ xCb64 ][ yCb64 ] and CbHeight[ 0 ][ xCb64 ][ yCb64 ] are both equal to 64, and intra_subpartitions_mode_flag[ xCb64 ][ yCb64 ] is equal to 1.
– CbWidth[ 0 ][ xCb64 ][ yCb64 ] or CbHeight[ 0 ][ xCb64 ][ yCb64 ] is less than 64, and CqtDepth[ 0 ][ xCb64 ][ yCb64 ] is equal to CtbLog2SizeY − 6.


comment:4 Changed 5 years ago by bbross

  • Resolution set to fixed
  • Status changed from new to closed

Thanks for reporting and confirming!

This will be fixed as suggested by Jangwon in the first version of D10.

Note: See TracTickets for help on using tickets.