[libcamera-devel,3/5] utils: ipu3-gen-imgu-input: Generate frames with different b/g
diff mbox series

Message ID 20220805181850.848886-4-umang.jain@ideasonboard.com
State Deferred
Delegated to: Umang Jain
Headers show
Series
  • IMGU standalone streaming
Related show

Commit Message

Umang Jain Aug. 5, 2022, 6:18 p.m. UTC
Differ each input generated frame by background color. This would help
us to deterimine how the IMGU statistics generation delay for each
frame.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
 utils/ipu3/ipu3-gen-imgu-input.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/utils/ipu3/ipu3-gen-imgu-input.sh b/utils/ipu3/ipu3-gen-imgu-input.sh
index ea0d385d..9e233396 100755
--- a/utils/ipu3/ipu3-gen-imgu-input.sh
+++ b/utils/ipu3/ipu3-gen-imgu-input.sh
@@ -66,10 +66,14 @@  if [[ -z ${in_size+x} ]] ; then
 	exit 1
 fi
 
+colors=(black red green violet yellow orange purple white brown pink gray)
+
 echo "Generating Input file frame-$in_size.raw"
 for i in `seq 0 $(expr $frame_count - 1)`
 do
-	convert -background "#000000" -size $in_size -fill "#ffffff" -pointsize 120 -gravity center label:"Frame $i" frame-$i.ppm
+	color_index=$(expr $i % ${#colors[@]})
+	convert -background "${colors[$color_index]}" -size $in_size -fill "white" \
+		-pointsize 120 -gravity center label:"Frame $i" frame-$i.ppm
 	pnm2raw frame-$i.ppm frame-$i.raw
 	ipu3-pack frame-$i.raw - >> frame-$in_size.raw