[{"id":13388,"web_url":"https://patchwork.libcamera.org/comment/13388/","msgid":"<20201022024707.GZ3942@pendragon.ideasonboard.com>","date":"2020-10-22T02:47:07","subject":"Re: [libcamera-devel] [PATCH v3 07/14] 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\nCC'ing Naush and David.\n\nOn Wed, Oct 21, 2020 at 04:36:28PM +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: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\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..4ca1528ad097 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) },\n> +\t{ &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) },\n> +\t{ &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) },\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) },\n\nThis looks good to me, but I haven't checked if the RPi IPA actually\nsupports all possible values. David or Naush, would you be able to\ncomment on this ?\n\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 E55F6C3D3C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Oct 2020 02:47:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5726861059;\n\tThu, 22 Oct 2020 04:47:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D4F0A6034F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Oct 2020 04:47:53 +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 4CD6353;\n\tThu, 22 Oct 2020 04:47:53 +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=\"wjTPfAl9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1603334873;\n\tbh=VDz45xoJVk9hLkOnuX3/Eec9o+Qhj68VnlsbOJ04Ass=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=wjTPfAl9XiGw1r0Fa1cZiDCEplGdpQCQ32XKPYp4YnXIxgGVRoTWJeQfX6wzpWS2d\n\ta52itShfHhxxFzUUfiskyEPCmfIdMAgSUqnlaAK8njGi7l5A1czzrKuB+KVvmr7r8M\n\tuDSS6730tX4ls2UCjg+lopmCNVKG7Yf71+hi/gak=","Date":"Thu, 22 Oct 2020 05:47:07 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20201022024707.GZ3942@pendragon.ideasonboard.com>","References":"<20201021143635.22846-1-jacopo@jmondi.org>\n\t<20201021143635.22846-8-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201021143635.22846-8-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v3 07/14] 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>"}},{"id":13405,"web_url":"https://patchwork.libcamera.org/comment/13405/","msgid":"<CAEmqJPqUBsyrLRj-JtKneiv_kV00=VVetqqrGiCq8jEqq06c1A@mail.gmail.com>","date":"2020-10-22T08:35:42","subject":"Re: [libcamera-devel] [PATCH v3 07/14] ipa: raspberry: Initialize\n\tControlInfo with values list","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent and Jacopo,\n\n\nOn Thu, 22 Oct 2020 at 03:47, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> CC'ing Naush and David.\n>\n> On Wed, Oct 21, 2020 at 04:36:28PM +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: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\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\n> b/include/libcamera/ipa/raspberrypi.h\n> > index b23baf2f1330..4ca1528ad097 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> >       { &controls::AeEnable, ControlInfo(false, true) },\n> >       { &controls::ExposureTime, ControlInfo(0, 999999) },\n> >       { &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },\n> > -     { &controls::AeMeteringMode, ControlInfo(0,\n> static_cast<int32_t>(controls::MeteringModeMax)) },\n> > -     { &controls::AeConstraintMode, ControlInfo(0,\n> static_cast<int32_t>(controls::ConstraintModeMax)) },\n> > -     { &controls::AeExposureMode, ControlInfo(0,\n> static_cast<int32_t>(controls::ExposureModeMax)) },\n> > +     { &controls::AeMeteringMode,\n> ControlInfo(controls::AeMeteringModeValues) },\n> > +     { &controls::AeConstraintMode,\n> ControlInfo(controls::AeConstraintModeValues) },\n> > +     { &controls::AeExposureMode,\n> ControlInfo(controls::AeExposureModeValues) },\n> >       { &controls::ExposureValue, ControlInfo(0.0f, 16.0f) },\n> >       { &controls::AwbEnable, ControlInfo(false, true) },\n> >       { &controls::ColourGains, ControlInfo(0.0f, 32.0f) },\n> > -     { &controls::AwbMode, ControlInfo(0,\n> static_cast<int32_t>(controls::AwbModeMax)) },\n> > +     { &controls::AwbMode, ControlInfo(controls::AwbModeValues) },\n>\n> This looks good to me, but I haven't checked if the RPi IPA actually\n> supports all possible values. David or Naush, would you be able to\n> comment on this ?\n>\n\nYes, we do support all listed modes, so this should be fine.\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n\n\n>\n> >       { &controls::Brightness, ControlInfo(-1.0f, 1.0f) },\n> >       { &controls::Contrast, ControlInfo(0.0f, 32.0f) },\n> >       { &controls::Saturation, ControlInfo(0.0f, 32.0f) },\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 DEA21BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Oct 2020 08:36:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7269861059;\n\tThu, 22 Oct 2020 10:36:01 +0200 (CEST)","from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4DCF60351\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Oct 2020 10:35:59 +0200 (CEST)","by mail-lf1-x141.google.com with SMTP id a7so1193131lfk.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Oct 2020 01:35:59 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"a7PL3QrU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=dpd9+lZ83xpJov+Y8ecAQ7tiF8cQxBrz8r9bKia6mxw=;\n\tb=a7PL3QrU/8WorV+I5MH/jMK+VmseAakbnc/gPx6TJ5oJtXNGO/QjXWtcPixyGU1i6G\n\tZ3iXiVYel1lRiW6oa62bvOnm1S01i851MT/GsnU5fh0ZiDKhhjXvtzt65Thu/NY/eGFV\n\tmewGziHmkbVd62jWBGaz2byK2Pss4LPDJ/GNUJ8Yrp8uENniy4X0DF/d594VOvTO2+/B\n\theRy6QVszeHGl/io+ic/LCf3LHOINEHUXlp4vjSGQ4P8suXH86DKc2tLokCnwi6jQHKm\n\tTr3ZBVzJicudtknx9xPNH9CG0QGrbAKpfPnY1jEeBFoEd3pQgIjDWoc3SxONWQE7kzsL\n\t/4Tg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=dpd9+lZ83xpJov+Y8ecAQ7tiF8cQxBrz8r9bKia6mxw=;\n\tb=iumdQWZ8OkZD5IYPOkNxY54/uYZ/J2aN4w4Xw/JTT71bTWWgAAz9ABjhShohiGJMhs\n\tWoNtM906SGJW7rlxNtC2sofCq38bbdQT4kP7hoZj3PYlPfxMaMAXWdw7w/PQ4HlDjkce\n\tlPONyzEyC4uLzIttnQ3tIOcmUlbNdaReNoB1mDfkOIAGKYkDCGL14YAvblkWzgGQZjZL\n\tjpjk0rUKkKe8jYl2RXGG972EnzCh1EWkQern4k3ce7SCmWhUoeMfXHF4QCYpwdD8BTUM\n\tXH9gRNOa5Q/VuAwWWAwGT2qtNwESYym1Ng0VLQUg7wYfVrGFpJ3//vqFqSB2JuPACnC7\n\tu1fw==","X-Gm-Message-State":"AOAM530ueuoepGrzJ+7c0i5gdhId8LDUwLe571o8PQcVISHNHvd6LX3s\n\te7AdOuUUClVg7M5e9BlgmqGEy0drruegKPNzGb0AbQ==","X-Google-Smtp-Source":"ABdhPJx1uuT0zPm7jumsUB1wCQeHKfL9fUm3EN4JVA+x71cd3WhMAdnp7sWPVyIXiZgbsjffz4yQPIeBl3GTfqijSCU=","X-Received":"by 2002:a19:418b:: with SMTP id\n\to133mr515154lfa.413.1603355759300; \n\tThu, 22 Oct 2020 01:35:59 -0700 (PDT)","MIME-Version":"1.0","References":"<20201021143635.22846-1-jacopo@jmondi.org>\n\t<20201021143635.22846-8-jacopo@jmondi.org>\n\t<20201022024707.GZ3942@pendragon.ideasonboard.com>","In-Reply-To":"<20201022024707.GZ3942@pendragon.ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Thu, 22 Oct 2020 09:35:42 +0100","Message-ID":"<CAEmqJPqUBsyrLRj-JtKneiv_kV00=VVetqqrGiCq8jEqq06c1A@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 07/14] 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":"multipart/mixed;\n\tboundary=\"===============2076189760883534786==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]