[vlc-devel] [PATCH 02/11] vout/opengl: remove unused vgl->local_count

Thomas Guillem thomas at gllm.fr
Wed Dec 14 17:16:07 CET 2016


This is not used anymore.
---
 modules/video_output/opengl/vout_helper.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index cbae13a..4846cab 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -144,7 +144,6 @@ struct vout_display_opengl_t {
     /* One YUV fragment shader and/or one RGBA fragment shader and
      * one vertex shader */
     GLint      shader[3];
-    int        local_count;
     GLfloat    local_value[16];
 
     /* Index of main picture program */
@@ -286,7 +285,6 @@ static void BuildVertexShader(vout_display_opengl_t *vgl,
 
 static void BuildYUVFragmentShader(vout_display_opengl_t *vgl,
                                    GLint *shader,
-                                   int *local_count,
                                    GLfloat *local_value,
                                    const video_format_t *fmt,
                                    float yuv_range_correction)
@@ -359,11 +357,8 @@ static void BuildYUVFragmentShader(vout_display_opengl_t *vgl,
         /* We place coefficient values for coefficient[4] in one array from matrix values.
            Notice that we fill values from top down instead of left to right.*/
         for (int j = 0; j < 4; j++)
-            local_value[*local_count + i*4+j] = j < 3 ? correction * matrix[j*4+i]
-                                                      : 0.f;
+            local_value[i*4+j] = j < 3 ? correction * matrix[j*4+i] : 0.f;
     }
-    (*local_count) += 4;
-
 
     *shader = vgl->CreateShader(GL_FRAGMENT_SHADER);
     vgl->ShaderSource(*shader, 1, (const char **)&code, NULL);
@@ -657,7 +652,6 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
     vgl->shader[0] =
     vgl->shader[1] =
     vgl->shader[2] = -1;
-    vgl->local_count = 0;
     unsigned nb_shaders = 0;
     int vertex_shader_idx = -1, fragment_shader_idx = -1,
         rgba_fragment_shader_idx = -1;
@@ -671,8 +665,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
     {
         fragment_shader_idx = nb_shaders++;
         BuildYUVFragmentShader(vgl, &vgl->shader[fragment_shader_idx],
-                               &vgl->local_count, vgl->local_value, fmt,
-                               yuv_range_correction);
+                               vgl->local_value, fmt, yuv_range_correction);
     }
 
     rgba_fragment_shader_idx = nb_shaders++;
-- 
2.10.2



More information about the vlc-devel mailing list