compute-runtime
compute-runtime copied to clipboard
clCreateFromVA_APIMediaSurfaceINTEL does NOT support VA_FOURCC_ABGR
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:
- export VPL surface
- define the exported as mfxSurfaceVAAPI described in https://github.com/intel/libvpl/blob/main/doc/surface_sharing_apis_overview.md
- create opencl memory object from mfxSurfaceVAAPI with clCreateFromVA_APIMediaSurfaceINTEL
- opencl kernel inference to implement RGB to BGRA conversion
- 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.
clCreateFromVA_APIMediaSurfaceINTEL alse does NOT support VA_FOURCC_YUY2 ?