Opened 10 years ago

Closed 10 years ago

#1232 closed defect (invalid)

Compatibility for all intra HM-11.0 bitstreams (wrong POC number)

Reported by: dfsouza Owned by:
Priority: minor Milestone: HM-14.0
Component: HM Version: HM-13.0
Keywords: HM-11.0 all intra bitstream compatibility NAL unit type Cc: fbossen, ksuehring, davidf, jct-vc@…


On the HM-13.0 decoder, the NAL unit type for intra slices in all intra configuration of the HM-11.0 bitstreams are decoded as NAL_UNIT_CODED_SLICE_TRAIL_N as specified in the JCTVC K1003-v7 document. However, the m_prevTid0POC private member of TComSlice class is not update for this NAL unit type. This implies in an error when the POC is set in the TDecCavlc::parseSliceHeader function (TDecCAVLC - line 865) when the POC number reaches 129 ( > iMaxPOClsb / 2 ). The slice POC is set as a negative number and the decoder crashes in the function TComSlice::checkLeadingPictureRestrictions (TComSlice - line 805).

One simple solution could be modify the function setPOC (TComSlice.h - line 1269) by adding the possibility to update the m_prevTid0POC private member for the NAL unit type NAL_UNIT_CODED_SLICE_TRAIL_N.

The attached patch can be used to fix this issue:

Index: Lib/TLibCommon/TComSlice.h
--- Lib/TLibCommon/TComSlice.h	(revision 3801)
+++ Lib/TLibCommon/TComSlice.h	(working copy)
@@ -1266,7 +1266,7 @@
   Void      setReferenced(Bool b)                               { m_bRefenced = b; }
   Bool      isReferenced()                                      { return m_bRefenced; }
   Bool      isReferenceNalu()                                   { return ((getNalUnitType() <= NAL_UNIT_RESERVED_VCL_R15) && (getNalUnitType()%2 != 0)) || ((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && (getNalUnitType() <= NAL_UNIT_RESERVED_IRAP_VCL23) ); }
-  Void      setPOC              ( Int i )                       { m_iPOC              = i; if ((getTLayer()==0) && (isReferenceNalu() && (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL_R)&& (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL_R))) {m_prevTid0POC=i;} }
+  Void      setPOC              ( Int i )                       { m_iPOC              = i; if ((getTLayer()==0) && ((isReferenceNalu() && (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL_R) && (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL_R)) || (getNalUnitType()==NAL_UNIT_CODED_SLICE_TRAIL_N))) {m_prevTid0POC=i;} }
   Void      setNalUnitType      ( NalUnitType e )               { m_eNalUnitType      = e;      }
   NalUnitType getNalUnitType    () const                        { return m_eNalUnitType;        }
   Bool      getRapPicFlag       ();  

Attachments (1)

update_m_prevTid0POC.patch (1.4 KB) - added by dfsouza 10 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf jct-vc@… added

Changed 10 years ago by dfsouza

comment:2 Changed 10 years ago by ksuehring

The spec says:

Let prevTid0Pic be the previous picture in decoding order that has TemporalId equal to 0 and is not a RASL picture, a RADL picture, or a sub-layer non-reference picture.

with sub-layer non-reference picture defined as

If a picture has nal_unit_type equal to TRAIL_N [...], the picture is a sub-layer non-reference picture.

So the suggested solution would not conform to the spec.

I have not seen any problems with intra-only streams that were generated with HM 13. Is it possible that intra-only streams which you generated with HM 11.0 are not conforming?

comment:3 Changed 10 years ago by dfsouza

I agree. Another possible solution is to modify when the POC become negative because of iPrevPOClsb is always equal to 0 (TDecCAVLC.cpp - line 850), when the picture is NAL_UNIT_CODED_SLICE_TRAIL_N:

      else if( (iPOClsb  >  iPrevPOClsb )  && ( (iPOClsb - iPrevPOClsb )  >  ( iMaxPOClsb / 2 ) ) ) 
        iPOCmsb = iPrevPOCmsb - iMaxPOClsb;

It is possible to replicate the error with any bitstream which can be found here, by decoding with the HM-13.0.

comment:4 Changed 10 years ago by adarsh

This issue is related to Ticket 1127. I think the all-intra streams generated with HM-11.0 were non-conforming, as described in 1127.

comment:5 Changed 10 years ago by ksuehring

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

There is no point in changing the software to decode non-conforming streams. Closing as invalid.

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

  • Adarsh Krishnan Ramasubramonian(Participant)
  • David Flynn(Subscriber)
  • Diego Felix de Souza(Reporter, Participant)
  • Frank Bossen(Subscriber)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)