- added directx include path to VS2008 solution

- updated shape vcproj and add it to VS2008 solution
- minor changes (i.e. typecasting) to get rid of compiler warnings in VS
This commit is contained in:
Andreas Schiffler 2010-09-15 22:15:47 -07:00
parent 458c6eda30
commit 1975b91fae
13 changed files with 50 additions and 31 deletions

View file

@ -144,19 +144,19 @@ RGBtoYUV(Uint8 * rgb, int *yuv, int monochrome, int luminance)
{
if (monochrome) {
#if 1 /* these are the two formulas that I found on the FourCC site... */
yuv[0] = 0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2];
yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
yuv[1] = 128;
yuv[2] = 128;
#else
yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
yuv[0] = (int)(0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
yuv[1] = 128;
yuv[2] = 128;
#endif
} else {
#if 1 /* these are the two formulas that I found on the FourCC site... */
yuv[0] = 0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2];
yuv[1] = (rgb[2] - yuv[0]) * 0.565 + 128;
yuv[2] = (rgb[0] - yuv[0]) * 0.713 + 128;
yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
yuv[1] = (int)((rgb[2] - yuv[0]) * 0.565 + 128);
yuv[2] = (int)((rgb[0] - yuv[0]) * 0.713 + 128);
#else
yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
yuv[1] = 128 - (0.148 * rgb[0]) - (0.291 * rgb[1]) + (0.439 * rgb[2]);
@ -606,7 +606,7 @@ main(int argc, char **argv)
}
if ((!paused) || (resized)) {
if (((SDL_GetTicks() - lastftick) > fpsdelay) || (resized)) {
if (((SDL_GetTicks() - lastftick) > (Uint32)fpsdelay) || (resized)) {
lastftick = SDL_GetTicks();
switch (overlay_format) {