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
f8abf7d4
Commit
f8abf7d4
authored
Feb 27, 2019
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkasm/h264: test 4:2:2 chroma loop filter functions
parent
186bd30a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
h264dsp.c
tests/checkasm/h264dsp.c
+26
-18
No files found.
tests/checkasm/h264dsp.c
View file @
f8abf7d4
...
@@ -341,9 +341,9 @@ static void check_loop_filter(void)
...
@@ -341,9 +341,9 @@ static void check_loop_filter(void)
c
=
c
*
9
/
10
;
c
=
c
*
9
/
10
;
}
}
#define CHECK_LOOP_FILTER(name, align,
...
) \
#define CHECK_LOOP_FILTER(name, align,
idc
) \
do { \
do { \
if (check_func(h.name, #name
"_%dbpp", bit_depth)) {
\
if (check_func(h.name, #name
#idc "_%dbpp", bit_depth)) {
\
for (j = 0; j < 36; j++) { \
for (j = 0; j < 36; j++) { \
intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \
intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \
for (i = 0; i < 1024; i+=4) { \
for (i = 0; i < 1024; i+=4) { \
...
@@ -355,7 +355,7 @@ static void check_loop_filter(void)
...
@@ -355,7 +355,7 @@ static void check_loop_filter(void)
call_ref(dst0 + off, 32, alphas[j], betas[j], tc0[j]); \
call_ref(dst0 + off, 32, alphas[j], betas[j], tc0[j]); \
call_new(dst1 + off, 32, alphas[j], betas[j], tc0[j]); \
call_new(dst1 + off, 32, alphas[j], betas[j], tc0[j]); \
if (memcmp(dst0, dst1, 32 * 16 * SIZEOF_PIXEL)) { \
if (memcmp(dst0, dst1, 32 * 16 * SIZEOF_PIXEL)) { \
fprintf(stderr, #name ": j:%d, alpha:%d beta:%d " \
fprintf(stderr, #name
#idc
": j:%d, alpha:%d beta:%d " \
"tc0:{%d,%d,%d,%d}\n", j, alphas[j], betas[j], \
"tc0:{%d,%d,%d,%d}\n", j, alphas[j], betas[j], \
tc0[j][0], tc0[j][1], tc0[j][2], tc0[j][3]); \
tc0[j][0], tc0[j][1], tc0[j][2], tc0[j][3]); \
fail(); \
fail(); \
...
@@ -365,12 +365,16 @@ static void check_loop_filter(void)
...
@@ -365,12 +365,16 @@ static void check_loop_filter(void)
} \
} \
} while (0)
} while (0)
CHECK_LOOP_FILTER
(
h264_v_loop_filter_luma
,
1
);
CHECK_LOOP_FILTER
(
h264_v_loop_filter_luma
,
1
,);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_luma
,
0
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_luma
,
0
,);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_luma_mbaff
,
0
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_luma_mbaff
,
0
,);
CHECK_LOOP_FILTER
(
h264_v_loop_filter_chroma
,
1
);
CHECK_LOOP_FILTER
(
h264_v_loop_filter_chroma
,
1
,);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma
,
0
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma
,
0
,);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_mbaff
,
0
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_mbaff
,
0
,);
ff_h264dsp_init
(
&
h
,
bit_depth
,
2
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma
,
0
,
422
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_mbaff
,
0
,
422
);
#undef CHECK_LOOP_FILTER
#undef CHECK_LOOP_FILTER
}
}
}
}
...
@@ -397,9 +401,9 @@ static void check_loop_filter_intra(void)
...
@@ -397,9 +401,9 @@ static void check_loop_filter_intra(void)
a
=
a
*
9
/
10
;
a
=
a
*
9
/
10
;
}
}
#define CHECK_LOOP_FILTER(name, align
)
\
#define CHECK_LOOP_FILTER(name, align
, idc)
\
do { \
do { \
if (check_func(h.name, #name
"_%dbpp", bit_depth)) {
\
if (check_func(h.name, #name
#idc "_%dbpp", bit_depth)) {
\
for (j = 0; j < 36; j++) { \
for (j = 0; j < 36; j++) { \
intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \
intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \
for (i = 0; i < 1024; i+=4) { \
for (i = 0; i < 1024; i+=4) { \
...
@@ -411,7 +415,7 @@ static void check_loop_filter_intra(void)
...
@@ -411,7 +415,7 @@ static void check_loop_filter_intra(void)
call_ref(dst0 + off, 32, alphas[j], betas[j]); \
call_ref(dst0 + off, 32, alphas[j], betas[j]); \
call_new(dst1 + off, 32, alphas[j], betas[j]); \
call_new(dst1 + off, 32, alphas[j], betas[j]); \
if (memcmp(dst0, dst1, 32 * 16 * SIZEOF_PIXEL)) { \
if (memcmp(dst0, dst1, 32 * 16 * SIZEOF_PIXEL)) { \
fprintf(stderr, #name ": j:%d, alpha:%d beta:%d\n", \
fprintf(stderr, #name
#idc
": j:%d, alpha:%d beta:%d\n", \
j, alphas[j], betas[j]); \
j, alphas[j], betas[j]); \
fail(); \
fail(); \
} \
} \
...
@@ -420,12 +424,16 @@ static void check_loop_filter_intra(void)
...
@@ -420,12 +424,16 @@ static void check_loop_filter_intra(void)
} \
} \
} while (0)
} while (0)
CHECK_LOOP_FILTER
(
h264_v_loop_filter_luma_intra
,
1
);
CHECK_LOOP_FILTER
(
h264_v_loop_filter_luma_intra
,
1
,);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_luma_intra
,
0
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_luma_intra
,
0
,);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_luma_mbaff_intra
,
0
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_luma_mbaff_intra
,
0
,);
CHECK_LOOP_FILTER
(
h264_v_loop_filter_chroma_intra
,
1
);
CHECK_LOOP_FILTER
(
h264_v_loop_filter_chroma_intra
,
1
,);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_intra
,
0
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_intra
,
0
,);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_mbaff_intra
,
0
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_mbaff_intra
,
0
,);
ff_h264dsp_init
(
&
h
,
bit_depth
,
2
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_intra
,
0
,
422
);
CHECK_LOOP_FILTER
(
h264_h_loop_filter_chroma_mbaff_intra
,
0
,
422
);
#undef CHECK_LOOP_FILTER
#undef CHECK_LOOP_FILTER
}
}
}
}
...
...
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