GNOME Bugzilla – Bug 731460
vaapipostproc: failed to scale interlaced MPEG-2 streams
Last modified: 2015-01-09 09:51:24 UTC
Solid green image with gst-launch-1.0 … vaapidecode ! vaapipostproc width=400 height=300 ! vaapisink gst-launch-1.0 … decodebin ! vaapipostproc width=400 height=300 ! vaapisink gst-launch-1.0 … decodebin! vaapipostproc ! vaapisink (no args for vaapipostproc) working pipes gst-launch-1.0 … vaapidecode! vaapisink gst-launch-1.0 … decodebin ! vaapisink gst-launch-1.0 … vaapidecode ! vaapipostproc ! vaapisink (no args for vaapipostproc) scaling with vaapipostproc and MPG2 does not work
Is there a specific testcase? What does "…" stand for?
(In reply to comment #0) > Solid green image with > gst-launch-1.0 … vaapidecode ! vaapipostproc width=400 height=300 ! vaapisink > gst-launch-1.0 … decodebin ! vaapipostproc width=400 height=300 ! vaapisink > gst-launch-1.0 … decodebin! vaapipostproc ! vaapisink (no args for > vaapipostproc) > > working pipes > gst-launch-1.0 … vaapidecode! vaapisink > gst-launch-1.0 … decodebin ! vaapisink > gst-launch-1.0 … vaapidecode ! vaapipostproc ! vaapisink (no args for > vaapipostproc) > > scaling with vaapipostproc and MPG2 does not work Do you mean that it works with an H.264 stream? What platform are you testing this on? Thanks.
Platform: ComExpress modules with different CPU's and Linux. With H264 scaling _only_ works. OK Example: (H264-stream==>) ! vaapidecode ! vaapipostproc width=480 height=270 ! vaapisink But scaling AND deinterlacing only works when vaapipostproc is called twice. Strange. Not OK Example (1 time vaapipostproc): (H264-stream==>) ! vaapidecode ! vaapipostproc width=800 height=600 deinterlace-mode=1 deinterlace-method=4 ! vaapisink OK Example (2 times vaapipostproc):: (H264-stream==>) ! vaapidecode! vaapipostproc deinterlace-mode=1 deinterlace-method=4 ! vaapipostproc width=400 height=300 ! vaapisink
(In reply to comment #1) > Is there a specific testcase? What does "…" stand for? ... stands for a MPEG2 stream coming from my encoder with local multicast IP 224.0.180.10:3010 Just take a MPEG2 stream and try to downscale.
Scaling with vaapipostproc and MPEG2 _works_ when input stream is progressive. Scaling with vaapipostproc and MPEG2 _not_works_ when input stream is interlaced. Also it depends on the deinterlace-mode and the deinterlace-method. It also depend on the decode element decodebin OR vaapidecode. Why vaapipostproc must be called twice for deinterlacing AND scaling? NOT working combinations (with interlaced input stream ): [MPEG2-stream] ! vaapidecode ! vaapipostproc width=480 height=270 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc width=480 height=270 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=bob ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=motion-adaptive ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=motion-compensated ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=bob ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=motion-adaptive ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=motion-compensated ! vaapipostproc width=400 height=300 ! vaapisink working combinations (with interlaced input stream ): [MPEG2-stream] ! vaapidecode ! vaapisink [MPEG2-stream] ! decodebin ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=none ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=weave ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=none ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=weave ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! decodebin ! vaapipostproc deinterlace-mode=disabled ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=bob ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=weave ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=motion-adaptive ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=motion-compensated ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=none ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=bob ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=weave ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=motion-adaptive ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=motion-compensated ! vaapipostproc width=400 height=300 ! vaapisink [MPEG2-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=disabled ! vaapipostproc width=400 height=300 ! vaapisink
Thanks for your comprehensive testing. Could you please try against the current git master tree? It seems to be working for me, including deinterlacing+scaling scenarios. Thanks.
Testing again the current git master tree shows same result. (Hopefully) easy to reproduce with: This pipe shows a green image only: [MPEG2-interlaced-stream] ! vaapidecode ! vaapipostproc width=480 height=270 ! vaapisink This pipe works, but deinterlacer is OFF: [MPEG2-interlaced-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=disabled width=400 height=300 ! vaapisink
I presume this is on Haswell too, what version of the driver do you use? Have you tried the current git master tree? Thanks.
(In reply to comment #7) > This pipe works, but deinterlacer is OFF: > [MPEG2-interlaced-stream] ! vaapidecode ! vaapipostproc > deinterlace-mode=disabled width=400 height=300 ! vaapisink For this one, I believe you receive an error (or should see an error in the logs) because "disabled" is not a valid enum value for "deinterlace-method", thus probably defaulting to "none" and then deinterlacer is OFF is expected behaviour.
(In reply to comment #8) > I presume this is on Haswell too, what version of the driver do you use? Have > you tried the current git master tree? Thanks. vainfo: Driver version: Intel i965 driver - 1.3.1 OK, I will retest with current git master tree.
(In reply to comment #9) > (In reply to comment #7) > > This pipe works, but deinterlacer is OFF: > > [MPEG2-interlaced-stream] ! vaapidecode ! vaapipostproc > > deinterlace-mode=disabled width=400 height=300 ! vaapisink > > For this one, I believe you receive an error (or should see an error in the > logs) because "disabled" is not a valid enum value for "deinterlace-method", > thus probably defaulting to "none" and then deinterlacer is OFF is expected > behaviour. There is no error, because "disabled" is the parameter for "deinterlace-mode", not for "deinterlace-method". Without "deinterlace-mode=disabled" the default ((0): auto - Auto detection) is used and it seems this doesn't work. The question is why is there only a green image with this pipe: [MPEG2-interlaced-stream] ! vaapidecode ! vaapipostproc width=480 height=270 ! vaapisink
Created attachment 279582 [details] decodebin with driver 1.3.2 or 1.3.3.pre1 screenshot Results with driver 1.3.2 and 1.3.3.pre1 With vaapidecode the deinterlacer seems to work. Together with decodebin there is a new issue. The image is alive but destroyed. See attached image.
(In reply to comment #10) > (In reply to comment #8) > > I presume this is on Haswell too, what version of the driver do you use? Have > > you tried the current git master tree? Thanks. > > vainfo: Driver version: Intel i965 driver - 1.3.1 > > OK, I will retest with current git master tree. Tested this driver versions together with the gstreamer-vaapi vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.3.pre1 vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2 vainfo: Driver version: Intel i965 driver - 1.3.1 Results with driver 1.3.2 and 1.3.3.pre1 With vaapidecode the deinterlacer seems to work. Together with decodebin there is a new issue. The image is alive but destroyed. See my attached screen shot image. With driver 1.3.1 vaapidecode and decodebin are working, but deinterlacer doesn’t work. Still not working are pipes with only one vaapipostproc call. In other words, for deinterlacing AND scaling vaapipostproc has called two times. Example: [MPEG2i-stream] ! vaapidecode ! vaapipostproc-->1 deinterlace-mode=auto deinterlace-method=weave ! vaapipostproc-->2 width=400 height=300 ! vaapisink Pipe with only one vaapipostproc call shows only a green image! This issue is also visible with h264i streams. Example: [MPEG2i-stream] ! vaapidecode ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=bob width=1024 height=768 ! vaapisink max-lateness=-1 sync=false In summary: - MPEG2i Streams with decodebin and Intel i965 driver 1.3.2 or 1.3.3.pre1 are not working - Calling vaapipostproc one time with interlace AND scaling parameter shows green image only.
New test with file source. Tested with file syntax_720.zip This mpeg2i file can be downloaded at http://www.nova-wings.com/videos/syntax_720.zip Setup vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2 vaapi: Filename /usr/lib/gstreamer-1.0/libgstvaapi.so Version 0.5.9.pre1 Not working pipes: with decodebin: destroyed image gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 height=300 ! vaapisink with vaapidecode: pipe doesn't start gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 height=300 ! vaapisink The result is same with Intel i965 driver 1.3.3.pre1
Thanks for your testing, I have tasked the VA driver team on that. That looks like a Haswell+ related issue (VEBOX-based implementation) as this looks to work on Ivybridge.
(In reply to comment #14) > New test with file source. > > Tested with file syntax_720.zip > This mpeg2i file can be downloaded at > http://www.nova-wings.com/videos/syntax_720.zip > > Setup > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2 > vaapi: > Filename /usr/lib/gstreamer-1.0/libgstvaapi.so > Version 0.5.9.pre1 > > Not working pipes: > > with decodebin: destroyed image > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > height=300 ! vaapisink > > with vaapidecode: pipe doesn't start > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! vaapidecode ! > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > height=300 ! vaapisink > > The result is same with Intel i965 driver 1.3.3.pre1 Pipe with vaapidecode was incorrect (missing mpegpsdemux). Working with gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 height=300 ! vaapisink Not working with decodebin gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 height=300 ! vaapisink Summary. MPEG2i from file is working with vaapidecode, but destroyed image with decodebin.
(In reply to comment #16) > (In reply to comment #14) > > New test with file source. > > > > Tested with file syntax_720.zip > > This mpeg2i file can be downloaded at > > http://www.nova-wings.com/videos/syntax_720.zip > > > > Setup > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2 > > vaapi: > > Filename /usr/lib/gstreamer-1.0/libgstvaapi.so > > Version 0.5.9.pre1 > > > > Not working pipes: > > > > with decodebin: destroyed image > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > height=300 ! vaapisink > > > > with vaapidecode: pipe doesn't start > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! vaapidecode ! > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > height=300 ! vaapisink > > > > The result is same with Intel i965 driver 1.3.3.pre1 > > Pipe with vaapidecode was incorrect (missing mpegpsdemux). > Working with > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none > width=400 height=300 ! vaapisink > > Not working with decodebin > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > height=300 ! vaapisink > > > Summary. > MPEG2i from file is working with vaapidecode, but destroyed image with > decodebin. This one would be a gstreamer-vaapi bug. I believe I spotted it recently, this used to work before. What happens is that the SW deinterlace element gets inserted with decodebin, and since the download facility to I420 is not implemented, that's probably why you also get a green surface.
why cannot i play syntax_720.mpg with gstreamer. mplayer can play it. command: gst-launch-1.0 filesrc location=/home/Stream/syntax_720.mpg '!' mpegpsdemux '!' vaapidecode '!' vaapisink test env: Libva: (master)c61d8c6ce9ffc27320e9e177c1e1123d5f1b5014 Libva_intel_driver: (master)c5cb17ea86f0065a939d3636dd26651c93d497c8 Ffmpeg: (master)14e2406de7d211d50fcce0059c90103bdaa947aa Mplayer: (hwaccel-vaapi)1923fa10ed77bbf8408f2ce312d85a97dab1f0f3 Glib: (master)d108ada4b98cb50fb1517f55c4f09acdaf3de471 Gstreamer10: (1.2)b8b6dbd36dd28b97b3e6ec7ef512fc01c270f4ec Gst_plugins_base10: (1.2)4c31880bf0a4b720ab90fc8753fbbcc72275d6f8 Gst_plugins_good10: (1.2)177dfaebdc1560b7e8830a29e1bc4966eba3d736 Gst_plugins_bad10: (1.2)277b8c34e7214177764833b73f17e43ced496f8f Gst_plugins_ugly10: (1.2)2233d97e6ad1a3988d9a9ca0fc0cf00ec4031a8f Gst_plugins_vaapi10: (master)22dc8c42514e1d5d3f89d064e52b252f01fce54b bt:
+ Trace 233795
Thread 1 (Thread 0x7ffff753f740 (LWP 7420))
log: [root@x-hswmedia opt]# gst-launch-1.0 filesrc location=/home/Stream/syntax_720.mpg '!' mpegpsdemux '!' vaapidecode '!' vaapisink libva error: Open file /root/trace_test/tracelog.61831.0181a320 failed (No such file or directory) libva info: VA-API version 0.35.2 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_35 libva info: va_openDriver() returns 0 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Got context from element 'vaapidecode0': gst.vaapi.Display=context, display=(GstVaapiDisplay)NULL; ** (gst-launch-1.0:7444): CRITICAL **: gst_video_decoder_negotiate_default: assertion 'GST_VIDEO_INFO_WIDTH (&state->info) != 0' failed ERROR: from element /GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0: GStreamer error: negotiation problem. ** (gst-launch-1.0:7444): CRITICAL **: gst_vaapi_decoder_flush: assertion 'decoder != NULL' failed Additional debug info: gstvideodecoder.c(2048): gst_video_decoder_chain (): /GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0: decoder not initialized ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ...
(In reply to comment #19) > log: > [root@x-hswmedia opt]# gst-launch-1.0 filesrc > location=/home/Stream/syntax_720.mpg '!' mpegpsdemux '!' vaapidecode '!' > vaapisink > libva error: Open file /root/trace_test/tracelog.61831.0181a320 failed (No such > file or directory) > libva info: VA-API version 0.35.2 > 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_35 > libva info: va_openDriver() returns 0 > Setting pipeline to PAUSED ... > Pipeline is PREROLLING ... > Got context from element 'vaapidecode0': gst.vaapi.Display=context, > display=(GstVaapiDisplay)NULL; > > ** (gst-launch-1.0:7444): CRITICAL **: gst_video_decoder_negotiate_default: > assertion 'GST_VIDEO_INFO_WIDTH (&state->info) != 0' failed > ERROR: from element /GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0: > GStreamer error: negotiation problem. > > ** (gst-launch-1.0:7444): CRITICAL **: gst_vaapi_decoder_flush: assertion > 'decoder != NULL' failed > Additional debug info: > gstvideodecoder.c(2048): gst_video_decoder_chain (): > /GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0: > decoder not initialized > ERROR: pipeline doesn't want to preroll. > Setting pipeline to NULL ... With libva info: VA-API version 0.35.1 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_35 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.35 (libva 1.3.1) vainfo: Driver version: Intel i965 driver - 1.3.1 this two pipes worked. gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! vaapisink gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! vaapidecode ! vaapisink With (newest) libva info: VA-API version 0.35.2 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_35 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.35 (libva 1.3.2.pre1) vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.3.pre1 same two pipes are _NOT_ working. gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! vaapisink gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! vaapidecode ! vaapisink
(In reply to comment #17) > (In reply to comment #16) > > (In reply to comment #14) > > > New test with file source. > > > > > > Tested with file syntax_720.zip > > > This mpeg2i file can be downloaded at > > > http://www.nova-wings.com/videos/syntax_720.zip > > > > > > Setup > > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2 > > > vaapi: > > > Filename /usr/lib/gstreamer-1.0/libgstvaapi.so > > > Version 0.5.9.pre1 > > > > > > Not working pipes: > > > > > > with decodebin: destroyed image > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > height=300 ! vaapisink > > > > > > with vaapidecode: pipe doesn't start > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! vaapidecode ! > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > height=300 ! vaapisink > > > > > > The result is same with Intel i965 driver 1.3.3.pre1 > > > > Pipe with vaapidecode was incorrect (missing mpegpsdemux). > > Working with > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > > vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none > > width=400 height=300 ! vaapisink > > > > Not working with decodebin > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > height=300 ! vaapisink > > > > > > Summary. > > MPEG2i from file is working with vaapidecode, but destroyed image with > > decodebin. > > This one would be a gstreamer-vaapi bug. I believe I spotted it recently, this > used to work before. What happens is that the SW deinterlace element gets > inserted with decodebin, and since the download facility to I420 is not > implemented, that's probably why you also get a green surface. With libva info: VA-API version 0.35.2 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_35 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.35 (libva 1.3.2.pre1) vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.3.pre1 this pipes are not working gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 height=300 ! vaapisink gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 height=300 ! vaapisink
OK, if deinterlace-method=none, then we should disable deinterlacing altogether and operate in passthrough mode.
(In reply to comment #22) > OK, if deinterlace-method=none, then we should disable deinterlacing altogether > and operate in passthrough mode. Please give a info when it is fixed. I will retest asap.
(In reply to comment #21) > (In reply to comment #17) > > (In reply to comment #16) > > > (In reply to comment #14) > > > > New test with file source. > > > > > > > > Tested with file syntax_720.zip > > > > This mpeg2i file can be downloaded at > > > > http://www.nova-wings.com/videos/syntax_720.zip > > > > > > > > Setup > > > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2 > > > > vaapi: > > > > Filename /usr/lib/gstreamer-1.0/libgstvaapi.so > > > > Version 0.5.9.pre1 > > > > > > > > Not working pipes: > > > > > > > > with decodebin: destroyed image > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > height=300 ! vaapisink > > > > > > > > with vaapidecode: pipe doesn't start > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! vaapidecode ! > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > height=300 ! vaapisink > > > > > > > > The result is same with Intel i965 driver 1.3.3.pre1 > > > > > > Pipe with vaapidecode was incorrect (missing mpegpsdemux). > > > Working with > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > > > vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none > > > width=400 height=300 ! vaapisink > > > > > > Not working with decodebin > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > height=300 ! vaapisink > > > > > > > > > Summary. > > > MPEG2i from file is working with vaapidecode, but destroyed image with > > > decodebin. > > > > This one would be a gstreamer-vaapi bug. I believe I spotted it recently, this > > used to work before. What happens is that the SW deinterlace element gets > > inserted with decodebin, and since the download facility to I420 is not > > implemented, that's probably why you also get a green surface. > > With > libva info: VA-API version 0.35.2 > libva info: va_getDriverName() returns 0 > libva info: Trying to open /usr/lib/dri/i965_drv_video.so > libva info: Found init function __vaDriverInit_0_35 > libva info: va_openDriver() returns 0 > vainfo: VA-API version: 0.35 (libva 1.3.2.pre1) > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - > 1.3.3.pre1 > > this pipes are not working > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > height=300 ! vaapisink This one should work, decodebin automatically inserts parser elements. > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none > width=400 height=300 ! vaapisink This one cannot work. An mpegvideoparse element needs to be inserted before vaapidecode. It is "now" (>= 1.2) required that parser elements are inserted before decoder elements.
(In reply to comment #24) > (In reply to comment #21) > > (In reply to comment #17) > > > (In reply to comment #16) > > > > (In reply to comment #14) > > > > > New test with file source. > > > > > > > > > > Tested with file syntax_720.zip > > > > > This mpeg2i file can be downloaded at > > > > > http://www.nova-wings.com/videos/syntax_720.zip > > > > > > > > > > Setup > > > > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2 > > > > > vaapi: > > > > > Filename /usr/lib/gstreamer-1.0/libgstvaapi.so > > > > > Version 0.5.9.pre1 > > > > > > > > > > Not working pipes: > > > > > > > > > > with decodebin: destroyed image > > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > > height=300 ! vaapisink > > > > > > > > > > with vaapidecode: pipe doesn't start > > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! vaapidecode ! > > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > > height=300 ! vaapisink > > > > > > > > > > The result is same with Intel i965 driver 1.3.3.pre1 > > > > > > > > Pipe with vaapidecode was incorrect (missing mpegpsdemux). > > > > Working with > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > > > > vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none > > > > width=400 height=300 ! vaapisink > > > > > > > > Not working with decodebin > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > height=300 ! vaapisink > > > > > > > > > > > > Summary. > > > > MPEG2i from file is working with vaapidecode, but destroyed image with > > > > decodebin. > > > > > > This one would be a gstreamer-vaapi bug. I believe I spotted it recently, this > > > used to work before. What happens is that the SW deinterlace element gets > > > inserted with decodebin, and since the download facility to I420 is not > > > implemented, that's probably why you also get a green surface. > > > > With > > libva info: VA-API version 0.35.2 > > libva info: va_getDriverName() returns 0 > > libva info: Trying to open /usr/lib/dri/i965_drv_video.so > > libva info: Found init function __vaDriverInit_0_35 > > libva info: va_openDriver() returns 0 > > vainfo: VA-API version: 0.35 (libva 1.3.2.pre1) > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - > > 1.3.3.pre1 > > > > this pipes are not working > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > height=300 ! vaapisink > > This one should work, decodebin automatically inserts parser elements. However, you will get an error with recent versions of gstreamer-vaapi because the vaapidecode element does not get auto-plugged, for some reason, so the SW decode element gets in but we don't expose R/W mappings from VA surface memory. An explicit pipeline with autoplug-select filtering out SW decoders would work though.
(In reply to comment #25) > > > this pipes are not working > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > height=300 ! vaapisink > > > > This one should work, decodebin automatically inserts parser elements. > > However, you will get an error with recent versions of gstreamer-vaapi because > the vaapidecode element does not get auto-plugged, for some reason, so the SW > decode element gets in but we don't expose R/W mappings from VA surface memory. > > An explicit pipeline with autoplug-select filtering out SW decoders would work > though. Alternative: increase vaapidecode rank to PRIMARY + 1. Hopefully, auto-plugging would get fixed by GStreamer 1.6 timeframe when capsfeatures are checked for end-to-end.
(In reply to comment #24) > (In reply to comment #21) > > (In reply to comment #17) > > > (In reply to comment #16) > > > > (In reply to comment #14) > > > > > New test with file source. > > > > > > > > > > Tested with file syntax_720.zip > > > > > This mpeg2i file can be downloaded at > > > > > http://www.nova-wings.com/videos/syntax_720.zip > > > > > > > > > > Setup > > > > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.2 > > > > > vaapi: > > > > > Filename /usr/lib/gstreamer-1.0/libgstvaapi.so > > > > > Version 0.5.9.pre1 > > > > > > > > > > Not working pipes: > > > > > > > > > > with decodebin: destroyed image > > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > > height=300 ! vaapisink > > > > > > > > > > with vaapidecode: pipe doesn't start > > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! vaapidecode ! > > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > > height=300 ! vaapisink > > > > > > > > > > The result is same with Intel i965 driver 1.3.3.pre1 > > > > > > > > Pipe with vaapidecode was incorrect (missing mpegpsdemux). > > > > Working with > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > > > > vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none > > > > width=400 height=300 ! vaapisink > > > > > > > > Not working with decodebin > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > height=300 ! vaapisink > > > > > > > > > > > > Summary. > > > > MPEG2i from file is working with vaapidecode, but destroyed image with > > > > decodebin. > > > > > > This one would be a gstreamer-vaapi bug. I believe I spotted it recently, this > > > used to work before. What happens is that the SW deinterlace element gets > > > inserted with decodebin, and since the download facility to I420 is not > > > implemented, that's probably why you also get a green surface. > > > > With > > libva info: VA-API version 0.35.2 > > libva info: va_getDriverName() returns 0 > > libva info: Trying to open /usr/lib/dri/i965_drv_video.so > > libva info: Found init function __vaDriverInit_0_35 > > libva info: va_openDriver() returns 0 > > vainfo: VA-API version: 0.35 (libva 1.3.2.pre1) > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - > > 1.3.3.pre1 > > > > this pipes are not working > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > height=300 ! vaapisink > > This one should work, decodebin automatically inserts parser elements. > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > > vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=none > > width=400 height=300 ! vaapisink > > This one cannot work. An mpegvideoparse element needs to be inserted before > vaapidecode. It is "now" (>= 1.2) required that parser elements are inserted > before decoder elements. OK, with additional mpegvideoparse this pipe work now. But this doesn' work. gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 height=300 ! vaapisink Also this short pipeline without vaapipostproc doesn't work. gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! vaapisink With both pipelines there is no image, it crashes with: ... ... ** (gst-launch-1.0:10254): CRITICAL **: gst_vaapi_window_get_size: assertion 'window != NULL' failed /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad2: caps = NULL /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0: caps = NULL ** (gst-launch-1.0:10254): CRITICAL **: gst_vaapi_display_get_pixel_aspect_ratio: assertion 'display != NULL' failed ** (gst-launch-1.0:10254): CRITICAL **: gst_video_calculate_display_ratio: assertion 'num > 0' failed ** (gst-launch-1.0:10254): CRITICAL **: gst_vaapi_window_reconfigure: assertion 'window != NULL' failed /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_1.GstProxyPad:proxypad3: caps = NULL ** (gst-launch-1.0:10254): CRITICAL **: gst_vaapi_window_get_size: assertion 'window != NULL' failed ** (gst-launch-1.0:10254): CRITICAL **: gst_vaapi_display_get_pixel_aspect_ratio: assertion 'display != NULL' failed /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_1: caps = NULL ** (gst-launch-1.0:10254): CRITICAL **: gst_video_calculate_display_ratio: assertion 'num > 0' failed ... ... Tested with vaapi 0.5.10.pre1
(In reply to comment #26) > (In reply to comment #25) > > > > > this pipes are not working > > > > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > > > > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > > > > height=300 ! vaapisink > > > > > > This one should work, decodebin automatically inserts parser elements. > > > > However, you will get an error with recent versions of gstreamer-vaapi because > > the vaapidecode element does not get auto-plugged, for some reason, so the SW > > decode element gets in but we don't expose R/W mappings from VA surface memory. > > > > An explicit pipeline with autoplug-select filtering out SW decoders would work > > though. > > Alternative: increase vaapidecode rank to PRIMARY + 1. Hopefully, auto-plugging > would get fixed by GStreamer 1.6 timeframe when capsfeatures are checked for > end-to-end. Regarding this one, I foresee a solution through bug #724352. When this is done, we should be able to upgrading vaapi elements rank to PRIMARY + 1.
Hi, (In reply to comment #27) > But this doesn' work. > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! > vaapipostproc deinterlace-mode=auto deinterlace-method=none width=400 > height=300 ! vaapisink > > Also this short pipeline without vaapipostproc doesn't work. > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! vaapisink To recap, is this the remaining issue? I have opened bug #735360 for that. Thanks. > With both pipelines there is no image, it crashes with: I currently get a failure to construct the pipeline, but no crash. > ** (gst-launch-1.0:10254): CRITICAL **: gst_vaapi_window_get_size: assertion > 'window != NULL' failed > /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad2: > caps = NULL > /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0: caps = NULL > > ** (gst-launch-1.0:10254): CRITICAL **: > gst_vaapi_display_get_pixel_aspect_ratio: assertion 'display != NULL' failed > > ** (gst-launch-1.0:10254): CRITICAL **: gst_video_calculate_display_ratio: > assertion 'num > 0' failed > > ** (gst-launch-1.0:10254): CRITICAL **: gst_vaapi_window_reconfigure: assertion > 'window != NULL' failed > /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_1.GstProxyPad:proxypad3: > caps = NULL > > ** (gst-launch-1.0:10254): CRITICAL **: gst_vaapi_window_get_size: assertion > 'window != NULL' failed > > ** (gst-launch-1.0:10254): CRITICAL **: > gst_vaapi_display_get_pixel_aspect_ratio: assertion 'display != NULL' failed > /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_1: caps = NULL > > ** (gst-launch-1.0:10254): CRITICAL **: gst_video_calculate_display_ratio: > assertion 'num > 0' failed > ... > ... > > > Tested with vaapi 0.5.10.pre1
(In reply to comment #0) > Solid green image with > gst-launch-1.0 … vaapidecode ! vaapipostproc width=400 height=300 ! vaapisink > gst-launch-1.0 … decodebin ! vaapipostproc width=400 height=300 ! vaapisink > gst-launch-1.0 … decodebin! vaapipostproc ! vaapisink (no args for > vaapipostproc) > > working pipes > gst-launch-1.0 … vaapidecode! vaapisink > gst-launch-1.0 … decodebin ! vaapisink > gst-launch-1.0 … vaapidecode ! vaapipostproc ! vaapisink (no args for > vaapipostproc) > > scaling with vaapipostproc and MPG2 does not work Back to the original issue, that is deinterlacing + scaling on Haswell. Could you please try the following VA intel-driver sources? <https://github.com/gbeauchesne/libva-intel-driver> ("17.vpp.vebox" branch). Based on feedback from other users for gstreamer-vaapi and XBMC, this improves the situation for deinterlacing, and I normally also fixed the outcome of additional operations. Could you please give it a try? Thanks.
Tests with this new libva-intel-driver ("17.vpp.vebox" branch). Two setups, one with Ivy, one with Haswell. vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Desktop - 1.3.3.pre1 vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.3.pre1 With Ivy an interlaced mpeg2 stream runs without errors (still running after 3 hours). Same stream with Haswell runs only for about 10 minutes. Deinterlacing works, but the pipe crashes with this different error messages (started same pipe lot of times, always one of this error message appears): gst-launch-1.0: i965_render.c:946: i965_render_dest_surface_state: Assertion `ss_bo->virtual' failed. Aborted gst-launch-1.0: i965_render.c:2438: gen7_render_sampler: Assertion `render_state->wm.sampler->virtual' failed. Aborted gst-launch-1.0: i965_render.c:2385: gen7_render_color_calc_state: Assertion `render_state->cc.state->virtual' failed. Aborted gst-launch-1.0: i965_render.c:574: i965_render_cc_viewport: Assertion `render_state->cc.viewport->virtual' failed. Aborted Caught SIGSEGV
+ Trace 234040
(In reply to comment #31) > Tests with this new libva-intel-driver ("17.vpp.vebox" branch). > > Two setups, one with Ivy, one with Haswell. > > vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Desktop - > 1.3.3.pre1 > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - > 1.3.3.pre1 I think I will provide a patch to help match the git version too. > With Ivy an interlaced mpeg2 stream runs without errors (still running after 3 > hours). This is surprising as Ivybridge has known bugs I have to backport from the Haswell branch when more people confirm the changes. :) > Same stream with Haswell runs only for about 10 minutes. Deinterlacing works, > but the pipe crashes with this different error messages (started same pipe lot > of times, always one of this error message appears): > > gst-launch-1.0: i965_render.c:946: i965_render_dest_surface_state: Assertion > `ss_bo->virtual' failed. > Aborted > > gst-launch-1.0: i965_render.c:2438: gen7_render_sampler: Assertion > `render_state->wm.sampler->virtual' failed. > Aborted > > gst-launch-1.0: i965_render.c:2385: gen7_render_color_calc_state: Assertion > `render_state->cc.state->virtual' failed. > Aborted > > gst-launch-1.0: i965_render.c:574: i965_render_cc_viewport: Assertion > `render_state->cc.viewport->virtual' failed. > Aborted > > Caught SIGSEGV > Sorry to ask, but please make sure you have the following patch fetched, built and installed: 9da94b4, vebox: fix memory leak of VEBOX state tables. What you describe sounds familiar without this patch. Actually, another customer and the XBMC community had reported something similar too, and confirmed the fix now runs well for them after hours on Haswell, used to fail after around 20 minutes too. Note that I have also integrated the VPP changes from my gstreamer-vaapi github to the official repository @ gitorious, i.e. on the "master" branch.
(In reply to comment #32) > (In reply to comment #31) > > Tests with this new libva-intel-driver ("17.vpp.vebox" branch). > > > > Two setups, one with Ivy, one with Haswell. > > > > vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Desktop - > > 1.3.3.pre1 > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - > > 1.3.3.pre1 > > I think I will provide a patch to help match the git version too. > > > With Ivy an interlaced mpeg2 stream runs without errors (still running after 3 > > hours). > > This is surprising as Ivybridge has known bugs I have to backport from the > Haswell branch when more people confirm the changes. :) > > > Same stream with Haswell runs only for about 10 minutes. Deinterlacing works, > > but the pipe crashes with this different error messages (started same pipe lot > > of times, always one of this error message appears): > > > > gst-launch-1.0: i965_render.c:946: i965_render_dest_surface_state: Assertion > > `ss_bo->virtual' failed. > > Aborted > > > > gst-launch-1.0: i965_render.c:2438: gen7_render_sampler: Assertion > > `render_state->wm.sampler->virtual' failed. > > Aborted > > > > gst-launch-1.0: i965_render.c:2385: gen7_render_color_calc_state: Assertion > > `render_state->cc.state->virtual' failed. > > Aborted > > > > gst-launch-1.0: i965_render.c:574: i965_render_cc_viewport: Assertion > > `render_state->cc.viewport->virtual' failed. > > Aborted > > > > Caught SIGSEGV > > > > Sorry to ask, but please make sure you have the following patch fetched, built > and installed: 9da94b4, vebox: fix memory leak of VEBOX state tables. What you > describe sounds familiar without this patch. > > Actually, another customer and the XBMC community had reported something > similar too, and confirmed the fix now runs well for them after hours on > Haswell, used to fail after around 20 minutes too. > > Note that I have also integrated the VPP changes from my gstreamer-vaapi github > to the official repository @ gitorious, i.e. on the "master" branch. You are rigth, patch 9da94b4 was not fetched. Now I repeated my tests with ad3f8b5e5548408428a6fb1ad66310470aa926a8. Until now all tested pipes works. Tested with interlaced mpeg2 stream: - deinterlacing (bob only) OK - scaling up and down OK - need only one vaapipostproc call for deinterlace and scaling OK It looks good. I will continue my tests with other interlaced streams. Please give us a info when this fixes are merged to master branch. Thanks.
Pipes with decodebin (AND vapisink) fails. Same pipes with vaapidecode works. OK with vaapidecode gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! mpegvideoparse ! vaapidecode ! vaapisink not OK with decodebin (black image only) gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! mpegvideoparse ! decodebin ! vaapisink not OK with vaapisink gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! vaapisink OK with xvimagesink gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! xvimagesink Setup with latest patches: vaapi Version 0.5.10.pre1 vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.3.pre1 (1.3.3.pre1) With older setup (0.5.9.pre1 and Intel i965 driver - 1.3.1) the pipes with decodebin and vaapisink works! Replace vaapisink with xvimagesink and the pipe works.... gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! vaapisink gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! xvimagesink All this looks strange for me, or am I wrong. It's also independnet of file video or stream video.
(In reply to comment #34) > Pipes with decodebin (AND vapisink) fails. > Same pipes with vaapidecode works. > > OK with vaapidecode > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > mpegvideoparse ! vaapidecode ! vaapisink > > not OK with decodebin (black image only) > gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! > mpegvideoparse ! decodebin ! vaapisink > > > not OK with vaapisink > gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! vaapisink > > OK with xvimagesink > gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! xvimagesink > > Setup with latest patches: > vaapi Version 0.5.10.pre1 > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - > 1.3.3.pre1 (1.3.3.pre1) > > > With older setup (0.5.9.pre1 and Intel i965 driver - 1.3.1) the pipes with > decodebin and vaapisink works! > > Replace vaapisink with xvimagesink and the pipe works.... > gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! vaapisink > gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! decodebin ! xvimagesink > > All this looks strange for me, or am I wrong. > It's also independnet of file video or stream video. If your video is MPEG-2, and you have the mpeg2dec SW decoder installed, then that's expected behaviour. If you want to have that working with current gstreamer-vaapi git master code, and GStreamer < 1.6 then you need to increase vaapidecode rank (gst/vaapi/gstvaapi.c) to PRIMARY + 2 for instance. Hopefully, we could get decodebin to auto-plug HW accelerated elements that expose the needed capsfeatures by GStreamer 1.6. Meanwhile, I would be implementing the workaround with the rank + bug #734093..
More precisely, the pipelines you mention that doesn't work are due to the use of the SW decoders through decodebin. Though, it is desired to work better with SW elements, decodebin should have picked the HW decoder instead. I also kind of remember that GStreamer selection, based on two plugins with the same rank, is to pick the one which comes first in alphabetical order. That's why, I presume that increasing vaapi elements rank to PRIMARY + 2 could help. I can't do it by default right now before implementing the fix for bug #734093. Otherwise, we'd risk to pick HW decode elements on platforms that don't support it, thus failing.
OK will try to understand and test it... But now with latest version of vaapi and i965 driver my tests with h264 streams doesn't work. Independent of decodebin and vaapidecode. Only a black window. Examples: gst-launch-1.0 [h264-stream] ! vaapidecode ! vaapipostproc width=480 height=270 ! vaapisink gst-launch-1.0 [h264-stream] ! decodebin ! vaapipostproc width=480 height=270 ! vaapisink Same issue without vaapipostproc. Only a black image. gst-launch-1.0 [h264-stream] ! vaapidecode ! vaapisink gst-launch-1.0 [h264-stream] ! decodebin ! vaapisink Setup vaapi Version 0.5.10.pre1 vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.3.pre1 (1.3.3.pre1) All examples (with vaapidecode AND decodebin ) above works with vaapi Version 0.5.9 and i965 driver 1.3.3.pre1. IMHO with mpeg2 vaapidecode works and for decodebin the ranking has to be changed. But what happens now with h264 streams? vaapidecode AND decodebin doesn't work!
(In reply to comment #37) > OK will try to understand and test it... > > But now with latest version of vaapi and i965 driver my tests with h264 streams > doesn't work. Independent of decodebin and vaapidecode. Only a black window. > > Examples: > gst-launch-1.0 [h264-stream] ! vaapidecode ! vaapipostproc width=480 height=270 > ! vaapisink > gst-launch-1.0 [h264-stream] ! decodebin ! vaapipostproc width=480 height=270 ! > vaapisink > > Same issue without vaapipostproc. Only a black image. > gst-launch-1.0 [h264-stream] ! vaapidecode ! vaapisink > gst-launch-1.0 [h264-stream] ! decodebin ! vaapisink > > Setup > vaapi Version 0.5.10.pre1 > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - > 1.3.3.pre1 (1.3.3.pre1) > > > > All examples (with vaapidecode AND decodebin ) above works with vaapi Version > 0.5.9 and i965 driver 1.3.3.pre1. > > IMHO with mpeg2 vaapidecode works and for decodebin the ranking has to be > changed. > But what happens now with h264 streams? > vaapidecode AND decodebin doesn't work! Sorry, my fault. Forget this comment. I have to add the workaround for BP streams;-))
(In reply to comment #38) > (In reply to comment #37) > > OK will try to understand and test it... > > > > But now with latest version of vaapi and i965 driver my tests with h264 streams > > doesn't work. Independent of decodebin and vaapidecode. Only a black window. > > > > Examples: > > gst-launch-1.0 [h264-stream] ! vaapidecode ! vaapipostproc width=480 height=270 > > ! vaapisink > > gst-launch-1.0 [h264-stream] ! decodebin ! vaapipostproc width=480 height=270 ! > > vaapisink > > > > Same issue without vaapipostproc. Only a black image. > > gst-launch-1.0 [h264-stream] ! vaapidecode ! vaapisink > > gst-launch-1.0 [h264-stream] ! decodebin ! vaapisink > > > > Setup > > vaapi Version 0.5.10.pre1 > > vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - > > 1.3.3.pre1 (1.3.3.pre1) > > > > > > > > All examples (with vaapidecode AND decodebin ) above works with vaapi Version > > 0.5.9 and i965 driver 1.3.3.pre1. > > > > IMHO with mpeg2 vaapidecode works and for decodebin the ranking has to be > > changed. > > But what happens now with h264 streams? > > vaapidecode AND decodebin doesn't work! > > > Sorry, my fault. > Forget this comment. > I have to add the workaround for BP streams;-)) Do you still have issues with the current git master branch where the VEBOX (including deinterlacer) enhancements were pushed? Yes, I fixed the scaling issue there too. The params to the internal scaling function were reversed.
Frank: Please answer comment 39.
Sorry for the delay. Yes there are still issues with the current git master together with deinterlacing and scaling. Deinterlacing a stream works. Scaling a stream works NOT. Green image only. Also deinterlace _AND_ scale _TOGEHTER_ doesn't work. With this combination there is also only a green image. Deinterlace _AND_ scale, but with deinterlace-method=none scaling works, but then the video is not deinterlaced. Example pipes (not working): // green only (both worked in the paste) // deinterlace and scale gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! mpegvideoparse ! vaapidecode ! vaapipostproc deinterlace-mode=auto deinterlace-method=bob width=400 height=300 ! vaapisink // scale only gst-launch-1.0 filesrc location=/root/syntax_720.mpg ! mpegpsdemux ! mpegvideoparse ! vaapidecode ! vaapipostproc width=400 height=300 ! vaapisink // same with decodebin (both not working, never worked) gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! vaapipostproc deinterlace-mode=auto deinterlace-method=bob width=400 height=300 ! vaapisink gst-launch-1.0 -v filesrc location=/root/syntax_720.mpg ! decodebin ! vaapipostproc width=400 height=300 ! vaapisink Setup info: libva info: VA-API version 0.36.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/va/i965_drv_video.so libva info: Found init function __vaDriverInit_0_36 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.36 (libva 1.4.1) vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.4.1 vainfo: Supported profile and entrypoints vaapi Version 0.5.10.pre1 commit 8bf8f1104d5725536243f44c0330144c3ba1a428 Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com> Date: Thu Nov 27 12:11:03 2014 +0200 gstreamer version 1.4.4 Info about file syntax_720.mpg see older comments.
See also bug with h264 interlace video, deinterlace and scaling bug https://bugs.freedesktop.org/show_bug.cgi?id=81199
Test again and it works now. Scaling up/down interlaced MPEG-2 streams is working now. Issue fixed with libva/intel-driver version 1.5.0 (also with 1.5.0.pre1) Setup info: libva info: VA-API version 0.37.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/va/i965_drv_video.so libva info: Found init function __vaDriverInit_0_37 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.37 (libva 1.5.0) vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.5.0 gstreamer version 1.4.4 vaapi version 0.5.10.pre1 Thanks for support.