src/video/SDL_blit_A.c
changeset 7641 0cd36d20df2b
parent 7640 38284657fc79
child 7677 871d43c6968a
equal deleted inserted replaced
7640:38284657fc79 7641:0cd36d20df2b
   350 		/* *INDENT-OFF* */
   350 		/* *INDENT-OFF* */
   351 		DUFFS_LOOP4({
   351 		DUFFS_LOOP4({
   352 		Uint32 alpha = *srcp & amask;
   352 		Uint32 alpha = *srcp & amask;
   353 		if (alpha == 0) {
   353 		if (alpha == 0) {
   354 			/* do nothing */
   354 			/* do nothing */
   355 		} else if (alpha == amask || (*dstp & amask) == 0) {
   355 		} else if (alpha == amask) {
   356 			*dstp = *srcp;
   356 			*dstp = *srcp;
   357 		} else {
   357 		} else {
   358 			src1 = _mm_cvtsi32_si64(*srcp); /* src(ARGB) -> src1 (0000ARGB)*/
   358 			src1 = _mm_cvtsi32_si64(*srcp); /* src(ARGB) -> src1 (0000ARGB)*/
   359 			src1 = _mm_unpacklo_pi8(src1, mm_zero); /* 0A0R0G0B -> src1 */
   359 			src1 = _mm_unpacklo_pi8(src1, mm_zero); /* 0A0R0G0B -> src1 */
   360 
   360 
   543 		_m_prefetch(dstp + 16);
   543 		_m_prefetch(dstp + 16);
   544 
   544 
   545 		alpha = *srcp & amask;
   545 		alpha = *srcp & amask;
   546 		if (alpha == 0) {
   546 		if (alpha == 0) {
   547 			/* do nothing */
   547 			/* do nothing */
   548 		} else if (alpha == amask || (*dstp & amask) == 0) {
   548 		} else if (alpha == amask) {
   549 			*dstp = *srcp;
   549 			*dstp = *srcp;
   550 		} else {
   550 		} else {
   551 			src1 = _mm_cvtsi32_si64(*srcp); /* src(ARGB) -> src1 (0000ARGB)*/
   551 			src1 = _mm_cvtsi32_si64(*srcp); /* src(ARGB) -> src1 (0000ARGB)*/
   552 			src1 = _mm_unpacklo_pi8(src1, mm_zero); /* 0A0R0G0B -> src1 */
   552 			src1 = _mm_unpacklo_pi8(src1, mm_zero); /* 0A0R0G0B -> src1 */
   553 
   553