From patchwork Mon Sep 7 07:15:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9501 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 DEBBFBDB1C for ; Mon, 7 Sep 2020 07:16:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6605F62B90; Mon, 7 Sep 2020 09:16:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="HJKVT7fw"; dkim-atps=neutral Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D31460371 for ; Mon, 7 Sep 2020 09:16:08 +0200 (CEST) Received: by mail-wr1-x42d.google.com with SMTP id a17so14575199wrn.6 for ; Mon, 07 Sep 2020 00:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9A5T59OAcqX5rwVHXcIQ1ysAObyec5s41B0Cko8zOQE=; b=HJKVT7fwWDFf9UNYCLrlMUk7iMY54qygB9VIRjzmDgWUvvsKPbFZXQ1w4rtL690Hq3 JlxJREqu3bGMbcLzQWv3do/GtZ/dHlcg6ABG4w0yMz9GODxaSFreuog/MOf7BW+K3ezA Pchazk0wbZjyAOOydeSsY6ge13iBpuNiTncwUNRrFkP5+tznbD1mAV8iBNTV0UnyPdWd eJWIgCeLMvOBM+Wd+liYDRtYYnqhmR7cmtdtUcIMFlj9p2nbWE5loVO7n2IWuvz3+zVZ gAWWM93bVY9d3ku3u04OMdpcp7zjLX3WeaxsTn/dGi98ShKOfatI9yJjGllLnYxek7La aNxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9A5T59OAcqX5rwVHXcIQ1ysAObyec5s41B0Cko8zOQE=; b=RCOfIPuVuJU1ufAKuBYE6eEm/vMheQV7mNtz9xZ0XzBBNF67mZjFtRdOSKhxb01Wd0 LESHGlWZzN84AdV8vKWelGaXpDOqXfmZE5G2dohPP12TdfzHGEQRrwdqq/NO5oQBdYNR NIBAZIAQ8FvTXVN9Rk2FHcagtoOGOJxSWzZb8Ivxa7EQUD0eFm5mlfribZZGdYshyw91 M/KMJDvpWR+ZjjF6aznd5GIW7//XpX79+kyeMFoKm2H3FpfkwlWBQzPOYJFGtp7oqgph 8JFH9RipA+CTf2ZQ6S59UJSypapZurGx/lpXTD4yONSM+86pFD6NUFbWNHEdQ4/Ut+Lb hQaw== X-Gm-Message-State: AOAM530HsNWjmpgaGf+3xtSv7zpWi7o5gbIsuqfIrywGphBsbRqYfneM OtOSv4RXtJEQ8DsFFZe2PF9/knybb7UE+A== X-Google-Smtp-Source: ABdhPJzXnIbZP4NkRYJqld7Ke9cjwXz/a4zsqgPjgGIu+YEm6S1658wyy7N2n0b9JConbccDoE9jKA== X-Received: by 2002:adf:dcc3:: with SMTP id x3mr19628740wrm.120.1599462967731; Mon, 07 Sep 2020 00:16:07 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id b2sm25543636wmh.47.2020.09.07.00.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2020 00:16:07 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Mon, 7 Sep 2020 08:15:55 +0100 Message-Id: <20200907071604.8355-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 0/8] 2D transforms 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" Hi everyone Here's version 8 of the 2D transforms, benefitting from the latest round of reviews from Laurent. Besides a couple of clarifications and small fixes (discussed in an earlier email) the main changes are to the BayerFormat class. Here, among other smaller things, I've changed the "modifiers" to "packing", and added the IPU3 packing type and formats. Otherwise the changes have the same format and 8 commits as before. Thanks and best regards David David Plowman (8): libcamera: pipeline: raspberrypi: Revert "Set sensor default orientation before configure()" libcamera: Allow access to v4l2_query_ext_ctrl structure for a V4L2 control libcamera: Add Transform enum to represent 2D plane transforms. libcamera: Add BayerFormat type libcamera: Add user Transform to CameraConfiguration libcamera: raspberrypi: Set camera flips correctly from user transform libcamera: raspberrypi: Plumb user transform through to IPA libcamera: ipa: raspberrypi: ALSC: Handle user transform include/libcamera/camera.h | 3 + include/libcamera/internal/bayer_format.h | 61 ++++ include/libcamera/internal/v4l2_device.h | 2 + include/libcamera/meson.build | 1 + include/libcamera/transform.h | 78 +++++ src/ipa/raspberrypi/controller/camera_mode.h | 4 + src/ipa/raspberrypi/controller/rpi/alsc.cpp | 13 +- src/ipa/raspberrypi/raspberrypi.cpp | 48 +-- src/libcamera/bayer_format.cpp | 268 +++++++++++++++ src/libcamera/camera.cpp | 16 +- src/libcamera/meson.build | 2 + src/libcamera/pipeline/ipu3/ipu3.cpp | 5 + .../pipeline/raspberrypi/raspberrypi.cpp | 161 ++++++++- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 + src/libcamera/pipeline/simple/simple.cpp | 5 + src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 5 + src/libcamera/pipeline/vimc/vimc.cpp | 5 + src/libcamera/transform.cpp | 322 ++++++++++++++++++ src/libcamera/v4l2_device.cpp | 15 + 19 files changed, 985 insertions(+), 34 deletions(-) create mode 100644 include/libcamera/internal/bayer_format.h create mode 100644 include/libcamera/transform.h create mode 100644 src/libcamera/bayer_format.cpp create mode 100644 src/libcamera/transform.cpp Acked-by: David Plowman