From e4c2762680e1f5813f332a4ca22b0a7bf4ff4a9b Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 13 Jun 2016 04:22:58 +0300 Subject: Add gen-image tool The tool is used to generate test images in a variety of formats from a PNM input image. Signed-off-by: Laurent Pinchart --- scripts/vsp-lib.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh index 4d3d166..6a59505 100755 --- a/scripts/vsp-lib.sh +++ b/scripts/vsp-lib.sh @@ -72,17 +72,17 @@ compare_frame_fuzzy() { img_a=$3 img_b=$4 - png_a=${img_a/bin/png} - png_b=${img_b/bin/png} + pnm_a=${img_a/bin/pnm} + pnm_b=${img_b/bin/pnm} - raw2rgbpnm -f $fmt -s $size $img_a $png_a > /dev/null - raw2rgbpnm -f $fmt -s $size $img_b $png_b > /dev/null + raw2rgbpnm -f $fmt -s $size $img_a $pnm_a > /dev/null + raw2rgbpnm -f $fmt -s $size $img_b $pnm_b > /dev/null - ae=$(compare -metric ae $png_a $png_b /dev/null 2>&1) - mae=$(compare -metric mae $png_a $png_b /dev/null 2>&1 | sed 's/.*(\(.*\))/\1/') + ae=$(compare -metric ae $pnm_a $pnm_b /dev/null 2>&1) + mae=$(compare -metric mae $pnm_a $pnm_b /dev/null 2>&1 | sed 's/.*(\(.*\))/\1/') - rm $png_a - rm $png_b + rm $pnm_a + rm $pnm_b width=$(echo $size | cut -d 'x' -f 1) height=$(echo $size | cut -d 'x' -f 2) @@ -136,6 +136,8 @@ compare_frames() { } done + rm -f frames/$reference + echo $result } -- cgit v1.2.3