ref: f9d20e6df21296899143d832f1a8d7ed7985e395
parent: 0d9417de4a377a76deffac47072e9ed5604d8fda
author: Luca Barbato <lu_zero@gentoo.org>
date: Fri Apr 7 20:26:54 EDT 2017
ppc: dc_128 predictor 16x16 20x faster. Change-Id: I05f0deb2d38ae7966eae6b71fbc0aa51880e5709
--- a/test/test_intra_pred_speed.cc
+++ b/test/test_intra_pred_speed.cc
@@ -316,9 +316,10 @@
INTRA_PRED_TEST(VSX, TestIntraPred8, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_vsx)
-INTRA_PRED_TEST(VSX, TestIntraPred16, NULL, NULL, NULL, NULL,
- vpx_v_predictor_16x16_vsx, vpx_h_predictor_16x16_vsx, NULL,
- NULL, NULL, NULL, NULL, NULL, vpx_tm_predictor_16x16_vsx)
+INTRA_PRED_TEST(VSX, TestIntraPred16, NULL, NULL, NULL,
+ vpx_dc_128_predictor_16x16_vsx, vpx_v_predictor_16x16_vsx,
+ vpx_h_predictor_16x16_vsx, NULL, NULL, NULL, NULL, NULL, NULL,
+ vpx_tm_predictor_16x16_vsx)
INTRA_PRED_TEST(VSX, TestIntraPred32, NULL, NULL, NULL, NULL,
vpx_v_predictor_32x32_vsx, vpx_h_predictor_32x32_vsx, NULL,
--- a/vpx_dsp/ppc/intrapred_vsx.c
+++ b/vpx_dsp/ppc/intrapred_vsx.c
@@ -361,3 +361,21 @@
tm_predictor_32x8(dst, stride, unpack_to_s16_l(l1), a0, a1, tl);
}
+
+static INLINE void dc_fill_predictor_16x16(uint8_t *dst, const ptrdiff_t stride,
+ const uint8x16_t val) {
+ int i;
+
+ for (i = 0; i < 16; i++, dst += stride) {
+ vec_vsx_st(val, 0, dst);
+ }
+}
+
+void vpx_dc_128_predictor_16x16_vsx(uint8_t *dst, ptrdiff_t stride,
+ const uint8_t *above, const uint8_t *left) {
+ const uint8x16_t v128 = vec_sl(vec_splat_u8(1), vec_splat_u8(7));
+ (void)above;
+ (void)left;
+
+ dc_fill_predictor_16x16(dst, stride, v128);
+}
--- a/vpx_dsp/vpx_dsp_rtcd_defs.pl
+++ b/vpx_dsp/vpx_dsp_rtcd_defs.pl
@@ -145,7 +145,7 @@
specialize qw/vpx_dc_left_predictor_16x16 neon msa sse2/;
add_proto qw/void vpx_dc_128_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
-specialize qw/vpx_dc_128_predictor_16x16 neon msa sse2/;
+specialize qw/vpx_dc_128_predictor_16x16 neon msa sse2 vsx/;
add_proto qw/void vpx_d207_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/vpx_d207_predictor_32x32 ssse3/;