[{"id":22352,"web_url":"https://patchwork.libcamera.org/comment/22352/","msgid":"<fefa5e49-e308-2eb1-5b3b-38a5e29f30d3@ideasonboard.com>","date":"2022-03-22T06:17:12","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: af: Set default grid block\n\twidth to the minimum value","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Kate,\n\nOn 22/03/2022 02:31, Kate Hsuan via libcamera-devel wrote:\n> Since x\tcoordinate is incorrectly computed by a kernel issue, the block width\n> should be set to 4 to prevent using the second stripe when setting the AF scene\n> to the centre of the image. A kernel patch had fixed this issue. Therefore, this\n> value can be set to the default minimum value.\n\nIf this is working fine with a width of 256 (2**4 * 16), why do you want \nto change it to have a smaller focus region ?\n\n> \n> Signed-off-by: Kate Hsuan <hpa@redhat.com>\n> ---\n> The kernel patch is shown as following URL.\n> https://lore.kernel.org/linux-media/CAEth8oES8abPO4p7eFv43PwDXuxeOmg1661YtVvykBPrkagzKg@mail.gmail.com/T/#mb02fa73ce9e3089a4619c318badb2047a3ac39e2\n> ---\n>   src/ipa/ipu3/algorithms/af.h | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\n> index 13c7e0e8..108fcd18 100644\n> --- a/src/ipa/ipu3/algorithms/af.h\n> +++ b/src/ipa/ipu3/algorithms/af.h\n> @@ -20,7 +20,7 @@ static constexpr uint8_t kAfMinGridWidth = 16;\n>   static constexpr uint8_t kAfMinGridHeight = 16;\n>   static constexpr uint8_t kAfMaxGridWidth = 32;\n>   static constexpr uint8_t kAfMaxGridHeight = 24;\n> -static constexpr uint16_t kAfMinGridBlockWidth = 4;\n> +static constexpr uint16_t kAfMinGridBlockWidth = 3;\n>   static constexpr uint16_t kAfMinGridBlockHeight = 3;\n>   static constexpr uint16_t kAfMaxGridBlockWidth = 6;\n>   static constexpr uint16_t kAfMaxGridBlockHeight = 6;","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 B1A4FC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Mar 2022 06:17:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E9517604DB;\n\tTue, 22 Mar 2022 07:17:16 +0100 (CET)","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 3299560135\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Mar 2022 07:17:16 +0100 (CET)","from [IPV6:2a01:e0a:169:7140:86b8:4813:20dd:2150] (unknown\n\t[IPv6:2a01:e0a:169:7140:86b8:4813:20dd:2150])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BCEBEDFA;\n\tTue, 22 Mar 2022 07:17:15 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647929836;\n\tbh=PLxiHOUJ9+qHMjgs7QBHBB4TXyHolDm/Y2DE97YfzXc=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=VbFxrwppLVhhzpj0c0yqE+loVbuKkEx5mDJ5745FfPEEeXO8lGmyVoUh+wviBlBC/\n\tjw/MdnveQUxDfbr+tkqpr6t3ANwMiQkbsE9KHaZs1ESW/Hytu07OKzyiJsiO+5Y71V\n\tW0Neq4TCn9sfs3Ugbfe4VE/XPawRP8F9cT1NbytSAbc2cV3vWsaWu39VaahmONNY9q\n\toiPxifvRoxmZNzCsn0x9MSL5ch8t+7XvUPM9kvns8ZAxDIqO1rH0nrJe10YFm9lFPe\n\t2aeYCptNutCRfbMVFqVg5vnA4qPFqnONk1r8sQU6QfEu9i7Dvc6LC1JRwdmBOvN1me\n\tZXkAHURUpINag==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1647929835;\n\tbh=PLxiHOUJ9+qHMjgs7QBHBB4TXyHolDm/Y2DE97YfzXc=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=GoLBiX8OSIV6jTxU7fXTzZSzovNJV3pzx6qi+Q4HVERxzzq51UCHvnHxp/pDnGlLT\n\t6AAnUMsz7ccplyTfEmI/5/GJ++AW3f3e6jGfWAocr9uoAZLxwFduWgUy9o0M4qcvLd\n\trmjztmWq5pN9kjyAJecXFkDkqRdG1K0fAWXk8ozA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"GoLBiX8O\"; dkim-atps=neutral","Message-ID":"<fefa5e49-e308-2eb1-5b3b-38a5e29f30d3@ideasonboard.com>","Date":"Tue, 22 Mar 2022 07:17:12 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.5.0","Content-Language":"en-US","To":"Kate Hsuan <hpa@redhat.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20220322013119.4262-1-hpa@redhat.com>","In-Reply-To":"<20220322013119.4262-1-hpa@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: af: Set default grid block\n\twidth to the minimum value","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>","From":"Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22353,"web_url":"https://patchwork.libcamera.org/comment/22353/","msgid":"<CAEth8oE5tsoKRfBtcgOP2d2P2OSNTd1nRkgae03HQh12dJS9jg@mail.gmail.com>","date":"2022-03-22T08:29:03","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: af: Set default grid block\n\twidth to the minimum value","submitter":{"id":105,"url":"https://patchwork.libcamera.org/api/people/105/","name":"Kate Hsuan","email":"hpa@redhat.com"},"content":"Hi Jean-Michel,\n\nOn Tue, Mar 22, 2022 at 2:17 PM Jean-Michel Hautbois\n<jeanmichel.hautbois@ideasonboard.com> wrote:\n>\n> Hi Kate,\n>\n> On 22/03/2022 02:31, Kate Hsuan via libcamera-devel wrote:\n> > Since x       coordinate is incorrectly computed by a kernel issue, the block width\n> > should be set to 4 to prevent using the second stripe when setting the AF scene\n> > to the centre of the image. A kernel patch had fixed this issue. Therefore, this\n> > value can be set to the default minimum value.\n>\n> If this is working fine with a width of 256 (2**4 * 16), why do you want\n> to change it to have a smaller focus region ?\n>\n> >\n> > Signed-off-by: Kate Hsuan <hpa@redhat.com>\n> > ---\n> > The kernel patch is shown as following URL.\n> > https://lore.kernel.org/linux-media/CAEth8oES8abPO4p7eFv43PwDXuxeOmg1661YtVvykBPrkagzKg@mail.gmail.com/T/#mb02fa73ce9e3089a4619c318badb2047a3ac39e2\n> > ---\n> >   src/ipa/ipu3/algorithms/af.h | 2 +-\n> >   1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\n> > index 13c7e0e8..108fcd18 100644\n> > --- a/src/ipa/ipu3/algorithms/af.h\n> > +++ b/src/ipa/ipu3/algorithms/af.h\n> > @@ -20,7 +20,7 @@ static constexpr uint8_t kAfMinGridWidth = 16;\n> >   static constexpr uint8_t kAfMinGridHeight = 16;\n> >   static constexpr uint8_t kAfMaxGridWidth = 32;\n> >   static constexpr uint8_t kAfMaxGridHeight = 24;\n> > -static constexpr uint16_t kAfMinGridBlockWidth = 4;\n> > +static constexpr uint16_t kAfMinGridBlockWidth = 3;\n> >   static constexpr uint16_t kAfMinGridBlockHeight = 3;\n> >   static constexpr uint16_t kAfMaxGridBlockWidth = 6;\n> >   static constexpr uint16_t kAfMaxGridBlockHeight = 6;\n>\n\nThe kernel patch fixed the issue on the second (rightmost) stripe configuration.\nThis means we can set x_start more than 640.\nAlso, according to the chomiumOS implementation, it set\nkAfMinGridBlockWidth to 3. So, it may align with chromium OS\nimplementation after the patch is merged to kernel release.\nhttps://chromium.googlesource.com/chromiumos/platform/arc-camera/+/refs/heads/master/hal/intel/include/ia_imaging/af_public.h#36\n\n--\nBR,\nKate","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 B102DBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Mar 2022 08:29:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0F9AD604C7;\n\tTue, 22 Mar 2022 09:29:22 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3721060397\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Mar 2022 09:29:20 +0100 (CET)","from mail-lj1-f200.google.com (mail-lj1-f200.google.com\n\t[209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\tus-mta-626-cKpWkaDPO9iFTVSSSm3WRw-1; Tue, 22 Mar 2022 04:29:16 -0400","by mail-lj1-f200.google.com with SMTP id\n\t11-20020a2e154b000000b0024967cd6752so5295795ljv.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Mar 2022 01:29:16 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647937762;\n\tbh=ljPoJpNWAGW3FgPwBZBuuQes8RnFR8ViB76zYIp2vxE=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=Deic5j9TGFmkFr1PzDvihRi8q/dTOnsrdyBR9LD/yj5WgtVoaKeXsib+EzBbNHAx4\n\tH5z9om+wJY584OxAMkdTP1YBvujnKLZaVSPxJLdBdrQ2BHuYyp5T68yTtrU2C4EVIf\n\tkrCR24HS4J4I3Dfp48PldSDWn45mN4xFzx4fPg45qSBU+QgdMSa9KsZytOheH1abXl\n\tdv2S1xaG5r3Dd65aXnCiW3DdhhKNKZwfsVnLeI0Culp93Zlr6bVaD4IMZarVS8TC6D\n\tU5W8dm8FAH+KHEt37OTJjcvNUJypnh2enp9t4slBpho9B24iRIQ5Kr2Wkkf8mZl29Y\n\t0VLpDTTvtpkPw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1647937759;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=BzHtHT8z6nOFl6iLFr2NRTfiYOuoHb0zF3pMJYNmuDQ=;\n\tb=Nn44A5yzhDYiSvSvbNBuGp7vrAdUN8gMsyaF23Ly91rt3aFbCGYfX4a+oGi0czhSZx1vIT\n\trjxV0RMvnDeFGVJKQpsCv68ygvFYdFzxq/iuEPKdUh1pO6k2EcXoSVbvn2X2TYv4WcE+XJ\n\tZwL47NPiVxiUDp2BQXG7aOzBiLi/9nk="],"Authentication-Results":["lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"Nn44A5yz\"; \n\tdkim-atps=neutral","relay.mimecast.com;\n\tauth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hpa@redhat.com"],"X-MC-Unique":"cKpWkaDPO9iFTVSSSm3WRw-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=BzHtHT8z6nOFl6iLFr2NRTfiYOuoHb0zF3pMJYNmuDQ=;\n\tb=KCgIVcWq098XXRHQcDm1dNHka6F3T5IRrfDRUEczci7hmp6hLnQfzSoXzT+jQSuE8j\n\tFsUpm1U+W8VLXdMWWEsOHKyJspLS2k3ZQ03hKp2gWnJ1/Ww5TtarudadCqPXdht9UBor\n\taRizzJGBh8qLTKDkgdLqTpR5IlxPp/e8Wz9JOH1+nEConB6pwhI2lAE1X1xqftOUtOl2\n\tQcYCpdo15a92fifVIgugWFKOWl2UmPgw+5gh8MgKl4hF4OGh+Llm8w4+sMMyGOU/63Mc\n\t57xLB3Tnb0T7g4fVcuLfc57dgX31PaMuM9HsbK+s75splyOXcmej4m0agjWS7WPGUt5W\n\tKllg==","X-Gm-Message-State":"AOAM531+ywXAxP03ZwjfycqBNgoZnam6ffJTWt/wF8Q5F/yC3BGiizBS\n\tnxbUQkSAKA0aiymTrkhtUEV/9KwklLVle00p1gwBm2jyZve1wPIGSU1J86btT2HQqj0d0J6h18x\n\taF3vrW1Q7wxODbgzqQ+7Y7idfwKpJjNroPZzMIj3ejWLTmhv3ow==","X-Received":["by 2002:a05:6512:3092:b0:448:9298:4f55 with SMTP id\n\tz18-20020a056512309200b0044892984f55mr16586722lfd.539.1647937754798; \n\tTue, 22 Mar 2022 01:29:14 -0700 (PDT)","by 2002:a05:6512:3092:b0:448:9298:4f55 with SMTP id\n\tz18-20020a056512309200b0044892984f55mr16586707lfd.539.1647937754333;\n\tTue, 22 Mar 2022 01:29:14 -0700 (PDT)"],"X-Google-Smtp-Source":"ABdhPJzGXW59PkIYewhMRO9ixv+qqC49IKVFvwSwGKA0bfvM8TYPRB1UWh9+3vMb8IWdY5ZgQe+Ahd2Tb4IZHvn4p4A=","MIME-Version":"1.0","References":"<20220322013119.4262-1-hpa@redhat.com>\n\t<fefa5e49-e308-2eb1-5b3b-38a5e29f30d3@ideasonboard.com>","In-Reply-To":"<fefa5e49-e308-2eb1-5b3b-38a5e29f30d3@ideasonboard.com>","Date":"Tue, 22 Mar 2022 16:29:03 +0800","Message-ID":"<CAEth8oE5tsoKRfBtcgOP2d2P2OSNTd1nRkgae03HQh12dJS9jg@mail.gmail.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: af: Set default grid block\n\twidth to the minimum value","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>","From":"Kate Hsuan via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Kate Hsuan <hpa@redhat.com>","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":22354,"web_url":"https://patchwork.libcamera.org/comment/22354/","msgid":"<7d0ac38a-7dac-5399-3475-ef267806e5c9@ideasonboard.com>","date":"2022-03-22T08:48:21","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: af: Set default grid block\n\twidth to the minimum value","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"On 22/03/2022 09:29, Kate Hsuan wrote:\n> Hi Jean-Michel,\n> \n> On Tue, Mar 22, 2022 at 2:17 PM Jean-Michel Hautbois\n> <jeanmichel.hautbois@ideasonboard.com> wrote:\n>>\n>> Hi Kate,\n>>\n>> On 22/03/2022 02:31, Kate Hsuan via libcamera-devel wrote:\n>>> Since x       coordinate is incorrectly computed by a kernel issue, the block width\n>>> should be set to 4 to prevent using the second stripe when setting the AF scene\n>>> to the centre of the image. A kernel patch had fixed this issue. Therefore, this\n>>> value can be set to the default minimum value.\n>>\n>> If this is working fine with a width of 256 (2**4 * 16), why do you want\n>> to change it to have a smaller focus region ?\n>>\n>>>\n>>> Signed-off-by: Kate Hsuan <hpa@redhat.com>\n>>> ---\n>>> The kernel patch is shown as following URL.\n>>> https://lore.kernel.org/linux-media/CAEth8oES8abPO4p7eFv43PwDXuxeOmg1661YtVvykBPrkagzKg@mail.gmail.com/T/#mb02fa73ce9e3089a4619c318badb2047a3ac39e2\n>>> ---\n>>>    src/ipa/ipu3/algorithms/af.h | 2 +-\n>>>    1 file changed, 1 insertion(+), 1 deletion(-)\n>>>\n>>> diff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\n>>> index 13c7e0e8..108fcd18 100644\n>>> --- a/src/ipa/ipu3/algorithms/af.h\n>>> +++ b/src/ipa/ipu3/algorithms/af.h\n>>> @@ -20,7 +20,7 @@ static constexpr uint8_t kAfMinGridWidth = 16;\n>>>    static constexpr uint8_t kAfMinGridHeight = 16;\n>>>    static constexpr uint8_t kAfMaxGridWidth = 32;\n>>>    static constexpr uint8_t kAfMaxGridHeight = 24;\n>>> -static constexpr uint16_t kAfMinGridBlockWidth = 4;\n>>> +static constexpr uint16_t kAfMinGridBlockWidth = 3;\n>>>    static constexpr uint16_t kAfMinGridBlockHeight = 3;\n>>>    static constexpr uint16_t kAfMaxGridBlockWidth = 6;\n>>>    static constexpr uint16_t kAfMaxGridBlockHeight = 6;\n>>\n> \n> The kernel patch fixed the issue on the second (rightmost) stripe configuration.\n> This means we can set x_start more than 640.\n> Also, according to the chomiumOS implementation, it set\n> kAfMinGridBlockWidth to 3. So, it may align with chromium OS\n> implementation after the patch is merged to kernel release.\n> https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/refs/heads/master/hal/intel/include/ia_imaging/af_public.h#36\n\nI get this, but it there a strong reason to do this ? Are we \nexperimenting bad behaviour when the grid is bigger in full resolution \nmaybe ? I would like to be sure it is not just \"because CrOS does it\" \n:-) at least we need to know why.\n\nJM","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 6C8E0C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Mar 2022 08:48:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CF391604DB;\n\tTue, 22 Mar 2022 09:48:26 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C06960397\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Mar 2022 09:48:25 +0100 (CET)","from [IPV6:2a01:e0a:169:7140:fde5:4bb:7d84:65f8] (unknown\n\t[IPv6:2a01:e0a:169:7140:fde5:4bb:7d84:65f8])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C0C6F11BB;\n\tTue, 22 Mar 2022 09:48:24 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647938906;\n\tbh=rduk7ZCVg5M+rl4Pv2vpd7MgQTu5Nb+YPyXUHZ8nNOM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=tbdcR83CfOW96JBolVGsa22LNs0n+sf5KsAjtmHhPSh1FKG6VXywdzVcPpb2L53Te\n\t0RyNt2KoTsPjEcmb9qslTLy5eUHkLgtJ4eHAQ3uql90GeweftZQ0NZaZF2YqiveslA\n\ts3aLFq8aSJJzpnW4MVvjE8pVplTFHlLvOM+icX5O361G4+eN+02cijF8BZuPxE7DQL\n\tFQ4sT69PD9AFKn5SDXo85hrPrfDeUtevvz36SFJOaHiU0gY4uksnIvkPW8jrvfvJcw\n\t8H0sgMNsElCXJIMYMgGAvz2iXlz0ywg5S4sJv+9saRF0q+P7CNzUIWlDQvVPfgXF7n\n\tTzgHnqTjqZ/Pw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1647938904;\n\tbh=rduk7ZCVg5M+rl4Pv2vpd7MgQTu5Nb+YPyXUHZ8nNOM=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=eG+/VrOlyWRE4jBz79t8Sl9o2wS1qs8dB393003i9Yst3abUQS/HbWtFp52KJgj4v\n\tCl5eGNAjC43B4JZNU5tQELRAQUpz4wJ9jXLhHfkv/BWCtvmsSQV6x3g4eGa6bAvhd3\n\tR136LNdsWHgiaaNkObJtql0jKfSg5w3qBkxo4KZI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"eG+/VrOl\"; dkim-atps=neutral","Message-ID":"<7d0ac38a-7dac-5399-3475-ef267806e5c9@ideasonboard.com>","Date":"Tue, 22 Mar 2022 09:48:21 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.5.0","Content-Language":"en-US","To":"Kate Hsuan <hpa@redhat.com>","References":"<20220322013119.4262-1-hpa@redhat.com>\n\t<fefa5e49-e308-2eb1-5b3b-38a5e29f30d3@ideasonboard.com>\n\t<CAEth8oE5tsoKRfBtcgOP2d2P2OSNTd1nRkgae03HQh12dJS9jg@mail.gmail.com>","In-Reply-To":"<CAEth8oE5tsoKRfBtcgOP2d2P2OSNTd1nRkgae03HQh12dJS9jg@mail.gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: af: Set default grid block\n\twidth to the minimum value","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>","From":"Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","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":22356,"web_url":"https://patchwork.libcamera.org/comment/22356/","msgid":"<Yjop0PTBp4Vyd7SX@pendragon.ideasonboard.com>","date":"2022-03-22T19:56:00","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: af: Set default grid block\n\twidth to the minimum value","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Mar 22, 2022 at 09:48:21AM +0100, Jean-Michel Hautbois via libcamera-devel wrote:\n> On 22/03/2022 09:29, Kate Hsuan wrote:\n> > On Tue, Mar 22, 2022 at 2:17 PM Jean-Michel Hautbois wrote:\n> >> On 22/03/2022 02:31, Kate Hsuan via libcamera-devel wrote:\n> >>> Since x       coordinate is incorrectly computed by a kernel issue, the block width\n> >>> should be set to 4 to prevent using the second stripe when setting the AF scene\n> >>> to the centre of the image. A kernel patch had fixed this issue. Therefore, this\n> >>> value can be set to the default minimum value.\n> >>\n> >> If this is working fine with a width of 256 (2**4 * 16), why do you want\n> >> to change it to have a smaller focus region ?\n> >>\n> >>> Signed-off-by: Kate Hsuan <hpa@redhat.com>\n> >>> ---\n> >>> The kernel patch is shown as following URL.\n> >>> https://lore.kernel.org/linux-media/CAEth8oES8abPO4p7eFv43PwDXuxeOmg1661YtVvykBPrkagzKg@mail.gmail.com/T/#mb02fa73ce9e3089a4619c318badb2047a3ac39e2\n\nThis patch will only appear in the kernel in v5.19, so at best we'll\nhave to wait for that kernel to be released. We should however support\nolder kernel versions, so a runtime kernel version check is likely\nneeded.\n\nDoes the Chrome OS kernel integrate that kernel fix too ?\n\n> >>> ---\n> >>>    src/ipa/ipu3/algorithms/af.h | 2 +-\n> >>>    1 file changed, 1 insertion(+), 1 deletion(-)\n> >>>\n> >>> diff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\n> >>> index 13c7e0e8..108fcd18 100644\n> >>> --- a/src/ipa/ipu3/algorithms/af.h\n> >>> +++ b/src/ipa/ipu3/algorithms/af.h\n> >>> @@ -20,7 +20,7 @@ static constexpr uint8_t kAfMinGridWidth = 16;\n> >>>    static constexpr uint8_t kAfMinGridHeight = 16;\n> >>>    static constexpr uint8_t kAfMaxGridWidth = 32;\n> >>>    static constexpr uint8_t kAfMaxGridHeight = 24;\n> >>> -static constexpr uint16_t kAfMinGridBlockWidth = 4;\n> >>> +static constexpr uint16_t kAfMinGridBlockWidth = 3;\n> >>>    static constexpr uint16_t kAfMinGridBlockHeight = 3;\n> >>>    static constexpr uint16_t kAfMaxGridBlockWidth = 6;\n> >>>    static constexpr uint16_t kAfMaxGridBlockHeight = 6;\n> > \n> > The kernel patch fixed the issue on the second (rightmost) stripe configuration.\n> > This means we can set x_start more than 640.\n> > Also, according to the chomiumOS implementation, it set\n> > kAfMinGridBlockWidth to 3. So, it may align with chromium OS\n> > implementation after the patch is merged to kernel release.\n> > https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/refs/heads/master/hal/intel/include/ia_imaging/af_public.h#36\n> \n> I get this, but it there a strong reason to do this ? Are we \n> experimenting bad behaviour when the grid is bigger in full resolution \n> maybe ? I would like to be sure it is not just \"because CrOS does it\" \n> :-) at least we need to know why.","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 C61C1C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Mar 2022 19:56:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0071D604DB;\n\tTue, 22 Mar 2022 20:56:19 +0100 (CET)","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 6C42E604C5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Mar 2022 20:56:18 +0100 (CET)","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 D209ADFA;\n\tTue, 22 Mar 2022 20:56:17 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647978980;\n\tbh=Fr9y/ySXkeSwztPxESSoVTULZFRpwn191b2akzYkCok=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=cN4BF3AAurh1Q9+ZP0lgB+hhAO+Qxe9P/U1RGBPJvCxWczbtZf0G3tYQL97AYiLSC\n\t3SAyR/o7TtGxYtWNHyRANgQRkcAPH3hVBTK4Yb2VZsBM1clJcTKiPyLoH41BfWPx/9\n\tSHcCrlKio/I3R+KlCkbjsuoNEmGr04odGHLD+rCh6sODefGF9MceLMSC5WjparDHnY\n\tFym2uAIgzadCQb/GCf4hQqFhcGWQDMqUDDgL2x5ZG3G8+milU6B3aZPsDbYIu+WFUm\n\t6raxHT58jd3mci2IJWDjz6UGK/LvkxmQb+U6O6zaXYmHUprflUTeKJkIY87lC9Eygz\n\t3BrvhpHqSBzgA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1647978978;\n\tbh=Fr9y/ySXkeSwztPxESSoVTULZFRpwn191b2akzYkCok=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oCLykPtCdaDkQ6oImtWaqDtZyfC4BwaxTr7HiVbsd0c5VAv/ps3PeloGQ3YKR6rXO\n\tm2sTF4BdrIu8psXi+9A5jHsTvG/vaxXKwOEECdPwWI9e7MgXgCWEkn9nwXTuwC3hIR\n\tOdJPXqKgh0ktBHG9X9je7EYDfvMIlpZwmXAix8GA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"oCLykPtC\"; dkim-atps=neutral","Date":"Tue, 22 Mar 2022 21:56:00 +0200","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<Yjop0PTBp4Vyd7SX@pendragon.ideasonboard.com>","References":"<20220322013119.4262-1-hpa@redhat.com>\n\t<fefa5e49-e308-2eb1-5b3b-38a5e29f30d3@ideasonboard.com>\n\t<CAEth8oE5tsoKRfBtcgOP2d2P2OSNTd1nRkgae03HQh12dJS9jg@mail.gmail.com>\n\t<7d0ac38a-7dac-5399-3475-ef267806e5c9@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<7d0ac38a-7dac-5399-3475-ef267806e5c9@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: af: Set default grid block\n\twidth to the minimum value","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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>"}}]