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
e1121f97
Commit
e1121f97
authored
Dec 02, 2017
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkasm/llviddsp : add test for add_gradient_pred
parent
630967ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
llviddsp.c
tests/checkasm/llviddsp.c
+30
-0
No files found.
tests/checkasm/llviddsp.c
View file @
e1121f97
...
...
@@ -165,6 +165,33 @@ static void check_add_left_pred_16(LLVidDSPContext c, unsigned mask, int width,
av_free
(
dst1
);
}
static
void
check_add_gradient_pred
(
LLVidDSPContext
c
,
int
w
)
{
int
src_size
,
stride
;
uint8_t
*
src0
,
*
src1
;
stride
=
w
+
32
;
src_size
=
(
stride
+
32
)
*
2
;
/* dsp need previous line, and ignore the start of the line */
src0
=
av_mallocz
(
src_size
);
src1
=
av_mallocz
(
src_size
);
declare_func_emms
(
AV_CPU_FLAG_MMX
,
void
,
uint8_t
*
src
,
const
ptrdiff_t
stride
,
const
ptrdiff_t
width
);
init_buffer
(
src0
,
src1
,
uint8_t
,
src_size
);
if
(
check_func
(
c
.
add_gradient_pred
,
"add_gradient_pred"
))
{
call_ref
(
src0
+
stride
+
32
,
stride
,
w
);
call_new
(
src1
+
stride
+
32
,
stride
,
w
);
if
(
memcmp
(
src0
,
src1
,
stride
)
||
/* previous line doesn't change */
memcmp
(
src0
+
stride
,
src1
+
stride
,
w
+
32
))
{
fail
();
}
bench_new
(
src1
+
stride
+
32
,
stride
,
w
);
}
av_free
(
src0
);
av_free
(
src1
);
}
void
checkasm_check_llviddsp
(
void
)
{
LLVidDSPContext
c
;
...
...
@@ -187,4 +214,7 @@ void checkasm_check_llviddsp(void)
check_add_left_pred_16
(
c
,
255
,
width
,
accRnd
,
"add_left_pred_int16"
);
report
(
"add_left_pred_int16"
);
check_add_gradient_pred
(
c
,
width
);
report
(
"add_gradient_pred"
);
}
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