{"id":16945,"url":"https://patchwork.libcamera.org/api/covers/16945/?format=json","web_url":"https://patchwork.libcamera.org/cover/16945/","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":"<20220803112640.30402-1-jacopo@jmondi.org>","date":"2022-08-03T11:26:32","name":"[libcamera-devel,v6,0/8] libcamera: Map multiple V4L2 formats to a single libcamera::format","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/cover/16945/mbox/","series":[{"id":3368,"url":"https://patchwork.libcamera.org/api/series/3368/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3368","date":"2022-08-03T11:26:32","name":"libcamera: Map multiple V4L2 formats to a single libcamera::format","version":6,"mbox":"https://patchwork.libcamera.org/series/3368/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/16945/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 933B2C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Aug 2022 11:26:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0ABCF603E6;\n\tWed,  3 Aug 2022 13:26:53 +0200 (CEST)","from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 90F07603E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Aug 2022 13:26:51 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 470AD1BF203;\n\tWed,  3 Aug 2022 11:26:48 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659526013;\n\tbh=uU+IUBGESwQUoHw9ID6FYqV+qleaYFoduTjFhxwbwuQ=;\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=ymL8LJzppgs1UINDLt1LeYLdbvQCPaGMAFNpx8jp/tT8DxfSev24HThKF2M0Y1NLl\n\tx/ZO6zK8VEVgQpGWijwvc4yfMLNT7Ev/3Hyb07nV3yjfoWdFjZdCKtUDnGyox/q9mu\n\tw13+mG9kQTFBCMhdJns3Utmz5v2yaXZFtYqwAjkCLjns8DS2AIGn6DeoMEzLfu4D9j\n\tLGp9YMT0JWh9hV47LztIwiA8+FOQmfHmb2oLVFBEfRI5COwWkAZc/32fDCFmPRcu2e\n\tLDPGU/CaomQYuL9tLB/5+i+iRRpiyeNDKnLJvVqVIgRrbCcnQSF2P3M/WRvky6Zeq3\n\tMRI5UPTkeSlpA==","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  3 Aug 2022 13:26:32 +0200","Message-Id":"<20220803112640.30402-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.37.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v6 0/8] libcamera: Map multiple V4L2\n\tformats to a single libcamera::format","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"jozef@mlich.cz, Pavel Machek <pavel@ucw.cz>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This series addresses the requirement of mapping multiple V4L2 pixel formats\nto a single libcamera format. Specifically, it allows to map V4L2_PIX_FMT_JPEG\nand V4L2_PIX_FMT_MJPEG to libcamera::formats::MJPEG.\n\nWhen testing on Pinephone I was able to capture JPEG (but not to inspect images)\nand YUYV. This time the sensor didn't fail me, and I was able to run a preview\nstream on the pinephone using the SDL backend.\n\nv5->v6:\n- Break-out Laurent's patch that introduces std::hash<V4L2PixelFormat>\n\nv4->v5:\n- Use std::hash<V4L2PixelFormat> specialization\n- Address Laurent's comment on 5/6\n- Add a tiny patch for the developer guide\n\nv3->v4:\n- Move 2/6 at the beginning and simplify it\n- Biggest change is in V4L2VideoDevice where formats are now collected in an\n  unordered_set<> requiring V4L2PixelFormat to be instrumented with an Hash\n  function object to allow it to be stored in an unordered STL container\n- Minor changes in comments/wording and Laurent's tags\n\nv2->v3:\n- Resorted patches as suggested by Laurent\n- Remove 'multiplanar' argument in the call chain\n- Cache the V4L2VideoDevice formats at open() time\n\nv1->v2:\n- Add a missing conversion using the video device in Simple converter\n- Map formats::MJPEG to V4L2_PIX_FMT_JPEG in v4l2 formats enumeration\n\nJacopo Mondi (7):\n  libcamera: formats: Reimplement V4L2 PixelFormatInfo::info()\n  libcamera: formats: Merge V4L2 single and multi formats\n  guides: pipeline handler: Remove rogue spaces\n  libcamera: v4l2_videodevice: Reintroduce toV4L2PixelFormat()\n  libcamera: v4l2_pixelformat: Return the list of V4L2 formats\n  libcamera: v4l2_videodevice: Match formats supported by the device\n  libcamera: formats: Map V4L2_PIX_FMT_JPEG to formats::MJPEG\n\nLaurent Pinchart (1):\n  libcamera: v4l2_pixelformat: Implement std::hash specialization\n\n Documentation/guides/pipeline-handler.rst     |   9 +-\n include/libcamera/internal/formats.h          |   5 +-\n include/libcamera/internal/v4l2_pixelformat.h |  18 +-\n include/libcamera/internal/v4l2_videodevice.h |   6 +\n src/libcamera/formats.cpp                     | 318 ++++--------------\n src/libcamera/pipeline/ipu3/cio2.cpp          |   2 +-\n src/libcamera/pipeline/ipu3/imgu.cpp          |   2 +-\n .../pipeline/raspberrypi/raspberrypi.cpp      |  34 +-\n src/libcamera/pipeline/rkisp1/rkisp1_path.cpp |   6 +-\n src/libcamera/pipeline/simple/converter.cpp   |  10 +-\n src/libcamera/pipeline/simple/simple.cpp      |   4 +-\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |   6 +-\n src/libcamera/pipeline/vimc/vimc.cpp          |   8 +-\n src/libcamera/v4l2_pixelformat.cpp            |  24 +-\n src/libcamera/v4l2_videodevice.cpp            |  61 +++-\n src/v4l2/v4l2_camera_proxy.cpp                |   6 +-\n test/libtest/buffer_source.cpp                |   2 +-\n 17 files changed, 211 insertions(+), 310 deletions(-)\n\n--\n2.37.1"}