]> git.sesse.net Git - ffmpeg/blobdiff - tests/fate-run.sh
img2: add j2c file extension
[ffmpeg] / tests / fate-run.sh
index 72554ad988e9c6a7ed342baee93905d5bd3a71c5..b6c7384ff0e2db30a59c2ec65d400653dc5a30a8 100755 (executable)
@@ -146,19 +146,10 @@ enc_dec(){
     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(){
@@ -171,6 +162,35 @@ 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