[libcamera-devel] [PATCH v2] pipeline: raspberrypi: Fix error in validateColorSpaces
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Feb 14 18:04:34 CET 2023
Hi David,
Thank you for the patch.
On Mon, Feb 13, 2023 at 10:18:08AM +0000, David Plowman via libcamera-devel wrote:
> This fixes a small error in the validateColorSpaces method where the
> colour space was not being set to Raw if it had an "unset" (null
> option) value.
>
> Fixes: 613d5402673e ("pipeline: raspberrypi: Fix handling of colour spaces")
> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
> Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index c0dd9551..84120954 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -449,10 +449,9 @@ CameraConfiguration::Status RPiCameraConfiguration::validateColorSpaces([[maybe_
> /* First fix up raw streams to have the "raw" colour space. */
> if (isRaw(cfg.pixelFormat)) {
> /* If there was no value here, that doesn't count as "adjusted". */
> - if (cfg.colorSpace && cfg.colorSpace != ColorSpace::Raw) {
> + if (cfg.colorSpace && cfg.colorSpace != ColorSpace::Raw)
> status = Adjusted;
> - cfg.colorSpace = ColorSpace::Raw;
> - }
> + cfg.colorSpace = ColorSpace::Raw;
> continue;
> }
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list