[Mp4-tech] Dropping NAL units on bit errors: Best approach?

Gary Sullivan garysull windows.microsoft.com
Sat Oct 21 04:34:59 ESTEDT 2006


I don't think you have it right.
The boundary between "byte stream NAL units" and "access units" is
detailed in the standard (mostly Annex B, which is only two pages long).
We made a small modification of the boundary location in a corrigendum
activity, so make sure you have a relatively recent version and not some
old 2003 draft.  When there are zero-valued bytes between the final
payload-bearing bits of one "NAL unit" and the
"start_code_prefix_one_3bytes" of the next "byte stream NAL unit", all
but the last one of those zero-valued bytes are considered part of the
preceding "byte stream NAL unit" and the last one is considered part of
the next "byte stream NAL unit".
But please don't take my word for it.  Read the spec closely.
Best Regards,
Gary Sullivan 
+> -----Original Message-----
+> From: mp4-tech-bounces lists.mpegif.org 
+> [mailto:mp4-tech-bounces lists.mpegif.org] On Behalf Of Luqman
+> Sent: Friday, October 20, 2023 3:46 PM
+> To: mp4-tech lists.mpegif.org
+> Subject: Re: [Mp4-tech] Dropping NAL units on bit errors: 
+> Best approach?
+> 
+> > Gary Sullivan wanted us to know:
+> 
+> >Yes, it's a byte-alignment recovery trick.  As John points 
+> out, extra
+> >zero-valued bytes can be present between any pair of NAL 
+> units, but at
+> >least one such byte is required for the most important NAL units to
+> >enable decoder alignment recovery.  Alignment recovery is 
+> important in
+> >some scenarios but not others, but the quantity of data necessary to
+> >enable it is so low (about 1-2 bytes per picture) that we decided to
+> >require it to be there all the time.
+> 
+> Thanks Gary for clarifying this. But there is some confusion 
+> where the
+> leading zero byte 0x00 before 3 byte start_code_prefix belongs to.
+> 
+> Example: 
+> 
+> 0x00000001................0x00000001.................0x00 0x00000001 
+> 
+> The extra 0x00 preceeding third 0x00000001 belongs to the second NALU
+> whereas 0x00000001 belongs to the third NALU.
+> Similarly in case of second appearance of 0x00000001, these 4 bytes
+> belong to second NALU.
+> 
+> Am I correct? Or is it only ture in case of SPS, PPS and 
+> first NALU of
+> an access unit / frame / picture?
+> 
+> Regards,
+> 
+> Luqman 
+> 
+> 
+> 


More information about the Mp4-tech mailing list