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
9719d57b
Commit
9719d57b
authored
Dec 03, 2017
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/x86/vf_threshold : add avx2 version for threshold 8
parent
51345cb1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
vf_threshold.asm
libavfilter/x86/vf_threshold.asm
+6
-1
vf_threshold_init.c
libavfilter/x86/vf_threshold_init.c
+16
-2
No files found.
libavfilter/x86/vf_threshold.asm
View file @
9719d57b
...
...
@@ -34,7 +34,7 @@ SECTION .text
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
mova
m4
,
[
pb_128
]
VBROADCASTI128
m4
,
[
pb_128
]
add
inq
,
wq
add
thresholdq
,
wq
add
minq
,
wq
...
...
@@ -70,4 +70,9 @@ RET
INIT_XMM
sse4
THRESHOLD_8
%if
HAVE_AVX2_EXTERNAL
INIT_YMM
avx2
THRESHOLD_8
%endif
%endif
libavfilter/x86/vf_threshold_init.c
View file @
9719d57b
...
...
@@ -30,12 +30,26 @@ void ff_threshold8_sse4(const uint8_t *in, const uint8_t *threshold,
ptrdiff_t
flinesize
,
ptrdiff_t
slinesize
,
ptrdiff_t
olinesize
,
int
w
,
int
h
);
void
ff_threshold8_avx2
(
const
uint8_t
*
in
,
const
uint8_t
*
threshold
,
const
uint8_t
*
min
,
const
uint8_t
*
max
,
uint8_t
*
out
,
ptrdiff_t
ilinesize
,
ptrdiff_t
tlinesize
,
ptrdiff_t
flinesize
,
ptrdiff_t
slinesize
,
ptrdiff_t
olinesize
,
int
w
,
int
h
);
av_cold
void
ff_threshold_init_x86
(
ThresholdContext
*
s
)
{
int
cpu_flags
=
av_get_cpu_flags
();
if
(
ARCH_X86_64
&&
EXTERNAL_SSE4
(
cpu_flags
)
&&
s
->
depth
==
8
)
{
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
;
}
}
}
}
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