From patchwork Fri Dec 10 14:44:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 15113 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 7B85ABF415 for ; Fri, 10 Dec 2021 14:44:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7FAB76089C; Fri, 10 Dec 2021 15:44:38 +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="rqFoWptA"; dkim-atps=neutral Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 34AC660868 for ; Fri, 10 Dec 2021 15:44:37 +0100 (CET) Received: by mail-wr1-x434.google.com with SMTP id i5so15331799wrb.2 for ; Fri, 10 Dec 2021 06:44:37 -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=38ydoVzEjRyVk7uiwhO7tuBSUdQ5l1eOfswX5fta6Fk=; b=rqFoWptAQgf2m46nBnuUTJp2IqgB934ehFGZ8OXa1s62ATcj5am8zVMgUQLb8PRqzh agFGG1P5rsisKYqhlLeP7k7O9KBs/HlrDtbiRkS3EvP/dh7G9GeAcR9S94+uYvNSc3OR wdNlVISSPUYqNcLYPgGIUpr1WD/Ej7kX08lJXtq3SDLfVItP+yivtKTD4zTAjSPt6MsA +bfwbYN/N4N/pY0ZrKeN/FpoH8VItLuBBMpJZi7f9eh6Mq9L7HNuF1D5kA02YHjiwD7x WRzPE22SzE7dl/DO1miorU2s/RqUMZ2AbAn9MWgYOjk+EjrgIxNkzCM3jQcxydySkL5B fugg== 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=38ydoVzEjRyVk7uiwhO7tuBSUdQ5l1eOfswX5fta6Fk=; b=HPgmcsTjD8bKj+OuGvfi3cbh4sCHY+SQLzoJffM8A+urDh2236tMS5PIFXX2SYuVuQ 2NBtlNveruT627GVEpvC4U9pIIsqZubAsgMjARvg7DRpoSHA9FRk0uV0hUPGSpVRHoSZ YOrFHP68YFO5sj9NBcPFHj4uSPpXwPvyPsVDj47xWF/Vp9XgU39aKDMGYZ6GPHL2t5Uy SP9GpxQWjq6PI/LRwwkz8PIRkWBrf+xbjRVJEPb29P76PW4Cq04dy3xJ23pDptVrRIDo ndSiyslmVAEXnHCCMk/vZgatFfrqpHzDboxIc1OiS+pg4ZiPThmblenXoLk3skGSCPmh CU6g== X-Gm-Message-State: AOAM533wPzdMVNFNPxTGC/nQgdIftOa1sjFYENkSQ+3HOU+MKBh8yLYV qJiDMm8CjE5zgMKdFgbqfidhvg== X-Google-Smtp-Source: ABdhPJwMIvrgRgDunbN+WvcJ/adVCSzXaVr0CAHKOnuQzmK/+RpRSIGGZKdqK50Umgb5p2Sst9/XwA== X-Received: by 2002:a5d:60d0:: with SMTP id x16mr15049877wrt.103.1639147476646; Fri, 10 Dec 2021 06:44:36 -0800 (PST) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id w22sm3000515wmi.27.2021.12.10.06.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 06:44:36 -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 14:44:16 +0000 Message-Id: <20211210144424.14747-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v12 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 v12 fixes a few small things over v11: * In patches 3/8, 4/8 and 5/8 the warning messages are moved into those static member functions. * In patch 7/8 a bug crept into the validateColorSpaces method at some point, so I've fixed that. * There were a few minor/cosmetic things that I'd missed, so apologies for those. Hopefully I've got them all now! Thanks again 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 | 83 +++++ 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 | 210 ++++++++++++ src/libcamera/v4l2_subdevice.cpp | 18 + src/libcamera/v4l2_videodevice.cpp | 22 ++ 18 files changed, 819 insertions(+), 6 deletions(-) create mode 100644 include/libcamera/color_space.h create mode 100644 src/libcamera/color_space.cpp