[{"id":13396,"web_url":"https://patchwork.libcamera.org/comment/13396/","msgid":"<20201022051138.GJ3942@pendragon.ideasonboard.com>","date":"2020-10-22T05:11:38","subject":"Re: [libcamera-devel] [PATCH v4 0/5] Digital zoom","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nThank you for the patches.\n\nOn Mon, Oct 19, 2020 at 01:51:51PM +0100, David Plowman wrote:\n> Hi everyone\n> \n> Here's a new version of the digital zoom patches, following on from\n> the previous implementations and the discussions that have been\n> ongoing since then. Firstly I should point out that I've dropped the\n> patch that added digital zoom parameters to the cam application as\n> someone had suggested they might do something there (so thanks for\n> that!). Also, I'm happy to add some geometry tests once there's a bit\n> less churn in this patch set as a whole. In view of the current churn,\n> I've dropped other \"Reviewed by\" tags - I hope that's reasonable.\n\nSure. Thank you so much for coping with my reviews.\n\n> That leaves 5 patches, as follows:\n> \n> 1. Adds the ScalerCropMaximum property.\n> \n> This is the property that expresses the part of the sensor array\n> within which an application can crop to implement digital zoom. The\n> property name has been changed, obviously, and the documentation\n> updated to be in line with recent discussion, otherwise nothing here\n> is very different.\n> \n> 2. Initialisation of the ScalerCropMaximum property.\n> \n> This is unchanged. Given that the property isn't really very\n> meaningful until you know what camera mode you mean, I do wonder\n> whether we might be better to initialise this to all zeroes?\n> Applications could always call isNull to be sure that they have\n> something sensible.\n\nSeems reasonable to me.\n\n> 3. Adds the ScalerCrop property.\n> \n> No great changes, apart from the property name and description.\n> \n> 4. Geometry helpers.\n> \n> Mostly as before, with the addition of a Point class and translation\n> functions. There's also a Rectangle::rescaledTo function to make it\n> easier to scale crop regions between sensor native and binned/scaled\n> coordinates. Maybe someone would prefer a different name?\n> \n> I've split Rectangle::boundedTo into a separate true intersection\n> function (taking the name Rectangle::boundedTo) and a function I've\n> named Rectangle::clampedTo. I'm open to suggestions on the name, I\n> wanted to choose something that didn't sound like it might be the\n> intersection...\n> \n> 5. Implementation in the Raspberry Pi pipeline.\n> \n> Mostly as before, with the modifications required by earlier changes\n> (notably scaling to and from native sensor coordinates). Some of the\n> code here might look a little nicer if we added a\n> \"Point Rectangle::offset() const { return { x, y }; }\" function, and\n> changed the translate methods to take a Point instead of a pair of\n> ints.\n> \n> Though I realise that the word \"offset\" is not popular,\n\nIt could be called Rectangle::topLeft().\n\n> and I find the\n> idea of translating by a Point mildly offensive, so I'm not sure about\n> all that. Thoughts?\n\nI'd be fine with it.\n\n> Well, I think that's everything!\n> \n> David Plowman (5):\n>   libcamera: Add SensorCropMaximum property\n>   libcamera: Initialise the ScalerCropMaximum property\n>   libcamera: Add ScalerCrop control\n>   libcamera: Add geometry helper functions\n>   libcamera: pipeline: raspberrypi: Implementation of digital zoom\n> \n>  include/libcamera/geometry.h                  |  53 ++++\n>  include/libcamera/ipa/raspberrypi.h           |   1 +\n>  src/ipa/raspberrypi/raspberrypi.cpp           |   7 +\n>  src/libcamera/camera_sensor.cpp               |   6 +\n>  src/libcamera/control_ids.yaml                |  12 +\n>  src/libcamera/geometry.cpp                    | 296 ++++++++++++++++++\n>  .../pipeline/raspberrypi/raspberrypi.cpp      |  70 ++++-\n>  src/libcamera/property_ids.yaml               |  23 ++\n>  8 files changed, 453 insertions(+), 15 deletions(-)","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 06320BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Oct 2020 05:12:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 65C7961059;\n\tThu, 22 Oct 2020 07:12:26 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D2DC26034F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Oct 2020 07:12:24 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 495ED53;\n\tThu, 22 Oct 2020 07:12:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qfPlwFpd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1603343544;\n\tbh=8Kml4ciZwkh0DLhL/ldA9hskd38LYAZIY7yOy62tCMw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=qfPlwFpdOcxPU0GKg6lOcd0IT075e1yBrnC2I30yHUGcbgVV8j0VDGRYwGZfHAYuY\n\tBe/g2a4tiITo4hneF/PXajUy6fpFPcqyxDSCEFd7fsSk0mP2HCGbv5o6ullTglW1si\n\tgT4QHYDt2Gn11O9Afg2qYSLsHvGaO1KGyPwot71M=","Date":"Thu, 22 Oct 2020 08:11:38 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<20201022051138.GJ3942@pendragon.ideasonboard.com>","References":"<20201019125156.26751-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201019125156.26751-1-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v4 0/5] Digital zoom","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]