summaryrefslogtreecommitdiff
path: root/test/stream
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-15 02:56:20 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-19 15:08:14 +0200
commita69414529f463ba1d2f0fa4a9e80538193f9b099 (patch)
tree1f642863e783ea0f18a905e164a40de420ea3351 /test/stream
parent4ff18e95063bbb70f6e0971774fcd2a1b0ad2b58 (diff)
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>
Diffstat (limited to 'test/stream')
-rw-r--r--test/stream/stream_formats.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/stream/stream_formats.cpp b/test/stream/stream_formats.cpp
index 92f1574b..9353d008 100644
--- a/test/stream/stream_formats.cpp
+++ b/test/stream/stream_formats.cpp
@@ -55,8 +55,8 @@ protected:
{
/* Test discrete sizes */
StreamFormats discrete({
- { PixelFormat(1), { SizeRange(100, 100), SizeRange(200, 200) } },
- { PixelFormat(2), { SizeRange(300, 300), SizeRange(400, 400) } },
+ { PixelFormat(1), { SizeRange({ 100, 100 }), SizeRange({ 200, 200 }) } },
+ { PixelFormat(2), { SizeRange({ 300, 300 }), SizeRange({ 400, 400 }) } },
});
if (testSizes("discrete 1", discrete.sizes(PixelFormat(1)),
@@ -68,10 +68,10 @@ protected:
/* Test range sizes */
StreamFormats range({
- { PixelFormat(1), { SizeRange(640, 480, 640, 480) } },
- { PixelFormat(2), { SizeRange(640, 480, 800, 600, 8, 8) } },
- { PixelFormat(3), { SizeRange(640, 480, 800, 600, 16, 16) } },
- { PixelFormat(4), { SizeRange(128, 128, 4096, 4096, 128, 128) } },
+ { PixelFormat(1), { SizeRange({ 640, 480 }, { 640, 480 }) } },
+ { PixelFormat(2), { SizeRange({ 640, 480 }, { 800, 600 }, 8, 8) } },
+ { PixelFormat(3), { SizeRange({ 640, 480 }, { 800, 600 }, 16, 16) } },
+ { PixelFormat(4), { SizeRange({ 128, 128 }, { 4096, 4096 }, 128, 128) } },
});
if (testSizes("range 1", range.sizes(PixelFormat(1)), { Size(640, 480) }))