Emby Compared

Tone Mapping Compared

How fast HDR video is tone-mapped to SDR, and how closely the result agrees with the libplacebo reference, across FFmpeg builds and GPUs.

Why compare?

What is compared

HDR video carries more brightness and a wider range of colors than an SDR display can show. Tone mapping decides how highlights, contrast and color are brought into the SDR range. Whenever HDR content is transcoded for an SDR client, this has to happen for every single frame, and different implementations make visibly different choices at very different costs.

These comparisons measure the tone mappers of five FFmpeg builds: the current Emby FFmpeg (2026) and its previous release (2023), Jellyfin FFmpeg, the Plex Transcoder, and FFmpeg 9.0 as released by the FFmpeg project. Each tone mapper runs on the processing it was made for: the CPU, NVIDIA CUDA, OpenCL on Intel and AMD GPUs, or Vulkan.

Sources

Test media

All four sources are original 4K HEVC Main 10 files, one for each HDR signal type. Every run verifies them against pinned checksums.

SignalSourceVideo
HLGIEC broadcast test clip3840×2160, 59.94 fps
HDR10IEC broadcast test clip3840×2160, 59.94 fps
HDR10+HDClub HDR10+ profile B test3840×2160, 23.976 fps
Dolby Vision profile 5Sol Levante (Netflix / Dolby)3840×2160, 24 fps

Performance

How performance is measured

The results show two kinds of performance measurement:

  • Isolated measures the tone mapper on its own. A decoded frame is prepared once, GPU frames are uploaded once, and the frame then passes through the tone mapper many times. Two runs of different length are timed, and their difference gives the cost per frame without startup, decoding, upload or encoding. Dolby Vision metadata changes from scene to scene, so its isolated test cycles through eight frames from different scenes, and the tone mapper also has to follow those changes.
  • Full Transcode measures a complete pipeline: decoding the original 4K video, tone mapping at full resolution, scaling to 720p and encoding H.264. Hardware routes keep the frames on the GPU from the decoder to the encoder.

Why the full transcode is built this way

A single transcode can hide large differences in efficiency. Suppose one tone mapper is just fast enough to barely slow the transcode down, but needs the whole GPU to get there, while another needs only a fraction of those resources. In a single transcode, both look the same. With five transcodes running at once, the second one still keeps up, while the first slows down dramatically, because each transcode now gets only a fifth of the GPU.

Measuring several transcodes in parallel would show this directly, but the results are noisy and hard to reproduce on other systems. These tests use a cleaner, if approximate, approach instead: a single transcode that gives the processing under test as much weight as possible. All processing happens on the original 4K frames, and only the very last step scales them down to 720p. This keeps the encoder's share of the work small, since the encoders are not what is being compared, and the encoders use settings that need as little processing as possible.

Fast GPU tone mappers can still finish a frame well within the time the hardware decoder needs to produce the next one, which would hide their cost behind the decoder. On GPU routes, every decoded frame therefore passes through tone mapping five times, and one of the five continues to the scaler and the encoder. Mapped FPS counts those passes.

Every case uses a fixed workload that is the same on every machine, and each result keeps its FFmpeg command, log and execution graph.

Quality

How quality is compared

Quality results compare each tone mapper's output with libplacebo, which serves as the reference, using the same tone-mapping curve. Keyframes are taken from the same position of each source and compared at the full 4K resolution.

PSNR and SSIM describe how closely each tone mapper agrees with libplacebo. They are agreement scores, not a measure of absolute picture quality: a different curve or gamut mapping can be a deliberate choice. The images can be viewed as originals, as signed differences, or as absolute differences with adjustable gain.

Reproduce the results

Roll your own tests

The public repository reproduces the tone-mapping performance and quality comparisons. Use Windows 10 or 11. The launchers use the Windows PowerShell included with Windows.

The downloadable suite covers Tone Mapping Compared. Tonemap Curves Compared and Subtitle Burn-In Compared are published comparisons and are not part of it.

  1. Clone EmbySupport/ToneMappingCompared, or download and extract a release. When cloning, download the matching binary package from the repository's releases and place its bin folder in the checkout.
  2. Run 01-DownloadTestMedia.cmd to download the source files.
  3. Run 02-Configure.cmd and select your GPUs and FFmpeg paths.
  4. Run 05-RunBenchmarks.cmd for performance and 06-RunQuality.cmd for curve-matched quality.
  5. Open 07-OpenResults.cmd to refresh and view the results. Use 08-ClearResults.cmd to remove generated results and logs before a fresh run.
git clone https://github.com/EmbySupport/ToneMappingCompared.git

Configuration is stored in config/user.json. The local viewer includes skipped and failed routes with their reason and available logs.

Continue