[Libav-user] Only last frame image being found?

Kentb Work jkbrinkley at hotmail.com
Sat Sep 8 00:50:14 CEST 2012


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.

Any pointers would be helpful in solving this problem,

Kent
=================================================================

Running H.264
Initialize AV Packet
Video decoding
Found codec
Alloc context and frame...
Done alloc context.
Log Level = 48
Done alloc frame.
Opening codec.
Opened codec.
Image_buf_read - bin_file_data=2de710 bin_file_data_size=8b1
rbuf = 3fef48, rsize = 1, nrs = 4096
read_index = 2225, nbtyes = 4096, abytes = 2225
Reading frame 0 
Read 2225 bytes
Entered h264: decode_frame: 
h264: decode_frame: Calling decode_nal_units
Enter ff_h264_decode_nal 
ff_h264_decode_nal: decoding esc
Escaping at 10 
Escaping at 15 
Next start at 24 
[h264 @ 0(500438] NAL 7 at 4/2225 length 22

[h264 @ 0500438] sps:0 profile:100/13 poc:0 ref:4 20x15 FRM 8B8 crop:0/0/0/0 VUI 420 1/50

Enter ff_h264_decode_nal 
startcode, so we must be past the end
no escaped 0
[h264 @ 0Ð500438] NAL 8 at 33/2225 length 5

pps:0 sps:0 CABAC slice_groups:1 ref:3/1 weighted qp:23/26/-2/-2 LPAR   8x8DCT
Enter ff_h264_decode_nal 
startcode, so we must be past the end
no escaped 0
[h264 @ 0Ð500438] NAL 6 at 42/2225 length 685

[h264 @ 0500438] user data:"x264 - core 125 r2208 d9d2288 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - 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"

Enter ff_h264_decode_nal 
startcode, so we must be past the end
no escaped 0
[h264 @ 0„500438] NAL 5 at 731/2225 length 1403

Processing NAL_SLICE: decode_slice_header
set_dimensions width=320
set_dimensions height=240
Frame number 0
[h264 @ 0¸500438] default_get_buffer called on pic 0À5378d8, 1 buffers used

[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 

Set key_frame.
Done NAL_SLICE
execute_decode_slices
Done execute_decode_slices
Enter ff_h264_decode_nal 
ff_h264_decode_nal: decoding esc
Escaping at 34 
Next start at 46 
[h264 @ 0à500438] NAL 1 at 2139/2225 length 45

Processing NAL_SLICE: decode_slice_header
Frame number 1
[h264 @ 0500438] default_release_buffer called on pic 05378d8, 0 buffers used

[h264 @ 0$500438] default_get_buffer called on pic 0€5378d8, 1 buffers used

[h264 @ 0¸500438] short term list:

[h264 @ 0¸500438] long term list:

[h264 @ 0¸500438] Missing reference picture

ERROR NAL_SLICE: decode_slice_header
[h264 @ 0decode_slice_header error

Enter ff_h264_decode_nal 
startcode, so we must be past the end
no escaped 0
[h264 @ 0NAL 1 at 2190/2225 length 14

Processing NAL_SLICE: decode_slice_header
Frame number 2
[h264 @ 0500438] Frame num gap 2 0

[h264 @ 0˜500438] default_release_buffer called on pic 0
default_get_buffer called on pic 0(5378d8, 1 buffers used

[h264 @ 0500438] no mmco here

[h264 @ 0500438] remove short 1 count 0

[h264 @ 0500438] short term list:

[h264 @ 0500438] 0 fn:1 poc:6 05980e8

[h264 @ 0500438] long term list:

[h264 @ 0È500438] default_get_buffer called on pic 0(537b90, 2 buffers used

[h264 @ 0500438] short term list:

[h264 @ 0500438] 0 fn:1 poc:6 05980e8

[h264 @ 0500438] long term list:

[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

Set key_frame.
Done NAL_SLICE
execute_decode_slices
Done execute_decode_slices
Enter ff_h264_decode_nal 
no escaped 0
[h264 @ 0¬500438] NAL 1 at 2209/2225 length 15

Processing NAL_SLICE: decode_slice_header
Frame number 3
[h264 @ 0500438] Frame num gap 3 1

[h264 @ 0˜500438] default_release_buffer called on pic 0
default_get_buffer called on pic 0(537b90, 2 buffers used

[h264 @ 0500438] no mmco here

[h264 @ 0500438] remove short 2 count 1

[h264 @ 0500438] 0 1 005378d8

[h264 @ 0500438] short term list:

[h264 @ 0500438] 0 fn:2 poc:4 0604a08

[h264 @ 0500438] 1 fn:1 poc:6 05980e8

[h264 @ 0500438] long term list:

[h264 @ 0È500438] default_get_buffer called on pic 0(537e48, 3 buffers used

[h264 @ 0¸500438] short term list:

[h264 @ 0¸500438] 0 fn:2 poc:8 0604a08

[h264 @ 0¸500438] 1 fn:1 poc:6 05980e8

[h264 @ 0¸500438] long term list:

[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

Set key_frame.
Done NAL_SLICE
execute_decode_slices
Done execute_decode_slices
!(s->flags2 & CODEC_FLAG2_CHUNKS) || (s->mb_y >= s->mb_height && s->mb_height)
Signal interlacing information externally
Derive interlacing flag from used decoding process.
cur->field_poc[0] == cur->field_poc[1]
Most likely progressive
[h264 @ 09500438] no picture
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120907/fae85d39/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: image-data-color.c
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120907/fae85d39/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: image-file.h
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120907/fae85d39/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-h264-color.c
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120907/fae85d39/attachment-0001.c>


More information about the Libav-user mailing list