[Cin] "color hell"

Andrew Randrianasulu randrianasulu at gmail.com
Tue Jul 13 20:17:54 CEST 2021


On Tuesday, July 13, 2021, Phyllis Smith via Cin <cin at lists.cinelerra-gg.org>
wrote:

> Not so sure about that after running more tests.
> Using 601Pal, mediainfo reports BT.601.
> Using 601Ntsc, medinao reports BT.709 !!
> As always, have to make sure old projects still work.
>


its called color hell for this exact reason)

may be mediainfo a bit wrong (at least ver. you used - shoukd be recent on
Fedora, but small fixes like this can go in anytime...)

see confusing code at (should be recent enough from 2020)

https://sourceforge.net/p/mediainfo/discussion/297610/thread/0b6d2fd38f/?limit=25

=====

ha.

//---------------------------------------------------------------------------
extern const char* Mpegv_colour_primaries(int8u colour_primaries)
{
    switch (colour_primaries)
    {
        case 1 : return "BT.709";
        case 4 : return "BT.470 System M";
        case 5 : return "BT.601 PAL";
        case 6 : return "BT.601 NTSC";
        case 7 : return "SMPTE 240M"; //Same as BT.601 NTSC
        case 8 : return "Generic film";
        case 9 : return "BT.2020"; //Added in HEVC
        case 10 : return "XYZ"; //Added in HEVC 2014
        case 11 : return "DCI P3"; //Added in HEVC 2016
        case 12 : return "Display P3"; //Added in HEVC 2016
        case 22 : return "EBU Tech 3213"; //Added in HEVC 2016
        default : return "";
    }
}

//---------------------------------------------------------------------------
extern const char* Mpegv_transfer_characteristics(int8u
transfer_characteristics)
{
    switch (transfer_characteristics)
    {
        case 1 : return "BT.709"; //Same as BT.601
        case 4 : return "BT.470 System M";
        case 5 : return "BT.470 System B/G";
        case 6 : return "BT.601";
        case 7 : return "SMPTE 240M";
        case 8 : return "Linear";
        case 9 : return "Logarithmic (100:1)"; //Added in MPEG-4 Visual
        case 10 : return "Logarithmic (316.22777:1)"; //Added in MPEG-4
Visual
        case 11 : return "xvYCC"; //Added in AVC
        case 12 : return "BT.1361"; //Added in AVC
        case 13 : return "sRGB/sYCC"; //Added in HEVC
        case 14 : return "BT.2020 (10-bit)"; //Same a BT.601 //Added in
HEVC, 10/12-bit difference is in ISO 23001-8
        case 15 : return "BT.2020 (12-bit)"; //Same a BT.601 //Added in
HEVC, 10/12-bit difference is in ISO 23001-8
        case 16 : return "PQ"; //Added in HEVC 2015
        case 17 : return "SMPTE 428M"; //Added in HEVC 2015
        case 18 : return "HLG"; //Added in HEVC 2016
        default : return "";
    }
}

//---------------------------------------------------------------------------
extern const char* Mpegv_matrix_coefficients(int8u matrix_coefficients)
{
    switch (matrix_coefficients)
    {
        case 0 : return "Identity"; //Added in AVC
        case 1 : return "BT.709";
        case 4 : return "FCC 73.682";
        case 5 : return "BT.470 System B/G";
        case 6 : return "BT.601"; //Same as BT.470 System B/G
        case 7 : return "SMPTE 240M";
        case 8 : return "YCgCo"; //Added in AVC
        case 9 : return "BT.2020 non-constant"; //Added in HEVC
        case 10 : return "BT.2020 constant"; //Added in HEVC
        case 11 : return "Y'D'zD'x"; //Added in HEVC 2016
        case 12 : return "Chromaticity-derived non-constant"; //Added in
HEVC 2016
        case 13 : return "Chromaticity-derived constant"; //Added in HEVC
2016
        case 14 : return "ICtCp"; //Added in HEVC 2016
        default : return "";
    }
}

=====

note _transfer characteristics_ #1 said to be the same for bt. 709 and #6
bt. 601! (in comment)

can you post full mediainfo output for input video, and three other videos:
unmodded Cin, modded and  set to BT601 NTSC, set to BT601 pal?


>
> On Mon, Jul 12, 2021 at 2:26 PM Andrew Randrianasulu via Cin <
> cin at lists.cinelerra-gg.org> wrote:
>
>> According to
>>
>> https://kdenlive.org/en/project/color-hell-ffmpeg-
>> transcoding-and-preserving-bt-601/
>>
>> bt 601 pal and bt 601 ntsc are  slightly different, I tried to update
>> CinGG's definitions so now she have two distinct 601 colorspaces, but I
>> still can be wrong (esp on kr, kb coeffecients)
>>
>> can anyone test patch 3 and see if it makes any positive difference?
>>
>>
>> --
>> Cin mailing list
>> Cin at lists.cinelerra-gg.org
>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210713/55351c95/attachment.htm>


More information about the Cin mailing list