After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741631 - [SNB|IVB|BYT][Media][Decode]GStreamer encountered a general stream error when doing MVC decoding test
[SNB|IVB|BYT][Media][Decode]GStreamer encountered a general stream error when...
Status: VERIFIED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on: 739992
Blocks: 731852
 
 
Reported: 2014-12-17 08:47 UTC by zhixinx.liu
Modified: 2015-01-23 08:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patches/videoparsers: h264: expose multiview compatible profiles (2.74 KB, patch)
2015-01-19 12:15 UTC, Víctor Manuel Jáquez Leal
none Details | Review
patches/videoparsers: h264: expose multiview compatible profiles (5.31 KB, patch)
2015-01-19 16:56 UTC, Víctor Manuel Jáquez Leal
none Details | Review

Description zhixinx.liu 2014-12-17 08:47:16 UTC
GStreamer encountered a general stream error when doing MVC decoding test

1. Testing Steps
========================================================================
run following command, and check the log:
[root@x-sgbmedia opt]# gst-launch-1.0 -q filesrc
location=/media/mvc/MVCDS-1.264 ! vaapiparse_h264 '!'
video/x-h264,stream-format=byte-stream,alignment=au '!' vaapidecode '!'
vaapisink sync=false
libva info: VA-API version 0.36.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_36
libva info: va_openDriver() returns 0
ERROR: from element /GstPipeline:pipeline0/GstVaapiH264Parse:vaapih264parse0:
GStreamer encountered a general stream error.
Additional debug info:
gstbaseparse.c(3249): gst_base_parse_loop ():
/GstPipeline:pipeline0/GstVaapiH264Parse:vaapih264parse0:
streaming stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.

2. Testing Env:
========================================================================
Libva:(master)ccd93de5a707e92a629cccd595757c8d436fa3cc
Libva_intel_driver:(master)24cba20a119c96556ae4dc9a90043896ea70e567
Gstreamer10:(1.2)861ca3d6787d84c9bea7110cb46821e9b8f63aff
Gst_plugins_base10:(1.2)df7e7daa29ba14447b4d8dd43c35d8a3ad9e4984
Gst_plugins_good10:(1.2)08ab260b8a39791e7e62c95f4b64fd5b69959325
Gst_plugins_bad10:(1.2)277b8c34e7214177764833b73f17e43ced496f8f
Gst_plugins_ugly10:(1.2)2233d97e6ad1a3988d9a9ca0fc0cf00ec4031a8f
Gst_plugins_vaapi10:master)eeb43989c1cf92aa3bd88e330ecea95bb8ab3319

3. Frequency of Occurence:
========================================================================
100%
Comment 1 zhixinx.liu 2014-12-17 08:57:40 UTC
you can get the background informaiton from Bug 739715 - [SNB|IVB|BYT|HSW|BDW Regression][Media][Decode]GStreamer encountered a general stream error when doing H264 decoding test
Comment 2 Víctor Manuel Jáquez Leal 2015-01-15 12:04:23 UTC
Using  master in all the repos the pipeline works in my setup:

$ jhbuild run gst-launch-1.0 -v filesrc location=~/patterns/MVCDS-1.264 ! vaapiparse_h264 ! video/x-h264,stream-format=byte-stream,alignment=au ! vaapidecode ! vaapisink sync=false                                                                                                 
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /home/vjaquez/gnome/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_37
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;
/GstPipeline:pipeline0/GstVaapiH264Parse:vaapih264parse0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3\,\ profile\=\(string\)multiview-high"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3\,\ profile\=\(string\)multiview-high"
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:src: caps = "video/x-raw\(memory:VASurface\)\,\ format\=\(string\)I420\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)0/1"
/GstPipeline:pipeline0/GstVaapiSink:vaapisink0.GstPad:sink: caps = "video/x-raw\(memory:VASurface\)\,\ format\=\(string\)I420\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)0/1"
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3\,\ profile\=\(string\)multiview-high"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3\,\ profile\=\(string\)multiview-high"
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:05.026802065
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 3 sreerenj 2015-01-15 12:22:08 UTC
(In reply to comment #2)
> Using  master in all the repos the pipeline works in my setup:
> 
> $ jhbuild run gst-launch-1.0 -v filesrc location=~/patterns/MVCDS-1.264 !
> vaapiparse_h264 ! video/x-h264,stream-format=byte-stream,alignment=au !
> vaapidecode ! vaapisink sync=false                                              
> libva info: VA-API version 0.37.0
> libva info: va_getDriverName() returns 0
> libva info: Trying to open /home/vjaquez/gnome/lib/dri/i965_drv_video.so
> libva info: Found init function __vaDriverInit_0_37
> 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;
> /GstPipeline:pipeline0/GstVaapiH264Parse:vaapih264parse0.GstPad:src: caps =
> "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\
> framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\
> stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\
> level\=\(string\)3\,\ profile\=\(string\)multiview-high"
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
> "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\
> framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\
> stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\
> level\=\(string\)3\,\ profile\=\(string\)multiview-high"
> /GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:src: caps =
> "video/x-raw\(memory:VASurface\)\,\ format\=\(string\)I420\,\
> width\=\(int\)640\,\ height\=\(int\)480\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\
> chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)bt601\,\
> framerate\=\(fraction\)0/1"
> /GstPipeline:pipeline0/GstVaapiSink:vaapisink0.GstPad:sink: caps =
> "video/x-raw\(memory:VASurface\)\,\ format\=\(string\)I420\,\
> width\=\(int\)640\,\ height\=\(int\)480\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\
> chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)bt601\,\
> framerate\=\(fraction\)0/1"
> /GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:sink: caps =
> "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\
> framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\
> stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\
> level\=\(string\)3\,\ profile\=\(string\)multiview-high"
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
> "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\
> framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\
> stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\
> level\=\(string\)3\,\ profile\=\(string\)multiview-high"
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> Got EOS from element "pipeline0".
> Execution ended after 0:00:05.026802065
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...

This issue is only reproducible with ivb or older platforms.. Please see https://bugzilla.gnome.org/show_bug.cgi?id=739715#c3 

You can do some tweaks in gstreamer-vaapi to mimic the behavior to reproduce the issue by dealing with "multiview-high" in gst-libs/gst/gstvaapiprofice.c ;)
Fix needed:
See https://bugzilla.gnome.org/show_bug.cgi?id=739715#c18
and http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst/videoparsers/gsth264parse.c#n1304
Comment 4 Víctor Manuel Jáquez Leal 2015-01-19 12:15:47 UTC
Created attachment 294865 [details] [review]
patches/videoparsers: h264: expose multiview compatible profiles
Comment 5 Víctor Manuel Jáquez Leal 2015-01-19 12:21:53 UTC
This last patch is done blindly  since I don't have the hardware to reproduce the bug, but in theory it will relax the profile restriction to stereo-high if the media is multi-view with two views if the peer doesn't support multi-view.
Comment 6 sreerenj 2015-01-19 12:27:05 UTC
(In reply to comment #4)
> Created an attachment (id=294865) [details] [review]
> patches/videoparsers: h264: expose multiview compatible profiles

This is not enough..In order to get "sps->extension.mvc.num_views_minus1", you have to parse the subset sps
Comment 7 sreerenj 2015-01-19 12:29:55 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > Created an attachment (id=294865) [details] [review] [details] [review]
> > patches/videoparsers: h264: expose multiview compatible profiles
> 
> This is not enough..In order to get "sps->extension.mvc.num_views_minus1", you
> have to parse the subset sps

You can implement it as another patch
Comment 8 Víctor Manuel Jáquez Leal 2015-01-19 16:56:49 UTC
Created attachment 294901 [details] [review]
patches/videoparsers: h264: expose multiview compatible profiles
Comment 9 sreerenj 2015-01-19 19:28:04 UTC
Zhinix, could you please have a try with the attached patch?
Comment 10 sreerenj 2015-01-21 16:43:28 UTC
Zhinix, could you please have a try with the current git master...I have merged the patches
Comment 11 zhixinx.liu 2015-01-22 01:08:44 UTC
ok, i will verify this issue. and will update the result later.
Comment 12 zhixinx.liu 2015-01-23 05:50:09 UTC
This issue cannot be reproduced with laster master branch.
Comment 13 zhixinx.liu 2015-01-23 05:50:27 UTC
Verified and Passed. So close it.
Comment 14 Víctor Manuel Jáquez Leal 2015-01-23 08:23:02 UTC
\o/