Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
a2fa9ee3
Commit
a2fa9ee3
authored
Apr 03, 2017
by
Steinar Midtskogen
Browse files
Improve SSE2 implementation of v64_abs_s8 and v128_abs_s8
Change-Id: I5243432106c2456f1220adb9d8f24ae5e4249748
parent
6033fb85
Changes
2
Hide whitespace changes
Inline
Side-by-side
aom_dsp/simd/v128_intrinsics_x86.h
View file @
a2fa9ee3
...
...
@@ -124,9 +124,8 @@ SIMD_INLINE v128 v128_abs_s8(v128 a) {
#if defined(__SSSE3__)
return
_mm_abs_epi8
(
a
);
#else
v128
t
=
_mm_sub_epi8
(
_mm_setzero_si128
(),
a
);
v128
mask
=
_mm_cmplt_epi8
(
t
,
a
);
return
_mm_or_si128
(
_mm_andnot_si128
(
mask
,
t
),
_mm_and_si128
(
mask
,
a
));
v128
sign
=
_mm_cmplt_epi8
(
a
,
_mm_setzero_si128
());
return
_mm_xor_si128
(
sign
,
_mm_add_epi8
(
a
,
sign
));
#endif
}
...
...
aom_dsp/simd/v64_intrinsics_x86.h
View file @
a2fa9ee3
...
...
@@ -142,9 +142,8 @@ SIMD_INLINE v64 v64_abs_s8(v64 a) {
#if defined(__SSSE3__)
return
_mm_abs_epi8
(
a
);
#else
v64
t
=
_mm_sub_epi8
(
_mm_setzero_si128
(),
a
);
v64
mask
=
_mm_cmplt_epi8
(
t
,
a
);
return
_mm_or_si128
(
_mm_andnot_si128
(
mask
,
t
),
_mm_and_si128
(
mask
,
a
));
v64
sign
=
_mm_cmplt_epi8
(
a
,
_mm_setzero_si128
());
return
_mm_xor_si128
(
sign
,
_mm_add_epi8
(
a
,
sign
));
#endif
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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