diff options
author | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2009-11-05 19:43:09 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2009-12-09 15:21:57 +0200 |
commit | a1386a1ceb0c50d2e23cf30be30ea165d2d2ea7c (patch) | |
tree | 6a75a9223eb451834f56346052671bba0d57c2e0 | |
parent | 78a60047ac0f85423e0474ef54930e1f537f646b (diff) |
ARM: added 'neon_src_0888_8888_rev' fast path
This is ARM NEON optimized conversion of native RGB format used by
GTK/GDK into native 32bpp RGB format used by cairo/pixman.
-rw-r--r-- | pixman/pixman-arm-neon-asm.S | 35 | ||||
-rw-r--r-- | pixman/pixman-arm-neon.c | 2 |
2 files changed, 37 insertions, 0 deletions
diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S index 691a1948..bb68be6e 100644 --- a/pixman/pixman-arm-neon-asm.S +++ b/pixman/pixman-arm-neon-asm.S @@ -1335,3 +1335,38 @@ generate_composite_function \ 0, /* dst_r_basereg */ \ 0, /* src_basereg */ \ 0 /* mask_basereg */ + +/******************************************************************************/ + +.macro pixman_composite_src_0888_8888_rev_process_pixblock_head + vswp d0, d2 +.endm + +.macro pixman_composite_src_0888_8888_rev_process_pixblock_tail +.endm + +.macro pixman_composite_src_0888_8888_rev_process_pixblock_tail_head + vst4.8 {d0, d1, d2, d3}, [DST_W]! + vld3.8 {d0, d1, d2}, [SRC]! + vswp d0, d2 + cache_preload 8, 8 +.endm + +.macro pixman_composite_src_0888_8888_rev_init + veor d3, d3, d3 +.endm + +generate_composite_function \ + pixman_composite_src_0888_8888_rev_asm_neon, 24, 0, 32, \ + FLAG_DST_WRITEONLY | FLAG_DEINTERLEAVE_32BPP, \ + 8, /* number of pixels, processed in a single block */ \ + 10, /* prefetch distance */ \ + pixman_composite_src_0888_8888_rev_init, \ + default_cleanup, \ + pixman_composite_src_0888_8888_rev_process_pixblock_head, \ + pixman_composite_src_0888_8888_rev_process_pixblock_tail, \ + pixman_composite_src_0888_8888_rev_process_pixblock_tail_head, \ + 0, /* dst_w_basereg */ \ + 0, /* dst_r_basereg */ \ + 0, /* src_basereg */ \ + 0 /* mask_basereg */ diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c index fef98a1c..ac0c5586 100644 --- a/pixman/pixman-arm-neon.c +++ b/pixman/pixman-arm-neon.c @@ -255,6 +255,7 @@ BIND_SRC_NULL_DST(src_0565_0565, uint16_t, 1, uint16_t, 1) BIND_SRC_NULL_DST(src_0888_0888, uint8_t, 3, uint8_t, 3) BIND_SRC_NULL_DST(src_8888_0565, uint32_t, 1, uint16_t, 1) BIND_SRC_NULL_DST(src_0565_8888, uint16_t, 1, uint32_t, 1) +BIND_SRC_NULL_DST(src_0888_8888_rev, uint8_t, 3, uint32_t, 1) BIND_SRC_NULL_DST(add_8000_8000, uint8_t, 1, uint8_t, 1) BIND_SRC_NULL_DST(add_8888_8888, uint32_t, 1, uint32_t, 1) @@ -397,6 +398,7 @@ static const pixman_fast_path_t arm_neon_fast_path_array[] = { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, neon_composite_src_8888_8888 }, { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, neon_composite_src_8888_8888 }, { PIXMAN_OP_SRC, PIXMAN_r8g8b8, PIXMAN_null, PIXMAN_r8g8b8, neon_composite_src_0888_0888 }, + { PIXMAN_OP_SRC, PIXMAN_b8g8r8, PIXMAN_null, PIXMAN_x8r8g8b8, neon_composite_src_0888_8888_rev }, { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, neon_composite_over_n_8_0565 }, { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, neon_composite_over_n_8_0565 }, { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, neon_composite_over_n_8_8888 }, |