Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
libvpx
Commits
143b21e3
Commit
143b21e3
authored
May 11, 2017
by
Luca Barbato
Committed by
James Zern
May 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc: Add get_mb_ss_vsx
Change-Id: I1b54a7a5bb642e4b836d786ea1ae506eed025e3f
parent
6d225eb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
test/variance_test.cc
test/variance_test.cc
+3
-0
vpx_dsp/ppc/variance_vsx.c
vpx_dsp/ppc/variance_vsx.c
+17
-0
vpx_dsp/vpx_dsp_rtcd_defs.pl
vpx_dsp/vpx_dsp_rtcd_defs.pl
+1
-1
No files found.
test/variance_test.cc
View file @
143b21e3
...
...
@@ -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
)));
...
...
vpx_dsp/ppc/variance_vsx.c
View file @
143b21e3
...
...
@@ -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
;
...
...
vpx_dsp/vpx_dsp_rtcd_defs.pl
View file @
143b21e3
...
...
@@ -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/
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment