Implement support for proper HDR to SDR conversion #1305
Labels
state:Planned
This issue is already scheduled to be worked on
type:Enhancement
New feature or request
This ticket tracks the proper support for processing HDR videos.
When processing HDR videos, the decoded frames could have properties looking like this:
Before the frame can be passed to, say, Real-ESRGAN, it must be converted into an
ncnn::Mat
, which will require converting the 10-bit HDR image into an 8-bit SDR (RGB24) image. Right now,AVFrame
conversions are done through libswscale, which can convert the frame formats, but does not support proper tone-mapping from HDR to SDR. As a result, processing HDR videos will result in color inaccuracies in the output video.Currently, the idea is to use libavformat's
zscale
andtonemap
filters to perform the tone-mapping and format conversion:Please feel free to suggest better ways to implement this feature and discuss about this in this thread if you're familiar with HDR content processing best practices.
The text was updated successfully, but these errors were encountered: