<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br><br>> Date: Thu, 20 Aug 2009 16:07:18 +0800<br>> Subject: Re: [Libva] any examples using vaPutImage?<br>> From: shengquan.yuan@gmail.com<br>> To: attbimmer@hotmail.com<br>> CC: libva@lists.freedesktop.org<br>> <br>> On Thu, Aug 20, 2009 at 12:08 AM, Attila Szilagyi<attbimmer@hotmail.com> wrote:<br>> > I've been looking at using vaPutImage and so far have no had much luck<br>> > getting an image to display in an X window. Below is basically what I am<br>> > doing.<br>> ><br>> > init (ie:XOpenDisplay, vaGetDisplay, vaInitialize)<br>> ><br>> > vaCreateSurfaces<br>> > vaQueryImageFormats (only supported image type returned is AYUV)<br>> I think it shouldn't be AYUV. vaQueryImageFormats usually returns back<br>> surface FOURCC, if the surface FOURCC is private, it can return a<br>> generic FOURCC, e.g. YV12, and driver can do conversion when do<br>> vaPutImage/vaGetImage<br>> <br><br>AYUV is a FOURCC type. I was a bit surprised that that was the only type supported by the S3 driver, but <br>that is what the query is returning.<br><br>> > vaCreateImage<br>> > vaMapBuffer (map created image to local buf ptr)<br>> > fill local buf with simple test pattern<br>> > vaUnmapBuffer<br>> > vaPutImage (put to surface created above)<br>> ><br>> > XCreateSimpleWindow<br>> > XMapWindow (also tried XMapRaised)<br>> > XSync<br>> ><br>> > vaPutSurface (put to window created above)<br>> > (also tried adding XFlush)<br>> ><br>> > All va functions return success, but at the end all I get is a blank window.<br>> ><br>> > I am using libva 0.28, S3G Driver 1.0 with an S3 540GTX card and running<br>> > Ubuntu. I ran most test programs in the libva src package and those worked.<br>> > Also mplayer is working using va and doing the same kind of test with<br>> > XPutImage works as well.<br>> ><br>> > I've searched around quite a bit, but haven't really found anything using<br>> > vaPutImage. Are there any working examples using vaPutImage? Does the above<br>> I will upload a sample code, but whether it work or not depends on<br>> driver implementation. Driver may not handle VAImage correctly.<br>> <br><br>Ok thanks. By removing the XSync I was able to get a green screen to display, but it doesn't <br>seem make any difference what I put in the image buffer, so looks like there are still problems somewhere.<br><br>> > sequence look like it should work or am I way off? I've just started looking<br>> > at libva the last few days and am pretty new to X as well so sorry if the<br>> > answer to this should be obvious.<br>> ><br>> > Thanks in advance for any help.<br>> ><br>> ><br>> ><br>> ><br>> ><br>> > ________________________________<br>> > With Windows Live, you can organize, edit, and share your photos. Click<br>> > here.<br>> > _______________________________________________<br>> > Libva mailing list<br>> > Libva@lists.freedesktop.org<br>> > http://lists.freedesktop.org/mailman/listinfo/libva<br>> ><br>> ><br><br /><hr />Windows Live: Make it easier for your friends to see what you’re up to on Facebook. <a href='http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009' target='_new'>Find out more.</a></body>
</html>