[{"id":26769,"web_url":"https://patchwork.libcamera.org/comment/26769/","msgid":"<CAHW6GYJSccxKv_2ebLLXcurPVPtO-D41+7XjG1T5WmnUCFM+4g@mail.gmail.com>","date":"2023-03-27T13:33:16","subject":"Re: [libcamera-devel] [PATCH v2 4/4] ipa: raspberrypi: Fix default\n\tframe durations calculation","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 the patch.\n\nOn Mon, 27 Mar 2023 at 10:34, Naushir Patuck via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> Fix a bug in the default frame durations calculation where the min/max\n> values are swapped round. This is a rarely travelled code path, so has\n> not actually caused a reported failure.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/ipa/raspberrypi/raspberrypi.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index c10e57e07ab0..66a020d022cd 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -1486,8 +1486,8 @@ void IPARPi::applyFrameDurations(Duration minFrameDuration, Duration maxFrameDur\n>          * This will only be applied once AGC recalculations occur.\n>          * The values may be clamped based on the sensor mode capabilities as well.\n>          */\n> -       minFrameDuration_ = minFrameDuration ? minFrameDuration : defaultMaxFrameDuration;\n> -       maxFrameDuration_ = maxFrameDuration ? maxFrameDuration : defaultMinFrameDuration;\n> +       minFrameDuration_ = minFrameDuration ? minFrameDuration : defaultMinFrameDuration;\n> +       maxFrameDuration_ = maxFrameDuration ? maxFrameDuration : defaultMaxFrameDuration;\n\nIndeed, good spot!\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid\n\n>         minFrameDuration_ = std::clamp(minFrameDuration_,\n>                                        mode_.minFrameDuration, mode_.maxFrameDuration);\n>         maxFrameDuration_ = std::clamp(maxFrameDuration_,\n> --\n> 2.34.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 D6105BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Mar 2023 13:33:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2B44562724;\n\tMon, 27 Mar 2023 15:33:30 +0200 (CEST)","from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com\n\t[IPv6:2607:f8b0:4864:20::32b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 88C5D626D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Mar 2023 15:33:28 +0200 (CEST)","by mail-ot1-x32b.google.com with SMTP id\n\tx8-20020a9d3788000000b0069f922cd5ceso4527208otb.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Mar 2023 06:33:28 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679924010;\n\tbh=ntLxszWTzqqX+fW8H63hbkucx587JktfuF3NmbM8wwY=;\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=Eqpr9hUaahwCntP9AVxOe8dhzbf8fLmvw7bNZxpofverNkov0bDe61/nco1KEio34\n\t0xtazInUPZ6X8rjd3E5b816soYm9EQM17hIzEf0/inPpfjrmqKQPo0Kbo+R+Rd8S0V\n\tmGm5dLpdCuTkhzyJNvZl7xXzBW27TX8scsuN5ZqK8AOTZJ+vMAfRxY0vnJjYj8zeNr\n\tB78lJRDkNLwI/bRbHfC9hPm8a9Z/bMniqbQI9pFrtsMrLZ1W9oTV6Hnh3Mf9OFzx8f\n\t4W7nTkWqcMXkBhKfafRllnnlWEP9r4Nibup9+sbki6vNhCrvx5ys6O15rjxGLh2K3R\n\tgvCOaz3h0rwMQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1679924007;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=o68tWaWqIjJ6d45x3FZCLS+IrDQH48sknVxRqpEsPy4=;\n\tb=HZkTkoks5Pz2PzNIf8n4/KZCGAKdOhkqmymk6wTjLpdeVSNM+HeBRkhfu/xgkY+JKg\n\tIudF5Z64/yebaoDaCRIZfps0EYI5k3Um3wjMaRl2IDIesTtRLh4DqB+Gi4g/SBV+d+my\n\tBNm9eO0aPz8N1hmky2wxJys0r88VFyntBq/nuw4bkMqp0h8WpUAjSbMlFodHeudYYcDj\n\th1sfoBVo3wTr2fxhrDGpkg3zcPre9PNKS/Dftm+gLteA1iWCAYvhP0arBBOOUd48v0L6\n\t1fYBgOVTSXyUlgWnuOmMzQQexszNu9O9olayhnP5siLyYUqbQ2/r0HFiqHv4YAkc9ueN\n\t+enQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"HZkTkoks\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1679924007;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=o68tWaWqIjJ6d45x3FZCLS+IrDQH48sknVxRqpEsPy4=;\n\tb=Aa1U7B5o9133Q7FVIYjY15t1dMn/omAX3mxQdAJnrRi3OrLuvbkhSJWYuOz7FLD8nD\n\tFCVW613m6866B45T4cBoCt3ne6jINPX426JuUq9Cn0PphvxUQ/NwJxN40r7EaAtrgnLA\n\tCX05RakDgRFPH5zyxPFlscC7FAAYE1ZOtWLevnca6HTe/UttKDk44scLDZPZuTTQWTal\n\tp/J+eJWKnHRHi4L4K8YRBd+EaVyOGVXci5yWlo7180X8SlIde6RJhcNMVRQo2rgNMTfz\n\trvDadlKo+wq++Lu8TrWsaHFxu9zoAZoFti0ZwwZ7zQhOI14uFpa0NUucJoSj+vOkP1If\n\t1hiQ==","X-Gm-Message-State":"AAQBX9eJwn0g0y7jJg+0BUYychrIqih+0HNihKDqLmYWHR3x58vK26Jv\n\tejGsFwRy58yPKm6TD6WSwPGZzLxYN8YSlGG1o0uCVToRXuVyv8tdf68=","X-Google-Smtp-Source":"AKy350anLNwNXME2ZjAfIzRXsRydZ6QMG29SeqCD4cocZD84KtZd2z0GgHC9Lkg5dWvmP0S4HPr0gziFeUZkci8ee1k=","X-Received":"by 2002:a05:6830:1be2:b0:6a1:24af:9ce0 with SMTP id\n\tk2-20020a0568301be200b006a124af9ce0mr2175458otb.4.1679924007433;\n\tMon, 27 Mar 2023 06:33:27 -0700 (PDT)","MIME-Version":"1.0","References":"<20230327093439.24670-1-naush@raspberrypi.com>\n\t<20230327093439.24670-5-naush@raspberrypi.com>","In-Reply-To":"<20230327093439.24670-5-naush@raspberrypi.com>","Date":"Mon, 27 Mar 2023 14:33:16 +0100","Message-ID":"<CAHW6GYJSccxKv_2ebLLXcurPVPtO-D41+7XjG1T5WmnUCFM+4g@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 4/4] ipa: raspberrypi: Fix default\n\tframe durations calculation","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":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26772,"web_url":"https://patchwork.libcamera.org/comment/26772/","msgid":"<20230327134418.3doazjc76srowph4@uno.localdomain>","date":"2023-03-27T13:44:18","subject":"Re: [libcamera-devel] [PATCH v2 4/4] ipa: raspberrypi: Fix default\n\tframe durations calculation","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Mon, Mar 27, 2023 at 10:34:39AM +0100, Naushir Patuck via libcamera-devel wrote:\n> Fix a bug in the default frame durations calculation where the min/max\n> values are swapped round. This is a rarely travelled code path, so has\n> not actually caused a reported failure.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n> ---\n>  src/ipa/raspberrypi/raspberrypi.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index c10e57e07ab0..66a020d022cd 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -1486,8 +1486,8 @@ void IPARPi::applyFrameDurations(Duration minFrameDuration, Duration maxFrameDur\n>  \t * This will only be applied once AGC recalculations occur.\n>  \t * The values may be clamped based on the sensor mode capabilities as well.\n>  \t */\n> -\tminFrameDuration_ = minFrameDuration ? minFrameDuration : defaultMaxFrameDuration;\n> -\tmaxFrameDuration_ = maxFrameDuration ? maxFrameDuration : defaultMinFrameDuration;\n> +\tminFrameDuration_ = minFrameDuration ? minFrameDuration : defaultMinFrameDuration;\n> +\tmaxFrameDuration_ = maxFrameDuration ? maxFrameDuration : defaultMaxFrameDuration;\n>  \tminFrameDuration_ = std::clamp(minFrameDuration_,\n>  \t\t\t\t       mode_.minFrameDuration, mode_.maxFrameDuration);\n>  \tmaxFrameDuration_ = std::clamp(maxFrameDuration_,\n> --\n> 2.34.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 D1295C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Mar 2023 13:44:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 85EA062724;\n\tMon, 27 Mar 2023 15:44:23 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B571626D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Mar 2023 15:44:22 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9AA487FA;\n\tMon, 27 Mar 2023 15:44:21 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679924663;\n\tbh=iicKXHmsEo3w+KGDHqGmxPTx4B9S3SAJ5h5XTA1+6dE=;\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=INud30wPlprh1xJ57G2GFYvnhxLSgeZilzstjUzmWOJow/KYJqCifxwgnzgDLWvoM\n\tFK9wkyzLjPfxpOCPFbX34vOgqyO14yh4is5xoLJ2c39PvxiFR98MdzVxiuN9MKRnEu\n\trhUEpV5eoaswjDkHFy2LU4aCaMwcMKqUtmYdfSz2GbMJwWSgbLGw22zu2RutPed7TS\n\t3zMNWZRVSrWDPOs6nsr3/MXr/GcYf4bcd4wZ6CtIUQpno7WWBKB+PSx89CyO1RzVH/\n\t+4dJtxR2y+x6Vq/52efCunQYonqjlVHvazunUCSeim2H/dlDIp/ifQo/7cr+NCgrVe\n\tLZxkJrwSit5Ag==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1679924661;\n\tbh=iicKXHmsEo3w+KGDHqGmxPTx4B9S3SAJ5h5XTA1+6dE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=LTK/BUubEnvaYwEZqiW2j9Khg6I/ske0QB+s13/Q6hiFsTM3e50zZXDtl69sPlSWJ\n\t9V6ok4YA7twmac/36SlN6pgs6jMW15yRXdR3Z7oVzxusuU7V+RQ4eZygyEafRs0wTs\n\tJboDXTLWKKL37VzsqN4hKTy6txSHnA7yAboHMP2I="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"LTK/BUub\"; dkim-atps=neutral","Date":"Mon, 27 Mar 2023 15:44:18 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20230327134418.3doazjc76srowph4@uno.localdomain>","References":"<20230327093439.24670-1-naush@raspberrypi.com>\n\t<20230327093439.24670-5-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230327093439.24670-5-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v2 4/4] ipa: raspberrypi: Fix default\n\tframe durations calculation","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]