compute-runtime icon indicating copy to clipboard operation
compute-runtime copied to clipboard

clCreateFromVA_APIMediaSurfaceINTEL does NOT support VA_FOURCC_ABGR

Open EmonLu opened this issue 1 year ago • 1 comments

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

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
  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

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

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.

EmonLu avatar Jun 19 '24 01:06 EmonLu

clCreateFromVA_APIMediaSurfaceINTEL alse does NOT support VA_FOURCC_YUY2 ?

Chris-LuYu avatar Jun 16 '25 09:06 Chris-LuYu