src/video/SDL_blit_N.c
changeset 2262 bee005ace1bf
parent 2257 340942cfda48
child 2267 c785543d1843
     1.1 --- a/src/video/SDL_blit_N.c	Fri Aug 17 03:22:03 2007 +0000
     1.2 +++ b/src/video/SDL_blit_N.c	Fri Aug 17 06:21:58 2007 +0000
     1.3 @@ -158,11 +158,11 @@
     1.4  static void
     1.5  Blit_RGB888_RGB565Altivec(SDL_BlitInfo * info)
     1.6  {
     1.7 -    int height = info->d_height;
     1.8 -    Uint8 *src = (Uint8 *) info->s_pixels;
     1.9 +    int height = info->dst_h;
    1.10 +    Uint8 *src = (Uint8 *) info->src;
    1.11      int srcskip = info->s_skip;
    1.12 -    Uint8 *dst = (Uint8 *) info->d_pixels;
    1.13 -    int dstskip = info->d_skip;
    1.14 +    Uint8 *dst = (Uint8 *) info->dst;
    1.15 +    int dstskip = info->dst_pitch;
    1.16      SDL_PixelFormat *srcfmt = info->src;
    1.17      vector unsigned char valpha = vec_splat_u8(0);
    1.18      vector unsigned char vpermute = calc_swizzle32(srcfmt, NULL);
    1.19 @@ -186,7 +186,7 @@
    1.20          vector unsigned char voverflow;
    1.21          vector unsigned char vsrc;
    1.22  
    1.23 -        int width = info->d_width;
    1.24 +        int width = info->dst_w;
    1.25          int extrawidth;
    1.26  
    1.27          /* do scalar until we can align... */
    1.28 @@ -262,11 +262,11 @@
    1.29  static void
    1.30  Blit_RGB565_32Altivec(SDL_BlitInfo * info)
    1.31  {
    1.32 -    int height = info->d_height;
    1.33 -    Uint8 *src = (Uint8 *) info->s_pixels;
    1.34 +    int height = info->dst_h;
    1.35 +    Uint8 *src = (Uint8 *) info->src;
    1.36      int srcskip = info->s_skip;
    1.37 -    Uint8 *dst = (Uint8 *) info->d_pixels;
    1.38 -    int dstskip = info->d_skip;
    1.39 +    Uint8 *dst = (Uint8 *) info->dst;
    1.40 +    int dstskip = info->dst_pitch;
    1.41      SDL_PixelFormat *srcfmt = info->src;
    1.42      SDL_PixelFormat *dstfmt = info->dst;
    1.43      unsigned alpha;
    1.44 @@ -336,7 +336,7 @@
    1.45          vector unsigned char voverflow;
    1.46          vector unsigned char vsrc;
    1.47  
    1.48 -        int width = info->d_width;
    1.49 +        int width = info->dst_w;
    1.50          int extrawidth;
    1.51  
    1.52          /* do scalar until we can align... */
    1.53 @@ -410,11 +410,11 @@
    1.54  static void
    1.55  Blit_RGB555_32Altivec(SDL_BlitInfo * info)
    1.56  {
    1.57 -    int height = info->d_height;
    1.58 -    Uint8 *src = (Uint8 *) info->s_pixels;
    1.59 +    int height = info->dst_h;
    1.60 +    Uint8 *src = (Uint8 *) info->src;
    1.61      int srcskip = info->s_skip;
    1.62 -    Uint8 *dst = (Uint8 *) info->d_pixels;
    1.63 -    int dstskip = info->d_skip;
    1.64 +    Uint8 *dst = (Uint8 *) info->dst;
    1.65 +    int dstskip = info->dst_pitch;
    1.66      SDL_PixelFormat *srcfmt = info->src;
    1.67      SDL_PixelFormat *dstfmt = info->dst;
    1.68      unsigned alpha;
    1.69 @@ -484,7 +484,7 @@
    1.70          vector unsigned char voverflow;
    1.71          vector unsigned char vsrc;
    1.72  
    1.73 -        int width = info->d_width;
    1.74 +        int width = info->dst_w;
    1.75          int extrawidth;
    1.76  
    1.77          /* do scalar until we can align... */
    1.78 @@ -559,11 +559,11 @@
    1.79  static void
    1.80  Blit32to32KeyAltivec(SDL_BlitInfo * info)
    1.81  {
    1.82 -    int height = info->d_height;
    1.83 -    Uint32 *srcp = (Uint32 *) info->s_pixels;
    1.84 +    int height = info->dst_h;
    1.85 +    Uint32 *srcp = (Uint32 *) info->src;
    1.86      int srcskip = info->s_skip;
    1.87 -    Uint32 *dstp = (Uint32 *) info->d_pixels;
    1.88 -    int dstskip = info->d_skip;
    1.89 +    Uint32 *dstp = (Uint32 *) info->dst;
    1.90 +    int dstskip = info->dst_pitch;
    1.91      SDL_PixelFormat *srcfmt = info->src;
    1.92      int srcbpp = srcfmt->BytesPerPixel;
    1.93      SDL_PixelFormat *dstfmt = info->dst;
    1.94 @@ -578,7 +578,7 @@
    1.95      vector unsigned int vckey;
    1.96      vector unsigned int vrgbmask;
    1.97      vpermute = calc_swizzle32(srcfmt, dstfmt);
    1.98 -    if (info->d_width < 16) {
    1.99 +    if (info->dst_w < 16) {
   1.100          if (copy_alpha) {
   1.101              BlitNtoNKeyCopyAlpha(info);
   1.102          } else {
   1.103 @@ -631,7 +631,7 @@
   1.104                  widthvar--; \
   1.105              } \
   1.106          }
   1.107 -        int width = info->d_width;
   1.108 +        int width = info->dst_w;
   1.109          ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
   1.110          assert(width > 0);
   1.111          if (width > 0) {
   1.112 @@ -677,11 +677,11 @@
   1.113  static void
   1.114  ConvertAltivec32to32_noprefetch(SDL_BlitInfo * info)
   1.115  {
   1.116 -    int height = info->d_height;
   1.117 -    Uint32 *src = (Uint32 *) info->s_pixels;
   1.118 +    int height = info->dst_h;
   1.119 +    Uint32 *src = (Uint32 *) info->src;
   1.120      int srcskip = info->s_skip;
   1.121 -    Uint32 *dst = (Uint32 *) info->d_pixels;
   1.122 -    int dstskip = info->d_skip;
   1.123 +    Uint32 *dst = (Uint32 *) info->dst;
   1.124 +    int dstskip = info->dst_pitch;
   1.125      SDL_PixelFormat *srcfmt = info->src;
   1.126      SDL_PixelFormat *dstfmt = info->dst;
   1.127      vector unsigned int vzero = vec_splat_u32(0);
   1.128 @@ -704,7 +704,7 @@
   1.129          Uint32 bits;
   1.130          Uint8 r, g, b, a;
   1.131  
   1.132 -        int width = info->d_width;
   1.133 +        int width = info->dst_w;
   1.134          int extrawidth;
   1.135  
   1.136          /* do scalar until we can align... */
   1.137 @@ -756,11 +756,11 @@
   1.138      const int scalar_dst_lead = sizeof(Uint32) * 4;
   1.139      const int vector_dst_lead = sizeof(Uint32) * 16;
   1.140  
   1.141 -    int height = info->d_height;
   1.142 -    Uint32 *src = (Uint32 *) info->s_pixels;
   1.143 +    int height = info->dst_h;
   1.144 +    Uint32 *src = (Uint32 *) info->src;
   1.145      int srcskip = info->s_skip;
   1.146 -    Uint32 *dst = (Uint32 *) info->d_pixels;
   1.147 -    int dstskip = info->d_skip;
   1.148 +    Uint32 *dst = (Uint32 *) info->dst;
   1.149 +    int dstskip = info->dst_pitch;
   1.150      SDL_PixelFormat *srcfmt = info->src;
   1.151      SDL_PixelFormat *dstfmt = info->dst;
   1.152      vector unsigned int vzero = vec_splat_u32(0);
   1.153 @@ -783,7 +783,7 @@
   1.154          Uint32 bits;
   1.155          Uint8 r, g, b, a;
   1.156  
   1.157 -        int width = info->d_width;
   1.158 +        int width = info->dst_w;
   1.159          int extrawidth;
   1.160  
   1.161          /* do scalar until we can align... */
   1.162 @@ -898,12 +898,12 @@
   1.163      int srcskip, dstskip;
   1.164  
   1.165      /* Set up some basic variables */
   1.166 -    width = info->d_width;
   1.167 -    height = info->d_height;
   1.168 -    src = (Uint32 *) info->s_pixels;
   1.169 +    width = info->dst_w;
   1.170 +    height = info->dst_h;
   1.171 +    src = (Uint32 *) info->src;
   1.172      srcskip = info->s_skip / 4;
   1.173 -    dst = info->d_pixels;
   1.174 -    dstskip = info->d_skip;
   1.175 +    dst = info->dst;
   1.176 +    dstskip = info->dst_pitch;
   1.177      map = info->table;
   1.178  
   1.179      if (map == NULL) {
   1.180 @@ -1015,12 +1015,12 @@
   1.181      int srcskip, dstskip;
   1.182  
   1.183      /* Set up some basic variables */
   1.184 -    width = info->d_width;
   1.185 -    height = info->d_height;
   1.186 -    src = (Uint32 *) info->s_pixels;
   1.187 +    width = info->dst_w;
   1.188 +    height = info->dst_h;
   1.189 +    src = (Uint32 *) info->src;
   1.190      srcskip = info->s_skip / 4;
   1.191 -    dst = (Uint16 *) info->d_pixels;
   1.192 -    dstskip = info->d_skip / 2;
   1.193 +    dst = (Uint16 *) info->dst;
   1.194 +    dstskip = info->dst_pitch / 2;
   1.195  
   1.196  #ifdef USE_DUFFS_LOOP
   1.197      while (height--) {
   1.198 @@ -1139,12 +1139,12 @@
   1.199      int srcskip, dstskip;
   1.200  
   1.201      /* Set up some basic variables */
   1.202 -    width = info->d_width;
   1.203 -    height = info->d_height;
   1.204 -    src = (Uint32 *) info->s_pixels;
   1.205 +    width = info->dst_w;
   1.206 +    height = info->dst_h;
   1.207 +    src = (Uint32 *) info->src;
   1.208      srcskip = info->s_skip / 4;
   1.209 -    dst = (Uint16 *) info->d_pixels;
   1.210 -    dstskip = info->d_skip / 2;
   1.211 +    dst = (Uint16 *) info->dst;
   1.212 +    dstskip = info->dst_pitch / 2;
   1.213  
   1.214  #ifdef USE_DUFFS_LOOP
   1.215      while (height--) {
   1.216 @@ -1252,12 +1252,12 @@
   1.217      int srcskip, dstskip;
   1.218  
   1.219      /* Set up some basic variables */
   1.220 -    width = info->d_width;
   1.221 -    height = info->d_height;
   1.222 -    src = (Uint8 *) info->s_pixels;
   1.223 +    width = info->dst_w;
   1.224 +    height = info->dst_h;
   1.225 +    src = (Uint8 *) info->src;
   1.226      srcskip = info->s_skip;
   1.227 -    dst = (Uint32 *) info->d_pixels;
   1.228 -    dstskip = info->d_skip / 4;
   1.229 +    dst = (Uint32 *) info->dst;
   1.230 +    dstskip = info->dst_pitch / 4;
   1.231  
   1.232  #ifdef USE_DUFFS_LOOP
   1.233      while (height--) {
   1.234 @@ -1874,12 +1874,12 @@
   1.235      int srcskip, dstskip;
   1.236  
   1.237      /* Set up some basic variables */
   1.238 -    width = info->d_width;
   1.239 -    height = info->d_height;
   1.240 -    src = (Uint32 *) info->s_pixels;
   1.241 +    width = info->dst_w;
   1.242 +    height = info->dst_h;
   1.243 +    src = (Uint32 *) info->src;
   1.244      srcskip = info->s_skip / 4;
   1.245 -    dst = info->d_pixels;
   1.246 -    dstskip = info->d_skip;
   1.247 +    dst = info->dst;
   1.248 +    dstskip = info->dst_pitch;
   1.249      map = info->table;
   1.250  
   1.251  #ifdef USE_DUFFS_LOOP
   1.252 @@ -1947,12 +1947,12 @@
   1.253      SDL_PixelFormat *srcfmt;
   1.254  
   1.255      /* Set up some basic variables */
   1.256 -    width = info->d_width;
   1.257 -    height = info->d_height;
   1.258 -    src = info->s_pixels;
   1.259 +    width = info->dst_w;
   1.260 +    height = info->dst_h;
   1.261 +    src = info->src;
   1.262      srcskip = info->s_skip;
   1.263 -    dst = info->d_pixels;
   1.264 -    dstskip = info->d_skip;
   1.265 +    dst = info->dst;
   1.266 +    dstskip = info->dst_pitch;
   1.267      map = info->table;
   1.268      srcfmt = info->src;
   1.269      srcbpp = srcfmt->BytesPerPixel;
   1.270 @@ -2028,12 +2028,12 @@
   1.271  static void
   1.272  Blit4to4MaskAlpha(SDL_BlitInfo * info)
   1.273  {
   1.274 -    int width = info->d_width;
   1.275 -    int height = info->d_height;
   1.276 -    Uint32 *src = (Uint32 *) info->s_pixels;
   1.277 +    int width = info->dst_w;
   1.278 +    int height = info->dst_h;
   1.279 +    Uint32 *src = (Uint32 *) info->src;
   1.280      int srcskip = info->s_skip;
   1.281 -    Uint32 *dst = (Uint32 *) info->d_pixels;
   1.282 -    int dstskip = info->d_skip;
   1.283 +    Uint32 *dst = (Uint32 *) info->dst;
   1.284 +    int dstskip = info->dst_pitch;
   1.285      SDL_PixelFormat *srcfmt = info->src;
   1.286      SDL_PixelFormat *dstfmt = info->dst;
   1.287  
   1.288 @@ -2077,12 +2077,12 @@
   1.289  static void
   1.290  BlitNtoN(SDL_BlitInfo * info)
   1.291  {
   1.292 -    int width = info->d_width;
   1.293 -    int height = info->d_height;
   1.294 -    Uint8 *src = info->s_pixels;
   1.295 +    int width = info->dst_w;
   1.296 +    int height = info->dst_h;
   1.297 +    Uint8 *src = info->src;
   1.298      int srcskip = info->s_skip;
   1.299 -    Uint8 *dst = info->d_pixels;
   1.300 -    int dstskip = info->d_skip;
   1.301 +    Uint8 *dst = info->dst;
   1.302 +    int dstskip = info->dst_pitch;
   1.303      SDL_PixelFormat *srcfmt = info->src;
   1.304      int srcbpp = srcfmt->BytesPerPixel;
   1.305      SDL_PixelFormat *dstfmt = info->dst;
   1.306 @@ -2112,12 +2112,12 @@
   1.307  static void
   1.308  BlitNtoNCopyAlpha(SDL_BlitInfo * info)
   1.309  {
   1.310 -    int width = info->d_width;
   1.311 -    int height = info->d_height;
   1.312 -    Uint8 *src = info->s_pixels;
   1.313 +    int width = info->dst_w;
   1.314 +    int height = info->dst_h;
   1.315 +    Uint8 *src = info->src;
   1.316      int srcskip = info->s_skip;
   1.317 -    Uint8 *dst = info->d_pixels;
   1.318 -    int dstskip = info->d_skip;
   1.319 +    Uint8 *dst = info->dst;
   1.320 +    int dstskip = info->dst_pitch;
   1.321      SDL_PixelFormat *srcfmt = info->src;
   1.322      int srcbpp = srcfmt->BytesPerPixel;
   1.323      SDL_PixelFormat *dstfmt = info->dst;
   1.324 @@ -2142,12 +2142,12 @@
   1.325  static void
   1.326  BlitNto1Key(SDL_BlitInfo * info)
   1.327  {
   1.328 -    int width = info->d_width;
   1.329 -    int height = info->d_height;
   1.330 -    Uint8 *src = info->s_pixels;
   1.331 +    int width = info->dst_w;
   1.332 +    int height = info->dst_h;
   1.333 +    Uint8 *src = info->src;
   1.334      int srcskip = info->s_skip;
   1.335 -    Uint8 *dst = info->d_pixels;
   1.336 -    int dstskip = info->d_skip;
   1.337 +    Uint8 *dst = info->dst;
   1.338 +    int dstskip = info->dst_pitch;
   1.339      SDL_PixelFormat *srcfmt = info->src;
   1.340      const Uint8 *palmap = info->table;
   1.341      Uint32 ckey = info->ckey;
   1.342 @@ -2208,12 +2208,12 @@
   1.343  static void
   1.344  Blit2to2Key(SDL_BlitInfo * info)
   1.345  {
   1.346 -    int width = info->d_width;
   1.347 -    int height = info->d_height;
   1.348 -    Uint16 *srcp = (Uint16 *) info->s_pixels;
   1.349 +    int width = info->dst_w;
   1.350 +    int height = info->dst_h;
   1.351 +    Uint16 *srcp = (Uint16 *) info->src;
   1.352      int srcskip = info->s_skip;
   1.353 -    Uint16 *dstp = (Uint16 *) info->d_pixels;
   1.354 -    int dstskip = info->d_skip;
   1.355 +    Uint16 *dstp = (Uint16 *) info->dst;
   1.356 +    int dstskip = info->dst_pitch;
   1.357      Uint32 ckey = info->ckey;
   1.358      Uint32 rgbmask = ~info->src->Amask;
   1.359  
   1.360 @@ -2242,12 +2242,12 @@
   1.361  static void
   1.362  BlitNtoNKey(SDL_BlitInfo * info)
   1.363  {
   1.364 -    int width = info->d_width;
   1.365 -    int height = info->d_height;
   1.366 -    Uint8 *src = info->s_pixels;
   1.367 +    int width = info->dst_w;
   1.368 +    int height = info->dst_h;
   1.369 +    Uint8 *src = info->src;
   1.370      int srcskip = info->s_skip;
   1.371 -    Uint8 *dst = info->d_pixels;
   1.372 -    int dstskip = info->d_skip;
   1.373 +    Uint8 *dst = info->dst;
   1.374 +    int dstskip = info->dst_pitch;
   1.375      Uint32 ckey = info->ckey;
   1.376      SDL_PixelFormat *srcfmt = info->src;
   1.377      SDL_PixelFormat *dstfmt = info->dst;
   1.378 @@ -2285,12 +2285,12 @@
   1.379  static void
   1.380  BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info)
   1.381  {
   1.382 -    int width = info->d_width;
   1.383 -    int height = info->d_height;
   1.384 -    Uint8 *src = info->s_pixels;
   1.385 +    int width = info->dst_w;
   1.386 +    int height = info->dst_h;
   1.387 +    Uint8 *src = info->src;
   1.388      int srcskip = info->s_skip;
   1.389 -    Uint8 *dst = info->d_pixels;
   1.390 -    int dstskip = info->d_skip;
   1.391 +    Uint8 *dst = info->dst;
   1.392 +    int dstskip = info->dst_pitch;
   1.393      Uint32 ckey = info->ckey;
   1.394      SDL_PixelFormat *srcfmt = info->src;
   1.395      SDL_PixelFormat *dstfmt = info->dst;