From patchwork Fri Oct 29 13:23:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 14424 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 DC494BF415 for ; Fri, 29 Oct 2021 13:23:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2417C600C3; Fri, 29 Oct 2021 15:23:49 +0200 (CEST) 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="L3DDAWaU"; dkim-atps=neutral Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 449C1600B8 for ; Fri, 29 Oct 2021 15:23:47 +0200 (CEST) Received: by mail-wr1-x435.google.com with SMTP id d3so16129270wrh.8 for ; Fri, 29 Oct 2021 06:23:47 -0700 (PDT) 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=Qw41KQSfW7aa/vXGngLbTdP+L5PzLptf6NbrBzZopiU=; b=L3DDAWaUhSmXLllz2bmYqUifKwa8R4ejWMKXUvE0abCx/z++xwfI4TPvDKqEEjEGmG 4JBMFqGhLs3uu7o4kg6WNhOJwkTmDntoWpGuVDL22enVVI6Gwd7sFqRz2I5qiqff79Qd Pjso2S9L5F4ye60z0BWi/aZHqmb8eTK1YVAqJcGZN9wEaWgkp3fl/pcuRjbUDv6FFO/C h4KG015m00VydEqIGcVPGZ/HsPvF0iCYGiY/E7TiHQHfRkWDrIfhIOnX0AuVErshM1T4 5DKixEy9YXiVP1xCZX4gl0gIIrb3vJ86+e/WDCT8gDd7JS5otExzUDwZ6gDzj9EASGzO jyzw== 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=Qw41KQSfW7aa/vXGngLbTdP+L5PzLptf6NbrBzZopiU=; b=eZgge9r37MCrvA8k2ekJCDTZLflYH3dp9M2MSrE/yBZ8B6E+9NE3uut0DboNtiPcDH lv8RHaDjGpJWaKm2D8cG4xFOEq81/sH/kuyZEY68tHPRRZyOMkqnp+d5dvcn/727Warm DX/v/qksmBkM+fcMDBIVF0AnrHgCZSNdN6/Z10TistlgpeCZu1Fuc7lOuQheF7ihjEJw 1jkNIL6CvsBvrxtzFBsNazudjIdAv4X5rYXREv/W11DuFyuZNGDSU9uSXKaxFdWNgrys acoVCHZqPd2feuoJqfN8uhTEJ0O63pRACxY4AjDn9NtGmut7wwGCEhgtDelchjxA1CUG 89JQ== X-Gm-Message-State: AOAM533IYc9IVNjJhOIZiEEmtw5jDoFVUJX1HlU8xmII0SGmyx8euFoz rIL5qmiU7yGpJlLPHdpKgPbiQecBRj+/pw== X-Google-Smtp-Source: ABdhPJzJyyVJb8kXcSj6NJ/HvvY9lzv/EKdio8iECmn5dPw2MNYYl4mjqn9nPdzxfT662exdt1kAMg== X-Received: by 2002:adf:a350:: with SMTP id d16mr14496483wrb.136.1635513826710; Fri, 29 Oct 2021 06:23:46 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:1ce1:9965:4328:89c4]) by smtp.gmail.com with ESMTPSA id l7sm111934wrf.31.2021.10.29.06.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 06:23:46 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Fri, 29 Oct 2021 14:23:36 +0100 Message-Id: <20211029132343.1629-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/7] 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 A fairly small update to this set, to adopt a couple of things from Naush and to fix a minor conflict. Mostly things are unchanged, so the highlights are: * ColorSpace class as before. * Two ColorSpace fields in the StreamConfiguration, so that validate() can't cause a configuration to become unusable. * I'm not currently signalling errors if the V4L2 classes get passed undefined ColorSpaces. Perhaps something to add once all pipeline handlers are upgraded? * And I'm happy to add commits to fill in a basic level of colour space handling in other pipeline handlers (please let me know). Thanks! David David Plowman (7): 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: 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 | 88 ++++++ 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 | 4 + src/libcamera/camera.cpp | 51 ++++ src/libcamera/camera_sensor.cpp | 1 + src/libcamera/color_space.cpp | 257 ++++++++++++++++++ src/libcamera/meson.build | 1 + .../pipeline/raspberrypi/raspberrypi.cpp | 42 +++ src/libcamera/stream.cpp | 25 ++ src/libcamera/v4l2_device.cpp | 171 ++++++++++++ src/libcamera/v4l2_subdevice.cpp | 37 ++- src/libcamera/v4l2_videodevice.cpp | 67 ++++- 16 files changed, 753 insertions(+), 5 deletions(-) create mode 100644 include/libcamera/color_space.h create mode 100644 src/libcamera/color_space.cpp