cconvYV12.c revision 3e1c4447f9ae4b44caf72d405973bd68e34a21d1
/* $Id$ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* Shader programming for VBoxFBOverlay.
*/
/*
* Copyright (C) 2009-2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
void vboxCConv()
{
float y;
float v;
float u;
if(partY < 0.25)
{
y = clrY.b;
}
else if(partY < 0.5)
{
y = clrY.g;
}
else if(partY < 0.75)
{
y = clrY.r;
}
else
{
y = clrY.a;
}
if(partVU < 0.25)
{
v = clrV.b;
u = clrU.b;
}
else if(partVU < 0.5)
{
v = clrV.g;
u = clrU.g;
}
else if(partVU < 0.75)
{
v = clrV.r;
u = clrU.r;
}
else
{
v = clrV.a;
u = clrU.a;
}
}