From: Sebastian Wick <sebastian.wick@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: "Pekka Paalanen" <ppaalanen@gmail.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Joshua Ashton" <joshua@froggi.es>,
"Xaver Hugl" <xaver.hugl@gmail.com>
Subject: Colorspace "Default" and the CTA-861 spec
Date: Fri, 1 Mar 2024 00:26:05 +0100 [thread overview]
Message-ID: <20240229232605.GC166694@toolbox> (raw)
Hey all,
I was trying to document the Colorspace property variants with what the
sink expects, what kind of data the CRTC should be configured to
produce, and what drivers must guarantee. I tried to stick to CTA-861-I
for this exercise and after more than an hour to get the "Default"
variant right, I gave up and now I'm writing this mail.
There are actually 4 distinct parameters that have to be known: the
colorimetry (primaries and white point), the transfer characteristics,
the YCbCr conversion matrix and the quantization level.
Section 5.1 has two paragraphs talking about the default color space
(which should imply the rest of the parameters). For IT formats, and CE
formats in some situations "the RGB color space used should be the RGB
color space the Sink declares in the Basic Display Parameters and
Features Block of its EDID". For sinks that accept YCbCr data and
InfoFrames, CE formats default to other color spaces. They do support
setting InfoFrames though and thus can set Y2=Y1=Y0=0 and force the sink
into accepting RGB (Table 18) and set C1=C0=0 for Colorimetry RGB. Foote
a helpfully notes that this is the colorimetry declared in the EDID.
Now, the first obvious issue is that none of that defines the YCbCr
matrix to be used. It is entirely undefined. If drivers use an YCbCr
output format, user space gets undefined behavior.
The second issue is the transfer characteristics. Section 5.3 defines
the transfer characteristics when a specific color space is selected. If
the colorimetry is RGB then the BT.709 transfer characteristics are used
(and not the gamma from the EDID) whereas the default color space as
defined in 5.1 seems to point to the EDID even for gamma.
That would means depending on if we have an IT mode or a CE mode with a
sink that supports YCbCr and InfoFrames, the default transfer
characteristics could be different. User space would have to figure all
of that out to know which transfer characteristics it should use.
Is the spec just wrong here?
There also is the "defaultRGB" colorimetry. This one actually clearly
defines that the sink shall expect data with the colorimetry and gamma
from the EDID. It seems to have been added in CTA-861-I so support for
it is basically non-existent.
So what should we do? To me it seems almost impossible to define
anything useful for the "Default" property variant, but because the
"defaultRGB" colorimetry is not supported at all right now, making
"Default" undefined means we can't get predictable colors on almost all
displays.
Cheers,
Sebastian
reply other threads:[~2024-02-29 23:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240229232605.GC166694@toolbox \
--to=sebastian.wick@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=joshua@froggi.es \
--cc=ppaalanen@gmail.com \
--cc=ville.syrjala@linux.intel.com \
--cc=xaver.hugl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.