summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-07-12 14:26:58 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-07-12 14:26:58 +0200
commitc83cd140b421809bf4d108bbb72100c19209ffcf (patch)
tree3a6fa15c8f7c6bf2be2e45faf75184e8491ee439
parent81641a5178d263e43f113fd240bd03d5b8012194 (diff)
gl: Constify YUV conversion shaders
-rw-r--r--gst-libs/gst/gl/gstgldownload.c14
-rw-r--r--gst-libs/gst/gl/gstglupload.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/gst-libs/gst/gl/gstgldownload.c b/gst-libs/gst/gl/gstgldownload.c
index dcd39c9..b238222 100644
--- a/gst-libs/gst/gl/gstgldownload.c
+++ b/gst-libs/gst/gl/gstgldownload.c
@@ -81,7 +81,7 @@ static void _do_download_draw_yuv_gles2 (GstGLDisplay * display,
#if GST_GL_HAVE_OPENGL
/* YUY2:y2,u,y1,v
UYVY:v,y1,u,y2 */
-static gchar *text_shader_YUY2_UYVY_opengl =
+static const gchar *text_shader_YUY2_UYVY_opengl =
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect tex;\n"
RGB_TO_YUV_COEFFICIENTS
@@ -103,7 +103,7 @@ static gchar *text_shader_YUY2_UYVY_opengl =
" gl_FragColor=vec4(%s);\n"
"}\n";
-static gchar *text_shader_I420_YV12_opengl =
+static const gchar *text_shader_I420_YV12_opengl =
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect tex;\n"
"uniform float w, h;\n"
@@ -126,7 +126,7 @@ static gchar *text_shader_I420_YV12_opengl =
" gl_FragData[2] = vec4(v, 0.0, 0.0, 1.0);\n"
"}\n";
-static gchar *text_shader_AYUV_opengl =
+static const gchar *text_shader_AYUV_opengl =
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect tex;\n"
RGB_TO_YUV_COEFFICIENTS
@@ -148,7 +148,7 @@ static gchar *text_shader_AYUV_opengl =
#endif /* GST_GL_HAVE_OPENGL */
#if GST_GL_HAVE_GLES2
-static gchar *text_shader_YUY2_UYVY_gles2 =
+static const gchar *text_shader_YUY2_UYVY_gles2 =
"precision mediump float;\n"
"varying vec2 v_texCoord;\n"
"uniform sampler2D tex;\n"
@@ -176,7 +176,7 @@ static gchar *text_shader_YUY2_UYVY_gles2 =
*/
#define text_shader_I420_YV12_gles2 NULL
-static gchar *text_shader_AYUV_gles2 =
+static const gchar *text_shader_AYUV_gles2 =
"precision mediump float;\n"
"varying vec2 v_texCoord;\n"
"uniform sampler2D tex;\n"
@@ -195,7 +195,7 @@ static gchar *text_shader_AYUV_gles2 =
" gl_FragColor=vec4(1.0,y,u,v);\n"
"}\n";
-static gchar *text_vertex_shader_gles2 =
+static const gchar *text_vertex_shader_gles2 =
"attribute vec4 a_position; \n"
"attribute vec2 a_texCoord; \n"
"varying vec2 v_texCoord; \n"
@@ -205,7 +205,7 @@ static gchar *text_vertex_shader_gles2 =
" v_texCoord = a_texCoord; \n"
"} \n";
-static gchar *text_shader_RGB_gles2 =
+static const gchar *text_shader_RGB_gles2 =
"precision mediump float; \n"
"varying vec2 v_texCoord; \n"
"uniform sampler2D s_texture; \n"
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
index 89dbbe3..a4fd222 100644
--- a/gst-libs/gst/gl/gstglupload.c
+++ b/gst-libs/gst/gl/gstglupload.c
@@ -79,7 +79,7 @@ static void _do_upload_draw_gles2 (GstGLDisplay * display,
#if GST_GL_HAVE_OPENGL
/* YUY2:r,g,a
UYVY:a,b,r */
-static gchar *text_shader_YUY2_UYVY_opengl =
+static const gchar *text_shader_YUY2_UYVY_opengl =
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect Ytex, UVtex;\n"
YUV_TO_RGB_COEFFICIENTS
@@ -100,7 +100,7 @@ static gchar *text_shader_YUY2_UYVY_opengl =
/* ATI: "*0.5", ""
normal: "", "*0.5" */
-static gchar *text_shader_I420_YV12_opengl =
+static const gchar *text_shader_I420_YV12_opengl =
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect Ytex,Utex,Vtex;\n"
YUV_TO_RGB_COEFFICIENTS
@@ -118,7 +118,7 @@ static gchar *text_shader_I420_YV12_opengl =
" gl_FragColor=vec4(r,g,b,1.0);\n"
"}\n";
-static gchar *text_shader_AYUV_opengl =
+static const gchar *text_shader_AYUV_opengl =
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect tex;\n"
YUV_TO_RGB_COEFFICIENTS
@@ -140,7 +140,7 @@ static gchar *text_shader_AYUV_opengl =
#if GST_GL_HAVE_GLES2
/* YUY2:r,g,a
UYVY:a,b,r */
-static gchar *text_shader_YUY2_UYVY_gles2 =
+static const gchar *text_shader_YUY2_UYVY_gles2 =
"precision mediump float;\n"
"varying vec2 v_texCoord;\n"
"uniform sampler2D Ytex, UVtex;\n"
@@ -160,7 +160,7 @@ static gchar *text_shader_YUY2_UYVY_gles2 =
" gl_FragColor = vec4(r, g, b, 1.0);\n"
"}\n";
-static gchar *text_shader_I420_YV12_gles2 =
+static const gchar *text_shader_I420_YV12_gles2 =
"precision mediump float;\n"
"varying vec2 v_texCoord;\n"
"uniform sampler2D Ytex,Utex,Vtex;\n"
@@ -179,7 +179,7 @@ static gchar *text_shader_I420_YV12_gles2 =
" gl_FragColor=vec4(r,g,b,1.0);\n"
"}\n";
-static gchar *text_shader_AYUV_gles2 =
+static const gchar *text_shader_AYUV_gles2 =
"precision mediump float;\n"
"varying vec2 v_texCoord;\n"
"uniform sampler2D tex;\n"
@@ -196,7 +196,7 @@ static gchar *text_shader_AYUV_gles2 =
" gl_FragColor=vec4(r,g,b,1.0);\n"
"}\n";
-static gchar *text_vertex_shader_gles2 =
+static const gchar *text_vertex_shader_gles2 =
"attribute vec4 a_position; \n"
"attribute vec2 a_texCoord; \n"
"varying vec2 v_texCoord; \n"