Cross Reference: cconvYV12.c
xref
: /
vbox
/
src
/
VBox
/
Frontends
/
VirtualBox
/
shaders
/
cconvYV12.c
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
cconvYV12.c revision 9fc488be77be11a4dcb83feb09cdee11bb160746
6035a3d1ce01a78c316578f23393c0b7edca0548
vboxsync
#
extension
GL_ARB_texture_rectangle
:
enable
6035a3d1ce01a78c316578f23393c0b7edca0548
vboxsync
uniform
sampler2DRect
uSrcTex
;
6035a3d1ce01a78c316578f23393c0b7edca0548
vboxsync
uniform
sampler2DRect
uVTex
;
6035a3d1ce01a78c316578f23393c0b7edca0548
vboxsync
uniform
sampler2DRect
uUTex
;
64082f4699f276693cf5b1ec5886ac12234af115
vboxsync
float
vboxSplitBGRA
(
vec4
color
,
float
coord
);
64082f4699f276693cf5b1ec5886ac12234af115
vboxsync
void
vboxCConvApplyAYUV
(
vec4
color
);
9fc488be77be11a4dcb83feb09cdee11bb160746
vboxsync
void
vboxCConv
()
6035a3d1ce01a78c316578f23393c0b7edca0548
vboxsync
{
9fc488be77be11a4dcb83feb09cdee11bb160746
vboxsync
vec2
coordY
=
vec2
(
gl_TexCoord
[0]);
9fc488be77be11a4dcb83feb09cdee11bb160746
vboxsync
vec2
coordV
=
vec2
(
gl_TexCoord
[
1
]);
64082f4699f276693cf5b1ec5886ac12234af115
vboxsync
vec4
clrY
=
texture2DRect
(
uSrcTex
,
vec2
(
coordY
));
64082f4699f276693cf5b1ec5886ac12234af115
vboxsync
vec4
clrV
=
texture2DRect
(
uVTex
,
vec2
(
coordV
));
9fc488be77be11a4dcb83feb09cdee11bb160746
vboxsync
vec4
clrU
=
texture2DRect
(
uUTex
,
vec2
(
coordV
));
64082f4699f276693cf5b1ec5886ac12234af115
vboxsync
float
y =
vboxSplitBGRA
(
clrY
,
coordY
.x);
64082f4699f276693cf5b1ec5886ac12234af115
vboxsync
float
v =
vboxSplitBGRA
(
clrV
,
coordV
.x);
9fc488be77be11a4dcb83feb09cdee11bb160746
vboxsync
float
u =
vboxSplitBGRA
(
clrU
,
coordV
.x);
64082f4699f276693cf5b1ec5886ac12234af115
vboxsync
vboxCConvApplyAYUV
(
vec4
(u, y,
0.0
, v));
6035a3d1ce01a78c316578f23393c0b7edca0548
vboxsync
}