intel / intel/compute-runtime

[GSD-11556] clCreateFromVA_APIMediaSurfaceINTEL does NOT support VA_FOURCC_ABGR

Open
#739 1 comment 0 reactions 0 assignees View on GitHub
Status: Backlog Type: Feature Request
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.
![image](https://github.com/intel/compute-runtime/assets/53183584/d71cd851-bb1b-47e2-8e30-7bd541cbbbfa)

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:
![image](https://github.com/intel/compute-runtime/assets/53183584/bac0e714-5be5-4f28-84ab-13979af47a5a)

While for encodeParams.mfx.FrameInfo.FourCC = MFX_FOURCC_BGR4, it goes wrong:
![image](https://github.com/intel/compute-runtime/assets/53183584/ea3f2542-ce3b-4f84-86f9-aec6001356e1)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.