[vlc-devel] [PATCH 6/7] opengl: rename yuv_coefficients to conv_matrix

Romain Vimont rom1v at videolabs.io
Wed Jan 22 13:33:48 CET 2020


The conversion matrix combines several transformations, it does not
contain "YUV coefficients".
---
 modules/video_output/opengl/converter.h        | 2 +-
 modules/video_output/opengl/fragment_shaders.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h
index 3e79f1eda3..2d3ec4287b 100644
--- a/modules/video_output/opengl/converter.h
+++ b/modules/video_output/opengl/converter.h
@@ -73,7 +73,7 @@ struct opengl_tex_converter_t
         GLint *pl_vars; /* for pl_sh_res */
     } uloc;
     bool yuv_color;
-    GLfloat yuv_coefficients[16];
+    GLfloat conv_matrix[16];
 
     struct pl_shader *pl_sh;
     const struct pl_shader_res *pl_sh_res;
diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
index efc543e8e1..b8da987840 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -133,7 +133,7 @@ tc_yuv_base_init(opengl_tex_converter_t *tc, vlc_fourcc_t chroma,
 {
     /* The current implementation always converts from limited to full range. */
     const video_color_range_t range = COLOR_RANGE_LIMITED;
-    float *matrix = tc->yuv_coefficients;
+    float *matrix = tc->conv_matrix;
     init_conv_matrix(matrix, yuv_space, range);
 
     if (desc->pixel_size == 2)
@@ -227,7 +227,7 @@ tc_base_prepare_shader(const opengl_tex_converter_t *tc,
 
     if (tc->yuv_color)
         tc->vt->UniformMatrix4fv(tc->uloc.ConvMatrix, 1, GL_FALSE,
-                                 tc->yuv_coefficients);
+                                 tc->conv_matrix);
 
     for (unsigned i = 0; i < interop->tex_count; ++i)
         tc->vt->Uniform1i(tc->uloc.Texture[i], i);
-- 
2.25.0



More information about the vlc-devel mailing list