Opened 10 years ago

Last modified 9 years ago

#1333 new defect

Leading pictures are sometimes skipped or not skipped incorrectly

Reported by: jackh Owned by:
Priority: minor Milestone:
Component: HM Version: HM-16.1
Keywords: Cc: ksuehring, davidf, karlsharman, jct-vc@…

Description

The rules governing the skipping of leading pictures as I understand them are:

  • RASLs should be skipped (not output) in the first IRAP of a new CVS.
  • RADLs are never skipped.
  • RASLs following a subsequent IRAP inside a CVS should not be skipped.

The reference decoder handles this by means of the function TDecTop::isRandomAccessSkipPicture(), which returns true to skip the picture. It determines whether pictures should be skipped by means of the variable m_pocRandomAccess, which takes the following values:

  • m_pocRandomAccess==MAX_INT: waiting to be set
  • m_pocRandomAccess==-MAX_INT: inside an IDR IRAP, no RASLs should be skipped.
  • Other values: contains POC of IRAP picture. RASLs should be skipped.

The current implementation doesn't handle the case where a subsequent CRA IRAP is encoded within a CVS. So if you had a BLA IRAP followed by a CRA IRAP with no EOS NAL unit between them, the following would happen:

  1. Start. m_pocRandomAccess==MAX_INT.
  2. Decode BLA. m_pocRandomAccess=<POC of BLA>.
  3. Decode leading and trailing pictures. RASLs are skipped if their POCs are less than the POC of the BLA picture.
  4. Decode CRA. m_pocRandomAccess is not changed as m_pocRandomAccess!=MAX_INT. RASLs are arbitrarily skipped if their POCS are less than the POC of the BLA picture.

As m_pocRandomAccess is only ever changed if m_pocRandomAccess==MAX_INT, and is only ever reset to MAX_INT when an EOS is encountered, it is possible to end up checking the POCs of RASLs against pictures that occurred many CVSs ago.

The attached patch addresses this issue by setting m_pocRandomAccess correctly for mid-CVS CRA pictures.

Attachments (1)

0001-Bug-fix-set-m_pocRandomAccess-correctly.patch (3.7 KB) - added by jackh 10 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by DefaultCC Plugin

  • Cc ksuehring davidf karlsharman jct-vc@… added

comment:2 Changed 10 years ago by ksuehring

Thanks for the patch. I have not checked the code yet. Could you clarify if this also covers the case that the new CVS starts with EOS before CRA?

comment:3 Changed 10 years ago by jackh

Yes, it covers that case.

comment:4 Changed 10 years ago by ksuehring

  • Milestone changed from HM-16.2 to HM-17.0

comment:5 Changed 10 years ago by ksuehring

  • Milestone changed from HM-16.3 to HM-next

comment:6 Changed 10 years ago by ksuehring

  • Milestone changed from HM-16.4 to HM-next

comment:7 Changed 10 years ago by ksuehring

  • Milestone changed from HM-next to HM-16.5

comment:8 Changed 10 years ago by ksuehring

  • Milestone changed from HM-16.5 to HM-next

comment:9 Changed 9 years ago by ksuehring

  • Milestone changed from HM-16.6 to HM-16.7

comment:10 Changed 9 years ago by ksuehring

  • Milestone HM-16.7 deleted
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)
  • Jack Haughton(Reporter, Participant)
  • jct-vc@…(Subscriber)
  • Karl Sharman(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)