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
5bdffced
Commit
5bdffced
authored
May 13, 2020
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkasm: pixblockdsp: Add tests for get_pixels_unaligned and diff_pixels_unaligned
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
70b14cc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
pixblockdsp.c
tests/checkasm/pixblockdsp.c
+10
-6
No files found.
tests/checkasm/pixblockdsp.c
View file @
5bdffced
...
...
@@ -44,13 +44,13 @@
} \
} while (0)
#define check_get_pixels(type
)
\
#define check_get_pixels(type
, aligned)
\
do { \
int i; \
declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *block, const uint8_t *pixels, ptrdiff_t line_size); \
\
for (i = 0; i < BUF_UNITS; i++) { \
int src_offset = i * 64 * sizeof(type) +
8 * i;
/* Test various alignments */
\
int src_offset = i * 64 * sizeof(type) +
(aligned ? 8 : 1) * i;
\
int dst_offset = i * 64;
/* dst must be aligned */
\
randomize_buffers(); \
call_ref(dst0 + dst_offset, src10 + src_offset, 8); \
...
...
@@ -61,13 +61,13 @@
} \
} while (0)
#define check_diff_pixels(type
)
\
#define check_diff_pixels(type
, aligned)
\
do { \
int i; \
declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, ptrdiff_t stride); \
\
for (i = 0; i < BUF_UNITS; i++) { \
int src_offset = i * 64 * sizeof(type) +
8 * i;
/* Test various alignments */
\
int src_offset = i * 64 * sizeof(type) +
(aligned ? 8 : 1) * i;
\
int dst_offset = i * 64;
/* dst must be aligned */
\
randomize_buffers(); \
call_ref(dst0 + dst_offset, src10 + src_offset, src20 + src_offset, 8); \
...
...
@@ -96,12 +96,16 @@ void checkasm_check_pixblockdsp(void)
ff_pixblockdsp_init
(
&
h
,
&
avctx
);
if
(
check_func
(
h
.
get_pixels
,
"get_pixels"
))
check_get_pixels
(
uint8_t
);
check_get_pixels
(
uint8_t
,
1
);
if
(
check_func
(
h
.
get_pixels_unaligned
,
"get_pixels_unaligned"
))
check_get_pixels
(
uint8_t
,
0
);
report
(
"get_pixels"
);
if
(
check_func
(
h
.
diff_pixels
,
"diff_pixels"
))
check_diff_pixels
(
uint8_t
);
check_diff_pixels
(
uint8_t
,
1
);
if
(
check_func
(
h
.
diff_pixels_unaligned
,
"diff_pixels_unaligned"
))
check_diff_pixels
(
uint8_t
,
0
);
report
(
"diff_pixels"
);
}
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