diff options
Diffstat (limited to 'test/ds.c')
-rw-r--r-- | test/ds.c | 47 |
1 files changed, 44 insertions, 3 deletions
@@ -81,6 +81,46 @@ combine_xor_u (pixman_implementation_t *imp, } } +#if 0 +static void +combine_add_u (pixman_implementation_t *imp, + pixman_op_t op, + uint32_t * dest, + const uint32_t * src, + const uint32_t * mask, + int width) +{ + int i; + + for (i = 0; i < width; ++i) + { + uint32_t s = combine_mask (src, mask, i); + uint32_t d = *(dest + i); + UN8x4_ADD_UN8x4 (d, s); + *(dest + i) = d; + } +} +#endif + +static void +combine_in_u (pixman_implementation_t *imp, + pixman_op_t op, + uint32_t * dest, + const uint32_t * src, + const uint32_t * mask, + int width) +{ + int i; + + for (i = 0; i < width; ++i) + { + uint32_t s = combine_mask (src, mask, i); + uint32_t a = ALPHA_8 (*(dest + i)); + UN8x4_MUL_UN8 (s, a); + *(dest + i) = s; + } +} + uint32_t dest_orig[256]; uint32_t dest[256]; @@ -127,10 +167,11 @@ int main (int argc, char *argv[]) } //combine_xor_u (NULL, 0, dest, src, mask, 256); - combine_xor_u (NULL, 0, dest_ref, src, NULL, 256); - //orc_code_combine_xor_u_n (dest, src, 256); + //combine_xor_u (NULL, 0, dest_ref, src, NULL, 256); + combine_in_u (NULL, 0, dest_ref, src, NULL, 256); + orc_code_combine_in_u_n (dest, src, 256); -#if 1 +#if 0 for(i=0;i<256;i++){ dest[i] = ORC_ARGB( COMPOSITE_XOR(ORC_ARGB_A(src[i]), ORC_ARGB_A(dest[i]), |