]> granicus.if.org Git - libvpx/commitdiff
ppc: horizontal predictor 16x16
authorLuca Barbato <lu_zero@gentoo.org>
Fri, 7 Apr 2017 14:49:00 +0000 (14:49 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 18 Apr 2017 23:48:09 +0000 (01:48 +0200)
About 10x faster.

Change-Id: Ie81077fa32ad214cdb46bdcb0be4e9e2c7df47c2

test/test_intra_pred_speed.cc
vpx_dsp/ppc/intrapred_vsx.c
vpx_dsp/vpx_dsp_rtcd_defs.pl

index 9ae05b02fd0300e5becbd6c534df644020e5d302..75abc169b430e096702b0cb16d994f66f224cb82 100644 (file)
@@ -314,8 +314,8 @@ INTRA_PRED_TEST(MSA, TestIntraPred32, vpx_dc_predictor_32x32_msa,
 
 #if HAVE_VSX
 INTRA_PRED_TEST(VSX, TestIntraPred16, NULL, NULL, NULL, NULL,
-                vpx_v_predictor_16x16_vsx, NULL, NULL, NULL, NULL, NULL, NULL,
-                NULL, NULL)
+                vpx_v_predictor_16x16_vsx, vpx_h_predictor_16x16_vsx, NULL,
+                NULL, NULL, NULL, NULL, NULL, NULL)
 
 INTRA_PRED_TEST(VSX, TestIntraPred32, NULL, NULL, NULL, NULL,
                 vpx_v_predictor_32x32_vsx, NULL, NULL, NULL, NULL, NULL, NULL,
index 16e08eec4219adc0304b64a4a40a481e583ed6bd..d803d3876122041d01f6fcaedcbdbdee7a64741c 100644 (file)
@@ -34,3 +34,61 @@ void vpx_v_predictor_32x32_vsx(uint8_t *dst, ptrdiff_t stride,
     vec_vsx_st(d1, 16, dst);
   }
 }
+
+void vpx_h_predictor_16x16_vsx(uint8_t *dst, ptrdiff_t stride,
+                               const uint8_t *above, const uint8_t *left) {
+  const uint8x16_t d = vec_vsx_ld(0, left);
+  const uint8x16_t v0 = vec_splat(d, 0);
+  const uint8x16_t v1 = vec_splat(d, 1);
+  const uint8x16_t v2 = vec_splat(d, 2);
+  const uint8x16_t v3 = vec_splat(d, 3);
+
+  const uint8x16_t v4 = vec_splat(d, 4);
+  const uint8x16_t v5 = vec_splat(d, 5);
+  const uint8x16_t v6 = vec_splat(d, 6);
+  const uint8x16_t v7 = vec_splat(d, 7);
+
+  const uint8x16_t v8 = vec_splat(d, 8);
+  const uint8x16_t v9 = vec_splat(d, 9);
+  const uint8x16_t v10 = vec_splat(d, 10);
+  const uint8x16_t v11 = vec_splat(d, 11);
+
+  const uint8x16_t v12 = vec_splat(d, 12);
+  const uint8x16_t v13 = vec_splat(d, 13);
+  const uint8x16_t v14 = vec_splat(d, 14);
+  const uint8x16_t v15 = vec_splat(d, 15);
+
+  (void)above;
+
+  vec_vsx_st(v0, 0, dst);
+  dst += stride;
+  vec_vsx_st(v1, 0, dst);
+  dst += stride;
+  vec_vsx_st(v2, 0, dst);
+  dst += stride;
+  vec_vsx_st(v3, 0, dst);
+  dst += stride;
+  vec_vsx_st(v4, 0, dst);
+  dst += stride;
+  vec_vsx_st(v5, 0, dst);
+  dst += stride;
+  vec_vsx_st(v6, 0, dst);
+  dst += stride;
+  vec_vsx_st(v7, 0, dst);
+  dst += stride;
+  vec_vsx_st(v8, 0, dst);
+  dst += stride;
+  vec_vsx_st(v9, 0, dst);
+  dst += stride;
+  vec_vsx_st(v10, 0, dst);
+  dst += stride;
+  vec_vsx_st(v11, 0, dst);
+  dst += stride;
+  vec_vsx_st(v12, 0, dst);
+  dst += stride;
+  vec_vsx_st(v13, 0, dst);
+  dst += stride;
+  vec_vsx_st(v14, 0, dst);
+  dst += stride;
+  vec_vsx_st(v15, 0, dst);
+}
index f0609f59165593993c3c9aa216e94daf5c959415..adbb72974c2484780b00dfffd28e3872cc6cc88a 100644 (file)
@@ -119,7 +119,7 @@ add_proto qw/void vpx_d63_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, c
 specialize qw/vpx_d63_predictor_16x16 ssse3/;
 
 add_proto qw/void vpx_h_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
-specialize qw/vpx_h_predictor_16x16 neon dspr2 msa sse2/;
+specialize qw/vpx_h_predictor_16x16 neon dspr2 msa sse2 vsx/;
 
 add_proto qw/void vpx_d117_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";