Fixed the list of supported YUV formats
authorSam Lantinga <slouken@libsdl.org>
Sun, 30 Nov 2008 23:42:33 +0000
changeset 28117af2419ad5b0
parent 2810 27cb878a278e
child 2812 dc39c0b02f12
Fixed the list of supported YUV formats
src/video/SDL_renderer_sw.c
src/video/win32/SDL_d3drender.c
src/video/win32/SDL_gdirender.c
src/video/x11/SDL_x11render.c
     1.1 --- a/src/video/SDL_renderer_sw.c	Sun Nov 30 21:58:23 2008 +0000
     1.2 +++ b/src/video/SDL_renderer_sw.c	Sun Nov 30 23:42:33 2008 +0000
     1.3 @@ -81,7 +81,7 @@
     1.4        SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD |
     1.5        SDL_TEXTUREBLENDMODE_MOD),
     1.6       (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST),
     1.7 -     12,
     1.8 +     14,
     1.9       {
    1.10        SDL_PIXELFORMAT_INDEX8,
    1.11        SDL_PIXELFORMAT_RGB555,
    1.12 @@ -92,6 +92,8 @@
    1.13        SDL_PIXELFORMAT_RGBA8888,
    1.14        SDL_PIXELFORMAT_ABGR8888,
    1.15        SDL_PIXELFORMAT_BGRA8888,
    1.16 +      SDL_PIXELFORMAT_YV12,
    1.17 +      SDL_PIXELFORMAT_IYUV,
    1.18        SDL_PIXELFORMAT_YUY2,
    1.19        SDL_PIXELFORMAT_UYVY,
    1.20        SDL_PIXELFORMAT_YVYU},
     2.1 --- a/src/video/win32/SDL_d3drender.c	Sun Nov 30 21:58:23 2008 +0000
     2.2 +++ b/src/video/win32/SDL_d3drender.c	Sun Nov 30 23:42:33 2008 +0000
     2.3 @@ -87,7 +87,7 @@
     2.4        SDL_TEXTUREBLENDMODE_MOD),
     2.5       (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
     2.6        SDL_TEXTURESCALEMODE_SLOW | SDL_TEXTURESCALEMODE_BEST),
     2.7 -     13,
     2.8 +     12,
     2.9       {
    2.10        SDL_PIXELFORMAT_INDEX8,
    2.11        SDL_PIXELFORMAT_RGB332,
    2.12 @@ -100,8 +100,7 @@
    2.13        SDL_PIXELFORMAT_ARGB8888,
    2.14        SDL_PIXELFORMAT_ARGB2101010,
    2.15        SDL_PIXELFORMAT_YUY2,
    2.16 -      SDL_PIXELFORMAT_UYVY,
    2.17 -      SDL_PIXELFORMAT_YVYU},
    2.18 +      SDL_PIXELFORMAT_UYVY},
    2.19       0,
    2.20       0}
    2.21  };
     3.1 --- a/src/video/win32/SDL_gdirender.c	Sun Nov 30 21:58:23 2008 +0000
     3.2 +++ b/src/video/win32/SDL_gdirender.c	Sun Nov 30 23:42:33 2008 +0000
     3.3 @@ -76,7 +76,7 @@
     3.4       (SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK |
     3.5        SDL_TEXTUREBLENDMODE_BLEND),
     3.6       (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST),
     3.7 -     12,
     3.8 +     14,
     3.9       {
    3.10        SDL_PIXELFORMAT_INDEX8,
    3.11        SDL_PIXELFORMAT_RGB555,
    3.12 @@ -87,6 +87,8 @@
    3.13        SDL_PIXELFORMAT_RGBA8888,
    3.14        SDL_PIXELFORMAT_ABGR8888,
    3.15        SDL_PIXELFORMAT_BGRA8888,
    3.16 +      SDL_PIXELFORMAT_YV12,
    3.17 +      SDL_PIXELFORMAT_IYUV,
    3.18        SDL_PIXELFORMAT_YUY2,
    3.19        SDL_PIXELFORMAT_UYVY,
    3.20        SDL_PIXELFORMAT_YVYU},
     4.1 --- a/src/video/x11/SDL_x11render.c	Sun Nov 30 21:58:23 2008 +0000
     4.2 +++ b/src/video/x11/SDL_x11render.c	Sun Nov 30 23:42:33 2008 +0000
     4.3 @@ -192,6 +192,8 @@
     4.4          if (info->num_texture_formats == 0) {
     4.5              return;
     4.6          }
     4.7 +        info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_YV12;
     4.8 +        info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_IYUV;
     4.9          info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_YUY2;
    4.10          info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_UYVY;
    4.11          info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_YVYU;