<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#CCCCCC">
<div class="moz-cite-prefix">On 6/20/14 5:42 AM, Miladin Sajic
wrote:<br>
</div>
<blockquote
cite="mid:31FCA5CD5EB3584289781A8B65502BF11EB79E1E@SCS002.citysyncnet.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to implement decoding of H264
NAL units that are received from the camera (using live555
rtsp streaming). Everything works fine if received NAL unit is
IDR (see part of the code in PS) but it does not work for
SLICE NAL unit (nal_unit_type == 1). To decode image this NAL
unit is not enough on its own and reference needs to be made
to all the units since last IDR unit (key frame with
nal_unit_type == 5). I do not know how to implement this.
<span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black">How to combine
last IDR unit with the following SLICE NAL units to produce
H264 frame before sending it to the decoder?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="color:#1F497D;mso-fareast-language:EN-GB"><img
id="Picture_x0020_3"
src="cid:part1.08020507.07030204@lsa2.com" height="94"
width="468"></span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Can you give me any advice or point me to
the right direction?<span style="color:#1F497D">
</span>Any help is greatly appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p><br>
</p>
</div>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
live-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a>
<a class="moz-txt-link-freetext" href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a>
</pre>
</blockquote>
Sorry Ross for continuing the OT discussion, but just real quick.
The answer to your decoding question lies in the question itself,
you said that non idr slices can reference any prior nal up to the
last idr. So in order to decode, you need to pass all prior nals up
to the last idr. How exactly you do this depends on the decoder
library you're using, ie ffmpeg requires that you provide the full
bitstream each call to the decoder, hence (sc = startcode)<br>
sps sc pps sc idr frame 1<br>
sps sc pps sc idr sc slice frame 2<br>
sps sc pps sc idr sc slice sc slice frame 3<br>
and so on.<br>
<br>
I can imagine a decoding library frontend that keeps track of the
unchanging parts of the bitstream for you, and I wonder why it
doesn't already exist, ie<br>
you pass nals in receive order to the decoder library and then ask
the library to give you a frame. Eventually, once it has enough
info, you get a frame back each call, while only having to briefly
store the latest nal on behalf of the library.<br>
<br>
I know this is OT, but if I'm mistaken someone please speak up.<br>
<pre class="moz-signature" cols="72">--
Joshua Kordani
LSA Autonomy</pre>
</body>
</html>