[06/20] tests: Simplify do_lavf()

Message ID 20180920084729.4523-7-diego@biurrun.de
State New
Headers show
Series
  • [01/20] tests: Use more consistent names for tests
Related show

Commit Message

Diego Biurrun Sept. 20, 2018, 8:47 a.m.
---
 tests/lavf-regression.sh | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Patch

diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index 8eb5bf1fdf..992973b37c 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -13,9 +13,9 @@  eval do_$test=y
 
 do_lavf()
 {
-    file=${outdir}lavf.$1
-    do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $2 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $3
-    do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4
+    file=${outdir}lavf.$test
+    do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $1 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2
+    do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
 }
 
 do_streamed_images()
@@ -45,11 +45,11 @@  do_audio_only()
 }
 
 if [ -n "$do_avi" ] ; then
-do_lavf avi "" "-c:a mp2 -ar 44100"
+do_lavf "" "-c:a mp2 -ar 44100"
 fi
 
 if [ -n "$do_asf" ] ; then
-do_lavf asf "" "-c:a mp2 -ar 44100" "-r 25"
+do_lavf "" "-c:a mp2 -ar 44100" "-r 25"
 fi
 
 if [ -n "$do_rm" ] ; then
@@ -60,47 +60,47 @@  do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100
 fi
 
 if [ -n "$do_mpg" ] ; then
-do_lavf mpg "" "-ar 44100"
+do_lavf "" "-ar 44100"
 fi
 
 if [ -n "$do_mxf" ] ; then
-do_lavf mxf "-ar 48000" "-bf 2 -timecode_frame_start 264363"
+do_lavf "-ar 48000" "-bf 2 -timecode_frame_start 264363"
 fi
 
 if [ -n "$do_mxf_d10" ]; then
-do_lavf mxf_d10 "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,pad=720:608:0:32 -c:v mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 30000k -maxrate 30000k -b 30000k -bufsize 1200000 -top 1 -rc_init_occupancy 1200000 -qmax 12 -f mxf_d10"
+do_lavf "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,pad=720:608:0:32 -c:v mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 30000k -maxrate 30000k -b 30000k -bufsize 1200000 -top 1 -rc_init_occupancy 1200000 -qmax 12 -f mxf_d10"
 fi
 
 if [ -n "$do_ts" ] ; then
-do_lavf ts "" "-mpegts_transport_stream_id 42 -ar 44100"
+do_lavf "" "-mpegts_transport_stream_id 42 -ar 44100"
 fi
 
 if [ -n "$do_swf" ] ; then
-do_lavf swf "" "-an"
+do_lavf "" "-an"
 fi
 
 if [ -n "$do_flv" ] ; then
-do_lavf flv "" "-an"
+do_lavf "" "-an"
 fi
 
 if [ -n "$do_mov" ] ; then
-do_lavf mov "" "-c:a pcm_alaw -c:v mpeg4"
+do_lavf "" "-c:a pcm_alaw -c:v mpeg4"
 fi
 
 if [ -n "$do_dv" ] ; then
-do_lavf dv "-ar 48000 -channel_layout stereo" "-r 25 -s pal"
+do_lavf "-ar 48000 -channel_layout stereo" "-r 25 -s pal"
 fi
 
 if [ -n "$do_gxf" ] ; then
-do_lavf gxf "-ar 48000" "-r 25 -s pal -ac 1"
+do_lavf "-ar 48000" "-r 25 -s pal -ac 1"
 fi
 
 if [ -n "$do_nut" ] ; then
-do_lavf nut "" "-c:a mp2 -ar 44100"
+do_lavf "" "-c:a mp2 -ar 44100"
 fi
 
 if [ -n "$do_mkv" ] ; then
-do_lavf mkv "" "-c:a mp2 -c:v mpeg4 -ar 44100"
+do_lavf "" "-c:a mp2 -c:v mpeg4 -ar 44100"
 fi