From 503b1905d9d6d5ffbea69a8335e97605928d4b5b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 6 Oct 2022 00:12:28 +0200 Subject: [PATCH] Support Rec2020 YUV/RGB conversion. --- src/lib/image.cc | 2 ++ src/wx/colour_conversion_editor.cc | 1 + 2 files changed, 3 insertions(+) diff --git a/src/lib/image.cc b/src/lib/image.cc index 2ac84e26c..d84755df3 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -240,6 +240,7 @@ Image::crop_scale_window ( EnumIndexedVector lut; lut[dcp::YUVToRGB::REC601] = SWS_CS_ITU601; lut[dcp::YUVToRGB::REC709] = SWS_CS_ITU709; + lut[dcp::YUVToRGB::REC2020] = SWS_CS_BT2020; /* The 3rd parameter here is: 0 -> source range MPEG (i.e. "video", 16-235) @@ -350,6 +351,7 @@ Image::scale (dcp::Size out_size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat out_fo EnumIndexedVector lut; lut[dcp::YUVToRGB::REC601] = SWS_CS_ITU601; lut[dcp::YUVToRGB::REC709] = SWS_CS_ITU709; + lut[dcp::YUVToRGB::REC2020] = SWS_CS_BT2020; /* The 3rd parameter here is: 0 -> source range MPEG (i.e. "video", 16-235) diff --git a/src/wx/colour_conversion_editor.cc b/src/wx/colour_conversion_editor.cc index b7c054e27..4cc9aaa9e 100644 --- a/src/wx/colour_conversion_editor.cc +++ b/src/wx/colour_conversion_editor.cc @@ -118,6 +118,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent, bool yuv) _yuv_to_rgb = new wxChoice (this, wxID_ANY); _yuv_to_rgb->Append (_("Rec. 601")); _yuv_to_rgb->Append (_("Rec. 709")); + _yuv_to_rgb->Append (_("Rec. 2020")); table->Add (_yuv_to_rgb, wxGBPosition (r, 1)); ++r; -- 2.30.2