mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 03:50:05 +01:00
FATE: allow a tolerance in the size comparison in do_tiny_psnr()
This will allow for comparing decoded output to the original source when the decoded size is not exactly the same as the original size.
This commit is contained in:
@@ -20,6 +20,7 @@ thread_type=${10:-frame+slice}
|
||||
cpuflags=${11:-all}
|
||||
cmp_shift=${12:-0}
|
||||
cmp_target=${13:-0}
|
||||
size_tolerance=${14:-0}
|
||||
|
||||
outdir="tests/data/fate"
|
||||
outfile="${outdir}/${test}"
|
||||
@@ -40,7 +41,8 @@ do_tiny_psnr(){
|
||||
size1=$(expr "$psnr" : '.*bytes: *\([0-9]*\)')
|
||||
size2=$(expr "$psnr" : '.*bytes:[ 0-9]*/ *\([0-9]*\)')
|
||||
val_cmp=$(compare $val $cmp_target $fuzz)
|
||||
if [ "$val_cmp" != 0 ] || [ $size1 != $size2 ]; then
|
||||
size_cmp=$(compare $size1 $size2 $size_tolerance)
|
||||
if [ "$val_cmp" != 0 ] || [ "$size_cmp" != 0 ]; then
|
||||
echo "$psnr"
|
||||
return 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user