diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-06-13 04:22:58 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-06-16 21:09:18 +0300 |
commit | e4c2762680e1f5813f332a4ca22b0a7bf4ff4a9b (patch) | |
tree | ea6864be62343c2adfad976c4339267e728af749 /scripts | |
parent | 62f0b16f639a9ecb116a79819655bdf44e269443 (diff) |
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 <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vsp-lib.sh | 18 |
1 files changed, 10 insertions, 8 deletions
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 } |