ppc: Add get_mb_ss_vsx
Change-Id: I1b54a7a5bb642e4b836d786ea1ae506eed025e3f
This commit is contained in:
parent
6d225eb5f9
commit
143b21e362
@ -1340,6 +1340,9 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_MSA
|
||||
|
||||
#if HAVE_VSX
|
||||
INSTANTIATE_TEST_CASE_P(VSX, SumOfSquaresTest,
|
||||
::testing::Values(vpx_get_mb_ss_vsx));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VSX, VpxSseTest,
|
||||
::testing::Values(SseParams(2, 2,
|
||||
&vpx_get4x4sse_cs_vsx)));
|
||||
|
@ -38,6 +38,23 @@ uint32_t vpx_get4x4sse_cs_vsx(const uint8_t *a, int a_stride, const uint8_t *b,
|
||||
return distortion;
|
||||
}
|
||||
|
||||
// TODO(lu_zero): Unroll
|
||||
uint32_t vpx_get_mb_ss_vsx(const int16_t *a) {
|
||||
unsigned int i, sum = 0;
|
||||
int32x4_t s = vec_splat_s32(0);
|
||||
|
||||
for (i = 0; i < 256; i += 8) {
|
||||
const int16x8_t v = vec_vsx_ld(0, a + i);
|
||||
s = vec_msum(v, v, s);
|
||||
}
|
||||
|
||||
s = vec_splat(vec_sums(s, vec_splat_s32(0)), 3);
|
||||
|
||||
vec_ste((uint32x4_t)s, 0, &sum);
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
void vpx_comp_avg_pred_vsx(uint8_t *comp_pred, const uint8_t *pred, int width,
|
||||
int height, const uint8_t *ref, int ref_stride) {
|
||||
int i, j;
|
||||
|
@ -1171,7 +1171,7 @@ add_proto qw/unsigned int vpx_mse8x8/, "const uint8_t *src_ptr, int source_stri
|
||||
specialize qw/vpx_mse8x8 sse2 msa/;
|
||||
|
||||
add_proto qw/unsigned int vpx_get_mb_ss/, "const int16_t *";
|
||||
specialize qw/vpx_get_mb_ss sse2 msa/;
|
||||
specialize qw/vpx_get_mb_ss sse2 msa vsx/;
|
||||
|
||||
add_proto qw/unsigned int vpx_get4x4sse_cs/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride";
|
||||
specialize qw/vpx_get4x4sse_cs neon msa vsx/;
|
||||
|
Loading…
Reference in New Issue
Block a user