﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1232	Compatibility for all intra HM-11.0 bitstreams (wrong POC number)	dfsouza		"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       ();  
}}}
"	defect	closed	minor	HM-14.0	HM	HM-13.0	invalid	HM-11.0 all intra bitstream compatibility NAL unit type	fbossen ksuehring davidf jct-vc@…
