[RFC,v2,07/13] libcamera: simple: Consider raw output configurations
diff mbox series

Message ID 20250124215806.158024-8-mzamazal@redhat.com
State New
Headers show
Series
  • Enable raw streams with software ISP
Related show

Commit Message

Milan Zamazal Jan. 24, 2025, 9:57 p.m. UTC
If there is no software ISP, all the output formats and sizes are
relevant.  If there is software ISP, take only software ISP
configurations if there is no raw stream and only raw
configurations (otherwise it wouldn't be possible to produce a correct
passthrough output) if there is a raw stream.

TODO: This change looks dubious but it works.  Some form of filtering is
definitely needed otherwise the followup overlap check leads to mess and
incorrect output.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 300ebbc0..87a2043f 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1215,7 +1215,7 @@  SimplePipelineHandler::generateConfiguration(Camera *camera, Span<const StreamRo
 	std::map<PixelFormat, std::vector<SizeRange>> formats;
 
 	for (const SimpleCameraData::Configuration &cfg : data->configs_)
-		if (static_cast<bool>(data->swIsp_) == cfg.swisp)
+		if (!data->swIsp_ || data->rawRequested_ != cfg.swisp)
 			for (PixelFormat format : cfg.outputFormats)
 				formats[format].push_back(cfg.outputSizes);