From patchwork Mon Feb 13 09:19:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 18277 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 A7147BDB13 for ; Mon, 13 Feb 2023 09:19:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 054DA625E3; Mon, 13 Feb 2023 10:19:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1676279981; bh=mj9RlCaGERUT2mUjKJ2Ui7OnAFZUoz9id+eqzhc7HJc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=HqeSEWsYGdqRmTsENzAngSJRHL0PjUBhY+BgUTaUbKBrDfDcid0UcDZkPqXhgkOUu yqmZb/gZjRkDswNJ/eUk4x/rS+D7GEy4ZN/WNQGd6HPKj4Zi6qvr/RPvrn3VGZ1Sa1 K9UVJaikrdA4dD/SPltEd76zB57iFq/updRML341WnvcuQiQODZavYub+wkUm2L4G+ RwYb+LvLLyQ05dV6EscGfU+xVIHb8Z54jbwhxDsIaanhCFs0jnFpz8sKWrZOy5IuCF nTSlYn6HZy2EfFd9pgbZna1RjXTLFRvOLpiL9dHC8jq89ugVUJNd3laIsR6/7a2pB4 Hq2Gayljn0HTw== Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 90BF961EED for ; Mon, 13 Feb 2023 10:19:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="MgFDSBwG"; dkim-atps=neutral Received: by mail-wm1-x32b.google.com with SMTP id m20-20020a05600c3b1400b003e1e754657aso2306717wms.2 for ; Mon, 13 Feb 2023 01:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fQl1dqXv05csJmiZGC0kR2/1g0tkHwD0LTQHKI/OMm8=; b=MgFDSBwG0ZTGy1lKbHIPo/LcC++4dgV4aljHBZHZ//MW1meteJe+6meccSpfcvAd6V RaKigKZIs8TaVoge8+el/bdyF8bfCE9JqD9+mbab9mrumOzNFYKBiKkCguQJg0LNCqKy z3NuKweacO4jLTU9ydHmgY4PKZqXwwGnJlmYS70gMRIgZoipr0OGWyUwG7TY38fwHVzY 2YUCwthRKPo/DcBcqKOUtGVW2CpGdjNKsU8BCJf6741Lj1aKFX9/mKonLm0A7vFwKXHL Wkk3o3QdmHKvKMPdb9HGAyh78/qiKj0aJGmRdvgnSBaVB8pZZWaYeVJREKDNaw+VkNbN kTWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fQl1dqXv05csJmiZGC0kR2/1g0tkHwD0LTQHKI/OMm8=; b=CsUxYqPA+U3AqM6n8SBCNePXE5KcwTt10TxJF3kUpl2xVnBpooxf4k/Nzri6RVHnK8 8015u8/2ki7WNYab4RpxF4HR4TYvl1APLRn15jbpPeTTbFvh/jlig2qeRPIaVwINzoMQ afQzl2/MiTaKXJJ+HQ5f7LC9PtzVP01VZc0WyKyEnVh1WJHU0hiyTXsOR2H594j6vDjR jzLeOkRjgjAeUlAtqLdny6J5XKbbQuFx7JtyaSMtAT6VPoDVFLkzJXCprzUhcx/QFKYF NQZtLVQtHGtxaVQqY/1Lk+hsiJqjZdmGYjyjF7KeMeAhDZNczHMMcKB0XGofgWnExCJY xZfg== X-Gm-Message-State: AO0yUKXZ+RdFRh734SHYT4qqnZJQly1J5hdXiwQoz+zkKxQ/OKnxMSW4 uvmmjwZMJ+07UwN3dRlwAPu7rpnlLA6uuZB4 X-Google-Smtp-Source: AK7set/+xJFfa5XfQ1X3NJYlM+5sbQxfzgQxfDupTOsa8AFa+frRb317FOjGwqm01oWbDeR43Tq7CQ== X-Received: by 2002:a05:600c:3287:b0:3dd:1c46:b92 with SMTP id t7-20020a05600c328700b003dd1c460b92mr20258851wmp.16.1676279978954; Mon, 13 Feb 2023 01:19:38 -0800 (PST) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id bg1-20020a05600c3c8100b003e118684d56sm14135485wmb.45.2023.02.13.01.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 01:19:38 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Mon, 13 Feb 2023 09:19:34 +0000 Message-Id: <20230213091934.2356-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix error in validateColorSpaces 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: , X-Patchwork-Original-From: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This fixes a small error in the validateColorSpaces method where the colour space was not being set to Raw if it had an "unset" (null option) value. Signed-off-by: David Plowman Reviewed-by: Umang Jain --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index c0dd9551..84120954 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -449,10 +449,9 @@ CameraConfiguration::Status RPiCameraConfiguration::validateColorSpaces([[maybe_ /* First fix up raw streams to have the "raw" colour space. */ if (isRaw(cfg.pixelFormat)) { /* If there was no value here, that doesn't count as "adjusted". */ - if (cfg.colorSpace && cfg.colorSpace != ColorSpace::Raw) { + if (cfg.colorSpace && cfg.colorSpace != ColorSpace::Raw) status = Adjusted; - cfg.colorSpace = ColorSpace::Raw; - } + cfg.colorSpace = ColorSpace::Raw; continue; }