OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

cl_intel_d3d11_nv12_media_sharing sample code

li__simon
Beginner
673 Views

Hello,

I'm playing with MediaSDK and DirectX11 interop.

Since the MediaSDK decode output is NV12 format, the OpenCL program needs to access the shared texture2D YUV data in the same format.

I fount that Y data can be accessed easily by the OpenCL kernel but UV is not. It looks like the OpenCL limitation on the format caused the issue. I searched on web and found that there is Intel extension on this - cl_intel_d3d11_nv12_media_sharing. I checked in the device extension has it supported already.

Can genius of Intel provide some detail usage help or example code on this?

 

Thanks

Regards,

Simon

0 Kudos
1 Reply
Michael_C_Intel1
Moderator
673 Views

Hi SimonL,

 

Does the dx11 interop example for Media SDK on github fit your expectation for accessing the UV data easily?

The dx11 setup is in it's own compilation module... the planar queuing setup is in opencl_filter.cpp.

If you're new to navigating this project... I find examining it within a project/sln structure much easier to understand than navigating modules indiviidually. opencl_filter.cpp is calls down into the different implementations.

If you are looking for generic NV12 format support you may want to see the documentation up on the Khronos registry about the cl_intel_planar_yuv extension... there are some good diagrams there of data layout.

Thanks for the question.

 

-MichaelC

0 Kudos
Reply