summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/vimc.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-15 19:29:21 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-18 18:02:40 +0100
commit4f3096f352edc2803b14c97c0fe04903528eae42 (patch)
tree5d81f4dea0c230aecece3c36b627c776d5f55254 /src/libcamera/pipeline/vimc.cpp
parent63050a8b57f62233157efde3a061f582ae1521f5 (diff)
libcamera: pipeline: vimc: Remove internal usage of ImageFormats
There is no need to use the ImageFormats helper to generate a map of PixelFormat to sizes, use std::map directly. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/vimc.cpp')
-rw-r--r--src/libcamera/pipeline/vimc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index 9817fb93..82649952 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -174,17 +174,17 @@ CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,
if (roles.empty())
return config;
- ImageFormats formats;
+ std::map<PixelFormat, std::vector<SizeRange>> formats;
for (PixelFormat pixelformat : pixelformats) {
/* The scaler hardcodes a x3 scale-up ratio. */
std::vector<SizeRange> sizes{
SizeRange{ 48, 48, 4096, 2160 }
};
- formats.addFormat(pixelformat, sizes);
+ formats[pixelformat] = sizes;
}
- StreamConfiguration cfg(formats.data());
+ StreamConfiguration cfg(formats);
cfg.pixelFormat = DRM_FORMAT_BGR888;
cfg.size = { 1920, 1080 };