[FFmpeg-devel] [PATCH] avcodec/dpxenc: support colour metadata in DPX encoder, fixes ticket #6023
Kieran O Leary
kieran.o.leary at gmail.com
Thu Feb 2 00:37:04 EET 2017
Hi James and Carl,
Thanks for getting back to me. It looks like your comments are similar,
though you might be asking to pull the information from different places?
On Wed, Feb 1, 2017 at 5:01 PM, James Almer <jamrial at gmail.com> wrote:
> I may be missing something and apologizes if it was already mentioned, but
> libavcodec already have options for these, color_trc and if i'm reading
> this right colorspace, making use of the AVColorTransferCharacteristic and
> AVColorSpace enums defined in avutil's pixfmt.h header.
> Can't you use them instead?
DPX contains some values that are super-specific to film, such as 'Printing
Density'. I do not see that value in either of those enums but it's a
common value that pops up in film scans.
The larger issue that I see with this approach is that it's an integer that
needs to be written to the 801/802 offsets in the DPX header. So if I want
logarithmic transfer characteristic, 3 needs to be written as the value and
this is interpreted by the decoder. Logarithmic is listed as 9 in
AVColorTransferCharacteristic - but perhaps this is irrelevant and I'm
misunderstanding how pixfmt.h works? Things like 'unspecified video' are
not in those enums either.
Carl Eugen mentioned AvCodecContext but I don't know enough about this to
be able to see if the values as specified by SMPTE will map.
More information about the ffmpeg-devel