[Libva] h264 decoding, Surface exporting to Beignet

Zhao Yakui yakui.zhao at intel.com
Fri May 13 01:34:25 UTC 2016


On 05/12/2016 07:39 PM, Nikita Orlov wrote:
> Hello!
>

Hi, Nikita

> I am decoding h264 via VAAPI, after I have decoded frame in VASurface, I export it to BEIGNET:
> 1)vaDeriveImage
> 2)vaAcquireBufferHandle
> 3)clCreateBufferFromLibvaIntel
>
> The problem, that after I call vaDeriveImage, it seems Surface is not more can be accessed by decoder and as future frames are referencing to this Surface, I can`t decode them.
> I need to release buffer handle and destroy VAImage, before Surface can be accessed by decoder again.
>
> Is it ok? Or am I doing something wrong?

[Yakui]: You are right. You need to destroy the VAImage if the surface 
is used as the decoded frame.

When the surface is exported, it indicates that it will be accessed by 
the other component. If we still use it for the decoding, it is possible 
that two components are trying to access it simultaneously.
This is not safe.

>
> By the way, what is difference between Image and Buffer objects? I mean I can export VAImage to Beignet Image or Buffer.
> Are there any difference in internal intel hardware for these two types of objects?

[Yakui]: There is no difference. All these objects are based on the drm 
object.

>
> --
> Nikita Orlov
> Skype: nik_stet
> QQ: 2717846083
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libva



More information about the Libva mailing list