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>
This commit is contained in:
Niklas Söderlund
2020-03-15 19:29:21 +01:00
parent 63050a8b57
commit 4f3096f352

View File

@@ -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 };