Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
9a5771e9
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,发现更多精彩内容 >>
提交
9a5771e9
编写于
11月 23, 2008
作者:
M
Måns Rullgård
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Run regression tests on target system.
Originally committed as revision 15915 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
dbad2c29
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
48 addition
and
38 deletion
+48
-38
Makefile
Makefile
+4
-4
tests/regression.sh
tests/regression.sh
+40
-33
tests/seek_test.sh
tests/seek_test.sh
+4
-1
未找到文件。
Makefile
浏览文件 @
9a5771e9
...
...
@@ -299,14 +299,14 @@ $(CODEC_TESTS) $(LAVF_TESTS): regtest-ref
regtest-ref
:
ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw
$(CODEC_TESTS) regtest-ref
:
tests/tiny_psnr$(EXESUF)
$(SRC_PATH)
/tests/regression.sh
$@
vsynth tests/vsynth1 a
$(SRC_PATH)
/tests/regression.sh
$@
rotozoom tests/vsynth2 a
$(SRC_PATH)
/tests/regression.sh
$@
vsynth tests/vsynth1 a
"
$(TARGET_EXEC)
"
"
$(TARGET_PATH)
"
$(SRC_PATH)
/tests/regression.sh
$@
rotozoom tests/vsynth2 a
"
$(TARGET_EXEC)
"
"
$(TARGET_PATH)
"
$(LAVF_TESTS)
:
$(SRC_PATH)
/tests/regression.sh
$@
lavf tests/vsynth1 b
$(SRC_PATH)
/tests/regression.sh
$@
lavf tests/vsynth1 b
"
$(TARGET_EXEC)
"
"
$(TARGET_PATH)
"
seektest
:
codectest libavtest tests/seek_test$(EXESUF)
$(SRC_PATH)
/tests/seek_test.sh
$(SEEK_REFFILE)
$(SRC_PATH)
/tests/seek_test.sh
$(SEEK_REFFILE)
"
$(TARGET_EXEC)
"
"
$(TARGET_PATH)
"
servertest
:
ffserver$(EXESUF) tests/vsynth1/00.pgm tests/asynth1.sw
@
echo
...
...
tests/regression.sh
浏览文件 @
9a5771e9
...
...
@@ -7,7 +7,11 @@
set
-e
target_exec
=
$5
target_path
=
$6
datadir
=
"./tests/data"
target_datadir
=
"
${
target_path
}
/
${
datadir
}
"
test
=
"
${
1
#regtest-
}
"
this
=
"
$test
.
$2
"
...
...
@@ -17,18 +21,19 @@ outfile="$datadir/$4-"
eval
do_
$test
=
y
# various files
ffmpeg
=
"
.
/ffmpeg_g"
ffmpeg
=
"
$target_exec
${
target_path
}
/ffmpeg_g"
tiny_psnr
=
"tests/tiny_psnr"
benchfile
=
"
$datadir
/
$this
.bench"
bench
=
"
$datadir
/
$this
.bench.tmp"
bench2
=
"
$datadir
/
$this
.bench2.tmp"
raw_src
=
"
$3
/%02d.pgm"
raw_src
=
"
$
{
target_path
}
/
$
3
/%02d.pgm"
raw_dst
=
"
$datadir
/
$this
.out.yuv"
raw_ref
=
"
$datadir
/
$2
.ref.yuv"
pcm_src
=
"tests/asynth1.sw"
pcm_src
=
"
${
target_path
}
/
tests/asynth1.sw"
pcm_dst
=
"
$datadir
/
$this
.out.wav"
pcm_ref
=
"
$datadir
/
$2
.ref.wav"
crcfile
=
"
$datadir
/
$this
.crc"
target_crcfile
=
"
$target_datadir
/
$this
.crc"
if
[
X
"
`
echo
|
md5sum
2> /dev/null
`
"
!=
X
]
;
then
do_md5sum
()
{
md5sum
-b
$1
;
}
...
...
@@ -47,6 +52,7 @@ do_ffmpeg()
{
f
=
"
$1
"
shift
set
--
$*
${
target_path
}
/
$f
echo
$ffmpeg
$FFMPEG_OPTS
$*
$ffmpeg
$FFMPEG_OPTS
-benchmark
$*
>
$bench
2> /tmp/ffmpeg
$$
egrep
-v
"^(Stream|Press|Input|Output|frame| Stream| Duration|video:)"
/tmp/ffmpeg
$$
||
true
...
...
@@ -67,6 +73,7 @@ do_ffmpeg_nomd5()
{
f
=
"
$1
"
shift
set
--
$*
${
target_path
}
/
$f
echo
$ffmpeg
$FFMPEG_OPTS
$*
$ffmpeg
$FFMPEG_OPTS
-benchmark
$*
>
$bench
2> /tmp/ffmpeg
$$
egrep
-v
"^(Stream|Press|Input|Output|frame| Stream| Duration|video:)"
/tmp/ffmpeg
$$
||
true
...
...
@@ -86,8 +93,8 @@ do_ffmpeg_crc()
{
f
=
"
$1
"
shift
echo
$ffmpeg
$FFMPEG_OPTS
$*
-f
crc
"
$crcfile
"
$ffmpeg
$FFMPEG_OPTS
$*
-f
crc
"
$crcfile
"
>
/tmp/ffmpeg
$$
2>&1
echo
$ffmpeg
$FFMPEG_OPTS
$*
-f
crc
"
$
target_
crcfile
"
$ffmpeg
$FFMPEG_OPTS
$*
-f
crc
"
$
target_
crcfile
"
>
/tmp/ffmpeg
$$
2>&1
egrep
-v
"^(Stream|Press|Input|Output|frame| Stream| Duration|video:|ffmpeg version| configuration| built)"
/tmp/ffmpeg
$$
||
true
rm
-f
/tmp/ffmpeg
$$
echo
"
$f
`
cat
$crcfile
`
"
>>
$logfile
...
...
@@ -108,55 +115,55 @@ do_ffmpeg_nocheck()
do_video_decoding
()
{
do_ffmpeg
$raw_dst
$1
-i
$
file
-f
rawvideo
$2
$raw_dst
do_ffmpeg
$raw_dst
$1
-i
$
target_path
/
$file
-f
rawvideo
$2
rm
-f
$raw_dst
}
do_video_encoding
()
{
file
=
${
outfile
}
$1
do_ffmpeg
$file
$2
-f
image2
-vcodec
pgmyuv
-i
$raw_src
$3
$file
do_ffmpeg
$file
$2
-f
image2
-vcodec
pgmyuv
-i
$raw_src
$3
}
do_audio_encoding
()
{
file
=
${
outfile
}
$1
do_ffmpeg
$file
-ab
128k
-ac
2
-f
s16le
-i
$pcm_src
$3
$file
do_ffmpeg
$file
-ab
128k
-ac
2
-f
s16le
-i
$pcm_src
$3
}
do_audio_decoding
()
{
do_ffmpeg
$pcm_dst
-i
$
file
-sample_fmt
s16
-f
wav
$pcm_dst
do_ffmpeg
$pcm_dst
-i
$
target_path
/
$file
-sample_fmt
s16
-f
wav
}
do_libav
()
{
file
=
${
outfile
}
libav.
$1
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-f
s16le
-i
$pcm_src
$2
$file
do_ffmpeg_crc
$file
-i
$file
$3
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-f
s16le
-i
$pcm_src
$2
do_ffmpeg_crc
$file
-i
$
target_path
/
$
file
$3
}
do_streamed_images
()
{
file
=
${
outfile
}${
1
}
pipe.
$1
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-f
image2pipe
$file
do_ffmpeg_crc
$file
-f
image2pipe
-i
$file
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-f
image2pipe
do_ffmpeg_crc
$file
-f
image2pipe
-i
$
target_path
/
$
file
}
do_image_formats
()
{
file
=
${
outfile
}
libav%02d.
$1
$ffmpeg
-t
0.5
-y
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
$2
$3
-flags
+bitexact
-sws_flags
+accurate_rnd+bitexact
$file
$ffmpeg
-t
0.5
-y
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
$2
$3
-flags
+bitexact
-sws_flags
+accurate_rnd+bitexact
$
target_path
/
$
file
do_md5sum
${
outfile
}
libav02.
$1
>>
$logfile
do_ffmpeg_crc
$file
$3
-i
$file
do_ffmpeg_crc
$file
$3
-i
$
target_path
/
$
file
wc
-c
${
outfile
}
libav02.
$1
>>
$logfile
}
do_audio_only
()
{
file
=
${
outfile
}
libav.
$1
do_ffmpeg
$file
-t
1
-qscale
10
-f
s16le
-i
$pcm_src
$file
do_ffmpeg_crc
$file
-i
$file
do_ffmpeg
$file
-t
1
-qscale
10
-f
s16le
-i
$pcm_src
do_ffmpeg_crc
$file
-i
$
target_path
/
$
file
}
rm
-f
"
$logfile
"
...
...
@@ -164,8 +171,8 @@ rm -f "$benchfile"
# generate reference for quality check
if
[
-n
"
$do_ref
"
]
;
then
do_ffmpeg_nocheck
$raw_ref
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-an
-f
rawvideo
$raw_ref
do_ffmpeg_nocheck
$pcm_ref
-ab
128k
-ac
2
-ar
44100
-f
s16le
-i
$pcm_src
-f
wav
$pcm_ref
do_ffmpeg_nocheck
$raw_ref
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-an
-f
rawvideo
$
target_path
/
$
raw_ref
do_ffmpeg_nocheck
$pcm_ref
-ab
128k
-ac
2
-ar
44100
-f
s16le
-i
$pcm_src
-f
wav
$
target_path
/
$
pcm_ref
fi
if
[
-n
"
$do_mpeg
"
]
;
then
...
...
@@ -207,7 +214,7 @@ do_video_decoding
# mpeg2 encoding interlaced
file
=
${
outfile
}
mpeg2reuse.mpg
do_ffmpeg
$file
-sameq
-me_threshold
256
-mb_threshold
1024
-i
${
outfile
}
mpeg2thread.mpg
-vcodec
mpeg2video
-f
mpeg1video
-bf
2
-flags
+ildct+ilme
-threads
4
$file
do_ffmpeg
$file
-sameq
-me_threshold
256
-mb_threshold
1024
-i
${
target_path
}
/
${
outfile
}
mpeg2thread.mpg
-vcodec
mpeg2video
-f
mpeg1video
-bf
2
-flags
+ildct+ilme
-threads
4
do_video_decoding
fi
...
...
@@ -424,11 +431,11 @@ fi
if
[
-n
"
$do_wma
"
]
;
then
# wmav1
do_audio_encoding wmav1.asf
"-ar 44100"
"-acodec wmav1"
do_ffmpeg_nomd5
$pcm_dst
-i
$
file
-f
wav
$pcm_dst
do_ffmpeg_nomd5
$pcm_dst
-i
$
target_path
/
$file
-f
wav
$tiny_psnr
$pcm_dst
$pcm_ref
2 8192
>>
$logfile
# wmav2
do_audio_encoding wmav2.asf
"-ar 44100"
"-acodec wmav2"
do_ffmpeg_nomd5
$pcm_dst
-i
$
file
-f
wav
$pcm_dst
do_ffmpeg_nomd5
$pcm_dst
-i
$
target_path
/
$file
-f
wav
$tiny_psnr
$pcm_dst
$pcm_ref
2 8192
>>
$logfile
fi
...
...
@@ -481,9 +488,9 @@ fi
if
[
-n
"
$do_rm
"
]
;
then
file
=
${
outfile
}
libav.rm
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-f
s16le
-i
$pcm_src
$file
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-f
s16le
-i
$pcm_src
# broken
#do_ffmpeg_crc $file -i $file
#do_ffmpeg_crc $file -i $
target_path/$
file
fi
if
[
-n
"
$do_mpg
"
]
;
then
...
...
@@ -530,8 +537,8 @@ fi
# streamed images
# mjpeg
#file=${outfile}libav.mjpeg
#do_ffmpeg $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src
$file
#do_ffmpeg_crc $file -i $file
#do_ffmpeg $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src
#do_ffmpeg_crc $file -i $
target_path/$
file
if
[
-n
"
$do_pbmpipe
"
]
;
then
do_streamed_images pbm
...
...
@@ -547,14 +554,14 @@ fi
if
[
-n
"
$do_gif
"
]
;
then
file
=
${
outfile
}
libav.gif
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-pix_fmt
rgb24
$file
#do_ffmpeg_crc $file -i $file
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
-pix_fmt
rgb24
#do_ffmpeg_crc $file -i $
target_path/$
file
fi
if
[
-n
"
$do_yuv4mpeg
"
]
;
then
file
=
${
outfile
}
libav.y4m
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
$file
#do_ffmpeg_crc $file -i $file
do_ffmpeg
$file
-t
1
-qscale
10
-f
image2
-vcodec
pgmyuv
-i
$raw_src
#do_ffmpeg_crc $file -i $
target_path/$
file
fi
# image formats
...
...
@@ -630,9 +637,9 @@ conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \
for
pix_fmt
in
$conversions
;
do
file
=
${
outfile
}
libav-
${
pix_fmt
}
.yuv
do_ffmpeg_nocheck
$file
-r
1
-t
1
-f
image2
-vcodec
pgmyuv
-i
$raw_src
\
-f
rawvideo
-s
352x288
-pix_fmt
$pix_fmt
$raw_dst
do_ffmpeg
$file
-f
rawvideo
-s
352x288
-pix_fmt
$pix_fmt
-i
$raw_dst
\
-f
rawvideo
-s
352x288
-pix_fmt
yuv444p
$file
-f
rawvideo
-s
352x288
-pix_fmt
$pix_fmt
$
target_path
/
$
raw_dst
do_ffmpeg
$file
-f
rawvideo
-s
352x288
-pix_fmt
$pix_fmt
-i
$
target_path
/
$
raw_dst
\
-f
rawvideo
-s
352x288
-pix_fmt
yuv444p
done
fi
...
...
tests/seek_test.sh
浏览文件 @
9a5771e9
...
...
@@ -3,6 +3,9 @@
LC_ALL
=
C
export
LC_ALL
target_exec
=
$2
target_path
=
$3
datadir
=
"tests/data"
logfile
=
"
$datadir
/seek.regression"
...
...
@@ -13,7 +16,7 @@ rm -f $logfile
for
i
in
$list
;
do
echo
----------------
>>
$logfile
echo
$i
>>
$logfile
tests/seek_test
$i
>>
$logfile
$target_exec
$target_path
/tests/seek_test
$target_path
/
$i
>>
$logfile
done
if
diff
-u
-w
"
$reffile
"
"
$logfile
"
;
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录