summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-10 00:35:37 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-18 18:13:06 +0300
commit72afcbb0873215dd31de098e0461586ba913dcfb (patch)
treecc26f9a6e88bba71e832f09f51e98baa0b4fa340 /include
parente7f446e1edcc6afc47287d49030280e335fe6838 (diff)
libcamera: geometry: Use Size to store min and max in SizeRange
Instead of storing four integers for the minimum and maximum width and height in the SizeRange class, use two instance of the Size class for the minimum and maximum sizes. While it at replace the mention of image size with size in the SizeRange documentation, as the Size class isn't limited to image sizes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/geometry.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h
index 7704ab5a..80f79c6b 100644
--- a/include/libcamera/geometry.h
+++ b/include/libcamera/geometry.h
@@ -38,21 +38,17 @@ struct Size {
struct SizeRange {
SizeRange()
- : SizeRange(0, 0, 0, 0)
{
}
SizeRange(unsigned int minW, unsigned int minH,
unsigned int maxW, unsigned int maxH)
- : minWidth(minW), minHeight(minH), maxWidth(maxW),
- maxHeight(maxH)
+ : min(minW, minH), max(maxW, maxH)
{
}
- unsigned int minWidth;
- unsigned int minHeight;
- unsigned int maxWidth;
- unsigned int maxHeight;
+ Size min;
+ Size max;
};
} /* namespace libcamera */