summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-04-04 03:36:21 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-04-04 03:36:21 +0300
commit6df1ad61158e9c2744786193619b873b3dedcd6b (patch)
tree4384c09e2346645d5c1f296e5e97bcfc3945478e /scripts
parentce2c37356c674e5893f80786616355b4659b43ad (diff)
Use correct .ppm extension for PPM images
The reference images used by the test scripts are in PPM format, not PNM. Use the correct file extension. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bin2png.sh8
-rwxr-xr-xscripts/vsp-lib.sh22
2 files changed, 15 insertions, 15 deletions
diff --git a/scripts/bin2png.sh b/scripts/bin2png.sh
index d231d19..e7b16ee 100755
--- a/scripts/bin2png.sh
+++ b/scripts/bin2png.sh
@@ -6,7 +6,7 @@ FILE=${1:-.}
convert_image() {
local file=$1
- local pnm=${file%bin}pnm
+ local ppm=${file%bin}ppm
local png=${file%bin}png
local format=$(echo $file | sed -e 's|.*-\([[:alnum:]]*\)-\([0-9]*x[0-9]*\).*.bin|\1|' | tr '[:lower:]' '[:upper:]')
@@ -24,9 +24,9 @@ convert_image() {
;;
esac
- raw2rgbpnm -f $format -s $size $file $pnm && \
- convert $pnm $png
- rm $pnm
+ raw2rgbpnm -f $format -s $size $file $ppm && \
+ convert $ppm $png
+ rm $ppm
}
if [ -d $FILE ] ; then
diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
index 114bc72..92a9121 100755
--- a/scripts/vsp-lib.sh
+++ b/scripts/vsp-lib.sh
@@ -196,7 +196,7 @@ reference_frame() {
[ x$__vsp_brx_inputs != x ] && options="$options -c $__vsp_brx_inputs"
$genimage -i $in_format -f $out_format -s $size -a $alpha $options -o $file \
- frames/frame-reference-1024x768.pnm
+ frames/frame-reference-1024x768.ppm
}
reference_histogram() {
@@ -210,7 +210,7 @@ reference_histogram() {
[[ "x$hgt_hue_areas" != x ]] && hue="--histogram-areas $hgt_hue_areas"
$genimage -i $format -f $format -s $size -H $file --histogram-type $type $hue \
- frames/frame-reference-1024x768.pnm
+ frames/frame-reference-1024x768.ppm
}
# ------------------------------------------------------------------------------
@@ -247,17 +247,17 @@ compare_frame_fuzzy() {
local img_a=$3
local img_b=$4
- local pnm_a=${img_a/bin/pnm}
- local pnm_b=${img_b/bin/pnm}
+ local ppm_a=${img_a/bin/ppm}
+ local ppm_b=${img_b/bin/ppm}
- raw2rgbpnm -f $fmt -s $size $img_a $pnm_a > /dev/null
- raw2rgbpnm -f $fmt -s $size $img_b $pnm_b > /dev/null
+ raw2rgbpnm -f $fmt -s $size $img_a $ppm_a > /dev/null
+ raw2rgbpnm -f $fmt -s $size $img_b $ppm_b > /dev/null
- local ae=$(compare -metric ae $pnm_a $pnm_b /dev/null 2>&1)
- local mae=$(compare -metric mae $pnm_a $pnm_b /dev/null 2>&1 | sed 's/.*(\(.*\))/\1/')
+ local ae=$(compare -metric ae $ppm_a $ppm_b /dev/null 2>&1)
+ local mae=$(compare -metric mae $ppm_a $ppm_b /dev/null 2>&1 | sed 's/.*(\(.*\))/\1/')
- rm $pnm_a
- rm $pnm_b
+ rm $ppm_a
+ rm $ppm_b
local width=$(echo $size | cut -d 'x' -f 1)
local height=$(echo $size | cut -d 'x' -f 2)
@@ -892,7 +892,7 @@ generate_input_frame() {
$(format_v4l2_is_yuv $format) && options="$options -C -i YUV444M"
$genimage -f $format -s $size -a $alpha $options -o $file \
- frames/frame-reference-1024x768.pnm
+ frames/frame-reference-1024x768.ppm
}
vsp_runner() {