[FFmpeg-user] A query on using the OpenCL tonemap filter from derived OpenCL device contexts from VAAPI.

Dennis Mungai dmngaie at gmail.com
Tue Nov 6 04:06:06 EET 2018


Hello there,

>From this patchwork:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/8b8b0e2cd26cf1f522c630859fcbcc62b6493fb9

It should be possible to utilize an OpenCL tonemap filter which does
HDR(HDR10/HLG) to SDR conversion with tone-mapping, as shown in the example
below:

ffmpeg -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device \
opencl=ocl at va -hwaccel vaapi -hwaccel_device va -hwaccel_output_format \
vaapi -i INPUT -filter_hw_device ocl -filter_complex \
'[0:v]hwmap,tonemap_opencl=t=bt2020:tonemap=linear:format=p010[x1]; \
[x1]hwmap=derive_device=vaapi:reverse=1' -c:v hevc_vaapi -profile 2 OUTPUT

However, doing this results in a failure, shown below:

Device creation failed: -38.
Failed to set value 'opencl=ocl at va' for option 'init_hw_device': Function
not implemented

Platform details:

I'm using the Intel Media driver built with the
cl_intel_va_api_media_sharing OpenCL extension enabled. The OpenCL platform
on the system is based on Neo:

fmpeg -hide_banner -v verbose -init_hw_device opencl
[AVHWDeviceContext @ 0x560d50e77140] 0.0: Intel(R) OpenCL HD Graphics /
Intel(R) Gen9 HD Graphics NEO

The Intel Media SDK is also installed, and can use both  QSV and
VAAPI-based encoders in FFmpeg using the media-driver.

How can I fix that issue above?


More information about the ffmpeg-user mailing list