[FFmpeg-cvslog] tests/fate-run: add transcode() as a simplified enc_dec()

Michael Niedermayer git at videolan.org
Tue Sep 6 19:09:06 EEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Sep  5 18:46:16 2016 +0200| [86f8ce9f3d95a3b585a018b877b7894c5d6e9f9f] | committer: Michael Niedermayer

tests/fate-run: add transcode() as a simplified enc_dec()

Approved-by: ubitux
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=86f8ce9f3d95a3b585a018b877b7894c5d6e9f9f
---

 tests/fate-run.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 5841b0c..8c3938a 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -192,6 +192,21 @@ enc_dec(){
     tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift
 }
 
+transcode(){
+    src_fmt=$1
+    srcfile=$2
+    enc_fmt=$3
+    enc_opt=$4
+    encfile="${outdir}/${test}.${enc_fmt}"
+    test "$7" = -keep || cleanfiles="$cleanfiles $encfile"
+    tsrcfile=$(target_path $srcfile)
+    tencfile=$(target_path $encfile)
+    ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \
+        -f $enc_fmt -y $tencfile || return
+    do_md5sum $encfile
+    echo $(wc -c $encfile)
+}
+
 lavffatetest(){
     t="${test#lavf-fate-}"
     ref=${base}/ref/lavf-fate/$t



More information about the ffmpeg-cvslog mailing list