{"id":18422,"url":"https://patchwork.libcamera.org/api/covers/18422/?format=json","web_url":"https://patchwork.libcamera.org/cover/18422/","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":"<20230321172004.176852-1-jacopo.mondi@ideasonboard.com>","date":"2023-03-21T17:20:00","name":"[libcamera-devel,v4,0/4] libcamera: rkisp1: Fix generateConfiguration","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/18422/mbox/","series":[{"id":3809,"url":"https://patchwork.libcamera.org/api/series/3809/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3809","date":"2023-03-21T17:20:00","name":"libcamera: rkisp1: Fix generateConfiguration","version":4,"mbox":"https://patchwork.libcamera.org/series/3809/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/18422/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 2E815C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Mar 2023 17:20:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B94A62710;\n\tTue, 21 Mar 2023 18:20:13 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1394461ED1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Mar 2023 18:20:12 +0100 (CET)","from uno.homenet.telecomitalia.it\n\t(host-87-18-61-243.retail.telecomitalia.it [87.18.61.243])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 370D810B;\n\tTue, 21 Mar 2023 18:20:11 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679419213;\n\tbh=BEDuFBa88PNQkhxS5xKRjTA0DEbIlMKzGS4351RgIWc=;\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=2Toyey8Nq+HC+FY5KtGe9UYX9g1Grm1BDVUaRbSxOmjPs6YXJYxumGYthcbocoWlc\n\tiTYg1bBWpCWmALLAjTGpf1c7HqKsRuBf5P0wIUVixZJBRtRd5ayPFCJVBmLA5IckHc\n\tElhJOizSqhHRr2v+i7LxAO5Gsel39A/5JgYWkR40FFJGXrw8k/Rk1ONETA7jj2XYl4\n\tn5T3AdptynrzFBvZQMDjNuc3ozLNX6twblZ42KRwpSJkqovxfkmGkYLRIfZ7W9tcPH\n\tq1E6xBGl116Lgi9mzwzQprLWWR66q/8XLk7f9XNvyeRYUpcbHtQAmyku2PDwkJkTqr\n\tleoFSKLWtP1UQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1679419211;\n\tbh=BEDuFBa88PNQkhxS5xKRjTA0DEbIlMKzGS4351RgIWc=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=FJxZa39b9KYQD3fhINatnEhXMaRste0Em3U9gZeKtopqeULTin1F4CFuKPlNirGoP\n\tXE6F/Q/oUZyieCdw6ZPhV0CxGbVVqGLY4udHAY8aCf4zJ51CnMKHW0b6aPn2lpRTCm\n\tpfqlVHo2f94sJacH0R3LzioGd2FTyOepuea/7bmM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"FJxZa39b\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 21 Mar 2023 18:20:00 +0100","Message-Id":"<20230321172004.176852-1-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.40.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 0/4] libcamera: rkisp1: Fix\n\tgenerateConfiguration","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.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, libcamera@luigi311.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The series started with bug 180:\nhttps://bugs.libcamera.org/show_bug.cgi?id=180\n\nPatch 1 fixes the bug by using main path if a single stream is requested\n\nI have then noticed how the current implementation of\nRkISP1Path::generateConfiguration() could produce unusual sizes, such as\n1920x1432 in case the sensor's resolution is larger than the maximum supported\n1920x1920 output.\n\nBefore assigning fixed sizes to StreamConfiguration, Laurent pointed out\nthat we should maintain pixel square before downscaling. Add 2/4 for that\nreason\n\nFinally 4/4 \"fixes\" generatation of RAW stream formats, by listing all\nsupported sensor's resolutions, and only report them when the raw stream\nis requested (this is debatable).\n\nTested on Pinephone Pro with imx258 camera.\n\nv3->v4:\n- Drop \"Reserve main path for StillCapture\" to continue prioritize the\n  stream role order when assigning outputs\n- Add \"Crop on ISP before downscaling\" to address Laurent's comment on\n  maintaining pixel square\n\nv2->v3:\n- Add review tags\n- Improve 3/4 as suggested by Paul\n\nv1->v2:\n- Enumerate StreamFormats for all the available size and not limited to the\n  current output size. This allows to enumerate higher resolutions even if the\n  desired role has a smaller resolution.\n\n  In example:\n  gst-launch-1.0 libcamerasrc camera-name=\"/base/i2c\\@ff110000/camera\\@1a\" ! 'video/x-raw,format=NV12,width=4208,height=3120' ! glimagesink\n\n  which used to fail now works correctly\n\n- Enumerate all the RAW sizes the sensor can produce but only if the requested\n  role is StreamRole::Raw\n\nJacopo Mondi (4):\n  libcamera: rkisp1: Generate config using main path\n  libcamera: rkisp1: Crop on ISP before downscaling\n  libcamera: rkisp1: Assign sizes to roles\n  libcamera: rkisp1: Fix enumeration of RAW formats\n\n src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 22 ++++++------\n src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 34 ++++++++++++++++---\n src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  1 +\n 3 files changed, 42 insertions(+), 15 deletions(-)\n\n--\n2.40.0"}