tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift
}
-regtest(){
- t="${test#$2-}"
- ref=${base}/ref/$2/$t
- ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags"
-}
-
lavftest(){
- regtest lavf lavf tests/vsynth1
-}
-
-lavfitest(){
- cleanfiles="tests/data/lavfi/${test#lavfi-}.nut"
- regtest lavfi lavfi tests/vsynth1
+ t="${test#lavf-}"
+ ref=${base}/ref/lavf/$t
+ ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags"
}
video_filter(){
$FLAGS $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5:
}
+pixdesc(){
+ pix_fmts="$(avconv -pix_fmts list 2>/dev/null | awk 'NR > 8 && /^IO/ { print $2 }' | sort)"
+ for pix_fmt in $pix_fmts; do
+ test=$pix_fmt
+ video_filter "format=$pix_fmt,pixdesctest" -pix_fmt $pix_fmt
+ done
+}
+
+pixfmts(){
+ filter=${test#filter-pixfmts-}
+ filter_args=$1
+
+ showfiltfmts="$target_exec $target_path/libavfilter/filtfmts-test"
+ exclude_fmts=${outfile}${filter}_exclude_fmts
+ out_fmts=${outfile}${filter}_out_fmts
+
+ # exclude pixel formats which are not supported as input
+ avconv -pix_fmts list 2>/dev/null | awk 'NR > 8 && /^\..\./ { print $2 }' | sort >$exclude_fmts
+ $showfiltfmts scale | awk -F '[ \r]' '/^OUTPUT/{ print $3 }' | sort | comm -23 - $exclude_fmts >$out_fmts
+
+ pix_fmts=$($showfiltfmts $filter | awk -F '[ \r]' '/^INPUT/{ print $3 }' | sort | comm -12 - $out_fmts)
+ for pix_fmt in $pix_fmts; do
+ test=$pix_fmt
+ video_filter "format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt
+ done
+
+ rm $exclude_fmts $out_fmts
+}
+
mkdir -p "$outdir"
exec 3>&2