[FFmpeg-devel] [PATCH] avcodec/exr: add cineon lin2log trc

Mark Reid mindmark at gmail.com
Fri Mar 6 21:33:01 EET 2020


On Fri, Mar 6, 2020 at 5:03 AM Kevin Wheatley <kevin.j.wheatley at gmail.com>
wrote:

> On Fri, Mar 6, 2020 at 10:19 AM Hendrik Leppkes <h.leppkes at gmail.com>
> wrote:
> > AVColorTransferCharacteristic should follow ISO/IEC 23001-8 and its
> > following standards (ISO/IEC 23091 I believe). Not sure we have a
> > solution for specialized variants, but adding one right there would
> > collide with the next addition to the standard...
>
> Agreed, A publicly "aligned twin text" version is available as ITU-T
> H.273 https://www.itu.int/rec/T-REC-H.273-201612-I/en shows that value
> is 'reserved'.
>
>
Agreed, it felt wrong about adding it where I did, but it was the quickest
way illustrate what I was trying
to do.

I would also suggest that there are a few implementations of the
> Cineon log to lin conversion and as such I'd reject it as is.
> You will need to pass in the parameters for the various variables
> white, black etc. You will also need to add a parameter for the
> density per code value constant (0.002 by default convention).
> Not all implementations use a gain scaling, though strictly these are
> no longer "Cineon" per se, but you will end up with needing various
> camera vendor equivalents. This would result in a large proliferation
> of equations, which I don't believe are core to the FFmpeg code.
>
>
Agreed and this all could also really be done with a 1dlut video filter but
the real issue I'm working around is that the
current float->int conversion happens in the exr codec. The currently
available apply_trc options clamp at 1.0f (unless I'm mistaken).
The full linear range is need to do any logarithmic conversion.

I was also thinking ACEScc or ACEScct might be more appropriate instead of
cineon.
http://j.mp/S-2014-003
http://j.mp/S-2016-001

I also thought of just adding a float pixel format output option to exr
sounded like a lot of work and I didn't know where to begin.


> You would perhaps be better creating a specialist filter and
> implementing it using OCIO (as suggested
> https://github.com/AcademySoftwareFoundation/tac/tree/master/gsoc), or
> extending the current 3D LUT code to read Cinespace or other 3D LUT
> formats that support a pre-shaper and handle the float->integer
> conversion that way.
>

I currently do have a workflow that does something similar to that, but it
slower and involves more steps :)


>
> Kevin
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list