]> git.sesse.net Git - ffmpeg/blobdiff - tests/fate-run.sh
mpeg: Split error resilience bits off into a separate file
[ffmpeg] / tests / fate-run.sh
index 6e30b5afe5acde20471ffd91a342807a9dc8dab0..a10a52307b4a4c054f0749788489154351fce9ac 100755 (executable)
@@ -118,7 +118,7 @@ enc_dec_pcm(){
     avconv -f $out_fmt -i ${encfile} -c:a pcm_${pcm_fmt} -f ${dec_fmt} -
 }
 
-FLAGS="-flags +bitexact -sws_flags +accurate_rnd+bitexact"
+FLAGS="-flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact"
 DEC_OPTS="-threads $threads -idct simple $FLAGS"
 ENC_OPTS="-threads 1        -idct simple -dct fastint"
 
@@ -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(){
@@ -179,6 +170,27 @@ pixdesc(){
     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