[{"id":20071,"web_url":"https://patchwork.libcamera.org/comment/20071/","msgid":"<YVxJmf5ItyzgyJkH@pendragon.ideasonboard.com>","date":"2021-10-05T12:48:25","subject":"Re: [libcamera-devel] [PATCH v2 0/3] Colour spaces","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nOn Mon, Sep 27, 2021 at 01:33:24PM +0100, David Plowman wrote:\n> Hi again\n> \n> Thanks for all the feedback on the previous version. There's not\n> really any change in functionality here though I have in the main\n> taken people's suggestions on board. Just a few notes on some of that:\n> \n> * I've de-inlined some code. I've left operator!= inline, though, as\n>   there seemed to be some precedent for that.\n> \n> * I haven't replaced that vector by a map because it would require us\n>   to have an ordering for ColorSpaces (operator< etc.). I seem to\n>   recall inventing arbitrary orderings in the past, I guess it depends\n>   which approach we dislike least... thoughts?\n\nHow about using std::unordered_map<> ?\n\n> * The ColorSpace now gets updated after a tryFormat. Thanks for\n>   pointing that out.\n> \n> One final question in relation to this: I was hoping not to list every\n> last colour space variant that exists in V4L2, mostly because many of\n> them seem quite esoteric to me. Or would we rather simply mirror\n> everything in V4L2 straight away?\n\nThat's fine with me as long as we make this extensible.\n\n> David Plowman (3):\n>   libcamera: Add ColorSpace class\n>   libcamera: Support passing ColorSpaces to V4L2 drivers\n>   libcamera: pipeline: raspberrypi: Support colour spaces\n> \n>  include/libcamera/color_space.h               |  83 +++++++\n>  include/libcamera/internal/v4l2_videodevice.h |   2 +\n>  include/libcamera/meson.build                 |   1 +\n>  include/libcamera/stream.h                    |   3 +\n>  src/libcamera/color_space.cpp                 | 207 ++++++++++++++++++\n>  src/libcamera/meson.build                     |   1 +\n>  .../pipeline/raspberrypi/raspberrypi.cpp      |  84 +++++++\n>  src/libcamera/v4l2_videodevice.cpp            | 119 ++++++++++\n>  8 files changed, 500 insertions(+)\n>  create mode 100644 include/libcamera/color_space.h\n>  create mode 100644 src/libcamera/color_space.cpp","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 CC177BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  5 Oct 2021 12:48:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3B6466918C;\n\tTue,  5 Oct 2021 14:48:34 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E5CBF684C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 Oct 2021 14:48:32 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6F9E025B;\n\tTue,  5 Oct 2021 14:48:32 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"WgK45mnP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633438112;\n\tbh=9N6nonh1UtE5pjPNI8AflC6QoqtAL+FhM3FsJXem5KA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WgK45mnPnWw3hRHutM+hR9ss86sgAwVIMdsZrEFfcrC8UesIo+N8N8FAJBJeeFx2t\n\tiqTqhqAz93n4Z30oEuWrmpPthxDZqgwhd0p4z7nAY0jerUoErfI0dR1g5lUirxW5lV\n\tI7GPLAA/YErGEv/cs7IBj6WK0rggED2y6lPlwi2Q=","Date":"Tue, 5 Oct 2021 15:48:25 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YVxJmf5ItyzgyJkH@pendragon.ideasonboard.com>","References":"<20210927123327.14554-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210927123327.14554-1-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v2 0/3] Colour spaces","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]