[{"id":20385,"web_url":"https://patchwork.libcamera.org/comment/20385/","msgid":"<CAHW6GYLnJqM-+3kNiTbXSOcESLsCh9nstb5hfpdMDozzBO1FsA@mail.gmail.com>","date":"2021-10-22T13:15:38","subject":"Re: [libcamera-devel] [PATCH 4/6] pipeline: raspberrypi: Remove\n\t\"unpacked\" format penalty in mode selection","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 this!\n\nOn Fri, 22 Oct 2021 at 12:55, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> With the recent change to switch to programming the sensor device directly,\n> the notion of packed vs unpacked modes are not relevent, since that is a\n> Unicam format construct. Remove any scoring based on packed/unpacked modes.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ----\n>  1 file changed, 4 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 0f13127a7748..fc190e39732a 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -125,7 +125,6 @@ SensorMode findBestMode(const SensorFormats &formatsMap, const Size &req)\n>  #define PENALTY_8BIT           2000.0\n>  #define PENALTY_10BIT          1000.0\n>  #define PENALTY_12BIT             0.0\n> -#define PENALTY_UNPACKED        500.0\n>\n>         /* Calculate the closest/best mode from the user requested size. */\n>         for (const auto &iter : formatsMap) {\n> @@ -143,9 +142,6 @@ SensorMode findBestMode(const SensorFormats &formatsMap, const Size &req)\n>                         score += PENALTY_AR * scoreFormat(reqAr, modeAr);\n>\n>                         /* Add any penalties... this is not an exact science! */\n> -                       if (!info.packed)\n> -                               score += PENALTY_UNPACKED;\n> -\n>                         if (info.bitsPerPixel == 12)\n>                                 score += PENALTY_12BIT;\n>                         else if (info.bitsPerPixel == 10)\n> --\n> 2.25.1\n>\n\nI think I agree here, this doesn't feel like quite the right place to\ndeal with packing.\n\nThanks!\n\nDavid","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 77D82BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Oct 2021 13:15:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 952B068F5A;\n\tFri, 22 Oct 2021 15:15:51 +0200 (CEST)","from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D6616012A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 15:15:49 +0200 (CEST)","by mail-wm1-x32d.google.com with SMTP id\n\to24-20020a05600c511800b0030d9da600aeso2447147wms.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 06:15:49 -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=\"GcZOWpC3\"; 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=afprmy/UCMNwRYYcxoaOaoIIqbrH8rILv/v2eEQdGTU=;\n\tb=GcZOWpC3p3gFl+xuwpPnQmxDqDjFAs12gK/xLCDgCcQRo4OCC2jJn5Afo5O/vmshLV\n\tuTvqht2aTBBt5D1yH3BrIchfTYd51hRGmV5St0ik/0Y5TbOLyFtgL6gF5R881WIKy19f\n\tuw67ooLsgY4LQecfVGvtk7OJbJb3SI9p+jbsNfZQdujx++P+05DFnhcpLP6bnxd+Fr99\n\tWhFGLz9g9V+DsnkVV8cL+UjEZyvYrOUaAMoockIhvJrxeQb1wHZ6dGsO3Gb7Qhn682Gz\n\t/FJzDYQnQ9aaCSM4QKn1ySG30tyXO4BTMb/pcVypQHxsOeC+0Dfy0Jvy/Vnf7W3s4yjO\n\tSDCA==","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=afprmy/UCMNwRYYcxoaOaoIIqbrH8rILv/v2eEQdGTU=;\n\tb=IXTFC/rp8VdEOUw9T2lDnKdwdgG6h/QSOJH35NcCRy2ytO6oWlbQBOAik0tOLp9ODP\n\tjWUFnxksI7wsp9aGIzrNbIU/oPKbAdr30tm93A3+ytFvDKOT6JWGKm6papx8LHAAqNbm\n\t86KlnR0M+yn/oD77ICeqNUoY92GXSpcPJ6S4o8A3qdkS4H1bieEJTkQMpJ2Bm6sqY4Vj\n\tf/C3oqVVPSQBN3QZiBbpo8EMbiK/IkVkW/z5ce1iYboZMScj3ByWQTy65l0W80B5bEk5\n\t2ZhwtdxOWJo9IALf9q1LvF2cRM7IWWA3xdPk2SmJQBoG1Q5aMU9NaXK0z9E4gymu7keT\n\tfbtg==","X-Gm-Message-State":"AOAM533OdsaOC32/sY+OQ3LaP152wEMG6OM6xebmPWgGkWNYCprgsum+\n\t5DRhMOnZj7k1cKRjucX8WHlc+Kja28cZEKFQarzHiQ==","X-Google-Smtp-Source":"ABdhPJw0NM10tM1ZS3DNwfYcrEV8va9STlSaH2Q4yijCz9Gl+ITl3ydbGS7IkL5+YMeEI8ynwicaTnLN0AIWGITnm7w=","X-Received":"by 2002:a1c:4d06:: with SMTP id o6mr14636017wmh.21.1634908549231;\n\tFri, 22 Oct 2021 06:15:49 -0700 (PDT)","MIME-Version":"1.0","References":"<20211022115537.2964533-1-naush@raspberrypi.com>\n\t<20211022115537.2964533-5-naush@raspberrypi.com>","In-Reply-To":"<20211022115537.2964533-5-naush@raspberrypi.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Fri, 22 Oct 2021 14:15:38 +0100","Message-ID":"<CAHW6GYLnJqM-+3kNiTbXSOcESLsCh9nstb5hfpdMDozzBO1FsA@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 4/6] pipeline: raspberrypi: Remove\n\t\"unpacked\" format penalty in mode 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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]