From 86f8ce9f3d95a3b585a018b877b7894c5d6e9f9f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 5 Sep 2016 18:46:16 +0200 Subject: [PATCH] tests/fate-run: add transcode() as a simplified enc_dec() Approved-by: ubitux Signed-off-by: Michael Niedermayer --- tests/fate-run.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 5841b0c413..8c3938a8be 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