Opened 13 years ago

Closed 13 years ago

#201 closed defect (fixed)

Redundant computation in 1-pass ALF encoding for multi-slice picture

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

Description

This redundat computation only happens when the following tools are both turned on:

  1. One-pass ALF (ALFEncodePassReduction: 1 or 2)
  2. Multi-slice picture (SliceMode : 1 or 2)

Not affect common test condition and not affect one-slice picture case.

Problem statement

In TEncAdaptiveLoopFilter.cpp,

Void TEncAdaptiveLoopFilter::xEncodeCUAlfCtrlFlags()
{
#if MTK_NONCROSS_INLOOP_FILTER

if(m_uiNumSlicesInPic > 1)
{

for(UInt s=0; s< m_uiNumSlicesInPic; s++)
{

for(UInt idx=0; idx< m_pSlice[s].getNumLCUs(); idx++)
{

CAlfLCU& cAlfLCU = m_pSlice[s][idx];

for(UInt i=0; i< cAlfLCU.getNumCtrlFlags(); i++)
{

m_pcEntropyCoder->encodeAlfCtrlFlag(cAlfLCU.getCUCtrlFlag(i));

}

}

}

}

#endif

for( UInt uiCUAddr = 0; uiCUAddr < m_pcPic->getNumCUsInFrame() ; uiCUAddr++ )
{

TComDataCU* pcCU = m_pcPic->getCU( uiCUAddr );
xEncodeCUAlfCtrlFlag(pcCU, 0, 0);

}

}

This function, xEncodeCUAlfCtrlFlags, is only used for 1-pass ALF to calculate the bitrate of ALF CU-on/off flags. When uiNumSlicesInPic > 1, there are redundant bitrate calculation.

Fix

Add one "return" for multi-slice picture case, the modification is as follows,

Void TEncAdaptiveLoopFilter::xEncodeCUAlfCtrlFlags()
{
#if MTK_NONCROSS_INLOOP_FILTER

if(m_uiNumSlicesInPic > 1)
{

for(UInt s=0; s< m_uiNumSlicesInPic; s++)
{

for(UInt idx=0; idx< m_pSlice[s].getNumLCUs(); idx++)
{

CAlfLCU& cAlfLCU = m_pSlice[s][idx];

for(UInt i=0; i< cAlfLCU.getNumCtrlFlags(); i++)
{

m_pcEntropyCoder->encodeAlfCtrlFlag(cAlfLCU.getCUCtrlFlag(i));

}

}

}
return;

}

#endif

for( UInt uiCUAddr = 0; uiCUAddr < m_pcPic->getNumCUsInFrame() ; uiCUAddr++ )
{

TComDataCU* pcCU = m_pcPic->getCU( uiCUAddr );
xEncodeCUAlfCtrlFlag(pcCU, 0, 0);

}

}

Change History (4)

comment:1 Changed 13 years ago by chiayang_tsai

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

fixed in r1339

comment:2 Changed 12 years ago by davidf

  • Component set to HM

Updating component after adding WD (Text) tickets

comment:3 Changed 12 years ago by davidf

  • Cc fbossen ksuehring davidf added

comment:4 Changed 12 years ago by davidf

  • Cc jct-vc@… added
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

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