Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
e3fc36a8
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e3fc36a8
编写于
2月 17, 2018
作者:
M
Martin Vignali
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
checkasm/vf_blend : add depth param in order to add test for 16 bit version
上级
c8552b78
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
28 deletion
+29
-28
tests/checkasm/vf_blend.c
tests/checkasm/vf_blend.c
+29
-28
未找到文件。
tests/checkasm/vf_blend.c
浏览文件 @
e3fc36a8
...
...
@@ -60,28 +60,29 @@
} \
} while (0)
#define check_blend_func(
)
\
#define check_blend_func(
depth)
\
do { \
int i
;
\
int i
, w;
\
declare_func(void, const uint8_t *top, ptrdiff_t top_linesize, \
const uint8_t *bottom, ptrdiff_t bottom_linesize, \
uint8_t *dst, ptrdiff_t dst_linesize, \
ptrdiff_t width, ptrdiff_t height, \
struct FilterParams *param, double *values); \
w = WIDTH / depth; \
\
for (i = 0; i < BUF_UNITS - 1; i++) { \
int src_offset = i * SIZE_PER_UNIT + i;
/* Test various alignments */
\
int dst_offset = i * SIZE_PER_UNIT;
/* dst must be aligned */
\
randomize_buffers(); \
call_ref(top1 + src_offset,
WIDTH, bot1 + src_offset, WIDTH,
\
dst1 + dst_offset,
WIDTH, WIDTH, HEIGHT, ¶m, NULL);
\
call_new(top2 + src_offset,
WIDTH, bot2 + src_offset, WIDTH,
\
dst2 + dst_offset,
WIDTH, WIDTH, HEIGHT, ¶m, NULL);
\
call_ref(top1 + src_offset,
w, bot1 + src_offset, w,
\
dst1 + dst_offset,
w, w, HEIGHT, ¶m, NULL);
\
call_new(top2 + src_offset,
w, bot2 + src_offset, w,
\
dst2 + dst_offset,
w, w, HEIGHT, ¶m, NULL);
\
if (memcmp(top1, top2, BUF_SIZE) || memcmp(bot1, bot2, BUF_SIZE) || memcmp(dst1, dst2, BUF_SIZE)) \
fail(); \
} \
bench_new(top2,
WIDTH / 4, bot2, WIDTH / 4, dst2, WIDTH / 4,
\
WIDTH / 4, HEIGHT / 4, ¶m, NULL);
\
bench_new(top2,
w / 4, bot2, w / 4, dst2, w / 4,
\
w / 4, HEIGHT / 4, ¶m, NULL);
\
} while (0)
void
checkasm_check_blend
(
void
)
...
...
@@ -96,29 +97,29 @@ void checkasm_check_blend(void)
.
opacity
=
1
.
0
,
};
#define check_and_report(name, val
)
\
#define check_and_report(name, val
, depth)
\
param.mode = val; \
ff_blend_init(¶m,
0);
\
ff_blend_init(¶m,
depth - 1);
\
if (check_func(param.blend, #name)) \
check_blend_func();
check_blend_func(
depth
);
check_and_report
(
addition
,
BLEND_ADDITION
)
check_and_report
(
grainmerge
,
BLEND_GRAINMERGE
)
check_and_report
(
and
,
BLEND_AND
)
check_and_report
(
average
,
BLEND_AVERAGE
)
check_and_report
(
darken
,
BLEND_DARKEN
)
check_and_report
(
grainextract
,
BLEND_GRAINEXTRACT
)
check_and_report
(
hardmix
,
BLEND_HARDMIX
)
check_and_report
(
lighten
,
BLEND_LIGHTEN
)
check_and_report
(
multiply
,
BLEND_MULTIPLY
)
check_and_report
(
or
,
BLEND_OR
)
check_and_report
(
phoenix
,
BLEND_PHOENIX
)
check_and_report
(
screen
,
BLEND_SCREEN
)
check_and_report
(
subtract
,
BLEND_SUBTRACT
)
check_and_report
(
xor
,
BLEND_XOR
)
check_and_report
(
difference
,
BLEND_DIFFERENCE
)
check_and_report
(
extremity
,
BLEND_EXTREMITY
)
check_and_report
(
negation
,
BLEND_NEGATION
)
check_and_report
(
addition
,
BLEND_ADDITION
,
1
)
check_and_report
(
grainmerge
,
BLEND_GRAINMERGE
,
1
)
check_and_report
(
and
,
BLEND_AND
,
1
)
check_and_report
(
average
,
BLEND_AVERAGE
,
1
)
check_and_report
(
darken
,
BLEND_DARKEN
,
1
)
check_and_report
(
grainextract
,
BLEND_GRAINEXTRACT
,
1
)
check_and_report
(
hardmix
,
BLEND_HARDMIX
,
1
)
check_and_report
(
lighten
,
BLEND_LIGHTEN
,
1
)
check_and_report
(
multiply
,
BLEND_MULTIPLY
,
1
)
check_and_report
(
or
,
BLEND_OR
,
1
)
check_and_report
(
phoenix
,
BLEND_PHOENIX
,
1
)
check_and_report
(
screen
,
BLEND_SCREEN
,
1
)
check_and_report
(
subtract
,
BLEND_SUBTRACT
,
1
)
check_and_report
(
xor
,
BLEND_XOR
,
1
)
check_and_report
(
difference
,
BLEND_DIFFERENCE
,
1
)
check_and_report
(
extremity
,
BLEND_EXTREMITY
,
1
)
check_and_report
(
negation
,
BLEND_NEGATION
,
1
)
report
(
"8bit"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录