summaryrefslogtreecommitdiff
path: root/vpx_dsp/ppc
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2017-04-08 22:41:41 +0000
committerJames Zern <jzern@google.com>2017-04-19 19:57:51 -0700
commitcc868da5266f164eff34d19e7431abd8056e6ea4 (patch)
tree8df3aa4d9ed4718c51a7a738c5dd9d8a3490604a /vpx_dsp/ppc
parent7a7dc9e62448d999eaf46f9564ffd8ec5f2fee6b (diff)
downloadlibvpx-cc868da5266f164eff34d19e7431abd8056e6ea4.tar
libvpx-cc868da5266f164eff34d19e7431abd8056e6ea4.tar.gz
libvpx-cc868da5266f164eff34d19e7431abd8056e6ea4.tar.bz2
libvpx-cc868da5266f164eff34d19e7431abd8056e6ea4.zip
ppc: d45 predictor 32x32
About 12x faster. Change-Id: I22c150256aefb4941861ab1f6c17d554fb694bed
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 6c7d7f94d..dba062762 100644
--- a/vpx_dsp/ppc/intrapred_vsx.c
+++ b/vpx_dsp/ppc/intrapred_vsx.c
@@ -518,3 +518,26 @@ void vpx_d45_predictor_16x16_vsx(uint8_t *dst, ptrdiff_t stride,
row = vec_perm(row, above_right, sl1);
}
}
+
+void vpx_d45_predictor_32x32_vsx(uint8_t *dst, ptrdiff_t stride,
+ const uint8_t *above, const uint8_t *left) {
+ const uint8x16_t a0 = vec_vsx_ld(0, above);
+ const uint8x16_t a1 = vec_vsx_ld(16, above);
+ const uint8x16_t above_right = vec_splat(a1, 15);
+ const uint8x16_t b0 = vec_perm(a0, a1, sl1);
+ const uint8x16_t b1 = vec_perm(a1, above_right, sl1);
+ const uint8x16_t c0 = vec_perm(b0, b1, sl1);
+ const uint8x16_t c1 = vec_perm(b1, above_right, sl1);
+ uint8x16_t row0 = avg3(a0, b0, c0);
+ uint8x16_t row1 = avg3(a1, b1, c1);
+ int i;
+ (void)left;
+
+ for (i = 0; i < 32; i++) {
+ vec_vsx_st(row0, 0, dst);
+ vec_vsx_st(row1, 16, dst);
+ dst += stride;
+ row0 = vec_perm(row0, row1, sl1);
+ row1 = vec_perm(row1, above_right, sl1);
+ }
+}