[GSD-11556] clCreateFromVA_APIMediaSurfaceINTEL does NOT support VA_FOURCC_ABGR
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
To create a opencl surface from libva surface, it fails when the color fomat is VA_FOURCC_ABGR. Added color format support as below, but the result still turns out to be wrong.

The background is to do JPEG encoding with Intel VPL. Basic steps are:
1. export VPL surface
2. define the exported as mfxSurfaceVAAPI described in [https://github.com/intel/libvpl/blob/main/doc/surface_sharing_apis_overview.md](https://github.com/intel/libvpl/blob/main/doc/surface_sharing_apis_overview.md)
3. create opencl memory object from mfxSurfaceVAAPI with clCreateFromVA_APIMediaSurfaceINTEL
4. opencl kernel inference to implement RGB to BGRA conversion
5. VPL do JPEG encoding
The demo works well for encodeParams.mfx.FrameInfo.FourCC = MFX_FOURCC_RGB4 result as below:

While for encodeParams.mfx.FrameInfo.FourCC = MFX_FOURCC_BGR4, it goes wrong:

As the only difference is the format support of clCreateFromVA_APIMediaSurfaceINTEL, so open an issue here to ask new feature added for VA_FOURCC_ABGR.
Contributor guide
Assessment
This issue has not been assessed yet.