[vlc-commits] opengl: don't use RGB shaders for RGB to RGB conversations

Felix Paul Kühne git at videolan.org
Sun Feb 24 22:49:34 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Feb 24 13:46:59 2013 -0800| [fbf375183ea004886fe55803ed1ac8b6dd2bb764] | committer: Felix Paul Kühne

opengl: don't use RGB shaders for RGB to RGB conversations

This fixes display of RGB* input modules such as screen://

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

 modules/video_output/opengl.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 36a514d..76cfb8f 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -412,8 +412,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
     bool need_fs_yuv = false;
     float yuv_range_correction = 1.0;
 
-    if (max_texture_units >= 3 && supports_shaders &&
-        vlc_fourcc_IsYUV(fmt->i_chroma) && !vlc_fourcc_IsYUV(vgl->fmt.i_chroma)) {
+    if (max_texture_units >= 3 && supports_shaders && vlc_fourcc_IsYUV(fmt->i_chroma)) {
         const vlc_fourcc_t *list = vlc_fourcc_GetYUVFallback(fmt->i_chroma);
         while (*list) {
             const vlc_chroma_description_t *dsc = vlc_fourcc_GetChromaDescription(*list);
@@ -466,14 +465,11 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
     vgl->shader[1] =
     vgl->shader[2] = -1;
     vgl->local_count = 0;
-    if (supports_shaders) {
-        if (need_fs_yuv)
-            BuildYUVFragmentShader(vgl, &vgl->shader[0],
+    if (supports_shaders && vlc_fourcc_IsYUV(fmt->i_chroma)) {
+        BuildYUVFragmentShader(vgl, &vgl->shader[0],
                                    &vgl->local_count,
                                    vgl->local_value,
                                    fmt, yuv_range_correction);
-        else
-            BuildRGBFragmentShader(vgl, &vgl->shader[0]);
         BuildRGBAFragmentShader(vgl, &vgl->shader[1]);
         BuildVertexShader(vgl, &vgl->shader[2]);
 



More information about the vlc-commits mailing list