Vaapi + OpenGL Elements with Intel Driver

Matthew Waters ystreet00 at gmail.com
Fri Feb 14 03:29:26 PST 2014


Hi,

On 13/02/14 22:31, adrien_sch wrote:
> Hello guys,
>
> In my way to explore HW acceleration, I tried to use this pipeline example
> in differents platform :
>
> Pipeline : filesrc ! matroskademux ! h264parse ! vaapidecode ! glcolorscale
> ! glimagesink
>
> Platform 1 :
> libva info: VA-API version 0.34.0
> libva info: va_getDriverName() returns 0
> libva info: Trying to open /usr/local/lib/dri/nvidia_drv_video.so
> libva info: Found init function __vaDriverInit_0_34
> libva info: va_openDriver() returns 0
> vainfo: VA-API version: 0.34 (libva 1.2.2.pre1)
> vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API -
> 0.7.5.pre1
>
> Platform 2 :
> libva info: VA-API version 0.34.0
> libva info: va_getDriverName() returns 0
> libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
> libva info: Found init function __vaDriverInit_0_34
> libva info: va_openDriver() returns 0
> vainfo: VA-API version: 0.34 (libva 1.2.2.pre1)
> vainfo: Driver version: Intel i965 driver - 1.2.2
>
> Versions :
> Gstreamer : 1.2.2
> gstreamer-vaapi : 0.5.9.pre1
> gst-plugins-gl : 0.11.0.1
>
> Works well on platform 1.
>
> On platform 2 :
>
> Gstreamer criticals errors :
> gst_vaapi_image_get_plane : assertion 'gst_vaapi_image_is_mapped(img)'
> failed
> gst_vaapi_image_get_pitch : assertion 'gst_vaapi_image_is_mapped(img)'
> failed
> gst_video_meta_unmap_vaapi_memory : assertion 'mem->surface' failed
>
> Warnings :
> libEGL warning : failed to create a pipe screen for i965.
>
> Note :
> - On platform 1 & 2, vaapi pipelines works fine (vaapidecode ! vaapisink).
>
> Questions :
> - Did someone already face to these issues ? Anyone has some advice, where
> to report this, and how ?

So, there's a couple of things that have to align for the vaapi and GL 
elements to work together.

1. Up to date code (looks like you already have this)
2. The GL apis have to be the same (GLES2 vs GL vs GL3).  vaapi uses 
fixed function GL for the GstVideoGLTextureUploadMeta and by default 
gst-plugins-gl uses the Desktop GL over GLES2 (if compiled in).  So this 
should work.
3. The platform specific GL api has to be the same (GLX, EGL, etc). This 
is where I think this is where the problem is.  vaapi uses GLX to 
perform GstVideoGLTextureUploadMeta, whereas gst-plugins-gl prefers EGL 
over GLX.  Could you try running with GST_GL_PLATFORM=glx set in your 
environment  on the intel platform and see if that fixes things. That 
could also be the reason you're seeing the libEGL warning.

> Observations :
> The overall quality of vaapi elements is quite bad with the intel driver. I
> observed few times segmentation fault in few cases, deadlock when using
> vaapipostproc, etc.... I'm trying to isolate, resolve, each unexpected
> behavior at a time.
>
> Remarks :
> - Sadly, the vaapipostproc doesn't expose a GstVideoGLTextureUploadMeta
> source pad who could be very interesting. Maybe there is a technical reason
> of that.
> - Happy to see that OpenGL element in motion :)
>
>
>
>
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Vaapi-OpenGL-Elements-with-Intel-Driver-tp4665233.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>



More information about the gstreamer-devel mailing list