[210/906] get ride of a wrong color on nvidia/linux when converting yv12 to rgb throu...
authorjulien User <julien@ubuntu.ubuntu-domain>
Sun, 24 Aug 2008 14:33:26 +0000 (16:33 +0200)
committerMatthew Waters <ystreet00@gmail.com>
Sat, 15 Mar 2014 17:36:27 +0000 (18:36 +0100)
gst-libs/gst/gl/gstgldisplay.c

index cc63f7d..b70c0ff 100644 (file)
@@ -2493,12 +2493,13 @@ gst_gl_display_thread_do_upload_fill (GstGLDisplay *display)
       offsetU = 1;
       offsetV = 2;
       break;
-    //it works on ati+win32 but we have to use the same offset as
-    //I420 on nvidia + linux (I mean offsetU = 1; offsetV = 2;)
-    //So we have to set a display->hardware (ATI o/ NVIDIA) and
-    //etc...
     case GST_VIDEO_FORMAT_YV12:
-
+      //WIN32
+#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
+      offsetU = 2;
+      offsetV = 1;
+      //LINUX
+#elseif
       if (g_ascii_strncasecmp ("ATI", (gchar *) glGetString (GL_VENDOR), 3) == 0)
       {
         offsetU = 2;
@@ -2509,6 +2510,7 @@ gst_gl_display_thread_do_upload_fill (GstGLDisplay *display)
         offsetU = 1;
         offsetV = 2;
       }
+#endif
       break;
     default:
       g_assert_not_reached ();