<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV 
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">I am 
writing a ffmpeg h264 decoder for a new processor and have run into a problem. 
The embedded decoder is using video clip that is linked in not read from a 
stream.  (Currently do not have a file system or Ethernet connection) I am 
able to process the image data using h264 decoder (based on tutorial01.c) but I 
only get the last frame. I can see the code processing the frames but it finds 
no images in the initial decode. Below is snapshot of the log message that I am 
seeing (note additional logging added). The image that I am testing with is only 
4 frames long but I have used an image that is 50 frames only. I have verified 
that I can use ffplay to playback the image successfully, so I believe that data 
I am using is good. Attached is a copy of the code that I am using along with 
video clip source file.</DIV>
<DIV 
style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">Any 
pointers would be helpful in solving this problem,</DIV>
<DIV 
style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">Kent</DIV>
<DIV 
style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">=================================================================</DIV>
<DIV 
style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt"> </DIV>
<DIV>Running H.264</DIV>
<DIV>Initialize AV Packet</DIV>
<DIV>Video decoding</DIV>
<DIV>Found codec</DIV>
<DIV>Alloc context and frame...</DIV>
<DIV>Done alloc context.</DIV>
<DIV>Log Level = 48</DIV>
<DIV>Done alloc frame.</DIV>
<DIV>Opening codec.</DIV>
<DIV>Opened codec.</DIV>
<DIV>Image_buf_read - bin_file_data=2de710 bin_file_data_size=8b1</DIV>
<DIV>rbuf = 3fef48, rsize = 1, nrs = 4096</DIV>
<DIV>read_index = 2225, nbtyes = 4096, abytes = 2225</DIV>
<DIV>Reading frame 0 </DIV>
<DIV>Read 2225 bytes</DIV>
<DIV>Entered h264: decode_frame: </DIV>
<DIV>h264: decode_frame: Calling decode_nal_units</DIV>
<DIV>Enter ff_h264_decode_nal </DIV>
<DIV>ff_h264_decode_nal: decoding esc</DIV>
<DIV>Escaping at 10 </DIV>
<DIV>Escaping at 15 </DIV>
<DIV>Next start at 24 </DIV>
<DIV>[h264 @ 0(500438] NAL 7 at 4/2225 length 22</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] sps:0 profile:100/13 poc:0 ref:4 20x15 FRM 8B8 
crop:0/0/0/0 VUI 420 1/50</DIV>
<DIV> </DIV>
<DIV>Enter ff_h264_decode_nal </DIV>
<DIV>startcode, so we must be past the end</DIV>
<DIV>no escaped 0</DIV>
<DIV>[h264 @ 0Ð500438] NAL 8 at 33/2225 length 5</DIV>
<DIV> </DIV>
<DIV>pps:0 sps:0 CABAC slice_groups:1 ref:3/1 weighted qp:23/26/-2/-2 
LPAR   8x8DCT</DIV>
<DIV>Enter ff_h264_decode_nal </DIV>
<DIV>startcode, so we must be past the end</DIV>
<DIV>no escaped 0</DIV>
<DIV>[h264 @ 0Ð500438] NAL 6 at 42/2225 length 685</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] user data:"x264 - core 125 r2208 d9d2288 - H.264/MPEG-4 
AVC codec - Copyleft 2003-2012 - <A 
href="http://www.videolan.org/x264.html">http://www.videolan.org/x264.html</A> - 
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x"</DIV>
<DIV> </DIV>
<DIV>Enter ff_h264_decode_nal </DIV>
<DIV>startcode, so we must be past the end</DIV>
<DIV>no escaped 0</DIV>
<DIV>[h264 @ 0„500438] NAL 5 at 731/2225 length 1403</DIV>
<DIV> </DIV>
<DIV>Processing NAL_SLICE: decode_slice_header</DIV>
<DIV>set_dimensions width=320</DIV>
<DIV>set_dimensions height=240</DIV>
<DIV>Frame number 0</DIV>
<DIV>[h264 @ 0¸500438] default_get_buffer called on pic 0À5378d8, 1 buffers 
used</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0slice:1 F mb:0 I fix IDR pps:0 frame:0 poc:0/0 ref:3/1 qp:28 
loop:1:0:0 weight:0 </DIV>
<DIV> </DIV>
<DIV>Set key_frame.</DIV>
<DIV>Done NAL_SLICE</DIV>
<DIV>execute_decode_slices</DIV>
<DIV>Done execute_decode_slices</DIV>
<DIV>Enter ff_h264_decode_nal </DIV>
<DIV>ff_h264_decode_nal: decoding esc</DIV>
<DIV>Escaping at 34 </DIV>
<DIV>Next start at 46 </DIV>
<DIV>[h264 @ 0à500438] NAL 1 at 2139/2225 length 45</DIV>
<DIV> </DIV>
<DIV>Processing NAL_SLICE: decode_slice_header</DIV>
<DIV>Frame number 1</DIV>
<DIV>[h264 @ 0500438] default_release_buffer called on pic 05378d8, 0 buffers 
used</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0$500438] default_get_buffer called on pic 0€5378d8, 1 buffers 
used</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0¸500438] short term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0¸500438] long term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0¸500438] Missing reference picture</DIV>
<DIV> </DIV>
<DIV>ERROR NAL_SLICE: decode_slice_header</DIV>
<DIV>[h264 @ 0decode_slice_header error</DIV>
<DIV> </DIV>
<DIV>Enter ff_h264_decode_nal </DIV>
<DIV>startcode, so we must be past the end</DIV>
<DIV>no escaped 0</DIV>
<DIV>[h264 @ 0NAL 1 at 2190/2225 length 14</DIV>
<DIV> </DIV>
<DIV>Processing NAL_SLICE: decode_slice_header</DIV>
<DIV>Frame number 2</DIV>
<DIV>[h264 @ 0500438] Frame num gap 2 0</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0˜500438] default_release_buffer called on pic 0</DIV>
<DIV>default_get_buffer called on pic 0(5378d8, 1 buffers used</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] no mmco here</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] remove short 1 count 0</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] short term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] 0 fn:1 poc:6 05980e8</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] long term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0È500438] default_get_buffer called on pic 0(537b90, 2 buffers 
used</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] short term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] 0 fn:1 poc:6 05980e8</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] long term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] slice:1 F mb:0 B fix pps:0 frame:2 poc:4/4 ref:1/1 qp:28 
loop:1:0:0 weight:2 SPAT</DIV>
<DIV> </DIV>
<DIV>Set key_frame.</DIV>
<DIV>Done NAL_SLICE</DIV>
<DIV>execute_decode_slices</DIV>
<DIV>Done execute_decode_slices</DIV>
<DIV>Enter ff_h264_decode_nal </DIV>
<DIV>no escaped 0</DIV>
<DIV>[h264 @ 0¬500438] NAL 1 at 2209/2225 length 15</DIV>
<DIV> </DIV>
<DIV>Processing NAL_SLICE: decode_slice_header</DIV>
<DIV>Frame number 3</DIV>
<DIV>[h264 @ 0500438] Frame num gap 3 1</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0˜500438] default_release_buffer called on pic 0</DIV>
<DIV>default_get_buffer called on pic 0(537b90, 2 buffers used</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] no mmco here</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] remove short 2 count 1</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] 0 1 005378d8</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] short term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] 0 fn:2 poc:4 0604a08</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] 1 fn:1 poc:6 05980e8</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] long term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0È500438] default_get_buffer called on pic 0(537e48, 3 buffers 
used</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0¸500438] short term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0¸500438] 0 fn:2 poc:8 0604a08</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0¸500438] 1 fn:1 poc:6 05980e8</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0¸500438] long term list:</DIV>
<DIV> </DIV>
<DIV>[h264 @ 0500438] slice:1 F mb:0 B fix pps:0 frame:3 poc:2/2 ref:1/2 qp:28 
loop:1:0:0 weight:2 SPAT</DIV>
<DIV> </DIV>
<DIV>Set key_frame.</DIV>
<DIV>Done NAL_SLICE</DIV>
<DIV>execute_decode_slices</DIV>
<DIV>Done execute_decode_slices</DIV>
<DIV>!(s->flags2 & CODEC_FLAG2_CHUNKS) || (s->mb_y >= 
s->mb_height && s->mb_height)</DIV>
<DIV>Signal interlacing information externally</DIV>
<DIV>Derive interlacing flag from used decoding process.</DIV>
<DIV>cur->field_poc[0] == cur->field_poc[1]</DIV>
<DIV>Most likely progressive</DIV>
<DIV>[h264 @ 09500438] no picture</DIV></DIV>
<DIV dir=ltr> </DIV></DIV></DIV></DIV></BODY></HTML>