From: Carl Hetherington Date: Mon, 17 Oct 2022 20:46:48 +0000 (+0200) Subject: Clarify RGB fragment type as being for Rec709/sRGB primaries. X-Git-Tag: v2.16.31~8^2~1 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=0a3bcd6e5f5243df76b3440dcd6a47092668946b Clarify RGB fragment type as being for Rec709/sRGB primaries. --- diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index f8c97ba14..16b01d25c 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -197,7 +197,7 @@ static constexpr char fragment_source[] = /* type = 0: draw outline content rectangle * type = 1: draw crop guess rectangle * type = 2: draw XYZ image - * type = 3: draw RGB image + * type = 3: draw RGB image (with sRGB/Rec709 primaries) * See FragmentType enum below. */ "uniform int type = 0;\n" @@ -288,7 +288,7 @@ enum class FragmentType OUTLINE_CONTENT = 0, CROP_GUESS = 1, XYZ_IMAGE = 2, - RGB_IMAGE = 3, + REC709_IMAGE = 3, }; @@ -539,11 +539,11 @@ GLVideoView::draw () glBindVertexArray(_vao); check_gl_error ("glBindVertexArray"); - glUniform1i(_fragment_type, static_cast(_optimise_for_j2k ? FragmentType::XYZ_IMAGE : FragmentType::RGB_IMAGE)); + glUniform1i(_fragment_type, static_cast(_optimise_for_j2k ? FragmentType::XYZ_IMAGE : FragmentType::REC709_IMAGE)); _video_texture->bind(); glDrawElements (GL_TRIANGLES, indices_video_texture_number, GL_UNSIGNED_INT, reinterpret_cast(indices_video_texture_offset * sizeof(int))); if (_have_subtitle_to_render) { - glUniform1i(_fragment_type, static_cast(FragmentType::RGB_IMAGE)); + glUniform1i(_fragment_type, static_cast(FragmentType::REC709_IMAGE)); _subtitle_texture->bind(); glDrawElements (GL_TRIANGLES, indices_subtitle_texture_number, GL_UNSIGNED_INT, reinterpret_cast(indices_subtitle_texture_offset * sizeof(int))); }