Opened 2 years ago

Closed 2 years ago

#362 closed defect (fixed)

Mismatch with spec on bcw_idx coding and parsing

Reported by: forayr Owned by:
Priority: minor Milestone: VTM-6.0
Component: VTM Version: VTM-5.0
Keywords: Cc: vzakharc, yuwenhe, jvet@…

Description

Issue 1:

bcw_idx is TR coded, which means according to the specification that

If prefixVal is less than cMax  >>  cRiceParam,
the prefix bin string is a bit string of length prefixVal + 1 indexed by binIdx.
The bins for binIdx less than prefixVal are equal to 1.
The bin with binIdx equal to prefixVal is equal to 0. 

But VTM set the binIdx less than prefixVal to 0, and the binIdx equal to prefixVal to 1:

  for(int ui = 0; ui < prefixNumBits; ++ui)
  {
    if (gbiCodingIdx == idx)
    {
      m_BinEncoder.encodeBinEP(1);
      break;
    }
    else
    {
      m_BinEncoder.encodeBinEP(0);
      idx += step;
    }
  }

Issue 2:

When weighted_pred_flag = 0 and weighted_bipred_flag = 0, the WpScalingParam in the Slice are not initialized (especially the value of bPresentFlag for each component are not set to 0).
In isGBiIdxCoded() function, which decide if bcw_idx is written, the condition checking if the weighted prediction is not enabled might therefore return a bad result if the weighted prediction is disabled.

bool CU::isGBiIdxCoded( const CodingUnit &cu )
{{{
 ...
    cu.cs->slice->getWpScaling(REF_PIC_LIST_0, refIdx0, wp0);
    cu.cs->slice->getWpScaling(REF_PIC_LIST_1, refIdx1, wp1);
    if ((wp0[COMPONENT_Y].bPresentFlag || wp0[COMPONENT_Cb].bPresentFlag || wp0[COMPONENT_Cr].bPresentFlag
    || wp1[COMPONENT_Y].bPresentFlag || wp1[COMPONENT_Cb].bPresentFlag || wp1[COMPONENT_Cr].bPresentFlag)
    )
    {
      return false;
    }
    return true;
  }
  return false;
}

}}}

Change history (2)

comment:1 Changed 2 years ago by forayr

  • Component changed from 360Lib to VTM
  • Version set to VTM-5.0

comment:2 Changed 2 years ago by XiangLi

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