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
179a2f04
Commit
179a2f04
authored
Dec 07, 2017
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkasm/vf_threshold : add test for threshold16
parent
869efbf9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
vf_threshold.c
tests/checkasm/vf_threshold.c
+11
-5
No files found.
tests/checkasm/vf_threshold.c
View file @
179a2f04
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
tmp_buf[j] = rnd() & 0xFF; \
tmp_buf[j] = rnd() & 0xFF; \
} while (0)
} while (0)
static
void
check_threshold
_8
(
void
){
static
void
check_threshold
(
int
depth
){
LOCAL_ALIGNED_32
(
uint8_t
,
in
,
[
WIDTH_PADDED
]);
LOCAL_ALIGNED_32
(
uint8_t
,
in
,
[
WIDTH_PADDED
]);
LOCAL_ALIGNED_32
(
uint8_t
,
threshold
,
[
WIDTH_PADDED
]);
LOCAL_ALIGNED_32
(
uint8_t
,
threshold
,
[
WIDTH_PADDED
]);
LOCAL_ALIGNED_32
(
uint8_t
,
min
,
[
WIDTH_PADDED
]);
LOCAL_ALIGNED_32
(
uint8_t
,
min
,
[
WIDTH_PADDED
]);
...
@@ -49,7 +49,7 @@ static void check_threshold_8(void){
...
@@ -49,7 +49,7 @@ static void check_threshold_8(void){
ptrdiff_t
olinesize
,
int
w
,
int
h
);
ptrdiff_t
olinesize
,
int
w
,
int
h
);
ThresholdContext
s
;
ThresholdContext
s
;
s
.
depth
=
8
;
s
.
depth
=
depth
;
ff_threshold_init
(
&
s
);
ff_threshold_init
(
&
s
);
memset
(
in
,
0
,
WIDTH_PADDED
);
memset
(
in
,
0
,
WIDTH_PADDED
);
...
@@ -63,10 +63,13 @@ static void check_threshold_8(void){
...
@@ -63,10 +63,13 @@ static void check_threshold_8(void){
randomize_buffers
(
min
,
WIDTH
);
randomize_buffers
(
min
,
WIDTH
);
randomize_buffers
(
max
,
WIDTH
);
randomize_buffers
(
max
,
WIDTH
);
if
(
check_func
(
s
.
threshold
,
"threshold8"
))
{
if
(
depth
==
16
)
w
/=
2
;
if
(
check_func
(
s
.
threshold
,
"threshold%d"
,
depth
))
{
call_ref
(
in
,
threshold
,
min
,
max
,
out_ref
,
line_size
,
line_size
,
line_size
,
line_size
,
line_size
,
w
,
1
);
call_ref
(
in
,
threshold
,
min
,
max
,
out_ref
,
line_size
,
line_size
,
line_size
,
line_size
,
line_size
,
w
,
1
);
call_new
(
in
,
threshold
,
min
,
max
,
out_new
,
line_size
,
line_size
,
line_size
,
line_size
,
line_size
,
w
,
1
);
call_new
(
in
,
threshold
,
min
,
max
,
out_new
,
line_size
,
line_size
,
line_size
,
line_size
,
line_size
,
w
,
1
);
if
(
memcmp
(
out_ref
,
out_new
,
w
))
if
(
memcmp
(
out_ref
,
out_new
,
WIDTH
))
fail
();
fail
();
bench_new
(
in
,
threshold
,
min
,
max
,
out_new
,
line_size
,
line_size
,
line_size
,
line_size
,
line_size
,
w
,
1
);
bench_new
(
in
,
threshold
,
min
,
max
,
out_new
,
line_size
,
line_size
,
line_size
,
line_size
,
line_size
,
w
,
1
);
}
}
...
@@ -74,6 +77,9 @@ static void check_threshold_8(void){
...
@@ -74,6 +77,9 @@ static void check_threshold_8(void){
void
checkasm_check_vf_threshold
(
void
)
void
checkasm_check_vf_threshold
(
void
)
{
{
check_threshold
_8
(
);
check_threshold
(
8
);
report
(
"threshold8"
);
report
(
"threshold8"
);
check_threshold
(
16
);
report
(
"threshold16"
);
}
}
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