From patchwork Wed Aug 17 17:25:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rishikesh Donadkar X-Patchwork-Id: 17143 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 60018BE173 for ; Wed, 17 Aug 2022 17:26:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8246261FC0; Wed, 17 Aug 2022 19:26:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1660757167; bh=X77HgUymeb6wNnABk/tTSPY/YwGgeF11cbZ6i+6BNsk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=LSHGmWOicAdXg/YfW87eYWGjpaz37n9oJyM3Aa2QRmje5A+mxCzDEzgaCtKcR8qo3 NyD7pXezkUbky+jWxZIExfXDEpx07vIKX+6b7cgYvUag4Gk8WLXHEBDPp0T4qx8DfS KGLWd6f4+U6fJ4XRbLZTw/ZWAIV3BZqz/nTlENc78tXPVCB4zWcnJUoyp3A2Myql6F PKictpsAAaGOiZ149IQXnig+yoCH3aUz2sqIui+gBCTb96f1EdUsR8ApoTdPAJpa5S o9T+jn00xmTns2mfQWTYairYu1vgik0sg8kIRgYl62xmvVCepgihS/+ikP4fY8mk4L pCCpnAMQO0YrQ== Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C331F61FA8 for ; Wed, 17 Aug 2022 19:26:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="o36TmkYM"; dkim-atps=neutral Received: by mail-pl1-x629.google.com with SMTP id m2so12562801pls.4 for ; Wed, 17 Aug 2022 10:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=cAySzkIt1fdhC6XMW++7iHJ1m+IA/KddgAkT9Jw1DEQ=; b=o36TmkYMFtGr1jvF/Vg5odPiv3kUhe0ii0CSf6dlQnpf9sWPA/OrBUqs9f4OT9qpo9 iJmDxKAHsupQCzDE41XcxBegsgLSiUI1fej0T8rKj0Fqv9aRzGr3Y0WcMXK8Es3t1Is4 hTpJa2PTRnZCc8+acj71AoiMIt1ss+L/+TsT6YamgBz0xY3qS/DcafLo1Rs9ceZjpWFy PAGuShN3RpBkuvk77YpxjNdadhXj8zewBonnjZ52aGGzRQIFQpA8yRQ0GZ7Vk841nrDK Kcn6gaJKrMnbv59HNMntiliKTJY+APk6JX9wYgXAjMk40jdersbrKlivk2X2QNynCGld 1S8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=cAySzkIt1fdhC6XMW++7iHJ1m+IA/KddgAkT9Jw1DEQ=; b=Yj3j8zthXzo3szDm322hU9ySoiB3Fi3B+d6GD/TMH/PvC/LaYdyQq2QlSSf7krxFIR ZmYN9sgXGo1wZkXX5XvB3kXkY24Qq//Kf1UXzSpJtvFE1r16ABH3VbHfW9RxOwYCGRv9 Pu5LOFKHqJOugEF9je26hx9i1Vt0EW2cgPA6STmk1qU74GvpYPf9+QIRvG6lNL5/qWYF DexIk3AEGUfPLT/JKOunaKLkPCG7qIT97rPRT1uvgqnz7kfUOj6b5K4HSc2rYpttnjvh ZE3PNJPlbHBtM+Nk7TOzyJiXoq8rWaQ1L2BTMTs7h4Oy+8lwqEkXI3vIgMsD4pFuNFqv buag== X-Gm-Message-State: ACgBeo3LvrRPqb77+L1rYCSABUYGZL/b944ZZgjMxvv8h/18BIxYP312 i5WG0IwLaKR9GRNH76Tavwm/V0EBE08b3w== X-Google-Smtp-Source: AA6agR41J0jVuksCU+4ZRDmgvwy7BwBzVJeWyxRIubuz43KInzdoDNYthS+iKwTwAckLnvkzxtw1dA== X-Received: by 2002:a17:90a:19d:b0:1f7:2b1a:947a with SMTP id 29-20020a17090a019d00b001f72b1a947amr4906504pjc.118.1660757163795; Wed, 17 Aug 2022 10:26:03 -0700 (PDT) Received: from localhost.localdomain ([49.36.99.40]) by smtp.googlemail.com with ESMTPSA id j5-20020a170902da8500b0016be834d54asm142071plx.306.2022.08.17.10.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 10:26:03 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 17 Aug 2022 22:55:40 +0530 Message-Id: <20220817172541.72339-1-rishikeshdonadkar@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/1] Multiple colorimetry support for libcamerasrc 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: Rishikesh Donadkar via libcamera-devel From: Rishikesh Donadkar Reply-To: Rishikesh Donadkar Cc: Rishikesh Donadkar , nicolas.dufresne@collabora.com, vedantparanjape160201@gmail.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" GStreamer pipeline supports passing multiple colorimetry as a comma separated list. For Example : gst-launch-1.0 libcamerasrc ! "video/x-raw,colorimetry={bt2020,bt709,sRGB}" ! glimagesink In this case, if supported by the camera one of bt2020, bt709, sRGB should be applied. This series aims to adds multiple colorimetry support to the libcamera gstreamer element. ... Based on top of [v3 PATCH 4/4] gstreamer: Provide colorimetry <> ColorSpace mappings. https://patchwork.libcamera.org/project/libcamera/list/?series=3360 ... --- changes from v1 to v2: - Moved the function colorspace_from_colorimetry() from PATCH 1/2 to PATCH 2/2. changes from v2 to v3: - Rebase on top of [v3 PATCH 4/4] gstreamer: Provide colorimetry <> ColorSpace mappings. - Use the comparator utility function gst_video_colorimetry_is_equal() to cut down code. - Rename dup_stream_cfg to pristine_stream_cfg. - Log the colorimetry that is selected from the list. - Change the API for the function gst_libcamera_configure_stream_from_caps() to pass pass state->config_ here instead of taking it in a holder variable reference. changes from v3 to v4: - Discard the approach form expanding the colorimetry list through caps normalization. Instead enumerate the colorimetry list and try out the colorimetry. - Add error checking for invalid colorimetry. --- Rishikesh Donadkar (1): gstreamer: Provide mulitple colorimetry support src/gstreamer/gstlibcamera-utils.cpp | 75 +++++++++++++++++++++------- src/gstreamer/gstlibcamera-utils.h | 4 +- src/gstreamer/gstlibcamerasrc.cpp | 2 +- 3 files changed, 62 insertions(+), 19 deletions(-)