1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/exr: tag gamma=1.0 output as linear light

By default the OpenEXR decoder outputs linear light pixel data by
applying a gamma=1.0 transfer (i.e. a no-op). When it does so, it
should tag the data as linear so color-managed filters or other tools
can work with it correctly.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
This commit is contained in:
Leo Izen 2023-08-16 00:54:36 -04:00
parent 9ae4863cc5
commit 7098bec73b
No known key found for this signature in database
GPG Key ID: 5A71C331FD2FA19A

View File

@ -2088,6 +2088,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
if (s->apply_trc_type != AVCOL_TRC_UNSPECIFIED)
avctx->color_trc = s->apply_trc_type;
else if (s->gamma > 0.9999f && s->gamma < 1.0001f)
avctx->color_trc = AVCOL_TRC_LINEAR;
switch (s->compression) {
case EXR_RAW: