ppc: dc_128 predictor 16x16

20x faster.

Change-Id: I05f0deb2d38ae7966eae6b71fbc0aa51880e5709
This commit is contained in:
Luca Barbato 2017-04-08 00:26:54 +00:00 committed by James Zern
parent 0d9417de4a
commit f9d20e6df2
3 changed files with 23 additions and 4 deletions

View File

@ -316,9 +316,10 @@ INTRA_PRED_TEST(MSA, TestIntraPred32, vpx_dc_predictor_32x32_msa,
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,

View File

@ -361,3 +361,21 @@ void vpx_tm_predictor_32x32_vsx(uint8_t *dst, ptrdiff_t stride,
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);
}

View File

@ -145,7 +145,7 @@ add_proto qw/void vpx_dc_left_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_strid
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/;