Support Rec2020 YUV/RGB conversion.
authorCarl Hetherington <cth@carlh.net>
Wed, 5 Oct 2022 22:12:28 +0000 (00:12 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Oct 2022 18:25:57 +0000 (20:25 +0200)
src/lib/image.cc
src/wx/colour_conversion_editor.cc

index 2ac84e26c072d754e2a270b40c906e648c65867c..d84755df3d1123242df4b2c948b5ef319e9968bd 100644 (file)
@@ -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)
index b7c054e27468d964c5a836c836b4619659cb8df6..4cc9aaa9e9899011a7df692826c21c49c6a1a743 100644 (file)
@@ -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;