comparison src/render/SDL_yuv_sw.c @ 5281:15a71bec4a55

merged
author Eric Wing <ewing . public |-at-| gmail . com>
date Sat, 12 Feb 2011 19:16:09 -0800
parents 11bd1585efb5
children
comparison
equal deleted inserted replaced
5219:adfcdd311ae0 5281:15a71bec4a55
1 /* 1 /*
2 SDL - Simple DirectMedia Layer 2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga 3 Copyright (C) 1997-2011 Sam Lantinga
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version. 8 version 2.1 of the License, or (at your option) any later version.
1125 || rect->h != swdata->h)) { 1125 || rect->h != swdata->h)) {
1126 SDL_SetError 1126 SDL_SetError
1127 ("YV12 and IYUV textures only support full surface updates"); 1127 ("YV12 and IYUV textures only support full surface updates");
1128 return -1; 1128 return -1;
1129 } 1129 }
1130 SDL_memcpy(swdata->pixels, pixels, swdata->h * swdata->w * 2); 1130 SDL_memcpy(swdata->pixels, pixels,
1131 (swdata->h * swdata->w) + (swdata->h * swdata->w) / 2);
1131 break; 1132 break;
1132 case SDL_PIXELFORMAT_YUY2: 1133 case SDL_PIXELFORMAT_YUY2:
1133 case SDL_PIXELFORMAT_UYVY: 1134 case SDL_PIXELFORMAT_UYVY:
1134 case SDL_PIXELFORMAT_YVYU: 1135 case SDL_PIXELFORMAT_YVYU:
1135 { 1136 {