{"id":17378,"url":"https://patchwork.libcamera.org/api/covers/17378/?format=json","web_url":"https://patchwork.libcamera.org/cover/17378/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220919025709.34528-1-rishikeshdonadkar@gmail.com>","date":"2022-09-19T02:57:08","name":"[libcamera-devel,v6,0/1] Provide multiple colorimetry for libcamerasrc.","submitter":{"id":118,"url":"https://patchwork.libcamera.org/api/people/118/?format=json","name":"Rishikesh Donadkar","email":"rishikeshdonadkar@gmail.com"},"mbox":"https://patchwork.libcamera.org/cover/17378/mbox/","series":[{"id":3490,"url":"https://patchwork.libcamera.org/api/series/3490/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3490","date":"2022-09-19T02:57:08","name":"Provide multiple colorimetry for libcamerasrc.","version":6,"mbox":"https://patchwork.libcamera.org/series/3490/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/17378/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D534EC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 19 Sep 2022 02:57:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4C76B6218E;\n\tMon, 19 Sep 2022 04:57:29 +0200 (CEST)","from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com\n\t[IPv6:2607:f8b0:4864:20::52c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 96E7D61F7F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Sep 2022 04:57:27 +0200 (CEST)","by mail-pg1-x52c.google.com with SMTP id f193so1357575pgc.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 18 Sep 2022 19:57:27 -0700 (PDT)","from localhost.localdomain ([49.36.97.74])\n\tby smtp.googlemail.com with ESMTPSA id\n\ta3-20020a656403000000b0042b291a89bfsm17303922pgv.11.2022.09.18.19.57.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 18 Sep 2022 19:57:25 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1663556249;\n\tbh=QpfT3FzLWcazZJ6aCgtVgde1GD2yXxKzljSu2r0Oq+g=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=rD0eyqs21Kyak2KwyQYpnJxitLVDjeqM9DLkNKZAcuBCZA+VbPfNHsc/i8+GXtpTy\n\tDwlnKWyd/0ODWP/usH7kLlxHVspANPnEt+IsC7vPRDSYo8wlwrqpLryJGvFbA2x1D8\n\tHubQfD0JiswmQJqTvYaO2FveEwpQJ1VYCjQRM8scOrLNldQV9dZbJV3ron7ejJwxRc\n\tCkBSfHbJtgIGy/oJIkrWZofVSdqbGb+0vIzcH//sk3QPpJSDgpBAu1emewQnfUYX0S\n\tMIAU4W5mtydlJR8wH/35V2k0OBm7IuIjyG4C16jPXbc30retyAETiC9R6v7FUzZD+u\n\t7mGOcOuurASWw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date;\n\tbh=aXflS0/6ntledaHUPmpLXTLiLzhYuA8b1OQ1jTv1KVQ=;\n\tb=DmOgplhCxzALXjcKB3W1pQS+lMGpfugONECyn+TmzcPT9A10DvehCk3sXDMXFhA/+l\n\t65i44mYEUe/3hvwxNyubEaqSHogSnbcqUmlgI4Prv0hdFgPtTGaY/UuA9AY/jXIYBKQe\n\tEUClKdGcT3/n/j0tFLtCpKFhI35qxm88QS5R/c6bx1kdUSwyE/NRZWWOVeqcGv1xhFGU\n\tNRTIKbpBN2eumOVznXKW2tigRdcceQCskVZPVuH+bWoNH+9iyv4bYCwTUnic+pyu49Jp\n\tUlqsAkZziINzdPfT/uVUtUbmI+/HHiRFQj0X3u2RqAsbrhmppI8Bfmp5P2NRM3NozigX\n\turTQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"DmOgplhC\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date;\n\tbh=aXflS0/6ntledaHUPmpLXTLiLzhYuA8b1OQ1jTv1KVQ=;\n\tb=f6rRki6cYnx+tX4a9+EFKAblr0TyYT799NWo9kun7x7kIRmyJb/Vuir7qZveVgr02T\n\tmPTlL1XNCu+aLs5Z4xza9e9z0kq21eTpUnh8H5YA7DBEA0wSH3Oc5PEFXDFlNRGkI44n\n\tvnWSxagLU2IpxkYW0jLbvs3N0pzXJkexDShgA4aurLPkm4AlzED0+dXYJcFHmR4khcBl\n\tm6nAVRWJdmwO6xuQc87KaLXPqrm6Z9U0VxrdcFV+/hMoHb3e2TbIGYe+ViZ0WObW9pO8\n\tB5vXpU5kWMgxF8HqYb/dE1QKdDnUBx6R07/9tugYDqrl7fh9/WYwuEflg7kiSyY2xYTV\n\tYkxw==","X-Gm-Message-State":"ACrzQf2AGbSUqA2xrKsJM3SLJAFBvQ44iYbAiNQHBcjUqyNi67nMYyf3\n\tRNCkd6AMBrJ/Y6GD3o48uLrTBDfUxbc=","X-Google-Smtp-Source":"AMsMyM4y6UlmoqTNPZxSLqLRXsj3CJDxNK6iHkmJ5zVMWcqjshqkKrlwqpVgN7jm0iDPYHlo/gzVcQ==","X-Received":"by 2002:a63:191d:0:b0:434:4bb3:e016 with SMTP id\n\tz29-20020a63191d000000b004344bb3e016mr14332694pgl.133.1663556245541; \n\tSun, 18 Sep 2022 19:57:25 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 19 Sep 2022 08:27:08 +0530","Message-Id":"<20220919025709.34528-1-rishikeshdonadkar@gmail.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v6 0/1] Provide multiple colorimetry for\n\tlibcamerasrc.","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Rishikesh Donadkar via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Rishikesh Donadkar <rishikeshdonadkar@gmail.com>","Cc":"nicolas.dufresne@collabora.com, vedantparanjape160201@gmail.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"GStreamer pipeline supports passing multiple colorimetry as a comma\nseparated list.\n\nFor Example :\n\ngst-launch-1.0 libcamerasrc ! \"video/x-raw,colorimetry={bt2020,bt709,sRGB}\" ! glimagesink\n\nIn this case, if supported by the camera one of bt2020, bt709, sRGB\nshould be applied.\n\nThis series aims to adds multiple colorimetry support to the libcamera\ngstreamer element.\n\n---\nchanges from v1 to v2:\n- Moved the function colorspace_from_colorimetry() from PATCH 1/2 to\n  PATCH 2/2.\n\nchanges from v2 to v3:\n- Rebase on top of [v3 PATCH 4/4] gstreamer: Provide colorimetry <> ColorSpace mappings.\n- Use the comparator utility function gst_video_colorimetry_is_equal()\n  to cut down code.\n- Rename dup_stream_cfg to pristine_stream_cfg.\n- Log the colorimetry that is selected from the list.\n- Change the API for the function gst_libcamera_configure_stream_from_caps()\n  to pass pass state->config_ here instead of taking it in a holder\n  variable reference.\n\nchanges from v3 to v4:\n- Discard the approach form expanding the colorimetry list through caps\n  normalization. Instead enumerate the colorimetry list and try out the\n  colorimetry.\n- Add error checking for invalid colorimetry.\n\nchanges for v4 to v5:\n- Use gboolean instead of int. Return true/false.\n- Add else if for the mutually exclusive conditions.\n- Add final else to trace if anything other than a string or a list is\n  passed in the colorimetry field by the user.\n\nchanges from v5 to v6:\n- Compare colorspace instead of colorimetry, this will reduce the\n  colorimetry<->colorspace conversion.\n- Compare the colorspace applied directly with the colorimetry requested\n  in the caps.\n---\n\n----\nTest results(on RPi 4 + OV5647):\ngst-launch-1.0 libcamerasrc ! \"video/x-raw,colorimetry={bt2020,bt709,sRGB}\" ! glimagesink\nSelected colorimetry bt709\n\ngst-launch-1.0 libcamerasrc ! \"video/x-raw,colorimetry={sRGB,bt601,bt2020,bt709}\" ! glimagesink\nNegotiation fails on bt601.\n\ngst-launch-1.0 libcamerasrc ! \"video/x-raw,colorimetry={sRGB,bt601,bt2020,bt709,2:4:5:4}\" ! glimagesink\nSelected colorimetry bt601.\n\ngst-launch-1.0 libcamerasrc ! \"video/x-raw,colorimetry={sRGB,bt709,bt2020,bt601}\" ! glimagesink\nSelected colorimetry bt709\n----\n\nRishikesh Donadkar (1):\n  gstreamer: Provide multiple colorimetry support for libcamerasrc\n\n src/gstreamer/gstlibcamera-utils.cpp | 49 +++++++++++++++++++++++-----\n src/gstreamer/gstlibcamera-utils.h   |  4 ++-\n src/gstreamer/gstlibcamerasrc.cpp    |  2 +-\n 3 files changed, 44 insertions(+), 11 deletions(-)"}