diff options
author | bobo1on1 <bobo1on1@svn> | 2010-07-15 23:37:10 +0000 |
---|---|---|
committer | bobo1on1 <bobo1on1@svn> | 2010-07-15 23:37:10 +0000 |
commit | 73db334552b34b36435e887b103d96fc07e21dee (patch) | |
tree | 7f45ffcc5a5a4562c0e8774c13abaed6f2a6132d /system/shaders/yuv2rgb_basic_2d_UYVY.arb | |
parent | c13bfaa8ca023923cc42d0808fc4f4f83260b2f7 (diff) |
added: UYVY support
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31832 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'system/shaders/yuv2rgb_basic_2d_UYVY.arb')
-rw-r--r-- | system/shaders/yuv2rgb_basic_2d_UYVY.arb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/system/shaders/yuv2rgb_basic_2d_UYVY.arb b/system/shaders/yuv2rgb_basic_2d_UYVY.arb new file mode 100644 index 0000000000..ec1c90958f --- /dev/null +++ b/system/shaders/yuv2rgb_basic_2d_UYVY.arb @@ -0,0 +1,47 @@ +!!ARBfp1.0 +PARAM yuvmat[4] = { program.local[0..3] }; +#stepx, stepy, width, height +PARAM dims[1] = { program.local[4] }; +TEMP f; +TEMP pos; +MAD pos.x , dims[0].x, -0.25, fragment.texcoord[0].x; +MOV pos.y , fragment.texcoord[0].y; +MUL f.x , dims[0].z, pos.x; +MUL f.y , dims[0].w, pos.y; +FRC f , f; + +TEMP c1pos; +TEMP c2pos; +SUB c1pos.x, 0.5, f.x; +SUB c2pos.x, 1.5, f.x; +MAD c1pos.x, c1pos.x, dims[0].x, pos.x; +MAD c2pos.x, c2pos.x, dims[0].x, pos.x; +MOV c1pos.y, pos.y; +MOV c2pos.y, pos.y; + +TEMP c1; +TEMP c2; +TEX c1, c1pos, texture[0], 2D; +TEX c2, c2pos, texture[0], 2D; + +TEMP cint; +MUL cint.x, f.x, 2.0; +MAD cint.y, f.x, 2.0, -1.0; +SGE cint.z, f.x, 0.5; + +TEMP yuv; +LRP yuv.g, cint.x, c1.a , c1.g; +LRP yuv.b, cint.y, c2.g , c1.a; +LRP yuv.r, cint.z, yuv.b, yuv.g; + +LRP yuv.g, f.x , c2.b , c1.b; +LRP yuv.b, f.x , c2.r , c1.r; + +TEMP rgb; +DPH rgb.r, yuv, yuvmat[0]; +DPH rgb.g, yuv, yuvmat[1]; +DPH rgb.b, yuv, yuvmat[2]; +MOV rgb.a, fragment.color.a; +MOV result.color, rgb; + +END |