[Libva] any examples using vaPutImage?

Yuan, Shengquan shengquan.yuan at gmail.com
Thu Aug 20 01:07:18 PDT 2009


On Thu, Aug 20, 2009 at 12:08 AM, Attila Szilagyi<attbimmer at hotmail.com> wrote:
> I've been looking at using vaPutImage and so far have no had much luck
> getting an image to display in an X window. Below is basically what I am
> doing.
>
> init (ie:XOpenDisplay, vaGetDisplay, vaInitialize)
>
> vaCreateSurfaces
> vaQueryImageFormats (only supported image type returned is AYUV)
I think it shouldn't be AYUV. vaQueryImageFormats usually returns back
surface FOURCC, if the surface FOURCC is private, it can return a
generic FOURCC, e.g. YV12, and driver can do conversion when do
vaPutImage/vaGetImage

> vaCreateImage
> vaMapBuffer (map created image to local buf ptr)
> fill local buf with simple test pattern
> vaUnmapBuffer
> vaPutImage (put to surface created above)
>
> XCreateSimpleWindow
> XMapWindow (also tried XMapRaised)
> XSync
>
> vaPutSurface (put to window created above)
> (also tried adding XFlush)
>
> All va functions return success, but at the end all I get is a blank window.
>
> I am using libva 0.28, S3G Driver 1.0 with an S3 540GTX card and running
> Ubuntu. I ran most test programs in the libva src package and those worked.
> Also mplayer is working using va and doing the same kind of test with
> XPutImage works as well.
>
> I've searched around quite a bit, but haven't really found anything using
> vaPutImage. Are there any working examples using vaPutImage? Does the above
I will upload a sample code, but whether it work or not depends on
driver implementation. Driver may not handle VAImage correctly.

> sequence look like it should work or am I way off? I've just started looking
> at libva the last few days and am pretty new to X as well so sorry if the
> answer to this should be obvious.
>
> Thanks in advance for any help.
>
>
>
>
>
> ________________________________
> With Windows Live, you can organize, edit, and share your photos. Click
> here.
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva
>
>


More information about the Libva mailing list