Skip to contentSkip to conversation

vsp-lib: Fix reference frame generation for HSV input formats

PATCH In review Laurent Pinchart 2 participants 2 messages Feb 13, 2017 – Feb 20, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vsp-lib: Fix reference frame generation for HSV input formats

gen-image doesn't support processing HSV input frames. Fortunately the HSV tests don't require it either, when they take an HSV input frame they just pass it straight to the WPF. We can thus set the input format to RGB for reference frame generation.

---
 scripts/vsp-lib.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
scripts/vsp-lib.sh +10 -0
index ae9683cffab6..695e081bf34d 100755
@@ -103,6 +103,16 @@ reference_frame() {
 	local alpha=
 	local options=
 
+	# gen-image doesn't support processing HSV input images. The good news
+	# is that the HSV tests that take HSV images as inputs don't need to
+	# perform any processing. We can set the input format to RGB for HSB
+	# reference frame generation.
+	case $in_format in
+	HSV24 | HSV32)
+		in_format=ARGB32
+		;;
+	esac
+
 	# Start with the input format to compute the alpha value being used by
 	# the RPF after unpacking. Keep in sync with generate_input_frame.
 	case $in_format in
Signature · 3 lines
Regards,

Laurent Pinchart
Reviewed-by on v1 1/1
#1 lore raw

Hi Laurent,

Quoted 15 lines · Laurent Pinchart

gen-image doesn't support processing HSV input frames. Fortunately the HSV tests don't require it either, when they take an HSV input frame they just pass it straight to the WPF. We can thus set the input format to RGB for reference frame generation.

---
 scripts/vsp-lib.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
scripts/vsp-lib.sh +0 -0
index ae9683cffab6..695e081bf34d 100755

scripts/vsp-lib.sh reference_frame() { · line 108

Quoted 6 lines
scripts/vsp-lib.sh +3 -0
@@ -103,6 +103,16 @@ reference_frame() {
 	local alpha=
 	local options=
 
+	# gen-image doesn't support processing HSV input images. The good news
+	# is that the HSV tests that take HSV images as inputs don't need to
+	# perform any processing. We can set the input format to RGB for HSB

s/HSB/HSV/

scripts/vsp-lib.sh reference_frame() { · line 118

Quoted 10 lines
scripts/vsp-lib.sh +7 -0
+	# reference frame generation.
+	case $in_format in
+	HSV24 | HSV32)
+		in_format=ARGB32
+		;;
+	esac
+
 	# Start with the input format to compute the alpha value being used by
 	# the RPF after unpacking. Keep in sync with generate_input_frame.
 	case $in_format in

With that,