" gl_FragColor = vec4(r, g, b, 1.0);\n"
"}\n";
+ //it works on nvidia+linux but
+ //there is a bug on ATI+win32 (I think only ATI)
+ //and the follwing 3 lines:
+ //" y=texture2DRect(Ytex,nxy).r;\n"
+ //" u=texture2DRect(Utex,nxy*0.5).r;\n"
+ //" v=texture2DRect(Vtex,nxy*0.5).r;\n"
+ //has to be replaced by :
+ //" y=texture2DRect(Ytex,nxy0.5).r;\n"
+ //" u=texture2DRect(Utex,nxy).r;\n"
+ //" v=texture2DRect(Vtex,nxy*0.5).r;\n"
+ //
+ //so we have to set a display->hardware (ATI/ NVIDIA)
+ //and check it etc...
display->text_shader_upload_I420_YV12 =
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect Ytex,Utex,Vtex;\n"
gchar string_size[512];
GQueue* sub_texture_pool = NULL;
-
+
sprintf (string_size, "%dx%d", width, height);
sub_texture_pool = g_datalist_get_data(&display->texture_pool, string_size);
//if the size is known
gchar string_size[512];
GQueue* sub_texture_pool = NULL;
GstGLDisplayTex* tex = NULL;
-
+
sprintf (string_size, "%dx%d", width, height);
sub_texture_pool = g_datalist_get_data(&display->texture_pool, string_size);
//if the size is known
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:
offsetU = 2;
offsetV = 1;
known issues:
- - gst-launch-0.10 videotestsrc ! glupload ! gldownload ! glimagesink
- (or glcolorspace instead of glupload ! gldownload)
- -> crash on linux when stopping (num_buffers=N or after clicking on the window cross)
- (was working on win32)
- (gst-launch-0.10 videotestsrc ! glupload ! gldownload ! glupload ! gldownload ! glupload ! gldownload ! ximagesink
- crash when stopping)
- (but not gst-launch-0.10 videotestsrc ! glupload ! gldownload ! glupload ! gldownload ! ximagesink)
- log: ( Définition du pipeline à READY (prêt)...
- Context 1 destroyed
- Définition du pipeline à NULL...
- Caught SIGSEGV accessing address 0x40 )
-
- - gst-launch-0.10 videotestsrc ! tee name=t t. ! queue ! glimagesink t. ! queue ! glimagesink t. ! queue ! glimagesink
- -> crash on linux when stopping (was working on win32 too)
- It look likes it's related to the first issue.
-
- gst-launch-0.10 videotestsrc ! "video/x-raw-yuv, format=(fourcc)YV12" ! glimagesink
- -> wrong color on linux (it look likes it uses text_shader_upload_I420 instead of YV12)
- (I remember it was working on win32, so maybe we have made a regression)
+ -> wrong color on linux
+ ok it comes from hardware, it seems that on ati+win32 it works,
+ but on nvidia+linux we do not need to make a disctinction between I420 and YV12
+ (see comments in gst/gl/gstgldisplay.c line 256 and line 2426)