From patchwork Wed Oct 27 09:28:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14361 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 51B99C324E for ; Wed, 27 Oct 2021 09:28:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E152E64882; Wed, 27 Oct 2021 11:28:18 +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="cCkljPBe"; dkim-atps=neutral Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3C9DA64880 for ; Wed, 27 Oct 2021 11:28:13 +0200 (CEST) Received: by mail-wr1-x433.google.com with SMTP id g7so1900464wrb.2 for ; Wed, 27 Oct 2021 02:28:13 -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=Os5Yadalc02jPm02yV1BUtlymUhsIMIWwsB8S6NAQnc=; b=cCkljPBetb1TqvRmUdWjWppR1dr7EVQ9SfNmiifURCYuzofB4FAUrfLj/2SCGKWFLn VXFHrhhLOiXxbJqpWHART8F39QfcwJ9yzWb/eprlInpcH7lbB2IQe6bBN1eYCYx34ZDJ aMWMQdS79ZYrTpGm6un5pAy1yVqG+wcAV8zXi3DZCXlH1QeoUkC+oWikrjfmoQM3zi7v 2Ji3zVoXvC2P7UkcF+rocjKbqgMwQZHpib2OMSgxAUxl9fb4zONsrRquD1dkB0GfPzQp juokQDA7UKVoPCt2hTGFCZUGLA4TgzzqlcNedByxPPDPpacohuL2c8CimE1kGozHvkh3 waJw== 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=Os5Yadalc02jPm02yV1BUtlymUhsIMIWwsB8S6NAQnc=; b=NfVsfPSseY0/GbIwADDsIrny9ZCPLHOS2d15osIxYBQvV7VUadq6GKMoKulWl5Axm3 Muur+YGRj1Pa6TaC6Tst9BckKxZItdq5sY3nhpKJIu970WqTj9acTHtyY0/+nmgzOjd2 ODRXtLVaHdDTONYQrISerfIwYCefIGGZ1S3VkRnplXn3ihtGfdhFh+OfFgXxCfUXg03m q8+CqtbVRBcr/AxHOJ0+ZLYBhIdesJqGo3s5CIZxq8/MSGdL4tSHsis1OvSJvVxCjTRW NebL4yhLe9GHiPKzGPVgVbgB+Idrfa7RO/r/xql8LPg2RpUPwj8Gf1KWNPYbkdyj2pgI NR3g== X-Gm-Message-State: AOAM533g7M4avBwoiOVJEGev5bfx9/Ls/9/PwAZhJUo9HIR5pi/QNKe9 C2vPBC4QlRWeVFdzWRvBSInSVTQHQl+d3u48 X-Google-Smtp-Source: ABdhPJzzSdXRmuIH485t6VOkExN0HzIgWO2Eces+JD3k48Ft0GRvYzjzxtbF6k/FT3plB6fNpOYmtA== X-Received: by 2002:a05:6000:1b90:: with SMTP id r16mr38422778wru.153.1635326892762; Wed, 27 Oct 2021 02:28:12 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:6561:eb24:3f00:ce98]) by smtp.gmail.com with ESMTPSA id x2sm2861360wmj.3.2021.10.27.02.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 02:28:11 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Wed, 27 Oct 2021 10:28:01 +0100 Message-Id: <20211027092803.3671096-8-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211027092803.3671096-1-naush@raspberrypi.com> References: <20211027092803.3671096-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 7/9] 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 Reviewed-by: David Plowman Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- 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 1b78b5e74a63..e01359b20fd9 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -144,7 +144,6 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size & #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) { @@ -162,9 +161,6 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size & score += PENALTY_AR * scoreFormat(reqAr, fmtAr); /* 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)