4 # Copyright (C) 2010-2013 Team XBMC
7 # This Program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This Program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with XBMC; see the file COPYING. If not, see
19 # <http://www.gnu.org/licenses/>.
23 PARAM yuvmat[4] = { program.local[0..3] };
26 ADD pos.x , fragment.texcoord[0].x, -0.25;
27 MOV pos.y , fragment.texcoord[0].y;
32 SUB c1pos.x, 0.5, f.x;
33 SUB c2pos.x, 1.5, f.x;
34 ADD c1pos.x, c1pos.x, pos.x;
35 ADD c2pos.x, c2pos.x, pos.x;
41 TEX c1, c1pos, texture[0], RECT;
42 TEX c2, c2pos, texture[0], RECT;
46 MAD cint.y, f.x, 2.0, -1.0;
50 LRP yuv.g, cint.x, c1.a , c1.g;
51 LRP yuv.b, cint.y, c2.g , c1.a;
52 LRP yuv.r, cint.z, yuv.b, yuv.g;
54 LRP yuv.g, f.x , c2.b , c1.b;
55 LRP yuv.b, f.x , c2.r , c1.r;
58 DPH rgb.r, yuv, yuvmat[0];
59 DPH rgb.g, yuv, yuvmat[1];
60 DPH rgb.b, yuv, yuvmat[2];
61 MOV rgb.a, fragment.color.a;
62 MOV result.color, rgb;