2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "SDL_config.h"
24 #include "SDL_video.h"
25 #include "SDL_sysvideo.h"
27 /* This is the software implementation of the YUV texture support */
29 struct SDL_SW_YUVTexture
37 void (*Display1X) (int *colortab, Uint32 * rgb_2_pix,
38 unsigned char *lum, unsigned char *cr,
39 unsigned char *cb, unsigned char *out,
40 int rows, int cols, int mod);
41 void (*Display2X) (int *colortab, Uint32 * rgb_2_pix,
42 unsigned char *lum, unsigned char *cr,
43 unsigned char *cb, unsigned char *out,
44 int rows, int cols, int mod);
46 /* These are just so we don't have to allocate them separately */
50 /* This is a temporary surface in case we have to stretch copy */
55 typedef struct SDL_SW_YUVTexture SDL_SW_YUVTexture;
57 SDL_SW_YUVTexture *SDL_SW_CreateYUVTexture(Uint32 format, int w, int h);
58 int SDL_SW_QueryYUVTexturePixels(SDL_SW_YUVTexture * swdata, void **pixels,
60 int SDL_SW_UpdateYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect,
61 const void *pixels, int pitch);
62 int SDL_SW_LockYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect,
63 int markDirty, void **pixels, int *pitch);
64 void SDL_SW_UnlockYUVTexture(SDL_SW_YUVTexture * swdata);
65 int SDL_SW_CopyYUVToRGB(SDL_SW_YUVTexture * swdata, const SDL_Rect * srcrect,
66 Uint32 target_format, int w, int h, void *pixels,
68 void SDL_SW_DestroyYUVTexture(SDL_SW_YUVTexture * swdata);
70 /* vi: set ts=4 sw=4 expandtab: */