From patchwork Tue Jun 30 14:58:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 8519 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 E6D83BF415 for ; Tue, 30 Jun 2020 14:58:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 504A360C56; Tue, 30 Jun 2020 16:58:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ibu+oXtI"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 672DB609C5 for ; Tue, 30 Jun 2020 16:58:23 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CC5A029F; Tue, 30 Jun 2020 16:58:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1593529103; bh=J1PZKp8OG7VZJve9xG4l3ELl1EtjQsnv3mAi0lGh3Wo=; h=From:To:Cc:Subject:Date:From; b=Ibu+oXtI6Irxlubw6wTQOPNOrFmyj3ar119bylhooQ4WQ+Bf/9ZRA1nfefNljdJQ6 uxcQCZGOYKKcg5eZAFXXtcUkS7fK9lgbuz47UxFe9/HfC1K7US1xvNjX5J4NKWEfvo N56/YmDiga82B9O3741oSpEaKBe9kjoPFvgtZjyM= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Jun 2020 23:58:02 +0900 Message-Id: <20200630145808.2976956-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/6] Move formats from v4l2-compat into libcamera 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" This patchset moves format information out of V4L2CameraProxy in the compatibility layer and into libcamera core. The first three patches add the info in the libcamera core formats, including an expansion to the format info to account for how many bytes are needed per how many pixels The last patch then removes the formats from V4L2CameraProxy and uses the libcamera core formats, cleaning code up at the same time. Changes in v2: - add documentation - fix vocab/wording - other minor changes Paul Elder (6): libcamera: formats: Add NV24 and NV42, and reorder NV formats libcamera: formats: Add fields to info ease calculating stride libcamera: formats: PixelFormatInfo: Add v4l2 lookup function libcamera: PixelFormatInfo: Add functions bytesPerLine and imageSize libcamera: pipeline: raspberrypi: Simplify format fetching v4l2: v4l2_camera_proxy: Use libcamera formats include/libcamera/internal/formats.h | 8 +- src/libcamera/formats.cpp | 197 ++++++++++++++++-- .../pipeline/raspberrypi/raspberrypi.cpp | 3 +- src/v4l2/v4l2_camera_proxy.cpp | 165 +++------------ src/v4l2/v4l2_camera_proxy.h | 7 - 5 files changed, 226 insertions(+), 154 deletions(-)