[Pixman] [PATCH 29/32] armv6: Add fetcher for a8 nearest-neighbour transformed images

Ben Avison bavison at riscosopen.org
Thu Aug 7 09:50:25 PDT 2014


This is related to the a8r8g8b8 nearest-scaled-cover fetcher. Below are
benchmarks for src_8_8888, which uses it.

lowlevel-blt-bench -n :

     Before          After
     Mean   StdDev   Mean   StdDev  Confidence  Change
L1   15.1   0.1      55.5   0.3     100.0%      +267.2%
L2   13.7   0.1      45.3   0.8     100.0%      +230.0%
M    14.5   0.0      53.9   0.1     100.0%      +272.5%
HT   8.3    0.0      21.2   0.2     100.0%      +154.6%
VT   8.3    0.0      20.1   0.3     100.0%      +141.7%
R    8.0    0.0      19.2   0.3     100.0%      +140.5%
RT   3.6    0.0      6.8    0.1     100.0%      +88.4%

affine-bench:

     Before          After
     Mean   StdDev   Mean   StdDev  Confidence  Change
0.5  17.2   0.0      76.5   0.1     100.0%      +344.4%
0.75 16.7   0.0      67.1   0.1     100.0%      +300.8%
1.0  16.4   0.0      54.3   0.1     100.0%      +232.2%
1.5  15.7   0.0      52.4   0.1     100.0%      +234.6%
2.0  14.8   0.0      50.8   0.1     100.0%      +243.9%
---
 pixman/pixman-arm-simd-asm-scaled.S |    8 ++++++++
 pixman/pixman-arm-simd.c            |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/pixman/pixman-arm-simd-asm-scaled.S b/pixman/pixman-arm-simd-asm-scaled.S
index f018e76..fa743a5 100644
--- a/pixman/pixman-arm-simd-asm-scaled.S
+++ b/pixman/pixman-arm-simd-asm-scaled.S
@@ -190,4 +190,12 @@ generate_nearest_scaled_cover_function \
     pixman_get_scanline_nearest_scaled_cover_r5g6b5_asm_armv6, 16, \
     2, 3 /* prefetch distances */, init_ge, convert_0565_8888
 
+.macro convert_8_8888, reg, tmp
+        mov     reg, reg, lsl #24
+.endm
+
+generate_nearest_scaled_cover_function \
+    pixman_get_scanline_nearest_scaled_cover_a8_asm_armv6, 8, \
+    2, 3 /* prefetch distances */, nop_macro, convert_8_8888
+
 /******************************************************************************/
diff --git a/pixman/pixman-arm-simd.c b/pixman/pixman-arm-simd.c
index 23e3ab5..6554530 100644
--- a/pixman/pixman-arm-simd.c
+++ b/pixman/pixman-arm-simd.c
@@ -179,6 +179,7 @@ cputype##_get_scanline_nearest_scaled_cover_##name (pixman_iter_t  *iter,   \
 BIND_GET_SCANLINE_NEAREST_SCALED_COVER (armv6, a8r8g8b8, uint32_t)
 BIND_GET_SCANLINE_NEAREST_SCALED_COVER (armv6, x8r8g8b8, uint32_t)
 BIND_GET_SCANLINE_NEAREST_SCALED_COVER (armv6, r5g6b5,   uint16_t)
+BIND_GET_SCANLINE_NEAREST_SCALED_COVER (armv6, a8,       uint8_t)
 
 void
 pixman_composite_src_n_8888_asm_armv6 (int32_t   w,
@@ -475,6 +476,14 @@ static const pixman_iter_info_t arm_simd_iters[] =
       NULL
     },
 
+    { PIXMAN_a8,
+      PIXMAN_ARM_NEAREST_SCALED_COVER_FLAGS,
+      ITER_NARROW | ITER_SRC,
+      NULL,
+      armv6_get_scanline_nearest_scaled_cover_a8,
+      NULL
+    },
+
     { PIXMAN_null },
 };
 
-- 
1.7.5.4



More information about the Pixman mailing list