3 # common regression functions for ffmpeg
16 datadir="./tests/data"
17 target_datadir="${target_path}/${datadir}"
19 this="$test.$test_ref"
20 outfile="$datadir/$test_ref/"
23 ffmpeg="$target_exec ${target_path}/ffmpeg${PROGSUF}"
24 raw_src="${target_path}/$raw_src_dir/%02d.pgm"
25 raw_dst="$datadir/$this.out.yuv"
26 pcm_src="$target_datadir/asynth1.sw"
27 pcm_src_1ch="$target_datadir/asynth-16000-1.wav"
28 pcm_ref_1ch="$datadir/$test_ref-16000-1.ref.wav"
29 crcfile="$datadir/$this.crc"
30 target_crcfile="$target_datadir/$this.crc"
32 cleanfiles="$raw_dst $crcfile"
33 trap 'rm -f -- $cleanfiles' EXIT
38 [ "${V-0}" -gt 0 ] && echov=echov || echov=:
44 . $(dirname $0)/md5.sh
46 AVCONV_OPTS="-nostats -y -cpuflags $cpuflags"
47 COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact"
48 DEC_OPTS="$COMMON_OPTS -threads $threads"
49 ENC_OPTS="$COMMON_OPTS -threads $threads -dct fastint"
53 $echov $ffmpeg $AVCONV_OPTS $*
54 $ffmpeg $AVCONV_OPTS $*
61 set -- $* ${target_path}/$f
71 set -- $* ${target_path}/$f
73 if [ $f = $raw_dst ] ; then
74 $tiny_psnr $f $raw_ref
75 elif [ $f = $pcm_dst ] ; then
76 $tiny_psnr $f $pcm_ref 2
86 run_avconv $* -f crc "$target_crcfile"
87 echo "$f $(cat $crcfile)"