Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#728 closed defect (fixed)

Decoder stops on assert when EnableTMVPFlag = 1, ColDir = 1 and NumRexIdx(REF_PIC_LIST_0) > 1

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


This bug occures when EnableTMVPFlag = 1, ColDir = 1 and NumRexIdx(REF_PIC_LIST_0) > 1

Reference decoder parses Slice header of first slice in the picture twice (except the very first slice). First - when variable m_bFirstSliceInPicture is false and second - when this variable is true. When m_bFirstSliceInPicture is false decoder initializes current slice data by data of previous slice (just in case the current slice is dependent one I believe), when m_bFirstSliceInPicture is true – by default values.

Let’s consider what will happen if current slice is the first slice of P picture following after B picture in decoding order. Last slice of B picture had ColDir = 1. Default values for ColDir is 0. In code below the "collocated_ref_idx" will be read if ColDir == 0 (right case for P_SLICE, second pass of slice header parsing) and won’t be read if ColDir == 1 (first pass of slice header parsing). So when decoder is trying to parse Slice header for the first time with wrong value of ColDir it skips reading of "collocated_ref_idx" , brokes CABAC decoding and stops on some asserts (see example in attachment)

if ( rpcSlice->getEnableTMVPFlag() )

if ( rpcSlice->getSliceType() == B_SLICE )

READ_FLAG( uiCode, "collocated_from_l0_flag" );


if ( rpcSlice->getSliceType() != I_SLICE &&

((rpcSlice->getColDir()==0 && rpcSlice->getNumRefIdx(REF_PIC_LIST_0)>1)
(rpcSlice->getColDir() ==1 && rpcSlice->getNumRefIdx(REF_PIC_LIST_1)>1)))


READ_UVLC( uiCode, "collocated_ref_idx" );



The bug could be easily fixed for example by initializing of ColDir to 0 (rpcSlice->setColDir(0);) before line “if ( rpcSlice->getSliceType() == B_SLICE )”

Change History (4)

comment:1 Changed 9 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf jct-vc@… added

comment:2 Changed 9 years ago by deryzhov

Sorry, size of encoded file is bigger then allowed for attachment.

comment:3 Changed 9 years ago by ksuehring

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

fixed in r2753

comment:4 Changed 9 years ago by ksuehring

  • Milestone set to HM-8.1
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

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