From patchwork Mon Mar 16 02:40:32 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: 3104 Return-Path: Received: from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net [195.74.38.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6ED6D60417 for ; Mon, 16 Mar 2020 03:41:34 +0100 (CET) X-Halon-ID: 8b15a529-672f-11ea-9f40-0050569116f7 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p4fca2392.dip0.t-ipconnect.de [79.202.35.146]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id 8b15a529-672f-11ea-9f40-0050569116f7; Mon, 16 Mar 2020 03:41:02 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Mon, 16 Mar 2020 03:40:32 +0100 Message-Id: <20200316024036.2474307-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/4] libcamera: PixelFormat: Turn into a class 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: , X-List-Received-Date: Mon, 16 Mar 2020 02:41:34 -0000 Hello, This series replaces the PixelFormat definition of a unisgned int with a class implementation that can hold both a fourcc and a set of modifiers. This is important to allow users of libcamera to look at modifiers. This series do not make use of the modifiers, a follow up series that adds RAW capture to the IPU3 will make use of them to describe the IPU3 Bayer format memory layout. Patch 1/4 switch to PixelFormat instead of an unsigned int where a pixel format really should be used. Patch 2/4 and 3/4 removes the use of the rather ugly ImageFormats helper from the code paths dealing with PixelFormats. Finally 4/4 turns PixelFormat into a class. Niklas Söderlund (4): libcamera: Use PixelFormat instead of unsigned int where appropriate libcamera: v4l2_videodevice: Remove usage of ImageFormats libcamera: pipeline: vimc: Remove internal usage of ImageFormats libcamera: PixelFormat: Turn into a class include/libcamera/pixelformats.h | 24 +++++- src/cam/main.cpp | 8 +- src/gstreamer/gstlibcamera-utils.cpp | 14 ++-- src/libcamera/include/v4l2_videodevice.h | 2 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- src/libcamera/pipeline/uvcvideo.cpp | 12 +-- src/libcamera/pipeline/vimc.cpp | 8 +- src/libcamera/pixelformats.cpp | 101 +++++++++++++++++++++-- src/libcamera/stream.cpp | 2 +- src/libcamera/v4l2_videodevice.cpp | 16 ++-- src/qcam/format_converter.cpp | 4 +- src/qcam/format_converter.h | 6 +- src/qcam/viewfinder.cpp | 2 +- src/qcam/viewfinder.h | 6 +- src/v4l2/v4l2_camera_proxy.cpp | 4 +- 16 files changed, 162 insertions(+), 51 deletions(-)