[{"id":16602,"web_url":"https://patchwork.libcamera.org/comment/16602/","msgid":"<YIeGACKt7oHNpGK+@pendragon.ideasonboard.com>","date":"2021-04-27T03:33:20","subject":"Re: [libcamera-devel] [PATCH v2 1/7] libcamera: controls: Add\n\tsensor test pattern mode","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nThank you for the patch.\n\nOn Wed, Apr 21, 2021 at 01:23:40PM +0900, Hirokazu Honda wrote:\n> The control is used to report available sensor test pattern modes\n> and also specify the mode to sensor.\n> \n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/control_ids.yaml | 59 ++++++++++++++++++++++++++++++++++\n>  1 file changed, 59 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index b4771f9d..5de75eb0 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -608,4 +608,63 @@ controls:\n>          detection, additional format conversions etc) count as an additional\n>          pipeline stage.\n>  \n> +  - TestPatternMode:\n> +      type: int32_t\n> +      draft: true\n> +      description: |\n> +       Control to select the test pattern mode. Currently identical to\n> +       ANDROID_SENSOR_TEST_PATTERN_MODE.\n\nThis should be indented by one more space.\n\n> +\n> +        Mode of operation for the test pattern mode.\n\nIs this line a leftover ?\n\n> +      enum:\n> +        - name: TestPatternModeOff\n> +          value: 0\n> +          description: |\n> +            No test pattern mode is used. The camera device returns from the\n> +            image sensor.\n\nI'm not sure to understand the second sentence, is there a word missing\n? \"returns frames\" maybe ?\n\n> +        - name: TestPatternModeSolidColor\n> +          value: 1\n> +          description: |\n> +            Each pixel in [R, G_even, G_odd, B] is replaced by its respective\n> +            color channel provided in test pattern mode data.\n\nI still see no pattern mode data support in this series. What am I\nmissing ?\n\n> +        - name: TestPatternModeColorBars\n> +          value: 2\n> +          description: |\n> +            All pixel data is replaced with an 8-bar color pattern. The vertical\n> +            bars (left-to-right) are as follows; white, yellow, cyan, green,\n> +            magenta, red, blue and black. Each bar should take up 1/8 of the\n> +            sensor pixel array width. When this is not possible, the bar size\n> +            should be rounded down to the nearest integer and the pattern can\n> +            repeat on the right side. Each bar's height must always take up the\n> +            full sensor pixel array height.\n> +        - name: TestPatternModeColorBarsFadeToGray\n> +          value: 3\n> +          description: |\n> +            The test pattern is similar to TestPatternModeColorBars,\n> +            except that each bar should start at its specified color at the top\n> +            and fade to gray at the bottom. Furthermore each bar is further\n> +            subdevided into a left and right half. The left half should have a\n> +            smooth gradient, and the right half should have a quantized\n> +            gradient. In particular, the right half's should consist of blocks\n> +            of the same color for 1/16th active sensor pixel array width. The\n> +            least significant bits in the quantized gradient should be copied\n> +            from the most significant bits of the smooth gradient. The height of\n> +            each bar should always be a multiple of 128. When this is not the\n> +            case, the pattern should repeat at the bottom of the image.\n> +        - name: TestPatternModePn9\n> +          value: 4\n> +          description: |\n> +            All pixel data is replaced by a pseudo-random sequence generated\n> +            from a PN9 512-bit sequence (typically implemented in hardware with\n> +            a linear feedback shift register). The generator should be reset at\n> +            the beginning of each frame, and thus each subsequent raw frame with\n> +            this test pattern should be exactly the same as the last.\n> +        - name: TestPatternModeCustom1\n> +          value: 5\n> +          description: |\n> +            The first custom test pattern. All custom patterns that are\n> +            available only on this camera device are at least this numeric\n> +            value. All of the custom test patterns will be static (that is the\n> +            raw image must not vary from frame to frame).\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 C06E7BDCA1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Apr 2021 03:33:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2E5E568878;\n\tTue, 27 Apr 2021 05:33:27 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A13B260512\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Apr 2021 05:33:26 +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 D74E7E9;\n\tTue, 27 Apr 2021 05:33:25 +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=\"FrSzWakJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1619494406;\n\tbh=UVhvoHVfF8BN1R+qQEVGZh5nKB1FQKkRYmNmAmtv8o4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=FrSzWakJUUSmOBiwj75Fya8XqrRrcI4PdfCy2JmVMkFtnAxqCahKp+UWEUHcQJ0ex\n\txFR1FXMfHNMmzeN7y5gW/Ikh82qIgpjLyegeFZ09HL8vOtA9wZXWp/LV7obUEJNLi3\n\tYACAvIfAgMaVMpO5ay6QNuVKfvSUyCYXMUSAfqQ4=","Date":"Tue, 27 Apr 2021 06:33:20 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YIeGACKt7oHNpGK+@pendragon.ideasonboard.com>","References":"<20210421042346.312854-1-hiroh@chromium.org>\n\t<20210421042346.312854-2-hiroh@chromium.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210421042346.312854-2-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH v2 1/7] libcamera: controls: Add\n\tsensor test pattern mode","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":16663,"web_url":"https://patchwork.libcamera.org/comment/16663/","msgid":"<CAO5uPHNE-Q9EMywayjHsJ6_yPpVgXztO9b3pBaPmupruyDYT+Q@mail.gmail.com>","date":"2021-04-28T04:13:55","subject":"Re: [libcamera-devel] [PATCH v2 1/7] libcamera: controls: Add\n\tsensor test pattern mode","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"On Tue, Apr 27, 2021 at 12:33 PM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Hiro,\n>\n> Thank you for the patch.\n>\n> On Wed, Apr 21, 2021 at 01:23:40PM +0900, Hirokazu Honda wrote:\n> > The control is used to report available sensor test pattern modes\n> > and also specify the mode to sensor.\n> >\n> > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/libcamera/control_ids.yaml | 59 ++++++++++++++++++++++++++++++++++\n> >  1 file changed, 59 insertions(+)\n> >\n> > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > index b4771f9d..5de75eb0 100644\n> > --- a/src/libcamera/control_ids.yaml\n> > +++ b/src/libcamera/control_ids.yaml\n> > @@ -608,4 +608,63 @@ controls:\n> >          detection, additional format conversions etc) count as an additional\n> >          pipeline stage.\n> >\n> > +  - TestPatternMode:\n> > +      type: int32_t\n> > +      draft: true\n> > +      description: |\n> > +       Control to select the test pattern mode. Currently identical to\n> > +       ANDROID_SENSOR_TEST_PATTERN_MODE.\n>\n> This should be indented by one more space.\n>\n> > +\n> > +        Mode of operation for the test pattern mode.\n>\n> Is this line a leftover ?\n>\n> > +      enum:\n> > +        - name: TestPatternModeOff\n> > +          value: 0\n> > +          description: |\n> > +            No test pattern mode is used. The camera device returns from the\n> > +            image sensor.\n>\n> I'm not sure to understand the second sentence, is there a word missing\n> ? \"returns frames\" maybe ?\n>\n> > +        - name: TestPatternModeSolidColor\n> > +          value: 1\n> > +          description: |\n> > +            Each pixel in [R, G_even, G_odd, B] is replaced by its respective\n> > +            color channel provided in test pattern mode data.\n>\n> I still see no pattern mode data support in this series. What am I\n> missing ?\n>\n\nIs it okay to add it later? I would like to split it in another patch.\n\n> > +        - name: TestPatternModeColorBars\n> > +          value: 2\n> > +          description: |\n> > +            All pixel data is replaced with an 8-bar color pattern. The vertical\n> > +            bars (left-to-right) are as follows; white, yellow, cyan, green,\n> > +            magenta, red, blue and black. Each bar should take up 1/8 of the\n> > +            sensor pixel array width. When this is not possible, the bar size\n> > +            should be rounded down to the nearest integer and the pattern can\n> > +            repeat on the right side. Each bar's height must always take up the\n> > +            full sensor pixel array height.\n> > +        - name: TestPatternModeColorBarsFadeToGray\n> > +          value: 3\n> > +          description: |\n> > +            The test pattern is similar to TestPatternModeColorBars,\n> > +            except that each bar should start at its specified color at the top\n> > +            and fade to gray at the bottom. Furthermore each bar is further\n> > +            subdevided into a left and right half. The left half should have a\n> > +            smooth gradient, and the right half should have a quantized\n> > +            gradient. In particular, the right half's should consist of blocks\n> > +            of the same color for 1/16th active sensor pixel array width. The\n> > +            least significant bits in the quantized gradient should be copied\n> > +            from the most significant bits of the smooth gradient. The height of\n> > +            each bar should always be a multiple of 128. When this is not the\n> > +            case, the pattern should repeat at the bottom of the image.\n> > +        - name: TestPatternModePn9\n> > +          value: 4\n> > +          description: |\n> > +            All pixel data is replaced by a pseudo-random sequence generated\n> > +            from a PN9 512-bit sequence (typically implemented in hardware with\n> > +            a linear feedback shift register). The generator should be reset at\n> > +            the beginning of each frame, and thus each subsequent raw frame with\n> > +            this test pattern should be exactly the same as the last.\n> > +        - name: TestPatternModeCustom1\n> > +          value: 5\n> > +          description: |\n> > +            The first custom test pattern. All custom patterns that are\n> > +            available only on this camera device are at least this numeric\n> > +            value. All of the custom test patterns will be static (that is the\n> > +            raw image must not vary from frame to frame).\n> > +\n> >  ...\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 43C7ABDE44\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Apr 2021 04:14:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 856C8688C0;\n\tWed, 28 Apr 2021 06:14:07 +0200 (CEST)","from mail-ed1-x535.google.com (mail-ed1-x535.google.com\n\t[IPv6:2a00:1450:4864:20::535])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D77ED60511\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Apr 2021 06:14:05 +0200 (CEST)","by mail-ed1-x535.google.com with SMTP id g10so4556879edb.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Apr 2021 21:14:05 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"SwDipUfc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=JceslwRI0hlzfsN5B2q5eF5RWgOgWWntawd4aRM3hbc=;\n\tb=SwDipUfcaVYzxVwCicT6+gSxchMyXzVp9ZVqMPeAtBiCU3XfsSX62AhLep6SUajy1Z\n\tmMQe57ZhVgGmXW6QVYOS+SM1nZwsiEWj99XVBIga3UGz0AwSWaXvap7PScxnY7ril08m\n\t0An6TaSWOgAHWQxHZO2xzb8Vn34dBlC0qbPtY=","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=JceslwRI0hlzfsN5B2q5eF5RWgOgWWntawd4aRM3hbc=;\n\tb=S9G5ndDlx13TnXOZRSuFiHXh3zCishRwmCKAV71PnHDjjkhYx50BI1LY2QzxOzQwEc\n\tusrPWNtd9fezAXPCCUdsH0LmyvFnSWe20V4XqOPQiOY+GaQ9/g2xMZmaQei7egag4EPd\n\tEliuSjgp1I4x0ywO8XIkKIogdLuj/4NEkVpIubI+jrpIETJiQGPVmYP1f7y2FYgVm0CL\n\tBxS5wjIyjBzR1dGvrG3dokBClNfAwrMqA5WEMYzac8U1avNNMjwPE38XNgRti/GjR8Vj\n\tntOQkSBUnj9h4ktXpRr5Coz1pgpiYAxdyL5HPjJ4IEhQcM2Vx1TRT0ywFqJXKrf7V/OJ\n\tKAuA==","X-Gm-Message-State":"AOAM532VTKMWq3Fyogp6N5XVKNbNW5Orn2y+H61GLLNpcmIrwFXryVAk\n\t2pTj7Zi0UcgSzs104+SVZe30j8jxli4vR0i8yf3BaA==","X-Google-Smtp-Source":"ABdhPJxpAYG3LPvypkssfYOwxYRSacHPJH5fwJiNZi3N30vzFeymHQM3LF4V91a7Q5HBBTVpNYUeh/0qHbfanMTHsII=","X-Received":"by 2002:aa7:c7da:: with SMTP id\n\to26mr8368445eds.244.1619583245484; \n\tTue, 27 Apr 2021 21:14:05 -0700 (PDT)","MIME-Version":"1.0","References":"<20210421042346.312854-1-hiroh@chromium.org>\n\t<20210421042346.312854-2-hiroh@chromium.org>\n\t<YIeGACKt7oHNpGK+@pendragon.ideasonboard.com>","In-Reply-To":"<YIeGACKt7oHNpGK+@pendragon.ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Wed, 28 Apr 2021 13:13:55 +0900","Message-ID":"<CAO5uPHNE-Q9EMywayjHsJ6_yPpVgXztO9b3pBaPmupruyDYT+Q@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 1/7] libcamera: controls: Add\n\tsensor test pattern mode","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>","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>"}}]