[{"id":17573,"web_url":"https://patchwork.libcamera.org/comment/17573/","msgid":"<CAEmqJPpipis9+toLqKEvXyOoKJE8b1r7O-mfUQcjB4OqBvyAAw@mail.gmail.com>","date":"2021-06-15T13:38:38","subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: ipa: raspberrypi: Add\n\tsupport for ov9281 sensor","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nNew sensors, very nice!\n\nOn Tue, 15 Jun 2021 at 11:51, David Plowman <david.plowman@raspberrypi.com>\nwrote:\n\n> The necessary tuning file and CamHelper is added for the ov9281 sensor\n> (which the driver names as the \"mov9281\").\n>\n> The ov9281 is a 1280x800 monochrome global shutter sensor. To enable\n> it, please add\n>\n> dtoverlay=ov9281\n>\n> to the /boot/config.txt file and reboot the Pi.\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  src/ipa/raspberrypi/cam_helper_mov9281.cpp | 108 +++++++++++++++++++++\n>  src/ipa/raspberrypi/data/meson.build       |   1 +\n>  src/ipa/raspberrypi/data/mov9281.json      |  92 ++++++++++++++++++\n>  src/ipa/raspberrypi/meson.build            |   1 +\n>  4 files changed, 202 insertions(+)\n>  create mode 100644 src/ipa/raspberrypi/cam_helper_mov9281.cpp\n>  create mode 100644 src/ipa/raspberrypi/data/mov9281.json\n>\n> diff --git a/src/ipa/raspberrypi/cam_helper_mov9281.cpp\n> b/src/ipa/raspberrypi/cam_helper_mov9281.cpp\n> new file mode 100644\n> index 00000000..5645c73a\n> --- /dev/null\n> +++ b/src/ipa/raspberrypi/cam_helper_mov9281.cpp\n> @@ -0,0 +1,108 @@\n> +/* SPDX-License-Identifier: BSD-2-Clause */\n> +/*\n> + * Copyright (C) 2019, Raspberry Pi (Trading) Limited\n> + *\n> + * cam_helper_mov9281.cpp - camera information for ov9281 sensor\n> + */\n> +\n> +#include <assert.h>\n> +\n> +#include \"cam_helper.hpp\"\n> +\n> +using namespace RPiController;\n> +\n> +class CamHelperOv9281 : public CamHelper\n> +{\n> +public:\n> +       CamHelperOv9281();\n> +       uint32_t GainCode(double gain) const override;\n> +       double Gain(uint32_t gain_code) const override;\n> +       void GetDelays(int &exposure_delay, int &gain_delay,\n> +                      int &vblank_delay) const override;\n> +       unsigned int HideFramesStartup() const override;\n> +       unsigned int HideFramesModeSwitch() const override;\n> +       unsigned int MistrustFramesStartup() const override;\n> +       unsigned int MistrustFramesModeSwitch() const override;\n> +\n> +private:\n> +       /*\n> +        * Smallest difference between the frame length and integration\n> time,\n> +        * in units of lines.\n> +        */\n> +       static constexpr int frameIntegrationDiff = 4;\n> +};\n> +\n> +/*\n> + * OV9281 doesn't output metadata, so we have to use the \"unicam parser\"\n> which\n> + * works by counting frames.\n> + */\n> +\n> +CamHelperOv9281::CamHelperOv9281()\n> +       : CamHelper(nullptr, frameIntegrationDiff)\n> +{\n> +}\n> +\n> +uint32_t CamHelperOv9281::GainCode(double gain) const\n> +{\n> +       return static_cast<uint32_t>(gain * 16.0);\n> +}\n> +\n> +double CamHelperOv9281::Gain(uint32_t gain_code) const\n> +{\n> +       return static_cast<double>(gain_code) / 16.0;\n> +}\n> +\n> +void CamHelperOv9281::GetDelays(int &exposure_delay, int &gain_delay,\n> +                               int &vblank_delay) const\n> +{\n> +       /*\n> +        * We run this sensor in a mode where the gain delay is bumped up\n> to\n> +        * 2. It seems to be the only way to make the delays \"predictable\".\n> +        */\n> +       exposure_delay = 2;\n> +       gain_delay = 2;\n> +       vblank_delay = 2;\n> +}\n> +\n> +unsigned int CamHelperOv9281::HideFramesStartup() const\n> +{\n> +       /*\n> +        * On startup, we get a couple of under-exposed frames which\n> +        * we don't want shown.\n> +        */\n> +       return 2;\n> +}\n> +\n> +unsigned int CamHelperOv9281::HideFramesModeSwitch() const\n> +{\n> +       /*\n> +        * After a mode switch, we get a couple of under-exposed frames\n> which\n> +        * we don't want shown.\n> +        */\n> +       return 2;\n> +}\n> +\n> +unsigned int CamHelperOv9281::MistrustFramesStartup() const\n> +{\n> +       /*\n> +        * First couple of frames are under-exposed and are no good for\n> control\n> +        * algos.\n> +        */\n> +       return 2;\n> +}\n> +\n> +unsigned int CamHelperOv9281::MistrustFramesModeSwitch() const\n> +{\n> +       /*\n> +        * First couple of frames are under-exposed even after a simple\n> +        * mode switch, and are no good for control algos.\n> +        */\n> +       return 2;\n> +}\n>\n\nPerhaps we need to see if these numbers can be reduced or (ideally) set to\n0?\nOther than that, looks good!\n\nReviewed-by: Naushir Patuck <naush@raspberrpyi.com>\n\n\n> +\n> +static CamHelper *Create()\n> +{\n> +       return new CamHelperOv9281();\n> +}\n> +\n> +static RegisterCamHelper reg(\"mov9281\", &Create);\n> diff --git a/src/ipa/raspberrypi/data/meson.build\n> b/src/ipa/raspberrypi/data/meson.build\n> index 92ad3272..f8baab6d 100644\n> --- a/src/ipa/raspberrypi/data/meson.build\n> +++ b/src/ipa/raspberrypi/data/meson.build\n> @@ -4,6 +4,7 @@ conf_files = files([\n>      'imx219.json',\n>      'imx290.json',\n>      'imx477.json',\n> +    'mov9281.json',\n>      'ov5647.json',\n>      'se327m12.json',\n>      'uncalibrated.json',\n> diff --git a/src/ipa/raspberrypi/data/mov9281.json\n> b/src/ipa/raspberrypi/data/mov9281.json\n> new file mode 100644\n> index 00000000..ecd262be\n> --- /dev/null\n> +++ b/src/ipa/raspberrypi/data/mov9281.json\n> @@ -0,0 +1,92 @@\n> +{\n> +    \"rpi.black_level\":\n> +    {\n> +        \"black_level\": 4096\n> +    },\n> +    \"rpi.lux\":\n> +    {\n> +        \"reference_shutter_speed\": 2000,\n> +        \"reference_gain\": 1.0,\n> +        \"reference_aperture\": 1.0,\n> +        \"reference_lux\": 800,\n> +        \"reference_Y\": 20000\n> +    },\n> +    \"rpi.noise\":\n> +    {\n> +        \"reference_constant\": 0,\n> +        \"reference_slope\": 2.5\n> +    },\n> +    \"rpi.sdn\":\n> +    {\n> +    },\n> +    \"rpi.agc\":\n> +    {\n> +        \"metering_modes\":\n> +        {\n> +            \"centre-weighted\": {\n> +                \"weights\": [4, 4, 4, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0]\n> +            }\n> +        },\n> +        \"exposure_modes\":\n> +        {\n> +            \"normal\":\n> +            {\n> +                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n> +                \"gain\":    [ 1.0, 2.0,   3.0,   4.0,   6.0    ]\n> +            }\n> +        },\n> +        \"constraint_modes\":\n> +        {\n> +            \"normal\":\n> +            [\n> +                { \"bound\": \"LOWER\", \"q_lo\": 0.98, \"q_hi\": 1.0,\n> \"y_target\": [ 0, 0.4, 1000, 0.4 ] }\n> +            ]\n> +        },\n> +        \"y_target\": [ 0, 0.16, 1000, 0.165, 10000, 0.17 ]\n> +    },\n> +    \"rpi.alsc\":\n> +    {\n> +        \"n_iter\": 0,\n> +        \"luminance_strength\": 1.0,\n> +        \"corner_strength\": 1.5\n> +    },\n> +    \"rpi.contrast\":\n> +    {\n> +        \"ce_enable\": 0,\n> +        \"gamma_curve\": [\n> +            0,     0,\n> +            1024,  5040,\n> +            2048,  9338,\n> +            3072,  12356,\n> +            4096,  15312,\n> +            5120,  18051,\n> +            6144,  20790,\n> +            7168,  23193,\n> +            8192,  25744,\n> +            9216,  27942,\n> +            10240, 30035,\n> +            11264, 32005,\n> +            12288, 33975,\n> +            13312, 35815,\n> +            14336, 37600,\n> +            15360, 39168,\n> +            16384, 40642,\n> +            18432, 43379,\n> +            20480, 45749,\n> +            22528, 47753,\n> +            24576, 49621,\n> +            26624, 51253,\n> +            28672, 52698,\n> +            30720, 53796,\n> +            32768, 54876,\n> +            36864, 57012,\n> +            40960, 58656,\n> +            45056, 59954,\n> +            49152, 61183,\n> +            53248, 62355,\n> +            57344, 63419,\n> +            61440, 64476,\n> +            65535, 65535\n> +        ]\n> +    }\n> +}\n> diff --git a/src/ipa/raspberrypi/meson.build\n> b/src/ipa/raspberrypi/meson.build\n> index d1397a32..e384c7ce 100644\n> --- a/src/ipa/raspberrypi/meson.build\n> +++ b/src/ipa/raspberrypi/meson.build\n> @@ -22,6 +22,7 @@ rpi_ipa_sources = files([\n>      'cam_helper_imx219.cpp',\n>      'cam_helper_imx290.cpp',\n>      'cam_helper_imx477.cpp',\n> +    'cam_helper_mov9281.cpp',\n>      'controller/controller.cpp',\n>      'controller/histogram.cpp',\n>      'controller/algorithm.cpp',\n> --\n> 2.20.1\n>\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 13D03C3218\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 15 Jun 2021 13:38:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8292F6892C;\n\tTue, 15 Jun 2021 15:38:57 +0200 (CEST)","from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com\n\t[IPv6:2a00:1450:4864:20::22d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F15696029A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Jun 2021 15:38:55 +0200 (CEST)","by mail-lj1-x22d.google.com with SMTP id n17so25146775ljg.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Jun 2021 06:38:55 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"oLiP47eT\"; 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=cPur+9s7HbZ+XHgw0fhaY5jO3SIEbQWY6i9eyUhuEm8=;\n\tb=oLiP47eTB69ZBbAoQQQwmFaN8rE5LkJdg3HtW5vmeGsGx74Bfp1/JzITdaU0YxrsDm\n\tyqsDURV49tfVVgUvaY4lIn+dTrZoVnCcntCSRSqKQAgtDqPzT6TMp2i+vzqS1tIX3DMz\n\tCMvDwmpnKr1P0cYZYshBtigRZhnunMBaDtHWEBZy/J3ZRQnREVppg0VHmJUEH2YA85Np\n\tsRm+Tuy77Qh6Hx5SVjLkuvlwWhTYB5vkrRghz7l7zCqengGEozKmsIEexTdyaflg15Mz\n\t0DJUoff8Wq9lnuB3WaqWVPZApgikAKJDRUDKS8d0CYHWwP00GFJiMF7hs3mOvs4eLXC+\n\ttHMg==","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=cPur+9s7HbZ+XHgw0fhaY5jO3SIEbQWY6i9eyUhuEm8=;\n\tb=qRDz6CJ6P795vt2tI8tRuRfkP5fGN6OjYgNDwmd8E8wX7lDBapmifRfyEPntgGwi4u\n\tB99alO3gAWwfbMzM6huCOEUuEqaq0LY8VeQ/UlvXtQArbP4Tns13XbuJtAUYC9iSzBqn\n\tS3X0uUWYay2PhzhVphK2zMM2VmDwx2eB+jdsrFpuBrNqAYainublAP72zkEfsqUNu+hI\n\tHpG4oZMkl9Dh4z0ySAuBiHQIjul589/kLAlf0r6tMxxqK2fqms5PlwALcIVmg16hGNiP\n\tZj7nGjwoJwwxBSUSwaNZfmRAkrJe7PAyEondOmR8nsOGIz/+WN/QdVKGYv8/UWTqm2Um\n\tY6vg==","X-Gm-Message-State":"AOAM533xL02+JHEn6ElGx55sahUNlzG+XjeXfiSRtxkGHzOJ7VFNZcq8\n\tHUe4ssZw6f+sfvWSJnKMogI20FwxpXOfaAh3ER0fnA==","X-Google-Smtp-Source":"ABdhPJwhR7CnwwpCn9RQ8iHAMszvJe5AeUwiX56dVdk71isVarw3vFjSAb55PyR17iHiumWFFcuwlq1yVhroluBy1M4=","X-Received":"by 2002:a2e:90ca:: with SMTP id\n\to10mr17179488ljg.299.1623764335313; \n\tTue, 15 Jun 2021 06:38:55 -0700 (PDT)","MIME-Version":"1.0","References":"<20210615105139.16171-1-david.plowman@raspberrypi.com>\n\t<20210615105139.16171-4-david.plowman@raspberrypi.com>","In-Reply-To":"<20210615105139.16171-4-david.plowman@raspberrypi.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Tue, 15 Jun 2021 14:38:38 +0100","Message-ID":"<CAEmqJPpipis9+toLqKEvXyOoKJE8b1r7O-mfUQcjB4OqBvyAAw@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Content-Type":"multipart/alternative; boundary=\"00000000000067d82e05c4ce18a6\"","Subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: ipa: raspberrypi: Add\n\tsupport for ov9281 sensor","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17576,"web_url":"https://patchwork.libcamera.org/comment/17576/","msgid":"<CAHW6GYLi=PwcN3YN7LwQcTPwtRrVo7gEakLg=v8vTKwunkrn+Q@mail.gmail.com>","date":"2021-06-15T14:26:00","subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: ipa: raspberrypi: Add\n\tsupport for ov9281 sensor","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nThanks for prompting me to look more closely at this.\n\nOn Tue, 15 Jun 2021 at 14:38, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> Hi David,\n>\n> New sensors, very nice!\n>\n> On Tue, 15 Jun 2021 at 11:51, David Plowman <david.plowman@raspberrypi.com> wrote:\n>>\n>> The necessary tuning file and CamHelper is added for the ov9281 sensor\n>> (which the driver names as the \"mov9281\").\n>>\n>> The ov9281 is a 1280x800 monochrome global shutter sensor. To enable\n>> it, please add\n>>\n>> dtoverlay=ov9281\n>>\n>> to the /boot/config.txt file and reboot the Pi.\n>>\n>> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n>> ---\n>>  src/ipa/raspberrypi/cam_helper_mov9281.cpp | 108 +++++++++++++++++++++\n>>  src/ipa/raspberrypi/data/meson.build       |   1 +\n>>  src/ipa/raspberrypi/data/mov9281.json      |  92 ++++++++++++++++++\n>>  src/ipa/raspberrypi/meson.build            |   1 +\n>>  4 files changed, 202 insertions(+)\n>>  create mode 100644 src/ipa/raspberrypi/cam_helper_mov9281.cpp\n>>  create mode 100644 src/ipa/raspberrypi/data/mov9281.json\n>>\n>> diff --git a/src/ipa/raspberrypi/cam_helper_mov9281.cpp b/src/ipa/raspberrypi/cam_helper_mov9281.cpp\n>> new file mode 100644\n>> index 00000000..5645c73a\n>> --- /dev/null\n>> +++ b/src/ipa/raspberrypi/cam_helper_mov9281.cpp\n>> @@ -0,0 +1,108 @@\n>> +/* SPDX-License-Identifier: BSD-2-Clause */\n>> +/*\n>> + * Copyright (C) 2019, Raspberry Pi (Trading) Limited\n>> + *\n>> + * cam_helper_mov9281.cpp - camera information for ov9281 sensor\n>> + */\n>> +\n>> +#include <assert.h>\n>> +\n>> +#include \"cam_helper.hpp\"\n>> +\n>> +using namespace RPiController;\n>> +\n>> +class CamHelperOv9281 : public CamHelper\n>> +{\n>> +public:\n>> +       CamHelperOv9281();\n>> +       uint32_t GainCode(double gain) const override;\n>> +       double Gain(uint32_t gain_code) const override;\n>> +       void GetDelays(int &exposure_delay, int &gain_delay,\n>> +                      int &vblank_delay) const override;\n>> +       unsigned int HideFramesStartup() const override;\n>> +       unsigned int HideFramesModeSwitch() const override;\n>> +       unsigned int MistrustFramesStartup() const override;\n>> +       unsigned int MistrustFramesModeSwitch() const override;\n>> +\n>> +private:\n>> +       /*\n>> +        * Smallest difference between the frame length and integration time,\n>> +        * in units of lines.\n>> +        */\n>> +       static constexpr int frameIntegrationDiff = 4;\n>> +};\n>> +\n>> +/*\n>> + * OV9281 doesn't output metadata, so we have to use the \"unicam parser\" which\n>> + * works by counting frames.\n>> + */\n>> +\n>> +CamHelperOv9281::CamHelperOv9281()\n>> +       : CamHelper(nullptr, frameIntegrationDiff)\n>> +{\n>> +}\n>> +\n>> +uint32_t CamHelperOv9281::GainCode(double gain) const\n>> +{\n>> +       return static_cast<uint32_t>(gain * 16.0);\n>> +}\n>> +\n>> +double CamHelperOv9281::Gain(uint32_t gain_code) const\n>> +{\n>> +       return static_cast<double>(gain_code) / 16.0;\n>> +}\n>> +\n>> +void CamHelperOv9281::GetDelays(int &exposure_delay, int &gain_delay,\n>> +                               int &vblank_delay) const\n>> +{\n>> +       /*\n>> +        * We run this sensor in a mode where the gain delay is bumped up to\n>> +        * 2. It seems to be the only way to make the delays \"predictable\".\n>> +        */\n>> +       exposure_delay = 2;\n>> +       gain_delay = 2;\n>> +       vblank_delay = 2;\n>> +}\n>> +\n>> +unsigned int CamHelperOv9281::HideFramesStartup() const\n>> +{\n>> +       /*\n>> +        * On startup, we get a couple of under-exposed frames which\n>> +        * we don't want shown.\n>> +        */\n>> +       return 2;\n>> +}\n>> +\n>> +unsigned int CamHelperOv9281::HideFramesModeSwitch() const\n>> +{\n>> +       /*\n>> +        * After a mode switch, we get a couple of under-exposed frames which\n>> +        * we don't want shown.\n>> +        */\n>> +       return 2;\n>> +}\n>> +\n>> +unsigned int CamHelperOv9281::MistrustFramesStartup() const\n>> +{\n>> +       /*\n>> +        * First couple of frames are under-exposed and are no good for control\n>> +        * algos.\n>> +        */\n>> +       return 2;\n>> +}\n>> +\n>> +unsigned int CamHelperOv9281::MistrustFramesModeSwitch() const\n>> +{\n>> +       /*\n>> +        * First couple of frames are under-exposed even after a simple\n>> +        * mode switch, and are no good for control algos.\n>> +        */\n>> +       return 2;\n>> +}\n>\n>\n> Perhaps we need to see if these numbers can be reduced or (ideally) set to 0?\n> Other than that, looks good!\n\nYes, it seems that our default implementation values are actually OK,\nso I'll roll that into a v2 of this set once we get that far.\n\nThanks\nDavid\n\n>\n> Reviewed-by: Naushir Patuck <naush@raspberrpyi.com>\n>\n>>\n>> +\n>> +static CamHelper *Create()\n>> +{\n>> +       return new CamHelperOv9281();\n>> +}\n>> +\n>> +static RegisterCamHelper reg(\"mov9281\", &Create);\n>> diff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/raspberrypi/data/meson.build\n>> index 92ad3272..f8baab6d 100644\n>> --- a/src/ipa/raspberrypi/data/meson.build\n>> +++ b/src/ipa/raspberrypi/data/meson.build\n>> @@ -4,6 +4,7 @@ conf_files = files([\n>>      'imx219.json',\n>>      'imx290.json',\n>>      'imx477.json',\n>> +    'mov9281.json',\n>>      'ov5647.json',\n>>      'se327m12.json',\n>>      'uncalibrated.json',\n>> diff --git a/src/ipa/raspberrypi/data/mov9281.json b/src/ipa/raspberrypi/data/mov9281.json\n>> new file mode 100644\n>> index 00000000..ecd262be\n>> --- /dev/null\n>> +++ b/src/ipa/raspberrypi/data/mov9281.json\n>> @@ -0,0 +1,92 @@\n>> +{\n>> +    \"rpi.black_level\":\n>> +    {\n>> +        \"black_level\": 4096\n>> +    },\n>> +    \"rpi.lux\":\n>> +    {\n>> +        \"reference_shutter_speed\": 2000,\n>> +        \"reference_gain\": 1.0,\n>> +        \"reference_aperture\": 1.0,\n>> +        \"reference_lux\": 800,\n>> +        \"reference_Y\": 20000\n>> +    },\n>> +    \"rpi.noise\":\n>> +    {\n>> +        \"reference_constant\": 0,\n>> +        \"reference_slope\": 2.5\n>> +    },\n>> +    \"rpi.sdn\":\n>> +    {\n>> +    },\n>> +    \"rpi.agc\":\n>> +    {\n>> +        \"metering_modes\":\n>> +        {\n>> +            \"centre-weighted\": {\n>> +                \"weights\": [4, 4, 4, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0]\n>> +            }\n>> +        },\n>> +        \"exposure_modes\":\n>> +        {\n>> +            \"normal\":\n>> +            {\n>> +                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n>> +                \"gain\":    [ 1.0, 2.0,   3.0,   4.0,   6.0    ]\n>> +            }\n>> +        },\n>> +        \"constraint_modes\":\n>> +        {\n>> +            \"normal\":\n>> +            [\n>> +                { \"bound\": \"LOWER\", \"q_lo\": 0.98, \"q_hi\": 1.0, \"y_target\": [ 0, 0.4, 1000, 0.4 ] }\n>> +            ]\n>> +        },\n>> +        \"y_target\": [ 0, 0.16, 1000, 0.165, 10000, 0.17 ]\n>> +    },\n>> +    \"rpi.alsc\":\n>> +    {\n>> +        \"n_iter\": 0,\n>> +        \"luminance_strength\": 1.0,\n>> +        \"corner_strength\": 1.5\n>> +    },\n>> +    \"rpi.contrast\":\n>> +    {\n>> +        \"ce_enable\": 0,\n>> +        \"gamma_curve\": [\n>> +            0,     0,\n>> +            1024,  5040,\n>> +            2048,  9338,\n>> +            3072,  12356,\n>> +            4096,  15312,\n>> +            5120,  18051,\n>> +            6144,  20790,\n>> +            7168,  23193,\n>> +            8192,  25744,\n>> +            9216,  27942,\n>> +            10240, 30035,\n>> +            11264, 32005,\n>> +            12288, 33975,\n>> +            13312, 35815,\n>> +            14336, 37600,\n>> +            15360, 39168,\n>> +            16384, 40642,\n>> +            18432, 43379,\n>> +            20480, 45749,\n>> +            22528, 47753,\n>> +            24576, 49621,\n>> +            26624, 51253,\n>> +            28672, 52698,\n>> +            30720, 53796,\n>> +            32768, 54876,\n>> +            36864, 57012,\n>> +            40960, 58656,\n>> +            45056, 59954,\n>> +            49152, 61183,\n>> +            53248, 62355,\n>> +            57344, 63419,\n>> +            61440, 64476,\n>> +            65535, 65535\n>> +        ]\n>> +    }\n>> +}\n>> diff --git a/src/ipa/raspberrypi/meson.build b/src/ipa/raspberrypi/meson.build\n>> index d1397a32..e384c7ce 100644\n>> --- a/src/ipa/raspberrypi/meson.build\n>> +++ b/src/ipa/raspberrypi/meson.build\n>> @@ -22,6 +22,7 @@ rpi_ipa_sources = files([\n>>      'cam_helper_imx219.cpp',\n>>      'cam_helper_imx290.cpp',\n>>      'cam_helper_imx477.cpp',\n>> +    'cam_helper_mov9281.cpp',\n>>      'controller/controller.cpp',\n>>      'controller/histogram.cpp',\n>>      'controller/algorithm.cpp',\n>> --\n>> 2.20.1\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 0B54EBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 15 Jun 2021 14:26:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 774AA68930;\n\tTue, 15 Jun 2021 16:26:13 +0200 (CEST)","from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5EA846029A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Jun 2021 16:26:12 +0200 (CEST)","by mail-wr1-x431.google.com with SMTP id c5so18547233wrq.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Jun 2021 07:26:12 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"WtjoDY+0\"; 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=p+P4zq0zP3Hakwzt5lQ+b3QL4ySIXYQjRSot1st47IQ=;\n\tb=WtjoDY+0VPIvFUZwPprf1dVpONK2PY8+pfFpAkDGilL98mN2xCVkRVpD5AMrplzXFK\n\tMTXe5SrjIi6gUZZqPDRHYfCXauS4VqqOPNP/VHaohuATsQU7VWWZ1HKjqEgowhbvOC/a\n\ts7joU/AfdpAobL8F874AQArycNT4aItCnDoof9/6OyFMO3ytctJvNr8zb0jyBCnYx7wk\n\t48i7q9Q5Iv5tmslpclrqBfwHUq/fsrKe5tweTryA9rQEbR7gl5UMMvIUt1wGE7KtiSqO\n\t5zeT52yNczRdcjbZ4COBACrVaG7NXAsc6Gm6RlEFe4QipkIrrXSGksZcWWF5XZT6+oNL\n\tiNHg==","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=p+P4zq0zP3Hakwzt5lQ+b3QL4ySIXYQjRSot1st47IQ=;\n\tb=m5MOw9Oh9ziNl5tnEveU0hmxrXhCmBb/AQhvqelChm/bP4PSdrgkqUILXgCP7Bp+7U\n\t37l6B7FjOAIzUWAR3Ct4nNptsdJKBRYOjzJy76NXjAv+c0Hko2rQRpo3tnK9K6y3LAsw\n\tXV9svTnH2gSdlEdFbnfBEiqcn585rxv/P9aq5VAf1kwlAINb0TC/I2SSq1S9HS4pBFha\n\tYH2cdES+CrwK9dqf+fVB4d9I90gysMp9PVVClaJaT1l4G0V5iPW9ahAnirM3GK9u0mEb\n\tZPuzxy4HpoRi56LnyiOjUVUB//Pe4Mv4UqWmbNsChad47cQfX+u1NvNt/bNpf0Ax4+mb\n\tm+9g==","X-Gm-Message-State":"AOAM532lYTmKiuKVtdF9YLJWMTz4HjqBtxXZB/tL7wrKsSuqUpN6dCdy\n\tAlPl7FHVQeDOfM1TPkPM3v6fdvuCPw+VClP5vHgvsQ==","X-Google-Smtp-Source":"ABdhPJwSIU18RR2NCkyww0PPF8C9dgU8nRFJbmy68BWjlHHJZxzVOlcossyKXuXiAAU+KYEi+sBjRhYGwkn3w6874IU=","X-Received":"by 2002:a5d:5192:: with SMTP id\n\tk18mr25512139wrv.163.1623767172050; \n\tTue, 15 Jun 2021 07:26:12 -0700 (PDT)","MIME-Version":"1.0","References":"<20210615105139.16171-1-david.plowman@raspberrypi.com>\n\t<20210615105139.16171-4-david.plowman@raspberrypi.com>\n\t<CAEmqJPpipis9+toLqKEvXyOoKJE8b1r7O-mfUQcjB4OqBvyAAw@mail.gmail.com>","In-Reply-To":"<CAEmqJPpipis9+toLqKEvXyOoKJE8b1r7O-mfUQcjB4OqBvyAAw@mail.gmail.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Tue, 15 Jun 2021 15:26:00 +0100","Message-ID":"<CAHW6GYLi=PwcN3YN7LwQcTPwtRrVo7gEakLg=v8vTKwunkrn+Q@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: ipa: raspberrypi: Add\n\tsupport for ov9281 sensor","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]