From patchwork Tue Aug 2 18:57:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 16917 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 D8860C3275 for ; Tue, 2 Aug 2022 18:57:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 364616330E; Tue, 2 Aug 2022 20:57:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659466649; bh=wK7PUsN38xSt3g0g8lx4/Zxi7ir3J1wpYTPcgmbxXWA=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=OPCUGDyqW2CigXJTYjF7shsD27jw3oQKba+vyvjFV7Rpc6hFiPjYPShrrCddJFhnv YlA9DzaUDDnNMbE4RUXflUHYiftYmScVk2ku+RqEp2pfoBqlaAqPMWtmrVSsbQtNz5 2Tk6t+2C+HjbsA5AbFPUZzhC4MOhwXUZlqTc9LYFl6vJlJFbcQQm41e5V9nz5Gn7d1 rQr/2149EK9iLSTQn5O628EsKtFjv579o/gyrwDu9AhGMQIUxk8FZqdo3dG6bw9wJi Z1QR97GI0BdKm8phVdY57EOOpcSQikYolaI/V5WQ4eojmg1WldwwFAT+rJtcUE/IBP lrWfXUT5Ec+Dg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2E923603E7 for ; Tue, 2 Aug 2022 20:57:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="WyeW6Zxb"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [IPv6:2401:4900:1f3f:85c2:5ee8:5bb8:aca7:5517]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 71A1825B; Tue, 2 Aug 2022 20:57:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659466647; bh=wK7PUsN38xSt3g0g8lx4/Zxi7ir3J1wpYTPcgmbxXWA=; h=From:To:Cc:Subject:Date:From; b=WyeW6ZxbI9IVrL4iTIAYKRvgj13/oFQWRp4LQvhBVj26xSOx3dzxKGEzje8EVle0a 7OqOk6WcfEMTKozUnahSy7BFGBPtOJ2OqaOsR6mWsk68jFDx6o4mBX7XU7kS1S/Nfa kEoGBQmrJTzp3h09P1XbizTkediLnnxSbSX5HS78= To: libcamera-devel@lists.libcamera.org Date: Wed, 3 Aug 2022 00:27:15 +0530 Message-Id: <20220802185719.380855-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/4] Colorspace adjustments and gstreamer mapping 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: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Cc: rishikeshdonadkar@gmail.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" RFC for first three patches and v3 for gstreamer mappings. Mainly the first 3 patches, adjusts ColorSpace::Srgb to define a sRGB colorspace space. It also accompanied with a colorspace adjustment API if sRGB is used with YUV. More such adjustments can be built on top using the ColorSpace::adjust(StreamConfiguration) API. Rishikesh Donadkar (1): gstreamer: Provide colorimetry <> ColorSpace mappings Umang Jain (3): libcamera: colorspace: Rectify ColorSpace::Srgb preset libcamera: colorspace: Adjust colorspace of YUV streams tests: stream: Add a colorspace adjustment test include/libcamera/color_space.h | 6 + src/gstreamer/gstlibcamera-utils.cpp | 176 +++++++++++++++++++++++++++ src/libcamera/camera.cpp | 11 ++ src/libcamera/color_space.cpp | 70 ++++++++++- src/libcamera/v4l2_device.cpp | 2 - test/stream/meson.build | 1 + test/stream/stream_colorspace.cpp | 57 +++++++++ 7 files changed, 315 insertions(+), 8 deletions(-) create mode 100644 test/stream/stream_colorspace.cpp