]> git.sesse.net Git - ffmpeg/blobdiff - tests/regression-funcs.sh
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / tests / regression-funcs.sh
index 7244b6614e868771edd49c4d721d4632642bd4a5..c4a0f40684d9a8f59a600100fd0df66bd5e1eb0e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# common regression functions for avconv
+# common regression functions for ffmpeg
 #
 #
 
@@ -20,7 +20,7 @@ this="$test.$test_ref"
 outfile="$datadir/$test_ref/"
 
 # various files
-avconv="$target_exec ${target_path}/ffmpeg"
+ffmpeg="$target_exec ${target_path}/ffmpeg"
 tiny_psnr="tests/tiny_psnr"
 raw_src="${target_path}/$raw_src_dir/%02d.pgm"
 raw_dst="$datadir/$this.out.yuv"
@@ -28,6 +28,8 @@ raw_ref="$datadir/$test_ref.ref.yuv"
 pcm_src="$target_datadir/asynth1.sw"
 pcm_dst="$datadir/$this.out.wav"
 pcm_ref="$datadir/$test_ref.ref.wav"
+pcm_src_1ch="$target_datadir/asynth-16000-1.wav"
+pcm_ref_1ch="$datadir/$test_ref-16000-1.ref.wav"
 crcfile="$datadir/$this.crc"
 target_crcfile="$target_datadir/$this.crc"
 
@@ -52,8 +54,8 @@ ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint"
 
 run_avconv()
 {
-    $echov $avconv $AVCONV_OPTS $*
-    $avconv $AVCONV_OPTS $*
+    $echov $ffmpeg $AVCONV_OPTS $*
+    $ffmpeg $AVCONV_OPTS $*
 }
 
 do_avconv()
@@ -68,7 +70,7 @@ do_avconv()
     elif [ $f = $pcm_dst ] ; then
         $tiny_psnr $f $pcm_ref 2
     else
-        wc -c $f
+        echo $(wc -c $f)
     fi
 }
 
@@ -83,7 +85,7 @@ do_avconv_nomd5()
     elif [ $f = $pcm_dst ] ; then
         $tiny_psnr $f $pcm_ref 2
     else
-        wc -c $f
+        echo $(wc -c $f)
     fi
 }
 
@@ -120,5 +122,10 @@ do_audio_encoding()
 
 do_audio_decoding()
 {
-    do_avconv $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav
+    do_avconv $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav $1
+}
+
+do_audio_decoding_nomd5()
+{
+    do_avconv_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav $1
 }