[vlc-commits] opengl: use interop for rgb_base_init()

Romain Vimont git at videolan.org
Mon Jan 13 11:44:13 CET 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Fri Nov 29 15:59:20 2019 +0100| [c09aba256db8e24f480ddbccaa685b6d8c34cfe6] | committer: Thomas Guillem

opengl: use interop for rgb_base_init()

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

 modules/video_output/opengl/fragment_shaders.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
index ac60ea9888..89499e6847 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -311,11 +311,10 @@ tc_yuv_base_init(opengl_tex_converter_t *tc, vlc_fourcc_t chroma,
 }
 
 static int
-tc_rgb_base_init(opengl_tex_converter_t *tc, GLenum tex_target,
-                 vlc_fourcc_t chroma)
+interop_rgb_base_init(struct vlc_gl_interop *interop, GLenum tex_target,
+                      vlc_fourcc_t chroma)
 {
     (void) tex_target;
-    struct vlc_gl_interop *interop = &tc->interop;
 
     switch (chroma)
     {
@@ -326,7 +325,7 @@ tc_rgb_base_init(opengl_tex_converter_t *tc, GLenum tex_target,
             };
             break;
         case VLC_CODEC_BGRA: {
-            if (GetTexFormatSize(tc->vt, tex_target, GL_BGRA, GL_RGBA,
+            if (GetTexFormatSize(interop->vt, tex_target, GL_BGRA, GL_RGBA,
                                  GL_UNSIGNED_BYTE) != 32)
                 return VLC_EGENERIC;
             interop->texs[0] = (struct vlc_gl_tex_cfg) {
@@ -546,7 +545,7 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target,
             ret = tc_yuv_base_init(tc, chroma, desc, yuv_space, &yuv_swap_uv);
     }
     else
-        ret = tc_rgb_base_init(tc, tex_target, chroma);
+        ret = interop_rgb_base_init(&tc->interop, tex_target, chroma);
 
     if (ret != VLC_SUCCESS)
         return 0;



More information about the vlc-commits mailing list