Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
cc2ba526
Commit
cc2ba526
authored
Dec 04, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86/vf_threshold: make threshold8 functions work on x86_32
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
bfd7f07b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
vf_threshold.asm
libavfilter/x86/vf_threshold.asm
+11
-4
vf_threshold_init.c
libavfilter/x86/vf_threshold_init.c
+6
-8
No files found.
libavfilter/x86/vf_threshold.asm
View file @
cc2ba526
...
...
@@ -22,8 +22,6 @@
%include
"libavutil/x86/x86util.asm"
%if
ARCH_X86_64
SECTION_RODATA
pb_128
:
times
16
db
128
...
...
@@ -31,9 +29,20 @@ pb_128: times 16 db 128
SECTION
.
text
%macro
THRESHOLD_8
0
%if
ARCH_X86_64
cglobal
threshold8
,
10
,
13
,
5
,
in
,
threshold
,
min
,
max
,
out
,
ilinesize
,
tlinesize
,
flinesize
,
slinesize
,
olinesize
,
w
,
h
,
x
mov
wd
,
dword
wm
mov
hd
,
dword
hm
%else
cglobal
threshold8
,
5
,
7
,
5
,
in
,
threshold
,
min
,
max
,
out
,
w
,
x
mov
wd
,
r10m
%define
ilinesizeq
r5mp
%define
tlinesizeq
r6mp
%define
flinesizeq
r7mp
%define
slinesizeq
r8mp
%define
olinesizeq
r9mp
%define
hd
r11mp
%endif
VBROADCASTI128
m4
,
[
pb_128
]
add
inq
,
wq
add
thresholdq
,
wq
...
...
@@ -74,5 +83,3 @@ THRESHOLD_8
INIT_YMM
avx2
THRESHOLD_8
%endif
%endif
libavfilter/x86/vf_threshold_init.c
View file @
cc2ba526
...
...
@@ -42,14 +42,12 @@ av_cold void ff_threshold_init_x86(ThresholdContext *s)
{
int
cpu_flags
=
av_get_cpu_flags
();
if
(
ARCH_X86_64
)
{
if
(
s
->
depth
==
8
)
{
if
(
EXTERNAL_SSE4
(
cpu_flags
))
{
s
->
threshold
=
ff_threshold8_sse4
;
}
if
(
EXTERNAL_AVX2_FAST
(
cpu_flags
))
{
s
->
threshold
=
ff_threshold8_avx2
;
}
if
(
s
->
depth
==
8
)
{
if
(
EXTERNAL_SSE4
(
cpu_flags
))
{
s
->
threshold
=
ff_threshold8_sse4
;
}
if
(
EXTERNAL_AVX2_FAST
(
cpu_flags
))
{
s
->
threshold
=
ff_threshold8_avx2
;
}
}
}
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