src/video/SDL_blit_A.c
branchSDL-1.2
changeset 13221 3705e81df6ff
parent 13220 0ae1ddca5e85
equal deleted inserted replaced
13220:0ae1ddca5e85 13221:3705e81df6ff
  1462 	BlitRGBtoRGBPixelAlphaARMSIMDAsm(width, height, dstp, dststride, srcp, srcstride);
  1462 	BlitRGBtoRGBPixelAlphaARMSIMDAsm(width, height, dstp, dststride, srcp, srcstride);
  1463 }
  1463 }
  1464 #endif
  1464 #endif
  1465 
  1465 
  1466 #if SDL_ARM_NEON_BLITTERS
  1466 #if SDL_ARM_NEON_BLITTERS
       
  1467 void BlitARGBto565PixelAlphaARMNEONAsm(int32_t w, int32_t h, uint16_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride);
       
  1468 
       
  1469 static void BlitARGBto565PixelAlphaARMNEON(SDL_BlitInfo *info)
       
  1470 {
       
  1471     int32_t width = info->d_width;
       
  1472     int32_t height = info->d_height;
       
  1473     uint16_t *dstp = (uint16_t *)info->d_pixels;
       
  1474     int32_t dststride = width + (info->d_skip >> 1);
       
  1475     uint32_t *srcp = (uint32_t *)info->s_pixels;
       
  1476     int32_t srcstride = width + (info->s_skip >> 2);
       
  1477 
       
  1478     BlitARGBto565PixelAlphaARMNEONAsm(width, height, dstp, dststride, srcp, srcstride);
       
  1479 }
       
  1480 
  1467 void BlitRGBtoRGBPixelAlphaARMNEONAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride);
  1481 void BlitRGBtoRGBPixelAlphaARMNEONAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride);
  1468 
  1482 
  1469 static void BlitRGBtoRGBPixelAlphaARMNEON(SDL_BlitInfo *info)
  1483 static void BlitRGBtoRGBPixelAlphaARMNEON(SDL_BlitInfo *info)
  1470 {
  1484 {
  1471 	int32_t width = info->d_width;
  1485 	int32_t width = info->d_width;
  2860            df->Gmask == 0x7e0 &&
  2874            df->Gmask == 0x7e0 &&
  2861 	   df->Bmask == 0x1f && SDL_HasAltiVec())
  2875 	   df->Bmask == 0x1f && SDL_HasAltiVec())
  2862             return Blit32to565PixelAlphaAltivec;
  2876             return Blit32to565PixelAlphaAltivec;
  2863         else
  2877         else
  2864 #endif
  2878 #endif
  2865 #if SDL_ARM_SIMD_BLITTERS
  2879 #if SDL_ARM_NEON_BLITTERS || SDL_ARM_SIMD_BLITTERS
  2866 		if(sf->BytesPerPixel == 4 && sf->Amask == 0xff000000
  2880 		if(sf->BytesPerPixel == 4 && sf->Amask == 0xff000000
  2867 		   && sf->Gmask == 0xff00 && df->Gmask == 0x7e0
  2881 		   && sf->Gmask == 0xff00 && df->Gmask == 0x7e0
  2868 		   && ((sf->Rmask == 0xff && df->Rmask == 0x1f)
  2882 		   && ((sf->Rmask == 0xff && df->Rmask == 0x1f)
  2869 		   || (sf->Bmask == 0xff && df->Bmask == 0x1f))
  2883 		   || (sf->Bmask == 0xff && df->Bmask == 0x1f)))
  2870 		   && SDL_HasARMSIMD())
  2884 		{
  2871 			return BlitARGBto565PixelAlphaARMSIMD;
  2885 #if SDL_ARM_NEON_BLITTERS
  2872 		else
  2886 		    if(SDL_HasARMNEON())
       
  2887 		        return BlitARGBto565PixelAlphaARMNEON;
       
  2888 #endif
       
  2889 #if SDL_ARM_SIMD_BLITTERS
       
  2890 		    if(SDL_HasARMSIMD())
       
  2891 		        return BlitARGBto565PixelAlphaARMSIMD;
       
  2892 #endif
       
  2893 		}
  2873 #endif
  2894 #endif
  2874 	    if(sf->BytesPerPixel == 4 && sf->Amask == 0xff000000
  2895 	    if(sf->BytesPerPixel == 4 && sf->Amask == 0xff000000
  2875 	       && sf->Gmask == 0xff00
  2896 	       && sf->Gmask == 0xff00
  2876 	       && ((sf->Rmask == 0xff && df->Rmask == 0x1f)
  2897 	       && ((sf->Rmask == 0xff && df->Rmask == 0x1f)
  2877 		   || (sf->Bmask == 0xff && df->Bmask == 0x1f))) {
  2898 		   || (sf->Bmask == 0xff && df->Bmask == 0x1f))) {