summaryrefslogtreecommitdiff
path: root/tests/fate-run.sh
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2020-08-14 18:58:27 +0200
committerNicolas George <george@nsup.org>2020-09-08 14:16:08 +0200
commitf08e024ac7d249064648a43bab06ed545f8827c7 (patch)
tree2e681510e2b97e29d06ce00e412d168639fe280d /tests/fate-run.sh
parent697fb09e3dd187b76f1bc57516fcbe482b4d89e2 (diff)
fate: disable automatic conversions on many tests.
Explicitly insert the scale or aresample filter where it would have been inserted by the negotiation. Re-enable conversions if it cannot be done easily. If a conversion is needed in a test, we want to know about it. If the negotiation changes and makes new conversion necessary, we want to know about it even more.
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-xtests/fate-run.sh54
1 files changed, 27 insertions, 27 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 071602ff4c..1b283e9c35 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -127,7 +127,7 @@ probegaplessinfo(){
ffmpeg(){
dec_opts="-hwaccel $hwaccel -threads $threads -thread_type $thread_type"
- ffmpeg_args="-nostdin -nostats -cpuflags $cpuflags"
+ ffmpeg_args="-nostdin -nostats -noauto_conversion_filters -cpuflags $cpuflags"
for arg in $@; do
[ x${arg} = x-i ] && ffmpeg_args="${ffmpeg_args} ${dec_opts}"
ffmpeg_args="${ffmpeg_args} ${arg}"
@@ -163,7 +163,7 @@ md5(){
}
pcm(){
- ffmpeg "$@" -vn -f s16le -
+ ffmpeg -auto_conversion_filters "$@" -vn -f s16le -
}
fmtstdout(){
@@ -181,8 +181,8 @@ enc_dec_pcm(){
encfile="${outdir}/${test}.${out_fmt}"
cleanfiles=$encfile
encfile=$(target_path ${encfile})
- ffmpeg -i $src_file "$@" -f $out_fmt -y ${encfile} || return
- ffmpeg -bitexact -i ${encfile} -c:a pcm_${pcm_fmt} -fflags +bitexact -f ${dec_fmt} -
+ ffmpeg -auto_conversion_filters -i $src_file "$@" -f $out_fmt -y ${encfile} || return
+ ffmpeg -auto_conversion_filters -bitexact -i ${encfile} -c:a pcm_${pcm_fmt} -fflags +bitexact -f ${dec_fmt} -
}
FLAGS="-flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact"
@@ -204,11 +204,11 @@ enc_dec(){
tsrcfile=$(target_path $srcfile)
tencfile=$(target_path $encfile)
tdecfile=$(target_path $decfile)
- ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \
+ ffmpeg -auto_conversion_filters -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \
-f $enc_fmt -y $tencfile || return
do_md5sum $encfile
echo $(wc -c $encfile)
- ffmpeg $8 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \
+ ffmpeg -auto_conversion_filters $8 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \
-f $dec_fmt -y $tdecfile || return
do_md5sum $decfile
tests/tiny_psnr${HOSTEXECSUF} $srcfile $decfile $cmp_unit $cmp_shift
@@ -270,7 +270,7 @@ echov(){
echo "$@" >&3
}
-AVCONV_OPTS="-nostdin -nostats -y -cpuflags $cpuflags"
+AVCONV_OPTS="-nostdin -nostats -noauto_conversion_filters -y -cpuflags $cpuflags"
COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact"
DEC_OPTS="$COMMON_OPTS -threads $threads"
ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint"
@@ -300,17 +300,17 @@ lavf_audio(){
t="${test#lavf-}"
outdir="tests/data/lavf"
file=${outdir}/lavf.$t
- do_avconv $file $DEC_OPTS $1 -ar 44100 -f s16le -i $pcm_src "$ENC_OPTS -metadata title=lavftest" -t 1 -qscale 10 $2
- do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file
+ do_avconv $file -auto_conversion_filters $DEC_OPTS $1 -ar 44100 -f s16le -i $pcm_src "$ENC_OPTS -metadata title=lavftest" -t 1 -qscale 10 $2
+ do_avconv_crc $file -auto_conversion_filters $DEC_OPTS $3 -i $target_path/$file
}
lavf_container(){
t="${test#lavf-}"
outdir="tests/data/lavf"
file=${outdir}/lavf.$t
- do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $1 -i $pcm_src "$ENC_OPTS -metadata title=lavftest" -b:a 64k -t 1 -qscale:v 10 $2
+ do_avconv $file -auto_conversion_filters $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $1 -i $pcm_src "$ENC_OPTS -metadata title=lavftest" -b:a 64k -t 1 -qscale:v 10 $2
test "$3" = "disable_crc" ||
- do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
+ do_avconv_crc $file -auto_conversion_filters $DEC_OPTS -i $target_path/$file $3
}
lavf_container_attach() { lavf_container "" "$1 -attach ${raw_src%/*}/00.pgm -metadata:s:t mimetype=image/x-portable-greymap"; }
@@ -330,8 +330,8 @@ lavf_container_fate()
outdir="tests/data/lavf-fate"
file=${outdir}/lavf.$t
input="${target_samples}/$1"
- do_avconv $file $DEC_OPTS $2 -i "$input" "$ENC_OPTS -metadata title=lavftest" -vcodec copy -acodec copy
- do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
+ do_avconv $file -auto_conversion_filters $DEC_OPTS $2 -i "$input" "$ENC_OPTS -metadata title=lavftest" -vcodec copy -acodec copy
+ do_avconv_crc $file -auto_conversion_filters $DEC_OPTS -i $target_path/$file $3
}
lavf_image(){
@@ -339,9 +339,9 @@ lavf_image(){
outdir="tests/data/images/$t"
mkdir -p "$outdir"
file=${outdir}/%02d.$t
- run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $1 "$ENC_OPTS -metadata title=lavftest" -frames 13 -y -qscale 10 $target_path/$file
+ run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $1 "$ENC_OPTS -metadata title=lavftest" -vf scale -frames 13 -y -qscale 10 $target_path/$file
do_md5sum ${outdir}/02.$t
- do_avconv_crc $file $DEC_OPTS $2 -i $target_path/$file $2
+ do_avconv_crc $file -auto_conversion_filters $DEC_OPTS $2 -i $target_path/$file $2
echo $(wc -c ${outdir}/02.$t)
}
@@ -350,16 +350,16 @@ lavf_image2pipe(){
t="${t%pipe}"
outdir="tests/data/lavf"
file=${outdir}/${t}pipe.$t
- do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe "$ENC_OPTS -metadata title=lavftest" -t 1 -qscale 10
- do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file
+ do_avconv $file -auto_conversion_filters $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe "$ENC_OPTS -metadata title=lavftest" -t 1 -qscale 10
+ do_avconv_crc $file -auto_conversion_filters $DEC_OPTS -f image2pipe -i $target_path/$file
}
lavf_video(){
t="${test#lavf-}"
outdir="tests/data/lavf"
file=${outdir}/lavf.$t
- do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src "$ENC_OPTS -metadata title=lavftest" -t 1 -qscale 10 $1 $2
- do_avconv_crc $file $DEC_OPTS -i $target_path/$file $1
+ do_avconv $file -auto_conversion_filters $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src "$ENC_OPTS -metadata title=lavftest" -t 1 -qscale 10 $1 $2
+ do_avconv_crc $file -auto_conversion_filters $DEC_OPTS -i $target_path/$file $1
}
refcmp_metadata(){
@@ -416,7 +416,7 @@ pixfmts(){
outertest=$test
for pix_fmt in $pix_fmts; do
test=$pix_fmt
- video_filter "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt -frames:v $nframes
+ video_filter "${prefilter_chain}scale,format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt -frames:v $nframes
done
rm $in_fmts $scale_in_fmts $scale_out_fmts $scale_exclude_fmts
@@ -433,16 +433,16 @@ gapless(){
cleanfiles="$cleanfiles $decfile1 $decfile2 $decfile3"
# test packet data
- ffmpeg $extra_args -i "$sample" -bitexact -c:a copy -f framecrc -y $(target_path $decfile1)
+ ffmpeg -auto_conversion_filters $extra_args -i "$sample" -bitexact -c:a copy -f framecrc -y $(target_path $decfile1)
do_md5sum $decfile1
# test decoded (and cut) data
- ffmpeg $extra_args -i "$sample" -bitexact -f wav md5:
+ ffmpeg -auto_conversion_filters $extra_args -i "$sample" -bitexact -f wav md5:
# the same as above again, with seeking to the start
- ffmpeg $extra_args -ss 0 -seek_timestamp 1 -i "$sample" -bitexact -c:a copy -f framecrc -y $(target_path $decfile2)
+ ffmpeg -auto_conversion_filters $extra_args -ss 0 -seek_timestamp 1 -i "$sample" -bitexact -c:a copy -f framecrc -y $(target_path $decfile2)
do_md5sum $decfile2
- ffmpeg $extra_args -ss 0 -seek_timestamp 1 -i "$sample" -bitexact -f wav md5:
+ ffmpeg -auto_conversion_filters $extra_args -ss 0 -seek_timestamp 1 -i "$sample" -bitexact -f wav md5:
# test packet data, with seeking to a specific position
- ffmpeg $extra_args -ss 5 -seek_timestamp 1 -i "$sample" -bitexact -c:a copy -f framecrc -y $(target_path $decfile3)
+ ffmpeg -auto_conversion_filters $extra_args -ss 5 -seek_timestamp 1 -i "$sample" -bitexact -c:a copy -f framecrc -y $(target_path $decfile3)
do_md5sum $decfile3
}
@@ -455,7 +455,7 @@ gaplessenc(){
cleanfiles="$cleanfiles $file1"
# test data after reencoding
- ffmpeg -i "$sample" -bitexact -map 0:a -c:a $codec -f $format -y "$(target_path "$file1")"
+ ffmpeg -i "$sample" -bitexact -map 0:a -c:a $codec -af aresample -f $format -y "$(target_path "$file1")"
probegaplessinfo "$(target_path "$file1")"
}
@@ -467,7 +467,7 @@ audio_match(){
decfile="${outdir}/${test}.wav"
cleanfiles="$cleanfiles $decfile"
- ffmpeg -i "$sample" -bitexact $extra_args -y $(target_path $decfile)
+ ffmpeg -auto_conversion_filters -i "$sample" -bitexact $extra_args -y $(target_path $decfile)
tests/audiomatch${HOSTEXECSUF} $decfile $trefile
}