74fcb10 removed the Mesa/Rusticl ICD on the assumption that Jellyfin
would then fall back to CPU tone-mapping on its own. It does not --
it selects the tone-map filter from ffmpeg's compiled-in filter list,
not from which hw devices actually exist, so it kept emitting
tonemap_opencl and ffmpeg died at -init_hw_device with "No such
device". That broke every HDR transcode.
Do the substitution in the wrapper instead, which already exists to
patch up Jellyfin's arg generation: drop the opencl device, repoint
-filter_hw_device at va, and rewrite the filter chain to tonemapx.
tonemapx takes the same option names as tonemap_opencl so the options
carry over unchanged, and it outputs software frames in the target
format, so the trailing hwdownload,format= pair is dropped.
Verified against the exact chain Jellyfin emits for Rent (2005):
ffmpeg exits 0 and the tonemapx path measured 1.84x vs 1.41x for the
OpenCL one, with no black-frame dropouts.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>