Bug 68561 - [gst-vaapi-0.4]Encoding timeout when b-frame-num value is greater than 3
Summary: [gst-vaapi-0.4]Encoding timeout when b-frame-num value is greater than 3
Status: VERIFIED FIXED
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wind Yuan
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-26 08:03 UTC by zhenxiang.li
Modified: 2013-09-02 07:26 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description zhenxiang.li 2013-08-26 08:03:29 UTC
Environment:
--------------
libva: d540f278465929f3a31030e3f18fdc95ceecffa5
intel-driver: 42bb613e72d235bcbe141c906dec9431e4c29661
Gstreamer:
(0.10)fa4da8fe6b3bed0bdf0233d321561b823c318742
gst-plugins-base:
(0.10)1e1e6eaf3f0dd11f6618154d9739cbe3e007d206
gst-plugins-bad:
(0.10)05183675077d502aaf0e7483656f5610bb4d0f43
gst-plugins-good:
(0.10)2720105682681ef652ee42c1e5a59e20d8146f3d
gst-plugins-ugly:
(0.10)5ddd97ff27ffeb03298be3a02ed18e8c2674d365
Gst-vaapi:
(0.4)441f3a27c51cedd8f6a0b49862b4993ef9785355

Bug Info:
--------------
Decoding timeout when b-frame-num value gt 3, and the size of enc.mp4 is 0;
while the enc.mp4 can be played by gstreamer when b-frame-num value le 3(command:gst-launch-0.10 filesrc location= enc.mp4 ! qtdemux ! vaapidecode ! vaapisink)

Log info:
--------------
gst-launch-0.10 -v filesrc location=1080p_blue_sky.yuv ! videoparse format=i420 width=1920 height=1080 ! vaapiupload ! vaapiencodeh264 rate-control=cbr bitrate=20000 init-qp=26 intra-period=200 slice-num=20 b-frame-num=4 ! qtmux faststart=true ! filesink location=enc.mp4
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /opt/X11R7/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoParse:videoparse0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVaapiUpload:vaapiupload0.GstPad:src: caps = video/x-surface, type=(string)vaapi, opengl=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVaapiUpload:vaapiupload0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh2640.GstPad:sink: caps = video/x-surface, type=(string)vaapi, opengl=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh2640.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0142c020ffe100206742c020966603c0112f2c2000000c800002711d180009c4000009c4037bdee101000468ee3c30
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:video_00: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0142c020ffe100206742c020966603c0112f2c2000000c800002711d180009c4000009c4037bdee101000468ee3c30
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = video/quicktime, variant=(string)apple
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)apple
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 23774327854 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:video_00: caps = NULL
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh2640.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh2640.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstVaapiUpload:vaapiupload0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstVaapiUpload:vaapiupload0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstVideoParse:videoparse0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...

Reproduce steps:
--------------
gst-launch-0.10 -v filesrc location=1080p_blue_sky.yuv ! videoparse format=i420 width=1920 height=1080 ! vaapiupload ! vaapiencodeh264 rate-control=cbr bitrate=20000 init-qp=26 intra-period=200 slice-num=20 b-frame-num=4 ! qtmux faststart=true ! filesink location=enc.mp4
1080p_blue_sky.yuv locates in ~/media_tools/encoder/encoderbitstreams
Comment 1 Wind Yuan 2013-09-02 07:00:10 UTC
please update gst-vaapi code. 
the issue was already fixed a few days ago.

commit 408cb29a7d864eb4c7e9c0ef56ad9e37cd676c29
Author: Wind Yuan <feng.yuan@intel.com>
Date:   Mon Aug 26 13:09:37 2013 +0800

    h264encoder: fix issue of b frame hang

     When b frame set in h.264 encoder, need to signal every
     busy buffer to wakeup next thread to catch
Comment 2 zhenxiang.li 2013-09-02 07:26:27 UTC
The bug has been verified on ivb/hsw platforms, close it.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.