Color Management: Update for new extended sRGB naming conventions in OCIO

Recognize srgbe_ prefix for interop ID, and edr-video encoding as HDR.

Pull Request: https://projects.blender.org/blender/blender/pulls/147205
This commit is contained in:
Brecht Van Lommel
2025-10-02 17:20:35 +02:00
committed by Brecht Van Lommel
parent 946b3498b3
commit e238970bd9
3 changed files with 4 additions and 4 deletions

View File

@@ -1503,7 +1503,7 @@ bool IMB_colormanagement_space_to_cicp(const ColorSpace *colorspace,
cicp[3] = CICP_RANGE_FULL;
return true;
}
if (ELEM(interop_id, "srgb_p3d65_display", "srgbx_p3d65_display")) {
if (ELEM(interop_id, "srgb_p3d65_display", "srgbe_p3d65_display")) {
/* For video we use BT.709 to match default sRGB writing, even though it is wrong.
* But we have been writing sRGB like this forever, and there is the so called
* "Quicktime gamma shift bug" that complicates things. */

View File

@@ -150,7 +150,7 @@ LibOCIOColorSpace::LibOCIOColorSpace(const int index,
interop_id_ = "srgb_p3d65_display";
}
else if (alias == "displayp3_hdr_display") {
interop_id_ = "srgbx_p3d65_display";
interop_id_ = "srgbe_p3d65_display";
}
else if (alias == "p3d65_display") {
interop_id_ = "g26_p3d65_display";

View File

@@ -114,7 +114,7 @@ LibOCIODisplay::LibOCIODisplay(const int index, const LibOCIOConfig &config) : c
bool view_is_hdr = false;
if (ocio_display_colorspace) {
StringRefNull encoding = ocio_display_colorspace->getEncoding();
view_is_hdr = encoding == "hdr-video";
view_is_hdr = encoding == "hdr-video" || encoding == "edr-video";
is_hdr_ |= view_is_hdr;
}
@@ -155,7 +155,7 @@ LibOCIODisplay::LibOCIODisplay(const int index, const LibOCIOConfig &config) : c
if (display_interop_id.startswith("srgb_")) {
transfer_function = TransferFunction::sRGB;
}
else if (display_interop_id.startswith("srgbx_")) {
else if (display_interop_id.startswith("srgbe_")) {
transfer_function = TransferFunction::ExtendedsRGB;
}
else if (display_interop_id.startswith("pq_")) {