summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1_path.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
index f8d47120..f195f91e 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
@@ -50,12 +50,13 @@ bool RkISP1Path::init(MediaDevice *media)
StreamConfiguration RkISP1Path::generateConfiguration(const Size &resolution)
{
- Size maxResolution = resolution;
- maxResolution.boundTo(maxResolution_);
+ Size maxResolution = maxResolution_.boundedToAspectRatio(resolution)
+ .boundedTo(resolution);
+ Size minResolution = minResolution_.expandedToAspectRatio(resolution);
std::map<PixelFormat, std::vector<SizeRange>> streamFormats;
for (const PixelFormat &format : formats_)
- streamFormats[format] = { { minResolution_, maxResolution } };
+ streamFormats[format] = { { minResolution, maxResolution } };
StreamFormats formats(streamFormats);
StreamConfiguration cfg(formats);