[Libva] vaGetImage failed with VA_STATUS_ERROR_SURFACE_BUSY
Xiang, Haihao
haihao.xiang at intel.com
Sun Dec 28 16:29:24 PST 2014
Hi Chuanbo,
You are using vaDeriveImage() in a wrong way. Please refer to the
comment in va.h:
* Calls to vaPutImage or vaGetImage using the same surface from
* which the image has been derived will return
* A_STATUS_ERROR_SURFACE_BUSY.vaPutImage
* vaGetImage with other surfaces is supported.
You are suggested to use vaCreateImage() instead of vaDeriveImage(),
then call vaGetImage(). Or use VPP to translate the format from
VA_FOURCC_YUY2 to VA_FOURCC_NV12.
Thanks
Haihao
> Hi all,
>
> I have a usage case of libva: I read camera frame to a
> VASurface (VA_FOURCC_YUY2 format),
>
> translate the format from VA_FOURCC_YUY2 to VA_FOURCC_NV12 and then
> show VASurface content
>
> to screen. The code of translating format is as below:
>
>
>
> VAImage nv12_image;
>
> va_status = vaDeriveImage(va_dpy, nv12_surface_id, &nv12_image);
>
> va_status = vaGetImage (va_dpy, gray_bgra_surface_id,
> 0, 0, width, height, nv12_image.image_id);
>
>
>
> It fails on vaGetImage with return value
> VA_STATUS_ERROR_SURFACE_BUSY. I dig into
>
> intel-driver, and find it returns on the this line of i965_GetImage():
>
> if (is_image_busy(i965, obj_image))
>
> return VA_STATUS_ERROR_SURFACE_BUSY;
>
>
>
> Could you find a way to solve this problem? Because
> it’s the most convenient way I know translating
>
> one format VASurface to another.
>
>
>
> Thanks,
>
> Chuanbo Weng
>
>
>
>
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva
More information about the Libva
mailing list