Vulkan Tone Mapping
Vulkan tone mapping uses GPU shader processing through Vulkan to adapt a picture to the output brightness range.
A renderer can use Vulkan to submit shader work on a GPU. The shader supplies the picture calculations; Vulkan provides the device, resources, command submission, and synchronization used to execute them.
GPU images and shader synchronization
A decoded picture becomes accessible as the required GPU image or buffer. A rendering library can assemble operations such as source interpretation, color conversion, tone mapping, scaling, and output preparation into shader processing.
The application submits the work and manages when resources can be read or written. A following presentation or encoding operation must wait for the prepared result. These relationships matter when frames are shared with another API or transferred from a decoder using a different memory arrangement.
libplacebo is a rendering-library example with a Vulkan backend. Its image-processing controls sit above Vulkan's lower-level interface. The source/target descriptions, selected curve, and adaptation inputs determine the brightness relationship that its programs perform.
Use the result in either of two contexts
| Consumer of the processed picture | Purpose |
|---|---|
| Display presentation | Prepare the image for an output surface and screen |
| Video encoder | Produce another compressed rendition from processed frames |
FFmpeg's libplacebo filter demonstrates the second use. GPU rendering calculations can be part of a conversion pipeline even when their immediate result is not being drawn to a window.
Vulkan Video decoding is another capability. Running a tone-mapping shader does not imply that the source was decoded using Vulkan Video; an application can support another decoder and the needed upload or resource sharing. The representation and synchronization at that boundary decide whether the pieces can connect efficiently.
Locate a Vulkan message in the Emby path
A renderer's Vulkan-related message describes that renderer's execution route. A separate server transcode can use another filter and API. Start with the playback-path diagram, then identify the application and stage producing the message.
Two routes using Vulkan can choose different image-processing programs, target descriptions, or library versions. Holding those inputs steady is what makes an image comparison meaningful; following the resource handoffs is what makes an execution comparison meaningful.
See Also
- OpenCL Tone Mapping
- CUDA Tone Mapping
- What a Tone-Mapping Curve Controls
- Where Tone Mapping Happens in an Emby Playback Session