@@ -453,12 +453,8 @@ blit_blend_rgba_mul_avx2(SDL_BlitInfo *info)
453453 0x80 , 12 , 0x80 , 11 , 0x80 , 10 , 0x80 , 9 , 0x80 , 8 );
454454
455455 mm_zero = _mm_setzero_si128 ();
456- mm_two_five_fives = _mm_set_epi64x (0x00FF00FF00FF00FF , 0x00FF00FF00FF00FF );
457-
458- mm256_two_five_fives = _mm256_set_epi8 (
459- 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF ,
460- 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF ,
461- 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF );
456+ mm_two_five_fives = _mm_set1_epi64x (0x00FF00FF00FF00FF );
457+ mm256_two_five_fives = _mm256_set1_epi16 (0x00FF );
462458
463459 while (height -- ) {
464460 if (pre_8_width > 0 ) {
@@ -578,16 +574,12 @@ blit_blend_rgb_mul_avx2(SDL_BlitInfo *info)
578574 0x80 , 12 , 0x80 , 11 , 0x80 , 10 , 0x80 , 9 , 0x80 , 8 );
579575
580576 mm_zero = _mm_setzero_si128 ();
581- mm_two_five_fives = _mm_set_epi64x (0x00FF00FF00FF00FF , 0x00FF00FF00FF00FF );
582- mm_alpha_mask = _mm_cvtsi32_si128 (amask );
583577
584- mm256_two_five_fives = _mm256_set_epi8 (
585- 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF ,
586- 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF ,
587- 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF , 0x00 , 0xFF );
578+ mm_two_five_fives = _mm_set1_epi64x (0x00FF00FF00FF00FF );
579+ mm256_two_five_fives = _mm256_set1_epi16 (0x00FF );
588580
589- mm256_alpha_mask = _mm256_set_epi32 (amask , amask , amask , amask , amask ,
590- amask , amask , amask );
581+ mm_alpha_mask = _mm_cvtsi32_si128 (amask );
582+ mm256_alpha_mask = _mm256_set1_epi32 ( amask );
591583
592584 while (height -- ) {
593585 if (pre_8_width > 0 ) {
@@ -772,8 +764,7 @@ blit_blend_rgb_add_avx2(SDL_BlitInfo *info)
772764 __m256i mm256_src , mm256_dst , mm256_alpha_mask ;
773765
774766 mm_alpha_mask = _mm_cvtsi32_si128 (amask );
775- mm256_alpha_mask = _mm256_set_epi32 (amask , amask , amask , amask , amask ,
776- amask , amask , amask );
767+ mm256_alpha_mask = _mm256_set1_epi32 (amask );
777768
778769 while (height -- ) {
779770 if (pre_8_width > 0 ) {
@@ -925,8 +916,7 @@ blit_blend_rgb_sub_avx2(SDL_BlitInfo *info)
925916 __m256i mm256_src , mm256_dst , mm256_alpha_mask ;
926917
927918 mm_alpha_mask = _mm_cvtsi32_si128 (amask );
928- mm256_alpha_mask = _mm256_set_epi32 (amask , amask , amask , amask , amask ,
929- amask , amask , amask );
919+ mm256_alpha_mask = _mm256_set1_epi32 (amask );
930920
931921 while (height -- ) {
932922 if (pre_8_width > 0 ) {
@@ -1078,8 +1068,7 @@ blit_blend_rgb_max_avx2(SDL_BlitInfo *info)
10781068 __m256i mm256_src , mm256_dst , mm256_alpha_mask ;
10791069
10801070 mm_alpha_mask = _mm_cvtsi32_si128 (amask );
1081- mm256_alpha_mask = _mm256_set_epi32 (amask , amask , amask , amask , amask ,
1082- amask , amask , amask );
1071+ mm256_alpha_mask = _mm256_set1_epi32 (amask );
10831072
10841073 while (height -- ) {
10851074 if (pre_8_width > 0 ) {
@@ -1231,8 +1220,7 @@ blit_blend_rgb_min_avx2(SDL_BlitInfo *info)
12311220 __m256i mm256_src , mm256_dst , mm256_alpha_mask ;
12321221
12331222 mm_alpha_mask = _mm_cvtsi32_si128 (amask );
1234- mm256_alpha_mask = _mm256_set_epi32 (amask , amask , amask , amask , amask ,
1235- amask , amask , amask );
1223+ mm256_alpha_mask = _mm256_set1_epi32 (amask );
12361224
12371225 while (height -- ) {
12381226 if (pre_8_width > 0 ) {
@@ -1351,10 +1339,7 @@ blit_blend_premultiplied_avx2(SDL_BlitInfo *info)
13511339 12 + a_index , 0x80 , 12 + a_index , 0x80 , 12 + a_index , 0x80 ,
13521340 8 + a_index , 0x80 , 8 + a_index , 0x80 , 8 + a_index , 0x80 , 8 + a_index );
13531341
1354- mm256_ones = _mm256_set_epi8 (
1355- 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 ,
1356- 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 ,
1357- 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 , 0x00 , 0x01 );
1342+ mm256_ones = _mm256_set1_epi16 (0x0001 );
13581343
13591344 while (height -- ) {
13601345 if (pre_8_width > 0 ) {
0 commit comments