mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
eglglessink: GLSL: Assorted fixes to optimized code
- Don't copy over opos as it's already a vec2 - Fix index order access at frag_YUY2_YVYU_UYVY_prog
This commit is contained in:
parent
73d865091c
commit
5c2b1dc631
1 changed files with 9 additions and 12 deletions
|
@ -225,7 +225,7 @@ static const char *frag_AYUV_prog = {
|
|||
"void main(void) {"
|
||||
" float r,g,b;"
|
||||
" vec3 yuv;"
|
||||
" yuv = texture2D(tex,opos.xy).gba;"
|
||||
" yuv = texture2D(tex,opos).gba;"
|
||||
" yuv += offset;"
|
||||
" r = dot(yuv, rcoeff);"
|
||||
" g = dot(yuv, gcoeff);"
|
||||
|
@ -246,9 +246,8 @@ static const char *frag_YUY2_YVYU_UYVY_prog = {
|
|||
"void main(void) {"
|
||||
" float r, g, b;"
|
||||
" vec3 yuv;"
|
||||
" vec2 oposxy = vec2(opos.x, opos.y);"
|
||||
" yuv.x = texture2D(Ytex,oposxy).x;"
|
||||
" yuv.yz = texture2D(UVtex,oposxy).yz;"
|
||||
" yuv.x = texture2D(Ytex,opos).%c;"
|
||||
" yuv.yz = texture2D(UVtex,opos).%c%c;"
|
||||
" yuv += offset;"
|
||||
" r = dot(yuv, rcoeff);"
|
||||
" g = dot(yuv, gcoeff);"
|
||||
|
@ -271,10 +270,9 @@ static const char *frag_PLANAR_YUV_prog = {
|
|||
"void main(void) {"
|
||||
" float r,g,b;"
|
||||
" vec3 yuv;"
|
||||
" vec2 nxy = opos.xy;"
|
||||
" yuv.x=texture2D(Ytex,nxy).r;"
|
||||
" yuv.y=texture2D(Utex,nxy).r;"
|
||||
" yuv.z=texture2D(Vtex,nxy).r;"
|
||||
" yuv.x=texture2D(Ytex,opos).r;"
|
||||
" yuv.y=texture2D(Utex,opos).r;"
|
||||
" yuv.z=texture2D(Vtex,opos).r;"
|
||||
" yuv += offset;"
|
||||
" r = dot(yuv, rcoeff);"
|
||||
" g = dot(yuv, gcoeff);"
|
||||
|
@ -295,10 +293,9 @@ static const char *frag_NV12_NV21_prog = {
|
|||
"void main(void) {"
|
||||
" float r,g,b;"
|
||||
" vec3 yuv;"
|
||||
" vec2 nxy = opos.xy;"
|
||||
" yuv.x=texture2D(Ytex,nxy).r;"
|
||||
" yuv.y=texture2D(UVtex,nxy).%c;"
|
||||
" yuv.z=texture2D(UVtex,nxy).%c;"
|
||||
" yuv.x=texture2D(Ytex,opos).r;"
|
||||
" yuv.y=texture2D(UVtex,opos).%c;"
|
||||
" yuv.z=texture2D(UVtex,opos).%c;"
|
||||
" yuv += offset;"
|
||||
" r = dot(yuv, rcoeff);"
|
||||
" g = dot(yuv, gcoeff);"
|
||||
|
|
Loading…
Reference in a new issue