jellyfin / jellyfin-ffmpeg

FFmpeg for Jellyfin
https://jellyfin.org
Other
438 stars 119 forks source link

[5.1] Sync intel D3D11VA textures before mapping to OpenCL #275

Closed nyanmisaka closed 10 months ago

nyanmisaka commented 10 months ago

Changes

Issues clEnqueueAcquireD3D11ObjectsKHR() on intel NEO runtime is not enough to synchronize D3D11 textures, especially when the source comes from DXVA decoder or video processor.

This violates one OpenCL spec since the cl_khr_d3d11_sharing extension claimed that the driver is responsible for providing the synchronization guarantee if user set CL_CONTEXT_INTEROP_USER_SYNC=0 on context creation.

So implement functions to manually synchronize it.

image