From patchwork Fri Oct 22 11:55:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14256 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 821C7BF415 for ; Fri, 22 Oct 2021 11:55:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 186D168F57; Fri, 22 Oct 2021 13:55:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="OPHQN6od"; dkim-atps=neutral Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 66BAE6012A for ; Fri, 22 Oct 2021 13:55:45 +0200 (CEST) Received: by mail-wr1-x436.google.com with SMTP id d13so4337360wrf.11 for ; Fri, 22 Oct 2021 04:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PDQBlbl4qInGaGsRRpYvBAqua2Eo/HUT+WJSofI6L8c=; b=OPHQN6oddmyjbEQMIoUE/Lzf6TG0icVOlzxnMOYQoqH16z0pO6FSnxGcAdmWL4N5dY wiES6vLY2jN21/CjrtNY0qSPEnktoRzv7m5xM9IxKrEdomUI0pBjxt6cLY87pzvlo99z HBCwIggkH3MzbrnXrerN4UvBBgd7Q8V2ZFLXkVOiRoEiwMduswXpK7CilW4VlGXCiPDV 3d/uxiSZfUOeO56n+Kdp6FB0nyA64HapGp3gOYpvXoj9O+ipaRznfQdDW98VkeDwYL5v 5Nn3KH/GiYfsh9dIcQ1Bzb0rv84PIxlvoZiIrfVzjRpPLvizSsLXabPmRYZdL9GUsh// DtzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PDQBlbl4qInGaGsRRpYvBAqua2Eo/HUT+WJSofI6L8c=; b=h/V9i8+HxUemPqe+TDQWfKubTDDYHcTBlWG9x3rozCZFamqnKZ88WzGofw6SCkOTbv wfBxGo5QefuVR7xm4CkV+kq0MAPRtBCXL8U2l32y4XcvCSCQwW36negK0Pu92YDDTw+x SKa4z0t23zVKE6Hs3bpcoBwsXKeg8RYcsgOnkYutyPXrxTtA2JfPa+LQqUG2YW949HWj hLBOFa8JBobTV22qqZQJ+dsQn4ucZPXIOm/eidbsqCSlSp6ugC0jdL9/0jCxHEc5Nf48 /a7P4fp86u+9/AJYY5yy5LfT83D62Q4JDu9BmOKMeoYI7UVibm6F+Rwaq0teAy67hfqB BAsA== X-Gm-Message-State: AOAM533BszkThF8mjlngWB4jtQCJ07zauoCJ9fEiQPmgO03skHo0Ni15 rFEFu8WoNKIl25bRcn24E2uur5Ut1ZdYtNIJ X-Google-Smtp-Source: ABdhPJx0Zq3y8ryWrwZy+Tz3UHK33wGcMvEaV3dN7gZySF0KU1RJg4IBXsDFnuWXcRqm8KNM4Jj89A== X-Received: by 2002:a5d:59aa:: with SMTP id p10mr15040842wrr.45.1634903744912; Fri, 22 Oct 2021 04:55:44 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:f00d:ddf0:61b0:a4cd]) by smtp.gmail.com with ESMTPSA id l5sm7853364wru.24.2021.10.22.04.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 04:55:44 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 22 Oct 2021 12:55:35 +0100 Message-Id: <20211022115537.2964533-5-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211022115537.2964533-1-naush@raspberrypi.com> References: <20211022115537.2964533-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/6] pipeline: raspberrypi: Remove "unpacked" format penalty in mode selection X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" With the recent change to switch to programming the sensor device directly, the notion of packed vs unpacked modes are not relevent, since that is a Unicam format construct. Remove any scoring based on packed/unpacked modes. Signed-off-by: Naushir Patuck --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 0f13127a7748..fc190e39732a 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -125,7 +125,6 @@ SensorMode findBestMode(const SensorFormats &formatsMap, const Size &req) #define PENALTY_8BIT 2000.0 #define PENALTY_10BIT 1000.0 #define PENALTY_12BIT 0.0 -#define PENALTY_UNPACKED 500.0 /* Calculate the closest/best mode from the user requested size. */ for (const auto &iter : formatsMap) { @@ -143,9 +142,6 @@ SensorMode findBestMode(const SensorFormats &formatsMap, const Size &req) score += PENALTY_AR * scoreFormat(reqAr, modeAr); /* Add any penalties... this is not an exact science! */ - if (!info.packed) - score += PENALTY_UNPACKED; - if (info.bitsPerPixel == 12) score += PENALTY_12BIT; else if (info.bitsPerPixel == 10)