From patchwork Wed Jul 1 21:16:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 8548 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0D31ABE905 for ; Wed, 1 Jul 2020 21:17:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A2D5060C56; Wed, 1 Jul 2020 23:16:59 +0200 (CEST) Received: from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net [195.74.38.228]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AAD9E60C53 for ; Wed, 1 Jul 2020 23:16:58 +0200 (CEST) X-Halon-ID: 2ecbe545-bbe0-11ea-8fb8-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p4fca2eca.dip0.t-ipconnect.de [79.202.46.202]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id 2ecbe545-bbe0-11ea-8fb8-005056917f90; Wed, 01 Jul 2020 23:16:57 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Wed, 1 Jul 2020 23:16:48 +0200 Message-Id: <20200701211650.1002567-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC 0/2] libcamera: formats: Remove ImageFormats X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This is in no way an attempt to conflict with the pending patches to ImageFormats on the ML from Jacopo. Following his patches there was a discussion if we could instead of making ImageFormats a template make use of the new utils::map_keys() helper. I liked the idea and gave it a try and the result was not so bad so I thought I send it out as an RFC. As the new helper is not yet merged this series depends on [1]. 1. [PATCH v2 0/2] libcamera: utils: Add map_keys() function Niklas Söderlund (2): libcamera: v4l2_subdevice: Replace ImageFormats with a map libcamera: formats: Remove ImageFormats include/libcamera/internal/camera_sensor.h | 6 +- include/libcamera/internal/formats.h | 14 ---- include/libcamera/internal/v4l2_subdevice.h | 4 +- src/libcamera/camera_sensor.cpp | 12 +-- src/libcamera/formats.cpp | 88 --------------------- src/libcamera/v4l2_subdevice.cpp | 16 ++-- test/v4l2_subdevice/list_formats.cpp | 16 ++-- 7 files changed, 27 insertions(+), 129 deletions(-)