Implement a lavfitest target for testing regressions in libavfilter.
[ffmpeg.git] / tests / codec-regression.sh
index e50106f..c00c977 100755 (executable)
@@ -660,4 +660,42 @@ for pix_fmt in $conversions ; do
 done
 fi
 
+# libavfilter testing
+
+function do_lavfi() {
+    test_name=$1
+    eval test=\$do_$test_name
+    vfilters=$2
+
+    if [ -n "$test" ] ; then
+        do_video_encoding ${test_name}.avi "-qscale 10" "-vcodec huffyuv -vfilters $vfilters"
+    fi
+}
+
+# do_lavfi "crop" "crop=100:100:-1:-1"
+# do_lavfi "crop_scale" "crop=100:100,scale=200:-1"
+# do_lavfi "scale" "scale=200:200"
+
+# libavfilter testing
+
+function do_lavfi() {
+    test_name=$1
+    eval test=\$do_$test_name
+    vfilters=$2
+
+    if [ -n "$test" ] ; then
+        do_video_encoding ${test_name}.avi "-qscale 10" "-vcodec huffyuv -vfilters $vfilters"
+    fi
+}
+
+# example tests:
+# do_lavfi "crop" "crop=100:100:-1:-1"
+# do_lavfi "crop_scale" "crop=100:100,scale=200:-1"
+# do_lavfi "scale" "scale=200:200"
+
+# TODO: add tests for
+# direct rendering,
+# slices
+# chains with feedback loops
+
 rm -f "$bench" "$bench2"