[{"id":24336,"web_url":"https://patchwork.libcamera.org/comment/24336/","msgid":"<20220803114955.GD311202@pyrite.rasen.tech>","date":"2022-08-03T11:49:55","subject":"Re: [libcamera-devel] [PATCH v6 0/8] libcamera: Map multiple V4L2\n\tformats to a single libcamera::format","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Jacopo,\n\nOn Wed, Aug 03, 2022 at 01:26:32PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> This series addresses the requirement of mapping multiple V4L2 pixel formats\n> to a single libcamera format. Specifically, it allows to map V4L2_PIX_FMT_JPEG\n> and V4L2_PIX_FMT_MJPEG to libcamera::formats::MJPEG.\n> \n> When testing on Pinephone I was able to capture JPEG (but not to inspect images)\n> and YUYV. This time the sensor didn't fail me, and I was able to run a preview\n> stream on the pinephone using the SDL backend.\n\nThis makes YVU422 work on rkisp1 \\o/\n\nTested-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> \n> v5->v6:\n> - Break-out Laurent's patch that introduces std::hash<V4L2PixelFormat>\n> \n> v4->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> \n> v3->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> \n> v2->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> \n> v1->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> \n> Jacopo 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> \n> Laurent 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> --\n> 2.37.1\n>","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 DA799BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Aug 2022 11:50:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 532B861FAE;\n\tWed,  3 Aug 2022 13:50:05 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B86CF603E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Aug 2022 13:50:03 +0200 (CEST)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A7F4F8B;\n\tWed,  3 Aug 2022 13:50:01 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659527405;\n\tbh=pUBYdSAklCfITHsd/BC/UWfVsJVhqt9BaiIfWIsCO4k=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=oY3PGck5Pc63OXWSIO4qUWRMrLfo3+qbPKIMRkJcpvhISUUo7VeOI2klyAsTFIKm4\n\tYKLYPUzsb/f28DAgHQOYobBe/zmQg21ySZZoQ7OkjYVmB2Za1Ia/Z6J0IuDpDO351F\n\tYImo+VIR93nSFbb5MMUsKl8iRARQfW2zIWAq8H/eSZeu4DhTQJZYUHA/EaflxKcKKE\n\t+9ez2DXfifXRQTUanluYrtEtgdmlvscD+D8OG1/iWt5AZieHzJcvManWjkczPqxGGT\n\tOuTgyOp9TscEeaiTc7Eb+sQ+W/jKomx1E7O68wmdoFEe/TpWiUS0ekvcNqjdiSCc4o\n\tIHzlUF9sEUzmw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659527403;\n\tbh=pUBYdSAklCfITHsd/BC/UWfVsJVhqt9BaiIfWIsCO4k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CYVL7SzDA9xuATM/ozxe+3eyPP77pCnw4DxA+QQN4pYM/EujnjBdS8qRl0JQhSj8W\n\t/LNLksvhFmwlC7YkodfEEHFM8gJVOCeEbhqncZfhPl2X3lyYA3JJzNW5CR2Gbm/yKw\n\tIni7QavlysyrH7RY8uUQMpJMZakDIzPs2Xxpuv6E="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"CYVL7SzD\"; dkim-atps=neutral","Date":"Wed, 3 Aug 2022 20:49:55 +0900","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20220803114955.GD311202@pyrite.rasen.tech>","References":"<20220803112640.30402-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220803112640.30402-1-jacopo@jmondi.org>","Subject":"Re: [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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org, jozef@mlich.cz,\n\tPavel Machek <pavel@ucw.cz>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]