summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-05-25 00:11:44 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-06-19 02:17:54 +0200
commited56f16c4b1bb61a459a005d64794fec5d4aa19e (patch)
tree5f28786d5642e284e00468b0493ae2bd71be171b /include
parent85a9b66134d48a4f805c77079599056492576b0b (diff)
libcamera: geometry: SizeRange: Extend with step information
The size range described might be subject to certain step limitations. Make it possible to record this information. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/geometry.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h
index ec5ed2be..b2a8e5b0 100644
--- a/include/libcamera/geometry.h
+++ b/include/libcamera/geometry.h
@@ -73,18 +73,27 @@ struct SizeRange {
}
SizeRange(unsigned int width, unsigned int height)
- : min(width, height), max(width, height)
+ : min(width, height), max(width, height), hStep(1), vStep(1)
{
}
SizeRange(unsigned int minW, unsigned int minH,
unsigned int maxW, unsigned int maxH)
- : min(minW, minH), max(maxW, maxH)
+ : min(minW, minH), max(maxW, maxH), hStep(1), vStep(1)
+ {
+ }
+
+ SizeRange(unsigned int minW, unsigned int minH,
+ unsigned int maxW, unsigned int maxH,
+ unsigned int hstep, unsigned int vstep)
+ : min(minW, minH), max(maxW, maxH), hStep(hstep), vStep(vstep)
{
}
Size min;
Size max;
+ unsigned int hStep;
+ unsigned int vStep;
};
bool operator==(const SizeRange &lhs, const SizeRange &rhs);