ppc: d45 predictor 32x32

About 12x faster.

Change-Id: I22c150256aefb4941861ab1f6c17d554fb694bed
This commit is contained in:
Luca Barbato 2017-04-08 22:41:41 +00:00 committed by James Zern
parent 7a7dc9e624
commit cc868da526
3 changed files with 26 additions and 3 deletions

View File

@ -325,8 +325,8 @@ INTRA_PRED_TEST(VSX, TestIntraPred16, vpx_dc_predictor_16x16_vsx,
INTRA_PRED_TEST(VSX, TestIntraPred32, vpx_dc_predictor_32x32_vsx,
vpx_dc_left_predictor_32x32_vsx, vpx_dc_top_predictor_32x32_vsx,
vpx_dc_128_predictor_32x32_vsx, vpx_v_predictor_32x32_vsx,
vpx_h_predictor_32x32_vsx, NULL, NULL, NULL, NULL, NULL, NULL,
vpx_tm_predictor_32x32_vsx)
vpx_h_predictor_32x32_vsx, vpx_d45_predictor_32x32_vsx, NULL,
NULL, NULL, NULL, NULL, vpx_tm_predictor_32x32_vsx)
#endif // HAVE_VSX
// -----------------------------------------------------------------------------

View File

@ -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);
}
}

View File

@ -151,7 +151,7 @@ add_proto qw/void vpx_d207_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride,
specialize qw/vpx_d207_predictor_32x32 ssse3/;
add_proto qw/void vpx_d45_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/vpx_d45_predictor_32x32 neon ssse3/;
specialize qw/vpx_d45_predictor_32x32 neon ssse3 vsx/;
add_proto qw/void vpx_d63_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
specialize qw/vpx_d63_predictor_32x32 ssse3/;