libcamera: geometry: Construct SizeRange from Size
The SizeRange constructors take minimum and maximum width and height values as separate arguments. We have a Size class to convey size information, use it in the constructors, and update the callers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -251,7 +251,7 @@ SizeRange StreamFormats::range(const PixelFormat &pixelformat) const
|
||||
return ranges[0];
|
||||
|
||||
LOG(Stream, Debug) << "Building range from discrete sizes";
|
||||
SizeRange range(UINT_MAX, UINT_MAX, 0, 0);
|
||||
SizeRange range({ UINT_MAX, UINT_MAX }, { 0, 0 });
|
||||
for (const SizeRange &limit : ranges) {
|
||||
if (limit.min < range.min)
|
||||
range.min = limit.min;
|
||||
|
||||
Reference in New Issue
Block a user