ARM: NEON optimization for nearest scaled over_8888_8_0565
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>
Wed, 3 Nov 2010 13:16:28 +0000 (15:16 +0200)
committerSiarhei Siamashka <siarhei.siamashka@nokia.com>
Tue, 15 Feb 2011 12:32:28 +0000 (14:32 +0200)
In some cases may be used for html5 video when hardware acceleration
is not available.

pixman/pixman-arm-neon-asm.S
pixman/pixman-arm-neon.c

index 4dddde1..927a8cd 100644 (file)
@@ -2363,3 +2363,17 @@ generate_composite_function_nearest_scanline \
     pixman_composite_src_0565_8888_process_pixblock_head, \
     pixman_composite_src_0565_8888_process_pixblock_tail, \
     pixman_composite_src_0565_8888_process_pixblock_tail_head
+
+generate_composite_function_nearest_scanline \
+    pixman_scaled_nearest_scanline_8888_8_0565_OVER_asm_neon, 32, 8, 16, \
+    FLAG_DST_READWRITE | FLAG_DEINTERLEAVE_32BPP, \
+    8, /* number of pixels, processed in a single block */ \
+    default_init_need_all_regs, \
+    default_cleanup_need_all_regs, \
+    pixman_composite_over_8888_8_0565_process_pixblock_head, \
+    pixman_composite_over_8888_8_0565_process_pixblock_tail, \
+    pixman_composite_over_8888_8_0565_process_pixblock_tail_head, \
+    28, /* dst_w_basereg */ \
+    4,  /* dst_r_basereg */ \
+    8,  /* src_basereg   */ \
+    24  /* mask_basereg  */
index 7d6c837..7f6aea1 100644 (file)
@@ -122,6 +122,9 @@ PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_DST (neon, 8888_0565, SRC,
 PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_DST (neon, 0565_8888, SRC,
                                         uint16_t, uint32_t)
 
+PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_A8_DST (SKIP_ZERO_SRC, neon, 8888_8_0565,
+                                           OVER, uint32_t, uint16_t)
+
 void
 pixman_composite_src_n_8_asm_neon (int32_t   w,
                                    int32_t   h,
@@ -332,6 +335,9 @@ static const pixman_fast_path_t arm_neon_fast_paths[] =
     SIMPLE_NEAREST_FAST_PATH_PAD (SRC, r5g6b5, a8r8g8b8, neon_0565_8888),
     SIMPLE_NEAREST_FAST_PATH_PAD (SRC, b5g6r5, a8b8g8r8, neon_0565_8888),
 
+    PIXMAN_ARM_SIMPLE_NEAREST_A8_MASK_FAST_PATH (OVER, a8r8g8b8, r5g6b5, neon_8888_8_0565),
+    PIXMAN_ARM_SIMPLE_NEAREST_A8_MASK_FAST_PATH (OVER, a8b8g8r8, b5g6r5, neon_8888_8_0565),
+
     { PIXMAN_OP_NONE },
 };