Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
a9a7ed4f
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,发现更多精彩内容 >>
提交
a9a7ed4f
编写于
3月 24, 2018
作者:
M
Martin Vignali
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
checkasm/swscale : add test for rgb shuffle_bytes func
上级
1ba5ca2d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
96 addition
and
0 deletion
+96
-0
tests/checkasm/Makefile
tests/checkasm/Makefile
+6
-0
tests/checkasm/checkasm.c
tests/checkasm/checkasm.c
+3
-0
tests/checkasm/checkasm.h
tests/checkasm/checkasm.h
+1
-0
tests/checkasm/sw_rgb.c
tests/checkasm/sw_rgb.c
+85
-0
tests/fate/checkasm.mak
tests/fate/checkasm.mak
+1
-0
未找到文件。
tests/checkasm/Makefile
浏览文件 @
a9a7ed4f
...
@@ -38,6 +38,12 @@ AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER) += vf_threshold.o
...
@@ -38,6 +38,12 @@ AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER) += vf_threshold.o
CHECKASMOBJS-$(CONFIG_AVFILTER)
+=
$
(
AVFILTEROBJS-yes
)
CHECKASMOBJS-$(CONFIG_AVFILTER)
+=
$
(
AVFILTEROBJS-yes
)
# swscale tests
SWSCALEOBJS
+=
sw_rgb.o
CHECKASMOBJS-$(CONFIG_SWSCALE)
+=
$(SWSCALEOBJS)
# libavutil tests
AVUTILOBJS
+=
fixed_dsp.o
AVUTILOBJS
+=
fixed_dsp.o
AVUTILOBJS
+=
float_dsp.o
AVUTILOBJS
+=
float_dsp.o
...
...
tests/checkasm/checkasm.c
浏览文件 @
a9a7ed4f
...
@@ -163,6 +163,9 @@ static const struct {
...
@@ -163,6 +163,9 @@ static const struct {
{
"vf_threshold"
,
checkasm_check_vf_threshold
},
{
"vf_threshold"
,
checkasm_check_vf_threshold
},
#endif
#endif
#endif
#endif
#if CONFIG_SWSCALE
{
"sw_rgb"
,
checkasm_check_sw_rgb
},
#endif
#if CONFIG_AVUTIL
#if CONFIG_AVUTIL
{
"fixed_dsp"
,
checkasm_check_fixed_dsp
},
{
"fixed_dsp"
,
checkasm_check_fixed_dsp
},
{
"float_dsp"
,
checkasm_check_float_dsp
},
{
"float_dsp"
,
checkasm_check_float_dsp
},
...
...
tests/checkasm/checkasm.h
浏览文件 @
a9a7ed4f
...
@@ -65,6 +65,7 @@ void checkasm_check_llviddspenc(void);
...
@@ -65,6 +65,7 @@ void checkasm_check_llviddspenc(void);
void
checkasm_check_pixblockdsp
(
void
);
void
checkasm_check_pixblockdsp
(
void
);
void
checkasm_check_sbrdsp
(
void
);
void
checkasm_check_sbrdsp
(
void
);
void
checkasm_check_synth_filter
(
void
);
void
checkasm_check_synth_filter
(
void
);
void
checkasm_check_sw_rgb
(
void
);
void
checkasm_check_utvideodsp
(
void
);
void
checkasm_check_utvideodsp
(
void
);
void
checkasm_check_v210enc
(
void
);
void
checkasm_check_v210enc
(
void
);
void
checkasm_check_vf_hflip
(
void
);
void
checkasm_check_vf_hflip
(
void
);
...
...
tests/checkasm/sw_rgb.c
0 → 100644
浏览文件 @
a9a7ed4f
/*
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with FFmpeg; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <string.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libswscale/rgb2rgb.h"
#include "checkasm.h"
#define randomize_buffers(buf, size) \
do { \
int j; \
for (j = 0; j < size; j+=4) \
AV_WN32(buf + j, rnd()); \
} while (0)
static
const
uint8_t
width
[]
=
{
12
,
16
,
20
,
32
,
36
,
128
};
#define MAX_STRIDE 128
static
void
check_shuffle_bytes
(
void
*
func
,
const
char
*
report
)
{
int
i
;
LOCAL_ALIGNED_32
(
uint8_t
,
src0
,
[
MAX_STRIDE
]);
LOCAL_ALIGNED_32
(
uint8_t
,
src1
,
[
MAX_STRIDE
]);
LOCAL_ALIGNED_32
(
uint8_t
,
dst0
,
[
MAX_STRIDE
]);
LOCAL_ALIGNED_32
(
uint8_t
,
dst1
,
[
MAX_STRIDE
]);
declare_func_emms
(
AV_CPU_FLAG_MMX
,
void
,
const
uint8_t
*
src
,
uint8_t
*
dst
,
int
src_size
);
memset
(
dst0
,
0
,
MAX_STRIDE
);
memset
(
dst1
,
0
,
MAX_STRIDE
);
randomize_buffers
(
src0
,
MAX_STRIDE
);
memcpy
(
src1
,
src0
,
MAX_STRIDE
);
if
(
check_func
(
func
,
"%s"
,
report
))
{
for
(
i
=
0
;
i
<
6
;
i
++
)
{
call_ref
(
src0
,
dst0
,
width
[
i
]);
call_new
(
src1
,
dst1
,
width
[
i
]);
if
(
memcmp
(
dst0
,
dst1
,
MAX_STRIDE
))
fail
();
}
bench_new
(
src0
,
dst0
,
width
[
5
]);
}
}
void
checkasm_check_sw_rgb
(
void
)
{
ff_sws_rgb2rgb_init
();
check_shuffle_bytes
(
shuffle_bytes_2103
,
"shuffle_bytes_2103"
);
report
(
"shuffle_bytes_2103"
);
check_shuffle_bytes
(
shuffle_bytes_0321
,
"shuffle_bytes_0321"
);
report
(
"shuffle_bytes_0321"
);
check_shuffle_bytes
(
shuffle_bytes_1230
,
"shuffle_bytes_1230"
);
report
(
"shuffle_bytes_1230"
);
check_shuffle_bytes
(
shuffle_bytes_3012
,
"shuffle_bytes_3012"
);
report
(
"shuffle_bytes_3012"
);
check_shuffle_bytes
(
shuffle_bytes_3210
,
"shuffle_bytes_3210"
);
report
(
"shuffle_bytes_3210"
);
}
tests/fate/checkasm.mak
浏览文件 @
a9a7ed4f
...
@@ -21,6 +21,7 @@ FATE_CHECKASM = fate-checkasm-aacpsdsp \
...
@@ -21,6 +21,7 @@ FATE_CHECKASM = fate-checkasm-aacpsdsp \
fate-checkasm-pixblockdsp
\
fate-checkasm-pixblockdsp
\
fate-checkasm-sbrdsp
\
fate-checkasm-sbrdsp
\
fate-checkasm-synth_filter
\
fate-checkasm-synth_filter
\
fate-checkasm-sw_rgb
\
fate-checkasm-v210enc
\
fate-checkasm-v210enc
\
fate-checkasm-vf_blend
\
fate-checkasm-vf_blend
\
fate-checkasm-vf_colorspace
\
fate-checkasm-vf_colorspace
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录