diff options
author | Ben Avison <bavison@riscosopen.org> | 2015-10-15 14:41:58 +0100 |
---|---|---|
committer | Ben Avison <bavison@riscosopen.org> | 2015-10-15 15:07:51 +0100 |
commit | 167fc7438cf460d2710f868081ed62dcec84a703 (patch) | |
tree | 23740306cc213be5949b63042e1826d629117389 | |
parent | 7d54a7a32df50371dd8c39969590e1af3d80e121 (diff) |
armv7: Add nearest-neighbour scaled a8r8g8b8 fetcher
-rw-r--r-- | pixman/pixman-arm-neon-asm.S | 14 | ||||
-rw-r--r-- | pixman/pixman-arm-neon.c | 21 |
2 files changed, 35 insertions, 0 deletions
diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S index 1fdd373..7676a70 100644 --- a/pixman/pixman-arm-neon-asm.S +++ b/pixman/pixman-arm-neon-asm.S @@ -3359,6 +3359,20 @@ generate_composite_function_single_scanline \ /******************************************************************************/ generate_composite_function_nearest_scanline \ + pixman_scaled_nearest_scanline_8888_8888_SRC_asm_neon, 32, 0, 32, \ + FLAG_DST_WRITEONLY, \ + 8, /* number of pixels, processed in a single block */ \ + default_init, \ + default_cleanup, \ + pixman_composite_src_8888_8888_process_pixblock_head, \ + pixman_composite_src_8888_8888_process_pixblock_tail, \ + pixman_composite_src_8888_8888_process_pixblock_tail_head, \ + 0, /* dst_w_basereg */ \ + 0, /* dst_r_basereg */ \ + 0, /* src_basereg */ \ + 0 /* mask_basereg */ + +generate_composite_function_nearest_scanline \ pixman_scaled_nearest_scanline_8888_8888_OVER_asm_neon, 32, 0, 32, \ FLAG_DST_READWRITE | FLAG_DEINTERLEAVE_32BPP, \ 8, /* number of pixels, processed in a single block */ \ diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c index ea86a61..5cebafc 100644 --- a/pixman/pixman-arm-neon.c +++ b/pixman/pixman-arm-neon.c @@ -181,6 +181,25 @@ fast_dest_fetch_noop (pixman_iter_t *iter, const uint32_t *mask) return iter->buffer; } +#define DECLARE_NEAREST_SCALED_SCANLINE_FUNCTION(cputype, name, alias, type) \ +void \ +pixman_scaled_nearest_scanline_##alias##_8888_SRC_asm_##cputype ( \ + int32_t width, \ + uint32_t *dest, \ + const type *source, \ + pixman_fixed_t x, \ + pixman_fixed_t ux, \ + pixman_fixed_t source_width); + +#define CALL_NEAREST_SCALED_SCANLINE_FUNCTION( \ + cputype, name, alias, width, x, ux, dest, source, mask, source_width) \ + pixman_scaled_nearest_scanline_##alias##_8888_SRC_asm_##cputype ( \ + width, dest, source + source_width, \ + x - pixman_int_to_fixed (source_width), ux, \ + pixman_int_to_fixed (source_width)); + +PIXMAN_ARM_BIND_GET_SCANLINE_NEAREST_SCALED_COVER (neon, a8r8g8b8, 8888, uint32_t) + void pixman_composite_src_n_8_asm_neon (int32_t w, int32_t h, @@ -482,6 +501,8 @@ static const pixman_fast_path_t arm_neon_fast_paths[] = static const pixman_iter_info_t arm_neon_iters[] = { + PIXMAN_ARM_NEAREST_SCALED_COVER_FETCHER (neon, a8r8g8b8), + PIXMAN_ARM_UNTRANSFORMED_COVER_FETCHER (neon, r5g6b5), PIXMAN_ARM_WRITEBACK (neon, r5g6b5), |