From 02f0492c55f293b6a00ee702cee51b5f1b1c2e50 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Mon, 13 Feb 2023 10:18:08 +0000 Subject: pipeline: raspberrypi: Always use ColorSpace::Raw for raw streams Commit 613d5402673e ("pipeline: raspberrypi: Fix handling of colour spaces") adjusts the colorspace to ColorSpace::Raw for raw streams. However, if the colorspace is not requested for raw streams(nullopt), we should still set the colorspace to ColorSpace::Raw, for raw streams. Fixes: 613d5402673e ("pipeline: raspberrypi: Fix handling of colour spaces") Signed-off-by: David Plowman Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart Signed-off-by: Umang Jain --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libcamera/pipeline/raspberrypi/raspberrypi.cpp') 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; } -- cgit v1.2.1