diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-05-26 12:45:48 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-05-26 12:46:46 +0400 |
commit | 52b23cbf1c8f276136556c9e2252184b763ae1ec (patch) | |
tree | 4dbfae0457fd5be1446408d7dfd61ec0d903822b /tests | |
parent | 72261fa8675ca6e118efe202fcb13fd0866d4a54 (diff) |
tests/lavfi: rework lavfi-regression.sh, avoid use of ffmpeg -pix_fmts
Use lavfi-showfiltfmts for checking the format supported by the scale
filter instead. The advantage is that the scale filter may support
formats which are not supported by libswscale (namely: the pal8 format).
The new implementation is also a bit cleaner, because it doesn't depend
on the ffmpeg output.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/lavfi-regression.sh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/lavfi-regression.sh b/tests/lavfi-regression.sh index 4d669f2d3c..2558bc097c 100755 --- a/tests/lavfi-regression.sh +++ b/tests/lavfi-regression.sh @@ -68,19 +68,24 @@ do_lavfi_pixfmts(){ filter_args=$2 showfiltfmts="$target_exec $target_path/tools/lavfi-showfiltfmts" - exclude_fmts=${outfile}${1}_exclude_fmts - out_fmts=${outfile}${1}_out_fmts + scale_exclude_fmts=${outfile}${1}_scale_exclude_fmts + scale_in_fmts=${outfile}${1}_scale_in_fmts + scale_out_fmts=${outfile}${1}_scale_out_fmts + in_fmts=${outfile}${1}_in_fmts # exclude pixel formats which are not supported as input - $avconv -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^\..\.' | cut -d' ' -f2 | sort >$exclude_fmts - $showfiltfmts scale | awk -F '[ \r]' '/^OUTPUT/{ fmt=substr($3, 5); print fmt }' | sort | comm -23 - $exclude_fmts >$out_fmts + $showfiltfmts scale | awk -F '[ \r]' '/^INPUT/{ fmt=substr($3, 5); print fmt }' | sort >$scale_in_fmts + $showfiltfmts scale | awk -F '[ \r]' '/^OUTPUT/{ fmt=substr($3, 5); print fmt }' | sort >$scale_out_fmts + comm -12 $scale_in_fmts $scale_out_fmts >$scale_exclude_fmts + + $showfiltfmts $filter | awk -F '[ \r]' '/^INPUT/{ fmt=substr($3, 5); print fmt }' | sort >$in_fmts + pix_fmts=$(comm -12 $scale_exclude_fmts $in_fmts) - pix_fmts=$($showfiltfmts $filter $filter_args | awk -F '[ \r]' '/^INPUT/{ fmt=substr($3, 5); print fmt }' | sort | comm -12 - $out_fmts) for pix_fmt in $pix_fmts; do do_video_filter $pix_fmt "slicify=random,format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt done - rm $exclude_fmts $out_fmts + rm $in_fmts $scale_in_fmts $scale_out_fmts $scale_exclude_fmts } # all these filters have exactly one input and exactly one output |