summaryrefslogtreecommitdiff
path: root/vpx_dsp/ppc
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2017-04-12 01:18:35 +0200
committerJames Zern <jzern@google.com>2017-04-19 19:57:51 -0700
commit0b9be9320518dfe08057ad0e091e604d6d7d67a3 (patch)
tree5435e9d664030c385f8d14686c224d21bed4d058 /vpx_dsp/ppc
parentee9325b0bd24ed0c9ed11f85a6d5aa1518b5e9c0 (diff)
downloadlibvpx-0b9be9320518dfe08057ad0e091e604d6d7d67a3.tar
libvpx-0b9be9320518dfe08057ad0e091e604d6d7d67a3.tar.gz
libvpx-0b9be9320518dfe08057ad0e091e604d6d7d67a3.tar.bz2
libvpx-0b9be9320518dfe08057ad0e091e604d6d7d67a3.zip
ppc: d63 predictor 8x8
10x faster. Change-Id: I7cedbf4df2ce7df5b6f1108b11815d088fdb9ba8
Diffstat (limited to 'vpx_dsp/ppc')
-rw-r--r--vpx_dsp/ppc/intrapred_vsx.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/vpx_dsp/ppc/intrapred_vsx.c b/vpx_dsp/ppc/intrapred_vsx.c
index 8216e3e9e..0ff0f935d 100644
--- a/vpx_dsp/ppc/intrapred_vsx.c
+++ b/vpx_dsp/ppc/intrapred_vsx.c
@@ -642,6 +642,29 @@ void vpx_d45_predictor_32x32_vsx(uint8_t *dst, ptrdiff_t stride,
}
}
+void vpx_d63_predictor_8x8_vsx(uint8_t *dst, ptrdiff_t stride,
+ const uint8_t *above, const uint8_t *left) {
+ const uint8x16_t af = vec_vsx_ld(0, above);
+ const uint8x16_t above_right = vec_splat(af, 9);
+ const uint8x16_t a = xxpermdi(af, above_right, 1);
+ const uint8x16_t b = vec_perm(a, above_right, sl1);
+ const uint8x16_t c = vec_perm(b, above_right, sl1);
+ uint8x16_t row0 = vec_avg(a, b);
+ uint8x16_t row1 = avg3(a, b, c);
+ int i;
+ (void)left;
+
+ for (i = 0; i < 4; i++) {
+ const uint8x16_t d0 = vec_vsx_ld(0, dst);
+ const uint8x16_t d1 = vec_vsx_ld(0, dst + stride);
+ vec_vsx_st(xxpermdi(row0, d0, 1), 0, dst);
+ vec_vsx_st(xxpermdi(row1, d1, 1), 0, dst + stride);
+ dst += stride * 2;
+ row0 = vec_perm(row0, above_right, sl1);
+ row1 = vec_perm(row1, above_right, sl1);
+ }
+}
+
void vpx_d63_predictor_16x16_vsx(uint8_t *dst, ptrdiff_t stride,
const uint8_t *above, const uint8_t *left) {
const uint8x16_t a0 = vec_vsx_ld(0, above);