1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Approved-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-09-05 18:46:16 +02:00
parent e3fd1857fb
commit 86f8ce9f3d

View File

@ -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