[PR #11198] fix: use Metal tonemap instead of OpenCL #12783

Closed
opened 2026-02-07 07:01:43 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/jellyfin/jellyfin/pull/11198

State: closed
Merged: Yes


Changes

As discussed in jellyfin/jellyfin-ffmpeg#357, the current OpenCL kernel runs extremely slow on Apple Silicon. This change updates the filter chain to use the Metal implementation of the tone map filter to handle Dolby Vision Profile 5 videos introduced by jellyfin/jellyfin-ffmpeg#369.

For Intel Macs, the OpenCL kernel is not compatible with certain GPUs and we will have the following error:

[AVHWDeviceContext @ 0x7faa2510e200] OpenCL error: [CL_IMAGE_FORMAT_NOT_SUPPORTED] : OpenCL Error : clCreateImage failed: The specified format is not supported for the specified image type.
[Parsed_tonemap_opencl_5 @ 0x7faa2510b940] Failed to create image for dither matrix: -10.

We need the Metal kernel to properly support Intel Macs.

Issues

**Original Pull Request:** https://github.com/jellyfin/jellyfin/pull/11198 **State:** closed **Merged:** Yes --- <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> As discussed in jellyfin/jellyfin-ffmpeg#357, the current OpenCL kernel runs extremely slow on Apple Silicon. This change updates the filter chain to use the Metal implementation of the tone map filter to handle Dolby Vision Profile 5 videos introduced by jellyfin/jellyfin-ffmpeg#369. For Intel Macs, the OpenCL kernel is not compatible with certain GPUs and we will have the following error: ``` [AVHWDeviceContext @ 0x7faa2510e200] OpenCL error: [CL_IMAGE_FORMAT_NOT_SUPPORTED] : OpenCL Error : clCreateImage failed: The specified format is not supported for the specified image type. [Parsed_tonemap_opencl_5 @ 0x7faa2510b940] Failed to create image for dither matrix: -10. ``` We need the Metal kernel to properly support Intel Macs. **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # -->
OVERLORD added the pull-request label 2026-02-07 07:01:43 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#12783