diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2023-02-13 10:18:08 +0000 |
---|---|---|
committer | Umang Jain <umang.jain@ideasonboard.com> | 2023-02-15 01:32:03 +0530 |
commit | 02f0492c55f293b6a00ee702cee51b5f1b1c2e50 (patch) | |
tree | 878ca98c071ac948fc84882ccada1420df33e3b1 | |
parent | 3f8bcc1a365f07a8b2e86dc0053801e6ad39ab0d (diff) |
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 <david.plowman@raspberrypi.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 5 |
1 files 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; } |