summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-06 00:12:28 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-18 20:25:57 +0200
commit503b1905d9d6d5ffbea69a8335e97605928d4b5b (patch)
tree7601a878c9e26bc4454e5b0d0843fe21ccc9405c
parentdf66d09ecd119206c5a9dc803acba212715075e7 (diff)
Support Rec2020 YUV/RGB conversion.
-rw-r--r--src/lib/image.cc2
-rw-r--r--src/wx/colour_conversion_editor.cc1
2 files changed, 3 insertions, 0 deletions
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<int, dcp::YUVToRGB> 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<int, dcp::YUVToRGB> 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;