[1/4] virtual: Fill alpha channels
diff mbox series

Message ID 20261008211149.51765-2-robert.mader@collabora.com
State Superseded
Headers show
Series
  • virtual: Support more common pixel formats
Related show

Commit Message

Robert Mader Oct. 8, 2026, 9:11 p.m. UTC
While libyuv::ARGBToNV12() seems to ignore the alpha values, let's
set them to fully opaque to avoid potential glitches going forward.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
---
 src/libcamera/pipeline/virtual/test_pattern_generator.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Barnabás Pőcze Oct. 9, 2026, 8:43 a.m. UTC | #1
2026. 10. 08. 23:11 keltezéssel, Robert Mader írta:
> While libyuv::ARGBToNV12() seems to ignore the alpha values, let's
> set them to fully opaque to avoid potential glitches going forward.
> 
> Signed-off-by: Robert Mader <robert.mader@collabora.com>
> ---

Looks ok to me.

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


>   src/libcamera/pipeline/virtual/test_pattern_generator.cpp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/virtual/test_pattern_generator.cpp b/src/libcamera/pipeline/virtual/test_pattern_generator.cpp
> index 1be3847d63a4..7b53e8b32327 100644
> --- a/src/libcamera/pipeline/virtual/test_pattern_generator.cpp
> +++ b/src/libcamera/pipeline/virtual/test_pattern_generator.cpp
> @@ -100,7 +100,7 @@ void ColorBarsGenerator::configure(const Size &size)
>   			*buf++ = kColorBar[index][2]; /* B */
>   			*buf++ = kColorBar[index][1]; /* G */
>   			*buf++ = kColorBar[index][0]; /* R */
> -			*buf++ = 0x00; /* A */
> +			*buf++ = 0xff; /* A */
>   		}
>   	}
>   }
> @@ -127,7 +127,7 @@ void DiagonalLinesGenerator::configure(const Size &size)
>   			*buf++ = kColorBar[index][2]; /* B */
>   			*buf++ = kColorBar[index][1]; /* G */
>   			*buf++ = kColorBar[index][0]; /* R */
> -			*buf++ = 0x00; /* A */
> +			*buf++ = 0xff; /* A */
>   		}
>   	}
>   }

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/virtual/test_pattern_generator.cpp b/src/libcamera/pipeline/virtual/test_pattern_generator.cpp
index 1be3847d63a4..7b53e8b32327 100644
--- a/src/libcamera/pipeline/virtual/test_pattern_generator.cpp
+++ b/src/libcamera/pipeline/virtual/test_pattern_generator.cpp
@@ -100,7 +100,7 @@  void ColorBarsGenerator::configure(const Size &size)
 			*buf++ = kColorBar[index][2]; /* B */
 			*buf++ = kColorBar[index][1]; /* G */
 			*buf++ = kColorBar[index][0]; /* R */
-			*buf++ = 0x00; /* A */
+			*buf++ = 0xff; /* A */
 		}
 	}
 }
@@ -127,7 +127,7 @@  void DiagonalLinesGenerator::configure(const Size &size)
 			*buf++ = kColorBar[index][2]; /* B */
 			*buf++ = kColorBar[index][1]; /* G */
 			*buf++ = kColorBar[index][0]; /* R */
-			*buf++ = 0x00; /* A */
+			*buf++ = 0xff; /* A */
 		}
 	}
 }