[Libva] VAAPI h264 h264encode test app fails
Ratin
ratin3 at gmail.com
Mon Oct 29 18:48:54 PDT 2012
On Mon, Oct 29, 2012 at 5:27 PM, Xiang, Haihao <haihao.xiang at intel.com> wrote:
>
>> ./h264encode r -w 1920 -h 1080 -o test.h264
>>
>> result is a assertion fail:
>>
>> libva info: VA-API version 0.34.0
>> libva info: va_getDriverName() returns 0
>> libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
>> libva info: Found init function __vaDriverInit_0_33
>> libva info: va_openDriver() returns 0
>> Coded 400 frames, 1920x1080, save the coded file into test.h264
>> Loading data into surface 15.....
>> h264encode: i965_drv_video.c:1506: i965_EndPicture: Assertion
>> `obj_context->codec_state.encode.seq_param' failed.
>> |00000000(I)(3240000 bytes coded)
>> Aborted
>>
>
> The is known issue, currently the Intel driver doesn't support the mode
> used by h264encode.
>
>
>> avcenc succeeds but mplayer fails to play the file:
>>
>> ./avcenc 704 576 /usr/local/bin/SOCCER_704x576_60_orig_02.yuv
>> SOCCER_704x576_60_orig_02.mp4
>>
>> libva info: VA-API version 0.34.0
>> libva info: va_getDriverName() returns 0
>> libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
>> libva info: Found init function __vaDriverInit_0_33
>> libva info: va_openDriver() returns 0
>> 600/600 ...
>> done!
>>
>>
>>
>> mplayer /workspace/ratin/videos/SOCCER_704x576_60_orig_02.mp4
>
> avcenc is only an example for testing, the output file is a raw video
> stream which doesn't include fps information. So you should specify -fps
> option in the command line, such as
>
> mplayer -fps 30 /workspace/ratin/videos/SOCCER_704x576_60_orig_02.mp4
>
>
Oh yea I remember I had to specify the framerate last time, sorry
about that. However, even with -fps, I get a blank video with lots of
these errors (original yuv file size is 364953600 but compressed is
only 5421):
FPS forced to be 30.000 (ftime: 0.033).
Starting playback...
[h264 @ 0xce2c00]left block unavailable for requested intra4x4 mode -1 at 0 0
[h264 @ 0xce2c00]error while decoding MB 0 0, bytestream (-5)
[h264 @ 0xce2c00]concealing 1584 DC, 1584 AC, 1584 MV errors
Movie-Aspect is undefined - no prescaling applied.
VO: [gl_nosw] 704x576 => 704x576 Planar YV12
V: 0.0 1/ 1 ??% ??% ??,?% 0 0
[h264 @ 0xce2c00]error while decoding MB 0 0, bytestream (-3)
[h264 @ 0xce2c00]concealing 1584 DC, 1584 AC, 1584 MV errors
It looks like it only gets 8 bytes within bitstream_end function
(which is called from build_nal_slice for ach slice - seems that only
slice header , slice data is missing ? ):
./avcenc 704 576 /usr/local/bin/SOCCER_704x576_60_orig_02.yuv
SOCCER_704x576_60_orig_02.mp4
codedbuf_size: 608256
bitstream_end: length: 13, bit_offset: 8
Wrote 13 bytes for this frame..w_items: 1..
bitstream_end: length: 8, bit_offset: 0
Wrote 8 bytes for this frame..w_items: 1..
is_intra: 1, is_idr: 1
bitstream_end: length: 9, bit_offset: 8
Wrote 9 bytes for this frame..w_items: 1..
1/600 ...
is_intra: 0, is_idr: 0
bitstream_end: length: 9, bit_offset: 8
Wrote 9 bytes for this frame..w_items: 1..
2/600 ...
is_intra: 0, is_idr: 0
bitstream_end: length: 9, bit_offset: 8
Wrote 9 bytes for this frame..w_items: 1..
3/600 ...
is_intra: 0, is_idr: 0
>
>
>> On Tue, Oct 23, 2012 at 10:45 PM, Xiang, Haihao <haihao.xiang at intel.com> wrote:
>> > On Tue, 2012-10-23 at 09:52 -0700, Charles, Daniel wrote:
>> >> On Mon, Oct 22, 2012 at 6:59 PM, ykzhao <yakui.zhao at intel.com> wrote:
>> >> > On Mon, 2012-10-22 at 15:12 -0600, Ratin wrote:
>> >> >> On Mon, Dec 17, 2012 at 5:04 PM, ykzhao <yakui.zhao at intel.com> wrote:
>> >> >> > On Wed, 2012-10-17 at 12:24 -0600, Ratin wrote:
>> >> >> >> Reading symbols from /usr/local/bin/h264encode...done.
>> >> >> >> (gdb) r -w 1920 -h 1080 -o test.h264
>> >> >> >> Starting program: /usr/local/bin/h264encode -w 1920 -h 1080 -o test.h264
>> >> >> >> [Thread debugging using libthread_db enabled]
>> >> >> >> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>> >> >> >> libva info: VA-API version 0.34.0
>> >>
>> >> VA API version is 0.34.0
>> >> >> >> libva info: va_getDriverName() returns 0
>> >> >> >> libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
>> >> >> >> libva info: Found init function __vaDriverInit_0_33
>> >>
>> >> libva is calling version 0.33.0
>> >>
>> >> And you're using staging branch driver 1.0.19.pre1
>> >
>> > If the driver is built against libva staging branch, the init function
>> > should be __vaDriverInit_0_34. So I think Ratin is using the master
>> > branch of Intel driver.
>> >
>> > Hi, Ratin
>> > Could you double check you are using the same branch name of libva and
>> > Intel driver ?
>> >
>> > Thanks
>> > Haihao
>> >
>>
>> Hi Haihao,
>> To avoid confusion, I just got everything fresh again,
>>
>> git clone git://anongit.freedesktop.org/vaapi/libva
>> git clone git://anongit.freedesktop.org/vaapi/intel-driver
>>
>> So they are both from master branches.
>>
>> built and make install libva first , then intel-driver. And ran
>> ./h264encode r -w 1920 -h 1080 -o test.h264
>>
>> result is a assertion fail:
>>
>> libva info: VA-API version 0.34.0
>> libva info: va_getDriverName() returns 0
>> libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
>> libva info: Found init function __vaDriverInit_0_33
>> libva info: va_openDriver() returns 0
>> Coded 400 frames, 1920x1080, save the coded file into test.h264
>> Loading data into surface 15.....
>> h264encode: i965_drv_video.c:1506: i965_EndPicture: Assertion
>> `obj_context->codec_state.encode.seq_param' failed.
>> |00000000(I)(3240000 bytes coded)
>> Aborted
>>
>>
>> avcenc succeeds but mplayer fails to play the file:
>>
>> ./avcenc 704 576 /usr/local/bin/SOCCER_704x576_60_orig_02.yuv
>> SOCCER_704x576_60_orig_02.mp4
>>
>> libva info: VA-API version 0.34.0
>> libva info: va_getDriverName() returns 0
>> libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
>> libva info: Found init function __vaDriverInit_0_33
>> libva info: va_openDriver() returns 0
>> 600/600 ...
>> done!
>>
>>
>>
>> mplayer /workspace/ratin/videos/SOCCER_704x576_60_orig_02.mp4
>> MPlayer SVN-r32819-4.6 (C) 2000-2011 MPlayer Team
>> mplayer: could not connect to socket
>> mplayer: No such file or directory
>> Failed to open LIRC support. You will not be able to use your remote control.
>>
>> Playing /workspace/ratin/videos/SOCCER_704x576_60_orig_02.mp4.
>> H264-ES file format detected.
>> FPS not specified in the header or invalid, use the -fps option.
>> Load subtitles in /workspace/ratin/videos/
>> [gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
>> ==========================================================================
>> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
>> Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
>> ==========================================================================
>> Audio: no sound
>> Starting playback...
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>> [h264 @ 0xce2c00]decode_slice_header error
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>> [h264 @ 0xce2c00]decode_slice_header error
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>> [h264 @ 0xce2c00]decode_slice_header error
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>> [h264 @ 0xce2c00]decode_slice_header error
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>> [h264 @ 0xce2c00]decode_slice_header error
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>> [h264 @ 0xce2c00]decode_slice_header error
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>> [h264 @ 0xce2c00]decode_slice_header error
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>> [h264 @ 0xce2c00]decode_slice_header error
>> [h264 @ 0xce2c00]non-existing PPS 0 referenced
>>
>>
>> so __vaDriverInit_0_33 should really be __vaDriverInit_0_34 ?
>>
>> Can somebody send me the exact git repo and git options (such as -b
>> staging etc) that works?
>>
>> Thanks
>>
>> Ratin
>>
>> >>
>> >> Would this affect your testing?
>> >>
>> >> I saw the same problem when using 1.0.19 and VA API + libva both on 0.33.0
>> >>
>> >> It works when using driver 1.0.16 though.
>> >>
>> >>
>> >> --
>> >> Daniel.
>> >>
>> >> >> >> libva info: va_openDriver() returns 0
>> >> >> >> Coded 400 frames, 1920x1080, save the coded file into test.h264
>> >> >> >> Loading data into surface 15.....
>> >> >> >> h264encode: i965_drv_video.c:1496: i965_EndPicture: Assertion
>> >> >> >> `obj_context->codec_state.encode.seq_param' failed.
>> >> >> >> |00000000(I)(3240000 bytes coded)
>> >> >> >> Program received signal SIGABRT, Aborted.
>> >> >> >> 0x00007ffff72ff445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
>> >> >> >>
>> >> >> >>
>> >> >> >> The encoded file is there but when I try to play the file with
>> >> >> >> mplayer, it has an error :
>> >> >> >> mplayer /workspace/ratin/videos/test.h264
>> >> >> >> MPlayer SVN-r32819-4.6 (C) 2000-2011 MPlayer Team
>> >> >> >> mplayer: could not connect to socket
>> >> >> >> mplayer: No such file or directory
>> >> >> >> Failed to open LIRC support. You will not be able to use your remote control.
>> >> >> >>
>> >> >> >> Playing /workspace/ratin/videos/test.h264.
>> >> >> >> Invalid seek to negative position!
>> >> >> >>
>> >> >> >>
>> >> >> >> Exiting... (End of file)
>> >> >> >
>> >> >> > Which platform is used ? Ivybridge or Sandybridge?
>> >> >>
>> >> >> Sandybridge with GMA 4000
>> >> >>
>> >> >> > BTW: Are you using the staging branch or master branch for the libva and
>> >> >> > the driver?
>> >> >>
>> >> >> staging branch, is main branch better?
>> >> >
>> >> > The staging branch is preferred.
>> >> >
>> >> >>
>> >> >> >
>> >> >> > It will be better that you can try whether the avcenc encoding tool is
>> >> >> > OK in your test.
>> >> >>
>> >> >> avcenc works but I only get garbled images. It has worked fine before
>> >> >> with slightly older versions of both.
>> >> >
>> >> > If now you get the garbled image while it works fine in the older
>> >> > version, it seems that this is a regression. Will you please file one
>> >> > bug in https://bugs.freedesktop.org?
>> >> >
>> >> >
>> >> >>
>> >> >> >> How to fix this?
>> >> >> >>
>> >> >> >> Vainfo:
>> >> >> >>
>> >> >> >> libva info: VA-API version 0.34.0
>> >> >> >> libva info: va_getDriverName() returns 0
>> >> >> >> libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
>> >> >> >> libva info: Found init function __vaDriverInit_0_33
>> >> >> >> libva info: va_openDriver() returns 0
>> >> >> >> vainfo: VA-API version: 0.34 (libva 1.1.0)
>> >> >> >> vainfo: Driver version: Intel i965 driver - 1.0.19.pre1
>> >> >> >> vainfo: Supported profile and entrypoints
>> >> >> >> VAProfileMPEG2Simple : VAEntrypointVLD
>> >> >> >> VAProfileMPEG2Main : VAEntrypointVLD
>> >> >> >> VAProfileH264Baseline : VAEntrypointVLD
>> >> >> >> VAProfileH264Baseline : VAEntrypointEncSlice
>> >> >> >> VAProfileH264Main : VAEntrypointVLD
>> >> >> >> VAProfileH264Main : VAEntrypointEncSlice
>> >> >> >> VAProfileH264High : VAEntrypointVLD
>> >> >> >> VAProfileH264High : VAEntrypointEncSlice
>> >> >> >> VAProfileVC1Simple : VAEntrypointVLD
>> >> >> >> VAProfileVC1Main : VAEntrypointVLD
>> >> >> >> VAProfileVC1Advanced : VAEntrypointVLD
>> >> >> >> _______________________________________________
>> >> >> >> Libva mailing list
>> >> >> >> Libva at lists.freedesktop.org
>> >> >> >> http://lists.freedesktop.org/mailman/listinfo/libva
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > Libva mailing list
>> >> > Libva at lists.freedesktop.org
>> >> > http://lists.freedesktop.org/mailman/listinfo/libva
>> >> _______________________________________________
>> >> Libva mailing list
>> >> Libva at lists.freedesktop.org
>> >> http://lists.freedesktop.org/mailman/listinfo/libva
>> >
>> >
>> > _______________________________________________
>> > Libva mailing list
>> > Libva at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/libva
>
>
More information about the Libva
mailing list