Opened 5 years ago

Closed 5 years ago

#770 closed defect (fixed)

Decoder cannot parse generated bistream when FastMrg is set to 0 and MMVD is set to 0.

Reported by: tsukuba.takeshi Owned by:
Priority: minor Milestone: VTM-7.2
Component: VTM Version: VTM-7.0
Keywords: Cc: ksuehring, XiangLi, fbossen, jvet@…

Description

At xChecRDCostMerge2Nx2N() in latest VTM(b62fc0cd), MMVD candidates to be tested are always inserted into RdModeList regardless of the value of tempCS->sps->getUseMMVD() as below:

  static_vector<ModeInfo, MRG_MAX_NUM_CANDS + MMVD_ADD_NUM>  RdModeList;
  bool                                        mrgTempBufSet = false;

  for (int i = 0; i < MRG_MAX_NUM_CANDS + MMVD_ADD_NUM; i++)
  {
    if (i < mergeCtx.numValidMergeCand)
    {
      RdModeList.push_back(ModeInfo(i, true, false, false));
    }
    else
    {
      RdModeList.push_back(ModeInfo(std::min(MMVD_ADD_NUM, i - mergeCtx.numValidMergeCand), false, true, false));
    }
  }


When FastMrg is set to 0 and MMVD is set to 0, decoder cannot parse generated bitstream.

./EncoderApp -c encoder_randomaccess_vtm.cfg -q 37 -i RaceHorses_416x240_30.yuv -b str.qp37.rap00.bin -o rec.qp37.rap00.yuv --InputBitDepth=8 --InputChromaFormat=420 -fr 30 -wdt 416 -hgt 240 --Level=2.1 -f 2 -fs 0 -ip 32 --FastMrg=0 --MMVD=0 --SEIDecodedPictureHash=1 --PrintHexPSNR=1 

./DecoderApp -b str.qp37.rap00.bin -o dec.qp37.rap00.yuv 
...
ERROR: In function "DecSlice::decompressSlice" in VVCSoftware_VTM.git\source\Lib\DecoderLib\DecSlice.cpp:284: Expecting a terminating bit

Same behavior is observed in VTM-7.1.

Suggested fix is as blow:

  static_vector<ModeInfo, MRG_MAX_NUM_CANDS + MMVD_ADD_NUM>  RdModeList;
  bool                                        mrgTempBufSet = false;

  for (int i = 0; i < MRG_MAX_NUM_CANDS + MMVD_ADD_NUM; i++)
  {
    if (i < mergeCtx.numValidMergeCand)
    {
      RdModeList.push_back(ModeInfo(i, true, false, false));
    }
    else
    {
      if(!tempCS->sps->getUseMMVD()) break;
      RdModeList.push_back(ModeInfo(std::min(MMVD_ADD_NUM, i - mergeCtx.numValidMergeCand), false, true, false));
    }
  }

Change history (2)

comment:2 Changed 5 years ago by XiangLi

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