summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-10 04:01:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-10 04:03:17 +0200
commitb97b4b58a6e1ac595002b3e3f3469161771c6003 (patch)
tree8c2833931fb16084f95bf0adf8317e1fa28aca12 /tests
parent67d441499a042edcfb0f8a120e6196d10b1d13db (diff)
parenta88ef93b4abbea9f18c8750113dc9e99931f2f8a (diff)
Merge remote branch 'qatar/master'
* qatar/master: mpegaudiodec: group #includes more sanely mpegaudio: remove #if 0 blocks ffmpeg.c: reset avoptions after each input/output file. ffmpeg.c: store per-output stream sws flags. mpegaudio: remove CONFIG_MPEGAUDIO_HP option mpegtsenc: Clear st->priv_data when freeing it udp: Fix receiving RTP data over multicast rtpproto: Remove an unused variable regtest: fix wma tests NOT pulled: mpegaudio: remove CONFIG_AUDIO_NONSHORT regtest: separate flags for encoding and decoding Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/codec-regression.sh6
-rwxr-xr-xtests/lavf-regression.sh32
-rwxr-xr-xtests/lavfi-regression.sh4
-rwxr-xr-xtests/regression-funcs.sh13
4 files changed, 29 insertions, 26 deletions
diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh
index 07be0aeeb6..95b99e351a 100755
--- a/tests/codec-regression.sh
+++ b/tests/codec-regression.sh
@@ -61,7 +61,7 @@ do_video_decoding
# mpeg2 encoding interlaced
file=${outfile}mpeg2reuse.mpg
-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_ffmpeg $file $DEC_OPTS -me_threshold 256 -i ${target_path}/${outfile}mpeg2thread.mpg $ENC_OPTS -sameq -me_threshold 256 -mb_threshold 1024 -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 4
do_video_decoding
fi
@@ -328,12 +328,12 @@ fi
if [ -n "$do_wmav1" ] ; then
do_audio_encoding wmav1.asf "-acodec wmav1"
-do_ffmpeg_nomd5 $pcm_dst -i $target_path/$file -f wav
+do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav
$tiny_psnr $pcm_dst $pcm_ref 2 8192 >> $logfile
fi
if [ -n "$do_wmav2" ] ; then
do_audio_encoding wmav2.asf "-acodec wmav2"
-do_ffmpeg_nomd5 $pcm_dst -i $target_path/$file -f wav
+do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav
$tiny_psnr $pcm_dst $pcm_ref 2 8192 >> $logfile
fi
diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index 7339c4e3c5..28f53f78b0 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -14,15 +14,15 @@ eval do_$test=y
do_lavf()
{
file=${outfile}lavf.$1
- 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_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $2
+ do_ffmpeg_crc $file $DEC_OPTS -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
- do_ffmpeg_crc $file -f image2pipe -i $target_path/$file
+ do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10
+ do_ffmpeg_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file
}
do_image_formats()
@@ -30,17 +30,17 @@ do_image_formats()
outfile="$datadir/images/$1/"
mkdir -p "$outfile"
file=${outfile}%02d.$1
- run_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
+ run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file
do_md5sum ${outfile}02.$1 >> $logfile
- do_ffmpeg_crc $file $3 -i $target_path/$file
+ do_ffmpeg_crc $file $DEC_OPTS $3 -i $target_path/$file
wc -c ${outfile}02.$1 >> $logfile
}
do_audio_only()
{
file=${outfile}lavf.$1
- do_ffmpeg $file -t 1 -qscale 10 $2 -f s16le -i $pcm_src $3
- do_ffmpeg_crc $file -i $target_path/$file
+ do_ffmpeg $file $DEC_OPTS $2 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3
+ do_ffmpeg_crc $file $DEC_OPTS -i $target_path/$file
}
rm -f "$logfile"
@@ -56,7 +56,7 @@ fi
if [ -n "$do_rm" ] ; then
file=${outfile}lavf.rm
-do_ffmpeg $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec ac3_fixed
+do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed
# broken
#do_ffmpeg_crc $file -i $target_path/$file
fi
@@ -127,13 +127,13 @@ fi
if [ -n "$do_gif" ] ; then
file=${outfile}lavf.gif
-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 -pix_fmt rgb24
+do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24
+do_ffmpeg_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24
fi
if [ -n "$do_yuv4mpeg" ] ; then
file=${outfile}lavf.y4m
-do_ffmpeg $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src
+do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10
#do_ffmpeg_crc $file -i $target_path/$file
fi
@@ -227,9 +227,9 @@ conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \
monob yuv440p yuvj440p"
for pix_fmt in $conversions ; do
file=${outfile}${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 $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
+ do_ffmpeg_nocheck $file $DEC_OPTS -r 1 -t 1 -f image2 -vcodec pgmyuv -i $raw_src \
+ $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst
+ do_ffmpeg $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \
+ $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p
done
fi
diff --git a/tests/lavfi-regression.sh b/tests/lavfi-regression.sh
index 7a5f239675..129358090e 100755
--- a/tests/lavfi-regression.sh
+++ b/tests/lavfi-regression.sh
@@ -19,8 +19,8 @@ do_video_filter() {
filters=$2
shift 2
printf '%-20s' $label >>$logfile
- run_ffmpeg -f image2 -vcodec pgmyuv -i $raw_src \
- -vf "$filters" -vcodec rawvideo $* -f nut md5: >>$logfile
+ run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \
+ $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: >>$logfile
}
do_lavfi() {
diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh
index 77ede1d5b7..0e4ea44f46 100755
--- a/tests/regression-funcs.sh
+++ b/tests/regression-funcs.sh
@@ -53,7 +53,10 @@ echov(){
. $(dirname $0)/md5.sh
-FFMPEG_OPTS="-v 0 -threads $threads -y -flags +bitexact -dct fastint -idct simple -sws_flags +accurate_rnd+bitexact"
+FFMPEG_OPTS="-v 0 -y"
+COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact"
+DEC_OPTS="$COMMON_OPTS -threads $threads"
+ENC_OPTS="$COMMON_OPTS -dct fastint"
run_ffmpeg()
{
@@ -115,22 +118,22 @@ do_ffmpeg_nocheck()
do_video_decoding()
{
- do_ffmpeg $raw_dst $1 -i $target_path/$file -f rawvideo $2
+ do_ffmpeg $raw_dst $DEC_OPTS $1 -i $target_path/$file -f rawvideo $ENC_OPTS $2
}
do_video_encoding()
{
file=${outfile}$1
- do_ffmpeg $file -f image2 -vcodec pgmyuv -i $raw_src $2
+ do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS $2
}
do_audio_encoding()
{
file=${outfile}$1
- do_ffmpeg $file -ab 128k -ac 2 -f s16le -i $pcm_src $2
+ do_ffmpeg $file $DEC_OPTS -ac 2 -f s16le -i $pcm_src -ab 128k $ENC_OPTS $2
}
do_audio_decoding()
{
- do_ffmpeg $pcm_dst -i $target_path/$file -sample_fmt s16 -f wav
+ do_ffmpeg $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav
}