From patchwork Mon Nov 1 09:15:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14445 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 5FEC6C3250 for ; Mon, 1 Nov 2021 09:15:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 185A360253; Mon, 1 Nov 2021 10:15:26 +0100 (CET) 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="nTvif4Eq"; dkim-atps=neutral Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AF4B2600C3 for ; Mon, 1 Nov 2021 10:15:20 +0100 (CET) Received: by mail-wr1-x42e.google.com with SMTP id k7so27090266wrd.13 for ; Mon, 01 Nov 2021 02:15:20 -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=pNLu50p/bpoSwik19pLTW1p9L6Hq5BR0d1Kqq9L4id8=; b=nTvif4EqM9rGa+sartidXDNBQGwx0DR+dJTIysNxh7iRSfL2/22XQHzsIy4RjhZiE7 3ZVnF1ZEqXnrvKcs06oEQe8vibmuWKQQ84uwp1nHcrNVu8oLCqSAhr78GMaRCuFwgowv 4MnGFhqIPH2Vrb6eUhdHFPtvYiS3uEpg0ul+Xwx7KHvy91Lezz8tHhd/tRpC0L5kPtUJ mdlm5O9rAPwAiQHiHOkscVK+FeJmV4tjAPOrb7Sb/uHfVzzQTUMHcrYwbn1+Vj8frVkc SV4WyPT9XSaSINxWucitrGty+05lCI7acpxMRuSwOM5Tbz+0x7LTyLmwlB4rfpNziAY5 tW7Q== 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=pNLu50p/bpoSwik19pLTW1p9L6Hq5BR0d1Kqq9L4id8=; b=3S1ojf/u576l1vRrV5QAiOURXyWMpo2eIsnMzLc4k7S8CT2U+0VndzS7s5YLC8d2k8 dycYT2WDuyCxDQN8QXvBHG8z9HVgq1v/mVNUb+Eae7nGTMG2408GQhXEBZwRhc1g2yec DLRezbF0pk8y42Emga4ZMtmHs16Tia/5U3pOUUTpgPdUSoWT24c5mGeluOWkRbhYKbFd eY6nwr1mheW0hDNuwmYgrwkeI52agmqMj2vZ0XgHTMRjTxmpeezLJkKSioIJ41AkRaSi 2igKAnVH2t2ehcCLO1oSP/Co145zbLWC7CO4dExuM5zlwuv7bZyPsOCddRNgVV+fUB6C +P9g== X-Gm-Message-State: AOAM530v64jANHlRs24u5z8PAwTk1oP4YLrUbdsxeptwYFjFpYpPeWZE NrzF4GwiYCNb0emoWB/BkqxBsB12IzZ0/O1b X-Google-Smtp-Source: ABdhPJzuDArb94LDBeoC77LY9mvs83IDRVZaBQWLyCJTHCn83KQap8VZrs05eqLTslIQlWIN/5xa7A== X-Received: by 2002:adf:a2d7:: with SMTP id t23mr37582496wra.156.1635758120200; Mon, 01 Nov 2021 02:15:20 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:3a2b:9d8c:92b9:ece6]) by smtp.gmail.com with ESMTPSA id w10sm13168849wrq.88.2021.11.01.02.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 02:15:19 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Mon, 1 Nov 2021 09:15:09 +0000 Message-Id: <20211101091510.23204-11-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211101091510.23204-1-naush@raspberrypi.com> References: <20211101091510.23204-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 10/11] 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 863516b997b2..996743cf48ef 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -131,7 +131,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) { @@ -150,9 +149,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)