From patchwork Thu Jul 9 09:15:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 8712 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 EAF0FBD790 for ; Thu, 9 Jul 2020 09:16:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8759F6118C; Thu, 9 Jul 2020 11:16:07 +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="tCzf/rQw"; dkim-atps=neutral Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E302A61186 for ; Thu, 9 Jul 2020 11:16:05 +0200 (CEST) Received: by mail-wr1-x436.google.com with SMTP id q5so1541743wru.6 for ; Thu, 09 Jul 2020 02:16:05 -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=idFkkZsp7V72MPL5/c/slbiEJT3dB2qY3Lo5RFw/+sY=; b=tCzf/rQwRCKT+6l52sTD8/0N/tHnSp03VBH+cBSP18NndJMZDO1YEqkrc1VIFMdUSd 9VeX+vvnSBtLTDjDwxYl2HSLiSE+3r4bJ6KlhdeL2AHOxyds1MS9X9JphIEqgFCRPKoW 7HoRgE6Y74a5223MewoAw/qJ9l7E+8v9H0P/FumghnJfXSi7qcklPWPjxkC7j+GAvuTC s3ZVearsXGZoJyQiCvA2spXf7lR4X7mqRxA70yKAO4EmWv2I00BGloTMZhs+Rn3E8tGj B6WlTuRCl5us7fK7WL3er7iEKArf97U43YUR3x3caqwtcnf7fxok+U1FN2hl6TLKIQmm G6jg== 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=idFkkZsp7V72MPL5/c/slbiEJT3dB2qY3Lo5RFw/+sY=; b=S/9tVY3ltpplDiU8giwTrtWiP5WgQrAiEV3vzR7MtSxAtDOzulp24fRkW0OAdHFHPK MkHcN8PgJGF104StwWmkvwNU5w65+DLOVDOrhXc5Vz24bGowEkFPPU2G5AMILqRxVeIg 58Hykbm/w0KzFjPIS+YSBkGFK3nNu3NJIcfbJpcV+mkfHHYErpO96hfxEPJKX5lzuaMy yTAddy9FdzhqHpXgqRkkDHS2Loas+Yf32a5gOsoV1UH07/VrfifMY2n9dMtxAS/EPr2s dcRspRCuSgfVU/ObzCyVHQN6PLhEzAt7zcrqiCElH8Ru7sw4IOvU//RYF038OQlsdWxu HrAg== X-Gm-Message-State: AOAM532lEdLNZveKDvZ7Q7GGZpvlhYMh+/tte/n7WzDLCnwhRoMghIm6 g01CDAj0ufC2+bQxwfOYWkkzDE9RBDE= X-Google-Smtp-Source: ABdhPJwLHlIi+cj5mSYWYpgCjuUR4qqE5YKY9y+BA5Hesu6nZIz4/5m5bQPBtNurxgxFtnMvzmZJCg== X-Received: by 2002:adf:8342:: with SMTP id 60mr12649147wrd.62.1594286165277; Thu, 09 Jul 2020 02:16:05 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id h84sm4135765wme.22.2020.07.09.02.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 02:16:04 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Thu, 9 Jul 2020 10:15:53 +0100 Message-Id: <20200709091555.1617-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/2] Digital zoom implementation 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 2 of this patch set, which addresses the issues that Naush raised with regard to the Raspberry Pi implementation (the second commit). The basic idea of this digital zoom implementation is still unchanged, however, and merits some discussion. In particular: * I've got this rather awkward getSensorCrop() function which gets the the dimension of the rectange, in pixels, within which you can zoom. * Is there any other way to get this rectangle? It's only the pipeline handler that actually calculates what it is. * Or would we be better off with ratios rather than pixels (which would obviate the need for the function)? Pixels sound useful, though I think folks will actually calculate them using ratios in a real application. Thoughts welcome as always! Thanks and best regards David David Plowman (2): libcamera: Implement digital zoom libcamera: raspberrypi: Implement digital zoom include/libcamera/camera.h | 2 + include/libcamera/internal/pipeline_handler.h | 4 ++ include/libcamera/ipa/raspberrypi.h | 1 + src/ipa/raspberrypi/raspberrypi.cpp | 10 ++++ src/libcamera/camera.cpp | 26 +++++++++ src/libcamera/control_ids.yaml | 10 ++++ .../pipeline/raspberrypi/raspberrypi.cpp | 56 ++++++++++++++++++- 7 files changed, 108 insertions(+), 1 deletion(-)