From patchwork Fri Sep 4 10:30:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9490 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 972E7BE174 for ; Fri, 4 Sep 2020 10:30:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1DF1C6037B; Fri, 4 Sep 2020 12:30:49 +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="R6UTk9/s"; dkim-atps=neutral Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3480D60371 for ; Fri, 4 Sep 2020 12:30:47 +0200 (CEST) Received: by mail-wm1-x32b.google.com with SMTP id s13so5576094wmh.4 for ; Fri, 04 Sep 2020 03:30:47 -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=fTNyjnDJlxQx3+qOWNHY5QNjiJ6B8Im3u0GmkR2VTwk=; b=R6UTk9/sEniK3NFzoRztQNZoYeXssXFa9rTdYVCQDzP8NJ8rXIB4bDO3wK+J9W3phe eO6lNhzAB2yqyS2W9kLNIEaaY1bfGGuvwU86uQXJLh+YezdyRTApGPV8iApfdrVaLN4i KAQfcAP/9vUEODyMKvNU3VSWczPSVJIaHwhKlWbuV0HfCpDLFvWWerC7XsAVCEBXnfHr o5tOvM4zwNvpft2NPWz+NhMAdTzLfZf3wGPAw8/se68SFjsTEqxh8hhkeMJiJuG4iftP M0TfbmwHYgcIfLG10oTD7uSAQjaYtS/PH/OUgCVgqvUbLXNVGj7lRCX4/G9v5lPVL7S6 ot4w== 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=fTNyjnDJlxQx3+qOWNHY5QNjiJ6B8Im3u0GmkR2VTwk=; b=QsCit/nzj9IN7uXd6aBfWOrEKtyqtejVxpGqRKcu/SnS79ZW2tjRDKTGB0Q6PqRFnA bXjEp6yrkVy2GMI8YXmmjs8xS+qZUVWcimLyjVOwvOXJSInb+oNtS/wt8h4RtJ/mMdov Vn4ZYQOqV6XdenPTZtVNrDKE0o69Emtb8aEP2YbPsrJUtiiWsIT2Wi1Or78AVHhwWHrT /GqGFfbIA7/98f8a4fMY/mXkH6ERshTj+HsTTH3Duf8ycrdckWoxCYv7aV6B5dmYqnpn Mao6L4sZyAUZaqFs1upJc15CwVZHlzgBfFFhsIFWO98UhqeuXkoZBNmuywrfw1XV8/lN tHjw== X-Gm-Message-State: AOAM532pTNuWU5OVUKXdk+BcNDYOsO7Tyjrvavv6udUM5lzbw2nUA/OB Q3zdy0N/BlPmitZIEOk6tyXa7thRs5S4tA== X-Google-Smtp-Source: ABdhPJwzpVF06OxKnPkQkjRshWFxLMEIZfXLYT15wpuTgWzADcxgRcB10L6zha6emcJdF5SYhWrWug== X-Received: by 2002:a7b:c00c:: with SMTP id c12mr7396971wmb.54.1599215446558; Fri, 04 Sep 2020 03:30:46 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id q4sm10294542wru.65.2020.09.04.03.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 03:30:46 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Fri, 4 Sep 2020 11:30:34 +0100 Message-Id: <20200904103042.1593-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v7 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 Thanks for the various comments from Kieran since last time. The latest version I think incorporates that feedback - I moved the combinedTransform_ field into the RPiCameraConfiguration, and removed that extra one I had called userTransform_ because it's the same as the field already named transform. Apart from that everything else is unchanged, except for maybe a couple of improved comments. So still 8 separate commits as last time: 1. The revert commit - unchanged. 2. V4L2Device::controlInfo method - unchanged. 3. Transform enum - unchanged. 4. BayerFormat class - unchanged apart from cosmetic tidying as per feedback. 5. Add transform to CameraConfiguration - unchanged. 6. This is where combinedTransform_ moves into the RPiCameraConfiguration, and userTransform_ is deleted (being just a duplicate of the transform field). 7 and 8. Unchanged. I think that's it! 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 | 60 ++++ 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 | 231 +++++++++++++ src/libcamera/camera.cpp | 16 +- src/libcamera/meson.build | 2 + src/libcamera/pipeline/ipu3/ipu3.cpp | 5 + .../pipeline/raspberrypi/raspberrypi.cpp | 155 ++++++++- 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, 941 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