[Libva] any examples using vaPutImage?
Attila Szilagyi
attbimmer at hotmail.com
Thu Aug 20 13:10:29 PDT 2009
> Date: Thu, 20 Aug 2009 16:07:18 +0800
> Subject: Re: [Libva] any examples using vaPutImage?
> From: shengquan.yuan at gmail.com
> To: attbimmer at hotmail.com
> CC: libva at lists.freedesktop.org
>
> 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
>
AYUV is a FOURCC type. I was a bit surprised that that was the only type supported by the S3 driver, but
that is what the query is returning.
> > 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.
>
Ok thanks. By removing the XSync I was able to get a green screen to display, but it doesn't
seem make any difference what I put in the image buffer, so looks like there are still problems somewhere.
> > 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
> >
> >
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/libva/attachments/20090820/775fd350/attachment.htm
More information about the Libva
mailing list