[vlc-commits] opengl: converter: handle packed yuv

Thomas Guillem git at videolan.org
Thu Feb 16 14:34:09 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Feb 16 11:00:37 2017 +0100| [ac24598ce274a45d94fd27d49fc46ec65b6e32a9] | committer: Thomas Guillem

opengl: converter: handle packed yuv

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

 modules/video_output/opengl/converters.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/modules/video_output/opengl/converters.c b/modules/video_output/opengl/converters.c
index 51b1cf2..6f8c3b3 100644
--- a/modules/video_output/opengl/converters.c
+++ b/modules/video_output/opengl/converters.c
@@ -193,6 +193,31 @@ tc_yuv_base_init(opengl_tex_converter_t *tc, GLenum tex_target,
             swizzle_per_tex[1] = "xa";
         }
     }
+    else if (desc->plane_count == 1)
+    {
+        tc->tex_count = 1;
+        tc->texs[0] = (struct opengl_tex_cfg) {
+            { 1, 1 }, { 1, 1 }, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE
+        };
+        switch (chroma)
+        {
+            case VLC_CODEC_UYVY:
+                swizzle_per_tex[0] = "gbr";
+                break;
+            case VLC_CODEC_YUYV:
+                swizzle_per_tex[0] = "rgb";
+                break;
+            case VLC_CODEC_VYUY:
+                swizzle_per_tex[0] = "bgr";
+                break;
+            case VLC_CODEC_YVYU:
+                swizzle_per_tex[0] = "rbg";
+                break;
+            default:
+                assert(!"missing chroma");
+                return VLC_EGENERIC;
+        }
+    }
     else
         return VLC_EGENERIC;
 



More information about the vlc-commits mailing list