From 4f3096f352edc2803b14c97c0fe04903528eae42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Sun, 15 Mar 2020 19:29:21 +0100 Subject: libcamera: pipeline: vimc: Remove internal usage of ImageFormats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/vimc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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> formats; for (PixelFormat pixelformat : pixelformats) { /* The scaler hardcodes a x3 scale-up ratio. */ std::vector 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 }; -- cgit v1.2.1