]> git.sesse.net Git - ffmpeg/commit
avformat/movenc: use enum values directly for colr atom
authorMichael Bradshaw <mjbshaw@google.com>
Tue, 31 Mar 2020 15:36:31 +0000 (09:36 -0600)
committerMichael Bradshaw <mjbshaw@google.com>
Mon, 13 Apr 2020 15:46:07 +0000 (09:46 -0600)
commitb1699f4ac38cedef79f565ba3b8f9fdec952f412
treed86251c3298b94f81bfd990e59e839954e97ebbd
parent70f866ad1ba6737d9a1a79d2531412ca91687ba1
avformat/movenc: use enum values directly for colr atom

The switch cases were missing:

  - Primaries: bt470m, film, smpte428, and ebu3213.
  - TRCs: gamma22, gamma28, linear, log, log_sqrt, iec61966_2_4, bt1361,
    iec61966_2_1, bt2020_10bit, and bt2020_12bit.
  - Space: rgb, fcc, ycgco, bt2020_cl, smpte2085, chroma-derived-nc,
    chroma-derived-c, and ictcp.

They also annoyingly remapped the following (which are functionally
equivalent but can be treated differently by clients):

  - smpte240m primaries to smpte170m.
  - smpte170m TRC to bt709.
  - bt470bg color space to smpte170m.

The enum values in FFmpeg are the same values as ITU-T H.273 and
ISO/IEC 23001-8 so we can just use them directly, which is both simpler
and preserves the user intent.

Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
libavformat/movenc.c