From patchwork Fri Oct 22 14:39:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14263 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 A8DE7BDB1C for ; Fri, 22 Oct 2021 14:40:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B6A6468F6B; Fri, 22 Oct 2021 16:40: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="CF7R+4n9"; dkim-atps=neutral Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F5FC6012A for ; Fri, 22 Oct 2021 16:40:16 +0200 (CEST) Received: by mail-wm1-x335.google.com with SMTP id y22-20020a1c7d16000000b003231ea3d705so3623206wmc.4 for ; Fri, 22 Oct 2021 07:40:16 -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=LPz2Ck+cam+tyTq1UgTzhzey7O0P6Ctm4/xvxMVlKak=; b=CF7R+4n9LPN9R0s6yF8WHf9Aj+aFI1s+2/upYLGakqLx3aseZtb/FqHFEHU+L/hWd4 43EdDotsMEzrMZGFQfMgSLJnlWGkxYy35LU2ena1AGmiYzq+q797Adue8g4JL3IY2TcE P9rLV+MZbH8jK17y1QyIhUiH3LbwhdrqLZ1681l78xlkfnYOY2YWn+S/QdIwPjHaJYeV XKyYnlDw2+ph44kOJ84j5jhxdJLb+Kx6SQo+7wVBTGVmj0+dUGpTvcp7SoTDs34hF5Sf ZZuf30fvdO8b/Yk/dmMSMMpJG7epealDbbxkLHt/Z2W+/Y50zYmGnckugIf0nZFvoe4T t7sw== 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=LPz2Ck+cam+tyTq1UgTzhzey7O0P6Ctm4/xvxMVlKak=; b=sUp7J7q747+LwOLnF4hfDa7bE/IrysShaUluNKmdUyugs8pVCwlDEA0haSGiQLHEek jVxhTS/Q9Mf7pj+k4Pe1lr8X1jrZkVzvTcglKU4Bohz6hpUJQr00iwuOTNhZGyaxpjWd DrmXZirvUW+1pFgXH7xmYs9OzxWqHtW6++cEQghiJk2AUUy57sgpixYdK6hfZg5UwOWa 3dfjROT9AbL0S5WlPFllbkqpVekCs5MTP1sX7KUoBvn/EUJ2kzwquVczPjgmR4TC9o3u LkV85m7GmsRG/tVOQMCXobyrgvoFseL326/COsqTkC0sKGyomADzFtrrxJ4+4Eil0lLx FLxg== X-Gm-Message-State: AOAM533y0hD4/7awrJMjICYnh66lYDeTLlGpaUWQlEsSEp4+Aze0tNNA zOdrKW/EgN/9DwWQazJINFAxHIevkkQNWDQ/ X-Google-Smtp-Source: ABdhPJztNC+0vmIcLRFyyo/xK34xRnkkxf+vswD15Ju9KH72gfUZaNuZno0cV2fzeoWgKvUpbrCsbQ== X-Received: by 2002:a7b:c088:: with SMTP id r8mr29495440wmh.120.1634913615823; Fri, 22 Oct 2021 07:40:15 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:f00d:ddf0:61b0:a4cd]) by smtp.gmail.com with ESMTPSA id r205sm8577878wma.3.2021.10.22.07.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 07:40:15 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 22 Oct 2021 15:39:05 +0100 Message-Id: <20211022143907.3089419-5-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211022143907.3089419-1-naush@raspberrypi.com> References: <20211022143907.3089419-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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 Reviewed-by: David Plowman Reviewed-by: Laurent Pinchart --- 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 45725527d66e..2b70b877e70a 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -109,7 +109,6 @@ V4L2SubdeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &re #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) { @@ -127,9 +126,6 @@ V4L2SubdeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &re 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)