[vlc-commits] opengl: rename yuv_coefficients to conv_matrix

Romain Vimont git at videolan.org
Mon Jan 27 17:45:48 CET 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Wed Jan 15 14:51:03 2020 +0100| [9cdac954f16326937d1d631491a4a5018d5be2fe] | committer: Thomas Guillem

opengl: rename yuv_coefficients to conv_matrix

The conversion matrix combines several transformations, it does not
contain "YUV coefficients".

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9cdac954f16326937d1d631491a4a5018d5be2fe
---

 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 2ffd653a4c..b0aeee8cbe 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -135,7 +135,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)
@@ -229,7 +229,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);



More information about the vlc-commits mailing list