diff options
author | James Almer <jamrial@gmail.com> | 2019-03-14 14:04:55 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-03-14 14:15:46 -0300 |
commit | d0c43e32427ec1efac364be0987a6aafa695527f (patch) | |
tree | b1c66b7aff6cce563836422f329bccc770e08933 /tests/fate-run.sh | |
parent | a8c5ae451184e879fc8ff1333c6f26f9542c8ebf (diff) | |
parent | a70eac7a9b193e8434b5bed90bd72aa4cb688363 (diff) | |
download | ffmpeg-d0c43e32427ec1efac364be0987a6aafa695527f.tar.gz |
Merge commit 'a70eac7a9b193e8434b5bed90bd72aa4cb688363'
* commit 'a70eac7a9b193e8434b5bed90bd72aa4cb688363':
tests: Convert image2pipe tests to non-legacy test scripts
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-x | tests/fate-run.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh index f1a1e34c36..2d5dbf2f47 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -243,6 +243,53 @@ stream_remux(){ -f framecrc - || return } +# FIXME: There is a certain duplication between the avconv-related helper +# functions above and below that should be refactored. +ffmpeg2="$target_exec ${target_path}/ffmpeg" +raw_src="${target_path}/tests/vsynth1/%02d.pgm" +crcfile="tests/data/$test.lavf.crc" +target_crcfile="${target_path}/$crcfile" + +[ "${V-0}" -gt 0 ] && echov=echov || echov=: + +echov(){ + echo "$@" >&3 +} + +AVCONV_OPTS="-nostdin -nostats -y -cpuflags $cpuflags -threads $threads" +DEC_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact" +ENC_OPTS="$DEC_OPTS -threads $threads -dct fastint" + +run_avconv(){ + $echov $ffmpeg2 $AVCONV_OPTS $* + $ffmpeg2 $AVCONV_OPTS $* +} + +do_avconv(){ + f="$1" + shift + set -- $* ${target_path}/$f + run_avconv $* + do_md5sum $f + echo $(wc -c $f) +} + +do_avconv_crc(){ + f="$1" + shift + run_avconv $* -f crc "$target_crcfile" + echo "$f $(cat $crcfile)" +} + +lavf_image2pipe(){ + t="${test#lavf-}" + 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 +} + lavffatetest(){ t="${test#lavf-fate-}" ref=${base}/ref/lavf-fate/$t |