﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1625	Inconsistency between spec and vtm for alf_ctb_cc_cb_idc/alf_ctb_cc_cr_idc ctxInc	peterderivaz		"In section 9.3.4.2.2 ""Derivation process of ctxInc using left and above syntax elements"", the spec says:

For the syntax elements alf_ctb_flag[ cIdx ][ ctbX ][ ctbY ], alf_ctb_cc_cb_idc[ ctbX ][ ctbY ], and alf_ctb_cc_cr_idc[ ctbX ][ ctbY ], ... cIdx equal to 1 for alf_ctb_cc_cr_idc[ ctbX ][ ctbY ] and cIdx equal to 2 for alf_ctb_cc_cr_idc[ ctbX ][ ctbY ]. 

...

The location ( xNbL, yNbL ) is set equal to ( x0 − 1, y0 ) and the derivation process for neighbouring block availability 
as specified in clause 6.4.4 is invoked with the location ( xCurr, yCurr ) set equal to ( x0, y0 ), the neighbouring location 
( xNbY, yNbY ) set equal to ( xNbL, yNbL ), checkPredModeY set equal to FALSE, and cIdx as inputs, and the output 
is assigned to availableL. 

However, in the VTM code for CABACReader.cpp:

{{{
void CABACReader::ccAlfFilterControlIdc(CodingStructure &cs, const ComponentID compID, const int curIdx,
                                        uint8_t *filterControlIdc, Position lumaPos, int filterCount)
{
  RExt__DECODER_DEBUG_BIT_STATISTICS_CREATE_SET( STATS__CABAC_BITS__CROSS_COMPONENT_ALF_BLOCK_LEVEL_IDC );

  const Position leftLumaPos  = lumaPos.offset(-(int) cs.pcv->maxCUWidth, 0);
  const Position aboveLumaPos = lumaPos.offset(0, -(int) cs.pcv->maxCUWidth);

  const uint32_t curSliceIdx = cs.slice->getIndependentSliceIdx();
  const TileIdx  curTileIdx  = cs.pps->getTileIdx(lumaPos);

  const bool leftAvail =
    cs.getCURestricted(leftLumaPos, lumaPos, curSliceIdx, curTileIdx, ChannelType::LUMA) != nullptr;
  const bool aboveAvail =
    cs.getCURestricted(aboveLumaPos, lumaPos, curSliceIdx, curTileIdx, ChannelType::LUMA) != nullptr;
  ...
}}}

the availability uses ChannelType::LUMA. 

This means that the VTM code is equivalent to if the spec set cIdx equal to 0 for alf_ctb_cc_cr_idc and alf_ctb_cc_cr_idc.

I believe the availability depends on cIdx, so this is not just an implementation detail.

"	defect	closed	minor		spec		invalid		ksuehring bbross XiangLi fbossen jvet@…
