@@ -1164,15 +1164,16 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()
pipeConfig_ = nullptr;
for (const SimpleCameraData::Configuration *pipeConfig : *configs) {
- const Size &size = pipeConfig->captureSize;
+ const Size &captureSize = pipeConfig->captureSize;
+ const Size &maxOutputSize = pipeConfig->outputSizes.max;
- if (size.width >= maxStreamSize.width &&
- size.height >= maxStreamSize.height) {
- if (!pipeConfig_ || size < pipeConfig_->captureSize)
+ if (maxOutputSize.width >= maxStreamSize.width &&
+ maxOutputSize.height >= maxStreamSize.height) {
+ if (!pipeConfig_ || captureSize < pipeConfig_->captureSize)
pipeConfig_ = pipeConfig;
}
- if (!maxPipeConfig || maxPipeConfig->captureSize < size)
+ if (!maxPipeConfig || maxPipeConfig->captureSize < captureSize)
maxPipeConfig = pipeConfig;
}
When a converter or the software ISP is used, output sizes do not equal input sizes - they notably can be smaller. Previous to this patch only capture sizes were considered, in some cases resulting in configs with too small maximum output sizes being selected, such as 1912x1080 for stream sizes of 1920x1080. Check that the maximum output sizes are big enough instead, while continuing to minimize capture sizes. Closes https://gitlab.freedesktop.org/camera/libcamera/-/issues/236 Signed-off-by: Robert Mader <robert.mader@collabora.com> --- src/libcamera/pipeline/simple/simple.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)