This actually marks up the buffers as having the state given by the applied trc,
Kevin On Tue, Sep 1, 2015 at 12:04 PM, Kevin Wheatley <kevin.j.wheat...@gmail.com> wrote: > This adds the actual usage and allows for command lines similar to this: > > ffmpeg -apply_trc bt709 -i linear.exr bt709.png > ffmpeg -apply_trc smpte2084 -i linear.exr smpte2084.png > ffmpeg -apply_trc iec61966_2_1 -i linear.exr sRGB.png > > > Which assuming the correct primaries in the linear OpenEXR file will > generate the appropriate file. > > Kevin
From 0e6bd2437146dafef0e6a89c9db378ba534211bd Mon Sep 17 00:00:00 2001 From: Kevin Wheatley <kevin.j.wheat...@gmail.com> Date: Tue, 1 Sep 2015 12:35:55 +0100 Subject: [PATCH 7/7] Mark up the decoded buffer as the appropriate transfer characteristic when applying one --- libavcodec/exr.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 8794da5..92f528a 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1308,6 +1308,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, av_log(avctx, AV_LOG_ERROR, "Missing channel list.\n"); return AVERROR_INVALIDDATA; } + + if (s->apply_trc_type != AVCOL_TRC_UNSPECIFIED) + avctx->color_trc = s->apply_trc_type; switch (s->compression) { case EXR_RAW: -- 1.7.1
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel