[{"id":16741,"web_url":"https://patchwork.libcamera.org/comment/16741/","msgid":"<YI/W7HAa05vhjeTH@bismarck.dyn.berto.se>","date":"2021-05-03T10:56:44","subject":"Re: [libcamera-devel] [PATCH v2 4/7] libcamera: ipu3: imgu: Fix IF\n\theight selection","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your work.\n\nOn 2021-05-03 11:27:02 +0200, Jacopo Mondi wrote:\n> Apply to calculateBDSHeight() function the first hunk of commit 243d134\n> (\"Fix some bug for some resolutions\") from\n> https://github.com/intel/intel-ipu3-pipecfg.git.\n> \n> The condition for the computed IF rectangle height to be matched\n> against the desired alignment now makes sure that it is included\n> in the minimum and maximum acceptable values.\n> \n> Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nAcked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/pipeline/ipu3/imgu.cpp | 6 ++++--\n>  1 file changed, 4 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\n> index ea654e57b0e7..feee2cc55abd 100644\n> --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n> @@ -135,7 +135,8 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n>  \t\testIFHeight = std::clamp<float>(estIFHeight, minIFHeight, iif.height);\n>  \n>  \t\tifHeight = utils::alignUp(estIFHeight, IF_ALIGN_H);\n> -\t\twhile (ifHeight >= minIFHeight && ifHeight / bdsSF >= minBDSHeight) {\n> +\t\twhile (ifHeight >= minIFHeight && ifHeight <= iif.height &&\n> +\t\t       ifHeight / bdsSF >= minBDSHeight) {\n>  \n>  \t\t\tbdsHeight = ifHeight / bdsSF;\n>  \t\t\tif (std::fmod(bdsHeight, 1.0) == 0) {\n> @@ -151,7 +152,8 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n>  \t\t}\n>  \n>  \t\tifHeight = utils::alignUp(estIFHeight, IF_ALIGN_H);\n> -\t\twhile (ifHeight <= iif.height && ifHeight / bdsSF >= minBDSHeight) {\n> +\t\twhile (ifHeight >= minIFHeight && ifHeight <= iif.height &&\n> +\t\t       ifHeight / bdsSF >= minBDSHeight) {\n>  \n>  \t\t\tbdsHeight = ifHeight / bdsSF;\n>  \t\t\tif (std::fmod(bdsHeight, 1.0) == 0) {\n> -- \n> 2.31.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 34005BDE78\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 May 2021 10:56:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ECF2268911;\n\tMon,  3 May 2021 12:56:46 +0200 (CEST)","from mail-ej1-x632.google.com (mail-ej1-x632.google.com\n\t[IPv6:2a00:1450:4864:20::632])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0737160511\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 May 2021 12:56:46 +0200 (CEST)","by mail-ej1-x632.google.com with SMTP id gx5so7163094ejb.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 03 May 2021 03:56:46 -0700 (PDT)","from localhost (p54ac5521.dip0.t-ipconnect.de. [84.172.85.33])\n\tby smtp.gmail.com with ESMTPSA id\n\tn12sm12254488edw.95.2021.05.03.03.56.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 03 May 2021 03:56:45 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"fDdMwKuS\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=XDuKZmogCH30N07dPHAfjgmAmiatyXJ7TmJMohMWqSc=;\n\tb=fDdMwKuSgqLNC/jLwWzxgfOKmN4ACq4gl6pdB5GzI0VwdZ6a8IWGHDD19CAU8K9k8T\n\tOgh1Wzy9XSVBTorbwjVXKnPvllKytz/X/pa3jX7J/CZ2C2tviSvByHpIsD3RDSby3YsI\n\tDP3ufHpLTidPkZ03KWjoXwP6qRecfjoRP3g/XQ5tgETewKJJU1Lm/p3wkFfRvpRHvT5T\n\tNM3FkxEJ1kbtgKaA1BItXelLWGPHccskao7YTckjq3GAQHMDiebHc++bovfVT7QxhaSY\n\tzIjC/cBsR9XtedGZPpAGcri3MTR58FWioBsdccTUsBrlOF0D52YdxExB37hbKTgTRN9r\n\tag9g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=XDuKZmogCH30N07dPHAfjgmAmiatyXJ7TmJMohMWqSc=;\n\tb=eGIE+NpLsK6q3m6s3ySyXVpNCEhrBgmEtPnWV2mM3VHLqBssec79pOokHhAOaQRrOK\n\tyCXaew1rxOWoJtMm/taimHLaQ+G/fEs2oWBuEgtPJ56vC14xipGmWinx1XhU6hVOEemm\n\tJ4neythIDPYNUivfKgcHmkDis8ITaxbD8Nng7IkEt6U1e3C/X02OPoms96Stx7vjikvW\n\t1EiPzm5h53pUttOpqgSULBXnxoCMSlUh0L7EXHNg52p9c4z2o/F//60viDDntZ5wOug6\n\t2Plwa6uQGJFgfFys7KDlC8d7EdVSQapdQ+fwdG/v1W/j0m5Lh6f9k/8+kd56j8utoC2f\n\tBfIw==","X-Gm-Message-State":"AOAM530XwmKKKA4MBPg54JXrbynQw1g5elYFeeAOc3/PbrxZEKEcvGHE\n\te0xpF1CwIJjs+Cvr1sZxiu3SDw==","X-Google-Smtp-Source":"ABdhPJwIdpspplYCU6m2T67lp5gUNGS602DaTeUA+pPHzQ9v5dCCzPU8XBemLBaNfRLUgRjUPMyiBw==","X-Received":"by 2002:a17:907:d27:: with SMTP id\n\tgn39mr2068011ejc.389.1620039405764; \n\tMon, 03 May 2021 03:56:45 -0700 (PDT)","Date":"Mon, 3 May 2021 12:56:44 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YI/W7HAa05vhjeTH@bismarck.dyn.berto.se>","References":"<20210503092705.15562-1-jacopo@jmondi.org>\n\t<20210503092705.15562-5-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210503092705.15562-5-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v2 4/7] libcamera: ipu3: imgu: Fix IF\n\theight selection","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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16786,"web_url":"https://patchwork.libcamera.org/comment/16786/","msgid":"<CAO5uPHO9dvBrs1sKS_yQsnbCsJLWgzhKOnaHh7X1xPdyzP0DjQ@mail.gmail.com>","date":"2021-05-06T05:52:24","subject":"Re: [libcamera-devel] [PATCH v2 4/7] libcamera: ipu3: imgu: Fix IF\n\theight selection","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Jacopo, thank you for the patch.\n\nOn Mon, May 3, 2021 at 7:56 PM Niklas Söderlund <\nniklas.soderlund@ragnatech.se> wrote:\n\n> Hi Jacopo,\n>\n> Thanks for your work.\n>\n> On 2021-05-03 11:27:02 +0200, Jacopo Mondi wrote:\n> > Apply to calculateBDSHeight() function the first hunk of commit 243d134\n> > (\"Fix some bug for some resolutions\") from\n> > https://github.com/intel/intel-ipu3-pipecfg.git.\n> >\n> > The condition for the computed IF rectangle height to be matched\n> > against the desired alignment now makes sure that it is included\n> > in the minimum and maximum acceptable values.\n> >\n> > Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> > Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n>\n> Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n>\n>\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n\n> > ---\n> >  src/libcamera/pipeline/ipu3/imgu.cpp | 6 ++++--\n> >  1 file changed, 4 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp\n> b/src/libcamera/pipeline/ipu3/imgu.cpp\n> > index ea654e57b0e7..feee2cc55abd 100644\n> > --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n> > @@ -135,7 +135,8 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe,\n> const Size &iif, const Size &gdc\n> >               estIFHeight = std::clamp<float>(estIFHeight, minIFHeight,\n> iif.height);\n> >\n> >               ifHeight = utils::alignUp(estIFHeight, IF_ALIGN_H);\n> > -             while (ifHeight >= minIFHeight && ifHeight / bdsSF >=\n> minBDSHeight) {\n> > +             while (ifHeight >= minIFHeight && ifHeight <= iif.height &&\n> > +                    ifHeight / bdsSF >= minBDSHeight) {\n> >\n> >                       bdsHeight = ifHeight / bdsSF;\n> >                       if (std::fmod(bdsHeight, 1.0) == 0) {\n> > @@ -151,7 +152,8 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe,\n> const Size &iif, const Size &gdc\n> >               }\n> >\n> >               ifHeight = utils::alignUp(estIFHeight, IF_ALIGN_H);\n> > -             while (ifHeight <= iif.height && ifHeight / bdsSF >=\n> minBDSHeight) {\n> > +             while (ifHeight >= minIFHeight && ifHeight <= iif.height &&\n> > +                    ifHeight / bdsSF >= minBDSHeight) {\n> >\n> >                       bdsHeight = ifHeight / bdsSF;\n> >                       if (std::fmod(bdsHeight, 1.0) == 0) {\n> > --\n> > 2.31.1\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n>\n> --\n> Regards,\n> Niklas Söderlund\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel\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 2E409BDE7E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 May 2021 05:52:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E41B468919;\n\tThu,  6 May 2021 07:52:36 +0200 (CEST)","from mail-ej1-x635.google.com (mail-ej1-x635.google.com\n\t[IPv6:2a00:1450:4864:20::635])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7970B68901\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 May 2021 07:52:35 +0200 (CEST)","by mail-ej1-x635.google.com with SMTP id n2so6437782ejy.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 05 May 2021 22:52:35 -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=\"Klp+6qM+\"; 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=BN6lsJmK2TH1BIVrqNmESbECJW/XBTyBEDCfp6nT+RM=;\n\tb=Klp+6qM+Uqh96TIqSzzuyp/ex7WFkxW20aEzPaWPnuaezXPLtimt0BJAeem7Ky+v15\n\tpLcY73dTGCfJ4RechX7rGBhABJxYrs0rRPceAX6cJKDJDkZlkMXbYyEqtQUupNDmH0SP\n\teYRFcKQhx3GOoYnzy+f/PmjhXE1FGrYR8KSm4=","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=BN6lsJmK2TH1BIVrqNmESbECJW/XBTyBEDCfp6nT+RM=;\n\tb=GilWZW6h5PqSR2M0CYc8Oomw5BO/261Mmo+aUGWjJsFJUC2mJ769z630ENomaZnCiM\n\t/vKlVS9ftd5vaScAndDS2NbKTgJyFWt4oVRXXlH2AMLDyZGGggv6QaQ/x6tivdom1EUR\n\tmMqpxk22tysuz1Meboy2nYoa1a8h04SCSyADvgdrUJyzqz7fhBxK01vrn8NUbgTxqFed\n\t2zCLIXg1QiauaBh5VX1Ls2Y9XdI/g7z/5n7SR+E8bsEcaAoyHTru1eBDCYYCOAyfd2Wq\n\tZlsKFjRWAO1uSiUbCJCu00EuKq63DyJHEI60RVxRrwbjIQykvYFogqY8M9fOAestxOFJ\n\tWZ1Q==","X-Gm-Message-State":"AOAM5336joN7gJR9xr+EG3Wsd+upYBEFaXdaqI0b1hiHUuLDU8WK6IWj\n\tmMXyFU8NUDbfDfZVkSStyaPoL3mMHGLVL17sJBdAoQ==","X-Google-Smtp-Source":"ABdhPJwvx8NWNiIpBi1m8SDol3baED5rouzfHu9KU9B1UrJiItGC9n1jLi6rPmA3hw8fPXoG74htbPp2vQCKezOa/0I=","X-Received":"by 2002:a17:906:5acd:: with SMTP id\n\tx13mr2397823ejs.243.1620280355171; \n\tWed, 05 May 2021 22:52:35 -0700 (PDT)","MIME-Version":"1.0","References":"<20210503092705.15562-1-jacopo@jmondi.org>\n\t<20210503092705.15562-5-jacopo@jmondi.org>\n\t<YI/W7HAa05vhjeTH@bismarck.dyn.berto.se>","In-Reply-To":"<YI/W7HAa05vhjeTH@bismarck.dyn.berto.se>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Thu, 6 May 2021 14:52:24 +0900","Message-ID":"<CAO5uPHO9dvBrs1sKS_yQsnbCsJLWgzhKOnaHh7X1xPdyzP0DjQ@mail.gmail.com>","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v2 4/7] libcamera: ipu3: imgu: Fix IF\n\theight selection","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":"multipart/mixed;\n\tboundary=\"===============0645541810888692285==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]