[FFmpeg-devel] [PATCH 2/2] libavcodec/dpxenc: change transfer/primaries to BT.709
Валерий Заподовников
val.zapod.vz at gmail.com
Tue May 25 21:59:29 EEST 2021
So, apparently two such patches were done before but not pushed (even
written by Paul, see patch 22747, it will supersede mine). I think at the
very least you must rename "linear colorimetric" BS, because there is no
such thing in the standard and it is not even defined for 2. Also one
little fact: ffplay does not support linear transfer (while mpv does). But
it does not mean you should use linear transfer on things that cannot be
linear (unless you actually select AVCOL_TRC_LINEAR), LOL, because that
will destroy colors in mpv! But whatever: ffplay does not even support some
combinations of BT.601 matrix and says that SMPTE 270M matrix is the same
as BT.601, while actually it is derived from SMPTE 170M/270M primaires and
white point! Hilarious. I also do not really wanna play with your FATE
system, maybe somebody can change metadata hashes of fate for me in Paul's
patch? I can also see that patchwork actions no longer print diff for fate
hashes, which is unfortunate (it did though print them before, like in that
patch).
Also FATE has samples without linear transfer, for example, as can be seen
in mediainfo's MediaTrace cyan.dpx uses value 3 for transfer which is new
"logarithmic" transfer (not sure it is the same as in ITU-T H.273's
though). Get rid of it. Now, lena_4x_concat.dpx uses linear transfer and is
oversaturated in mpv, get rid of it too (it is produced by ffmpeg for sure
as it has 2 as color primaries but that is a wrong value).
And lighthouse_rgb48.dpx was created by some very old version of
ImageMagick.
P.S. Paul's patch is almost perfect. Indeed AVCOL_PRI_SMPTE240M is the same
as AVCOL_PRI_SMPTE170M and thus it is the same value as in the SMPTE 268M
standard: i.e. value 9. No, ITU-R 601-5 system M (525) is NTSC 1953 with
Illuminant C and is actually defined in BT.470, you know that one BT.601
matrix was derived from! LOL. Now with GAMMA22 (which is actually real 2.2
(563/256) only in Adobe RGB 1998) it is System M actually, so should return
8. Also add AVCOL_TRC_GAMMA28 and return System B, G (value 7).
More information about the ffmpeg-devel
mailing list