Add pixdesctest filter and corresponding test.
[ffmpeg.git] / tests / lavfi-regression.sh
index ebbc0f3..220d43c 100755 (executable)
@@ -86,6 +86,26 @@ if [ -n "$do_lavfi_pix_fmts" ]; then
     done
 fi
 
+if [ -n "$do_lavfi_pixdesc" ]; then
+    pix_fmts="$($ffmpeg -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^IO' | cut -d' ' -f2)"
+
+    ref_file=tests/ref/lavfi/lavfi_pixdesc
+    rm -f $ref_file
+    res_file=$logfile
+
+    for pix_fmt in $pix_fmts; do
+        # print to the reference logfile
+        logfile=$ref_file
+        do_video_encoding "lavfi_pixdesc-${pix_fmt}.nut" "" \
+            "-vf slicify=random,format=$pix_fmt -vcodec rawvideo -pix_fmt $pix_fmt"
+
+        # print to the result logfile
+        logfile=$res_file
+        do_video_encoding "lavfi_pixdesc-${pix_fmt}.nut" "" \
+            "-vf slicify=random,format=$pix_fmt,pixdesctest -vcodec rawvideo -pix_fmt $pix_fmt"
+    done
+fi
+
 # TODO: add tests for
 # direct rendering,
 # chains with feedback loops