[{"id":13457,"web_url":"https://patchwork.libcamera.org/comment/13457/","msgid":"<20201023220736.GI5979@pendragon.ideasonboard.com>","date":"2020-10-23T22:07:36","subject":"Re: [libcamera-devel] [PATCH v4 06/12] ipa: raspberry: Initialize\n\tControlInfo with values list","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Fri, Oct 23, 2020 at 07:11:10PM +0200, Jacopo Mondi wrote:\n> Initialize the ControlInfoMap of controls supported by the Raspberry\n> pipeline handler and IPA using the list of the enumerated values instead\n> of specifying them manually.\n> \n> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nIf you think the changes I proposed in the review of 03/12 are good,\nfeel free to include them here.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  include/libcamera/ipa/raspberrypi.h | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> index b23baf2f1330..1d3827404966 100644\n> --- a/include/libcamera/ipa/raspberrypi.h\n> +++ b/include/libcamera/ipa/raspberrypi.h\n> @@ -50,13 +50,13 @@ static const ControlInfoMap Controls = {\n>  \t{ &controls::AeEnable, ControlInfo(false, true) },\n>  \t{ &controls::ExposureTime, ControlInfo(0, 999999) },\n>  \t{ &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },\n> -\t{ &controls::AeMeteringMode, ControlInfo(0, static_cast<int32_t>(controls::MeteringModeMax)) },\n> -\t{ &controls::AeConstraintMode, ControlInfo(0, static_cast<int32_t>(controls::ConstraintModeMax)) },\n> -\t{ &controls::AeExposureMode, ControlInfo(0, static_cast<int32_t>(controls::ExposureModeMax)) },\n> +\t{ &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues.data(), controls::AeMeteringModeValues.size()) },\n> +\t{ &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues.data(), controls::AeConstraintModeValues.size()) },\n> +\t{ &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues.data(), controls::AeExposureModeValues.size()) },\n>  \t{ &controls::ExposureValue, ControlInfo(0.0f, 16.0f) },\n>  \t{ &controls::AwbEnable, ControlInfo(false, true) },\n>  \t{ &controls::ColourGains, ControlInfo(0.0f, 32.0f) },\n> -\t{ &controls::AwbMode, ControlInfo(0, static_cast<int32_t>(controls::AwbModeMax)) },\n> +\t{ &controls::AwbMode, ControlInfo(controls::AwbModeValues.data(), controls::AwbModeValues.size()) },\n>  \t{ &controls::Brightness, ControlInfo(-1.0f, 1.0f) },\n>  \t{ &controls::Contrast, ControlInfo(0.0f, 32.0f) },\n>  \t{ &controls::Saturation, ControlInfo(0.0f, 32.0f) },","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 37265BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Oct 2020 22:08:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A234E61CB4;\n\tSat, 24 Oct 2020 00:08:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 747C0619AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 24 Oct 2020 00:08:23 +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 E2C319BF;\n\tSat, 24 Oct 2020 00:08:22 +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=\"qnb/Ngnf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1603490903;\n\tbh=P/8vFHYtaaBxW8asOobslTwEqrhV4lkL8gpQlxIFwv8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=qnb/NgnfJwmK/j3JxJDbnnR9qQbpXohKTXCsWuScCpkSoG3IZy+Qs5hVAHdA6H1iT\n\t05zL28WHoFMYd9LpMCZOEHFSQbZPSnejNo0NfSeKf+nNflDNTlZDD5hCzavt+aaAR/\n\tdNGKpDyyWVHRBth03035GdtCSIgWCj2PwQqy/BP0=","Date":"Sat, 24 Oct 2020 01:07:36 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20201023220736.GI5979@pendragon.ideasonboard.com>","References":"<20201023171116.24899-1-jacopo@jmondi.org>\n\t<20201023171116.24899-7-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201023171116.24899-7-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v4 06/12] ipa: raspberry: Initialize\n\tControlInfo with values list","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>"}}]