From patchwork Mon Feb 13 10:18:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 18278 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 5A855BDB1C for ; Mon, 13 Feb 2023 10:18:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B7EA6625F4; Mon, 13 Feb 2023 11:18:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1676283493; bh=BQhPLflshEqUpFwLE9QkcuEOa0RPXBdQzt7FSqhNd4k=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=mrakHr48M6yEuph6TlVgymIApayZvxq0rISfAlWAS+ul+UV0UFJejQOQYUqGARVRn Mjz8r/JFPscd96dMM2HJKI5CnBHCSG1/Pt00pXdst0FGXpkJflcB5C2ju2v7W3EYWe ZoUqOgI+W+QQzdhnwYjHcV/wDimjSlZFanSNSSBnVssXORHnXSl1JwNgyAPNi8CjhN yRl+ZqzmnvyrgFWADQ5BeR+uIVSlnElkGi79UwiMkhJcrrTUN2XL8JvM2M4CPsHWBA mr82rY0pFRHYQa+feDRI9WJEXmmZGlk6mWJ6dgvVyeVfU263jYGTZ80LxgpEwFeNnE 1q01v2dwZuA8A== Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A611361EED for ; Mon, 13 Feb 2023 11:18:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="mTOlsnYu"; dkim-atps=neutral Received: by mail-wm1-x32f.google.com with SMTP id bg5-20020a05600c3c8500b003e00c739ce4so8570079wmb.5 for ; Mon, 13 Feb 2023 02:18:12 -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=ZZAoXy19ikm1jKHqYClfTHA33QP56yDo1XHhRALdOFE=; b=mTOlsnYudFiUlJb7xrt5FETlRTAxFf77d6gdAarjHGH6O04cliEKcD3YpE9MHaSeQj Bks/O/OQkesqKmTo4tiQPaJGwJJlAXPKx1y/woVp8aq6nUGx9gPLkKk1zvQ3rY6o6UmU HBrYHB4xpg1HoSCeFVYDY7u3T3mHF/b0sQZLKARJCV04qRul/s+ILC6DnokQFqq+R9Nn 2AOsH/n6Orptlc3+OGCkRyPkz8LkL4+cApqEa3sby8V8n5uGXrt0a+h7PqAkXlaxWT6W VaJykJjZS+ERQI9GN05fRhiRhM1nM6qSgyE/rhY+Z9Ewu+q+d/IlWgjHISK1f8VVm7jz oRrg== 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=ZZAoXy19ikm1jKHqYClfTHA33QP56yDo1XHhRALdOFE=; b=g7P0X54VOkwLW8T/iJIkIRQWEJfgNpgIgSFWEcMyjr8R3QADPGIKeFbMuKSkXPDR/f mRu0d8Va9mpehd4BDBuyswq+Ht9qMW+RNR+J+RrgzlDatdcQpmoG+ebOCYWgkNw9mmBJ S7yIGfBG/WIhTm+NDf6wGpbdkpGoF+54hMEWGT3Wo7k+AkFsWvwmgRypIfgKjklt0iVH 5ikPspxmJ6exaEfynQiahtPBPS478pFelau9myS5LMOQTPgxN8YB3ctIW29U27tZ9WXp iwlysxMrK8OvsGEjgg8YiyBhgNbKiRZ4SD/j2Fj176V3m2CY6LIEOhdxUmy5crgafYC4 cd9g== X-Gm-Message-State: AO0yUKXypBYTXfjWQM600cAFzOVFIWtEIPWE1/HmiQHhrnqYh9mhdaZk +IzNnRSnKn7DJjuTtu5fTxK1mSp6mAz9EIbl X-Google-Smtp-Source: AK7set8ILxAk/QEGD44saiFfwywtZLhsf8yQIzdzh+ZoOLYWpp9CfVyCb7DqPSJNoGAxtX4xUUiyeg== X-Received: by 2002:a05:600c:3511:b0:3df:9858:c03a with SMTP id h17-20020a05600c351100b003df9858c03amr5339146wmq.15.1676283492077; Mon, 13 Feb 2023 02:18:12 -0800 (PST) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c3b1100b003df5be8987esm17662640wms.20.2023.02.13.02.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 02:18:11 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Mon, 13 Feb 2023 10:18:08 +0000 Message-Id: <20230213101808.4985-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] 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. Fixes: 613d5402673e ("pipeline: raspberrypi: Fix handling of colour spaces") Signed-off-by: David Plowman Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart --- 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; }