[libav-devel] [PATCH 05/20] tests: Simplify do_image_formats()

Diego Biurrun diego at biurrun.de
Thu Sep 20 10:47:14 CEST 2018


---
 tests/lavf-regression.sh | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index 10fbe4cbeb..8eb5bf1fdf 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -28,13 +28,13 @@ do_streamed_images()
 
 do_image_formats()
 {
-    outdir="$datadir/images/$1/"
+    outdir="$datadir/images/$test/"
     mkdir -p "$outdir"
-    file=${outdir}%02d.$1
-    run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $2 $ENC_OPTS $3 -frames 12 -y -qscale 10 $target_path/$file
-    do_md5sum ${outdir}02.$1
-    do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file
-    echo $(wc -c ${outdir}02.$1)
+    file=${outdir}%02d.$test
+    run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $1 $ENC_OPTS $2 -frames 12 -y -qscale 10 $target_path/$file
+    do_md5sum ${outdir}02.$test
+    do_avconv_crc $file $DEC_OPTS $2 -i $target_path/$file
+    echo $(wc -c ${outdir}02.$test)
 }
 
 do_audio_only()
@@ -137,55 +137,55 @@ fi
 # image formats
 
 if [ -n "$do_pgm" ] ; then
-do_image_formats pgm
+do_image_formats
 fi
 
 if [ -n "$do_ppm" ] ; then
-do_image_formats ppm
+do_image_formats
 fi
 
 if [ -n "$do_png" ] ; then
-do_image_formats png
+do_image_formats
 fi
 
 if [ -n "$do_bmp" ] ; then
-do_image_formats bmp
+do_image_formats
 fi
 
 if [ -n "$do_tga" ] ; then
-do_image_formats tga
+do_image_formats
 fi
 
 if [ -n "$do_tiff" ] ; then
-do_image_formats tiff "-pix_fmt rgb24"
+do_image_formats "-pix_fmt rgb24"
 fi
 
 if [ -n "$do_sgi" ] ; then
-do_image_formats sgi
+do_image_formats
 fi
 
 if [ -n "$do_jpg" ] ; then
-do_image_formats jpg "-pix_fmt yuvj420p" "-f image2"
+do_image_formats "-pix_fmt yuvj420p" "-f image2"
 fi
 
 if [ -n "$do_pam" ] ; then
-do_image_formats pam
+do_image_formats
 fi
 
 if [ -n "$do_pcx" ] ; then
-do_image_formats pcx
+do_image_formats
 fi
 
 if [ -n "$do_xwd" ] ; then
-do_image_formats xwd
+do_image_formats
 fi
 
 if [ -n "$do_dpx" ] ; then
-do_image_formats dpx
+do_image_formats
 fi
 
 if [ -n "$do_sun" ] ; then
-do_image_formats sun
+do_image_formats
 fi
 
 # audio only
-- 
2.11.0



More information about the libav-devel mailing list