From patchwork Wed Dec 1 15:44:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 14973 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 16C07BDB13 for ; Wed, 1 Dec 2021 15:45:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 666A460744; Wed, 1 Dec 2021 16:45: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="N2C+Q2JQ"; dkim-atps=neutral Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DF31D60743 for ; Wed, 1 Dec 2021 16:45:02 +0100 (CET) Received: by mail-wr1-x431.google.com with SMTP id q3so30383881wru.5 for ; Wed, 01 Dec 2021 07:45:02 -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=3HPB2+nyV052sSYQt37NpuQLI0FViFzwk1sllZ/mKNY=; b=N2C+Q2JQLFtrREDKoIm+A8eedkwdc9SU/9lWDQn2PJKc4UXSeAdoCb//mIVhAiqZdr Otkz+eSJnkyWX8TmaTqz/7VYGuK1UIaQpL6UzmWIpfaNPTOgOVwu1kIQ5G5ixNgnBYF4 QHJbWiFHAiQIEOFKwRxk9CdgyyTm93ZDwvLthOyGYvht6d5VQNk2wabMeXAhScDjNaHS Lyi4OjDjzySk7Ocby1RJD8EtUZjMgMSh4gxCYnodHh871xwLuGR2NHq37M86cXBnAQ/a G3W06TOyluNpTiMW6YnjzUpC6AthIwKkFAiVgtRwPdQXTT7dmKOCCxyCZtBGZH7wZB6C fmQg== 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=3HPB2+nyV052sSYQt37NpuQLI0FViFzwk1sllZ/mKNY=; b=4t+j+sTUVz2f+hO/qCXPDgqrDruLGtfI00OJaMQokwUyJlNu9tbVA+IEAL2gTmPERi tbeDfQwKeGd8ygFjE7OawtTr4kbAvst9fSrWvI16FQ7u61kElV8QEYUiCEnjJhoSnc+w rOzo/epYV6k6aZWUM4N4aUO4017TCg5wQRbk7NyOBZgfzCJaX8GehLJPVNj18B5jwY8Q /PTiYQezOLXdNGOBbQenS/TwnsG6G3OQB/1ufCyMCn6G18k9A/krsHpDglA7WxD9/XDr 3qymPA1OMVOUpLwtq/1PhzsEu26652d0QRHT7xtucMEl63PWT8pwQr39Sgx/zVK6EnQT pGcw== X-Gm-Message-State: AOAM5330pV8ISoXc999VGpaI3syADG+3QtILtXadSGgi+fyQB3zRUund HpGSOyCDrFb3Zowq/NyMpUAVBahf+VBl3xOV X-Google-Smtp-Source: ABdhPJy+tr2gt79ajcpEuQW++/VJZ1CB+ftT4SlNkOLadkGs2jGDjeaPBwYAQmys1PbGYWvbpq0xcw== X-Received: by 2002:adf:dc0a:: with SMTP id t10mr7698614wri.8.1638373502311; Wed, 01 Dec 2021 07:45:02 -0800 (PST) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id y7sm148209wrw.55.2021.12.01.07.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 07:45:01 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org, Laurent Pinchart , Kieran Bingham , Jacopo Mondi , Hans Verkuil , Tomasz Figa , Naushir Patuck Date: Wed, 1 Dec 2021 15:44:26 +0000 Message-Id: <20211201154434.23127-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 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 everyone This version of this patch set takes most of Jacopo's suggestions from his recent reviews, so thanks very much for those! The most obvious difference is that the patch which adds a ColorSpace to the V4L2SubdeviceFormat has been broken into two. The first adds the field and fixes some brace initializers that were broken; the second actually deals with handing the ColorSpace to/from V4L2. I thought it might be a bit clearer like that. Best regards David David Plowman (8): libcamera: Add ColorSpace class libcamera: Add ColorSpace fields to StreamConfiguration libcamera: Convert between ColorSpace class and V4L2 formats libcamera: Support passing ColorSpaces to V4L2 video devices libcamera: Add colorSpace field to V4L2SubdeviceFormat libcamera: Support passing ColorSpaces to V4L2 subdevices libcamera: Add validateColorSpaces to CameraConfiguration class libcamera: pipeline: raspberrypi: Support color spaces include/libcamera/camera.h | 2 + include/libcamera/color_space.h | 69 ++++ include/libcamera/internal/v4l2_device.h | 7 + include/libcamera/internal/v4l2_subdevice.h | 2 + include/libcamera/internal/v4l2_videodevice.h | 2 + include/libcamera/meson.build | 1 + include/libcamera/stream.h | 3 + src/libcamera/camera.cpp | 69 ++++ src/libcamera/camera_sensor.cpp | 1 + src/libcamera/color_space.cpp | 305 ++++++++++++++++++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/ipu3/cio2.cpp | 7 +- .../pipeline/raspberrypi/raspberrypi.cpp | 43 +++ src/libcamera/pipeline/simple/simple.cpp | 8 +- src/libcamera/stream.cpp | 20 ++ src/libcamera/v4l2_device.cpp | 192 +++++++++++ src/libcamera/v4l2_subdevice.cpp | 25 +- src/libcamera/v4l2_videodevice.cpp | 32 ++ 18 files changed, 782 insertions(+), 7 deletions(-) create mode 100644 include/libcamera/color_space.h create mode 100644 src/libcamera/color_space.cpp