From patchwork Fri Dec 10 11:21:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 15104 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 D9A4FBF415 for ; Fri, 10 Dec 2021 11:22:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F058A60897; Fri, 10 Dec 2021 12:22:04 +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="H3JplUB6"; 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 5284F60868 for ; Fri, 10 Dec 2021 12:22:03 +0100 (CET) Received: by mail-wm1-x335.google.com with SMTP id d72-20020a1c1d4b000000b00331140f3dc8so6394554wmd.1 for ; Fri, 10 Dec 2021 03:22:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2jloSvCky1XZpMKAVDD/veonE94c99Tu0OnU7LPgcZY=; b=H3JplUB6C4ZfMWi13nOLEvu21GhOXnklcbSscGTnyhh4vZrN8oA2kQIJPgK1G3sFfx vuqVnAwLG4ze7iK795CAHLcNwOzN6vSLd2F/U2fBuN7ctB1Fo21RxTVa7bZpojrTbgGU NqSaquTIJbetYRGY1f21MumKWJmHtdG/IAfBJ0fet10Xv0O+kZZNmzaNc9XwJhD04oKS RVSHjDBibm7vYglY6mDOmP6tTt5A72QxycoRQoOqmoaSznpApjXn99P/8Xgmv5t/cL8b S8WCieok07sK4GiNFLoLiu5VK3e6vvVUPl0TOmHwVrdvDSxdqS3IciqNwzTm8UMSxWQe K8zg== 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:mime-version :content-transfer-encoding; bh=2jloSvCky1XZpMKAVDD/veonE94c99Tu0OnU7LPgcZY=; b=3k/KAm++T3xOT8EaXj4oPw5yjftVS1nHmHHFbRVtwRb4bRLtgWZDJdgiPYhUMgq/EA DS4VJQ3fKoHScXC4RhyYBFitx+RmlV0Ha6yKueTD3FF1/hdPkQVho6FOp/v8NenoPJi1 aiJFxdjXEZOmkprOU41+/4SCHOL7IYP/17ALu6sMtRDKtSxT9lo/YDcAYb8iwmk2aOYA uGKYb6dhhcIVTISMBAcxGQmk8HRFGoaY27naekpbCitTlLWRaJ9vchKdli5ROdo5s6op At/DBEpLfouXN+K1+AZtkueku2yDgq3GljSdAcPaVia7TaY+aJjJfCYdJXA2e67CvFs9 gyAQ== X-Gm-Message-State: AOAM532H88nzX/bJPLBtqBgHN+bOwBN9msiCWWWN7g8TjNoTTVSHp64z fg26Oebp2h87xAiXgUXrRqL9zg== X-Google-Smtp-Source: ABdhPJyio3Ex0a3J3yXHHyh4E2Tl6q75zp2oYcFfHUpJkQgwtoUGvomLsjDShH+aWJT2Ks0hdygReg== X-Received: by 2002:a05:600c:3788:: with SMTP id o8mr15379427wmr.82.1639135322816; Fri, 10 Dec 2021 03:22:02 -0800 (PST) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id z18sm2198469wrq.11.2021.12.10.03.22.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 03:22:02 -0800 (PST) From: David Plowman To: Laurent Pinchart , Kieran Bingham , Hans Verkuil , Tomasz Figa , Jacopo Mondi , Naushir Patuck , libcamera-devel@lists.libcamera.org Date: Fri, 10 Dec 2021 11:21:34 +0000 Message-Id: <20211210112142.18441-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v11 0/8] Colour spaces 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" Hi again So here now is v11, which has just hoovered up those mostly minor items from Laurent, so thank you very much for those. The only point of note is that I made the to/fromColorSpace methods protected, only to discover that I then couldn't move the logging messages in there because they're static member functions. Is there some cunning workaround for this? Other than that, I think we're getting pretty close! Thanks again and best regards David David Plowman (8): libcamera: Add ColorSpace class libcamera: stream: Add ColorSpace fields to StreamConfiguration libcamera: video_device: Convert between ColorSpace class and V4L2 formats libcamera: video_device: Support passing ColorSpaces to V4L2 video devices libcamera: v4l2_subdevice: Add colorSpace field to V4L2SubdeviceFormat libcamera: v4l2_subdevice: Support passing ColorSpaces to V4L2 subdevices libcamera: Add validateColorSpaces to CameraConfiguration class libcamera: pipeline: raspberrypi: Support color spaces include/libcamera/camera.h | 10 + include/libcamera/color_space.h | 70 ++++ include/libcamera/internal/v4l2_device.h | 8 + include/libcamera/internal/v4l2_subdevice.h | 3 + include/libcamera/internal/v4l2_videodevice.h | 3 + include/libcamera/meson.build | 1 + include/libcamera/stream.h | 3 + src/libcamera/camera.cpp | 80 +++++ src/libcamera/camera_sensor.cpp | 1 + src/libcamera/color_space.cpp | 317 ++++++++++++++++++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/ipu3/cio2.cpp | 7 +- .../pipeline/raspberrypi/raspberrypi.cpp | 40 +++ src/libcamera/pipeline/simple/simple.cpp | 8 +- src/libcamera/stream.cpp | 20 ++ src/libcamera/v4l2_device.cpp | 194 +++++++++++ src/libcamera/v4l2_subdevice.cpp | 25 +- src/libcamera/v4l2_videodevice.cpp | 32 ++ 18 files changed, 816 insertions(+), 7 deletions(-) create mode 100644 include/libcamera/color_space.h create mode 100644 src/libcamera/color_space.cpp