[{"id":20560,"web_url":"https://patchwork.libcamera.org/comment/20560/","msgid":"<163533717043.1184428.5830306080073789526@Monstersaurus>","date":"2021-10-27T12:19:30","subject":"Re: [libcamera-devel] [PATCH v3 7/9] pipeline: raspberrypi: Remove\n\t\"unpacked\" format penalty in mode selection","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck (2021-10-27 10:28:01)\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> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\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 1b78b5e74a63..e01359b20fd9 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -144,7 +144,6 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &\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> @@ -162,9 +161,6 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &\n>                         score += PENALTY_AR * scoreFormat(reqAr, fmtAr);\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>","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 713CABF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Oct 2021 12:19:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 235676487F;\n\tWed, 27 Oct 2021 14:19:34 +0200 (CEST)","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 8482860123\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Oct 2021 14:19:33 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 267C7993;\n\tWed, 27 Oct 2021 14:19:33 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"VGtsKftQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1635337173;\n\tbh=ieBiWClX6jSmLF24KRJk+G7if2yYAeMsLEMJlAdASyo=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=VGtsKftQ4D+oHQSie7820vcdSmwXt9BdZ0CylqgVvgD/eWq2WKJYVEcT1kFVTtEpV\n\t7/XgghawNwJDgB1UoIgD8yndAQUBPnnWgMgnX0Gl8FRFJ5IiPJ1tqZXiJ/xix6BwlA\n\tzkSTtsmqddt4EZ2ijLikbJ5EZzQf2T4AAVROLBC8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211027092803.3671096-8-naush@raspberrypi.com>","References":"<20211027092803.3671096-1-naush@raspberrypi.com>\n\t<20211027092803.3671096-8-naush@raspberrypi.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 27 Oct 2021 13:19:30 +0100","Message-ID":"<163533717043.1184428.5830306080073789526@Monstersaurus>","User-Agent":"alot/0.9.1","Subject":"Re: [libcamera-devel] [PATCH v3 7/9] 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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]