From patchwork Thu Oct 28 08:46:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14385 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 8EBC4BF415 for ; Thu, 28 Oct 2021 08:47:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 49BB2600BA; Thu, 28 Oct 2021 10:47:06 +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="nXSYDrQC"; dkim-atps=neutral Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 883E1600C6 for ; Thu, 28 Oct 2021 10:46:59 +0200 (CEST) Received: by mail-wr1-x431.google.com with SMTP id z14so8796751wrg.6 for ; Thu, 28 Oct 2021 01:46:59 -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=l2aBYZ7AsH1FcO9lnVpab/qb2Bw69co6fVhKXhX3xcg=; b=nXSYDrQCFrE/sQzE2TLPZ/4F9y6GU33SkXuh1EV0ilpWQzw/iA4Wv9PbLTve07G+9Y iSlg6Wj/5CaN1yO9yha/UR56je7gk7aWYzTS4/HmpKckXfW69PDl7GENW0lqvx1wAjOm NXHspmInoiJFUr7Ezs8SAG+LFgizcuItN/ZuNXFuOLvLPNayWJl70yiXtQTvx2ndIe/Y ZbWA9/4tDaMcr++xvecvgpvVgs4ozmGqVo4WoHKeVwcNdX/wa46+Xv+VMOYs9rEnBvSE 17hoirmdjHhVBfoDdGHThZeBlgvQtA8/DEjSIOXTiTSHGVD1AUy0eVQELDYM1xHahULD yIeg== 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=l2aBYZ7AsH1FcO9lnVpab/qb2Bw69co6fVhKXhX3xcg=; b=dOQlP4uhQtZnRKXCGi2gRWJ6HOUTnkKx43Xc3eqJYDaQkcJjfwT+NRuucAJOdZSgyI +4NiZ+ZejzCf0IUgope3DbRZQWT4T06uBaRROC9Pmk91+KOZdn9ZCq9OBPBGRbgtfVPm pwMi1mS/x3Q6XDtlMWHjuPgzcauUkio27TD+0J/Wib01cLXqrfxlVqmSYkaSKG4AVVB9 GyOqkE1HRZqL2ie1QV94vKAfvuVacO3dTYOSpPd1N7QrOT302lmSyO+214kqhKuXtAAs o5Amu4hl43V8yRr/mPnhVdl8BY5Ki2p5l20ESpFvFUz8j+VgboIXRVBGEhhGCfnGaQnj uqFg== X-Gm-Message-State: AOAM5323LEMa7JJVXEAnOlOATFeIJIU/pqOtHS/TNAk52PguphJcvwzC +aD0Iv0VkMQRPZWtOyamIC9/uudaqwr7MnwG X-Google-Smtp-Source: ABdhPJwW8P6mhAmCXBE/xppFPez1UWZ79uQaFJQv9/IvzHGosWmYWl36ybxgqPKfzpP9vtApouZRQQ== X-Received: by 2002:a05:6000:15c8:: with SMTP id y8mr3917625wry.377.1635410819059; Thu, 28 Oct 2021 01:46:59 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:b894:feb0:b828:13b]) by smtp.gmail.com with ESMTPSA id z2sm1955281wmk.19.2021.10.28.01.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 01:46:58 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Thu, 28 Oct 2021 09:46:45 +0100 Message-Id: <20211028084646.453775-10-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211028084646.453775-1-naush@raspberrypi.com> References: <20211028084646.453775-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 09/10] 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 8e3e96a4359f..b405e2d55d57 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)