{"id":18708,"url":"https://patchwork.libcamera.org/api/covers/18708/?format=json","web_url":"https://patchwork.libcamera.org/cover/18708/","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":"<20230606103336.17782-1-jacopo.mondi@ideasonboard.com>","date":"2023-06-06T10:33:32","name":"[libcamera-devel,v5,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/18708/mbox/","series":[{"id":3909,"url":"https://patchwork.libcamera.org/api/series/3909/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3909","date":"2023-06-06T10:33:32","name":"libcamera: rkisp1: Fix generateConfiguration","version":5,"mbox":"https://patchwork.libcamera.org/series/3909/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/18708/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 220AAC3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Jun 2023 10:33:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 756B862892;\n\tTue,  6 Jun 2023 12:33:53 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id ECD5C62722\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Jun 2023 12:33:51 +0200 (CEST)","from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D4DC105;\n\tTue,  6 Jun 2023 12:33:26 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1686047633;\n\tbh=oMEWLht72sqD1+xkME4lCe0KN7D5yClCMIOmsr8Oz4E=;\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=WKKmE1MBMak2HdfEgC2581AzOWz1bOyE27Gxm2PYz245YOv0vMntqDXf7p5JNJ5Uf\n\tpfC4b0yVl+QdfWIHeQQpYzBtikxLq+9ap9GiK53msicqnoivG+e4AkAf8zuSHNJGDt\n\to66h1ArvrPf4ACW8Jrg7pW61d2cbCchIIYFX7oayegi9a805Q953trUTAYLcM2sLQP\n\txIpDITeB+aaMukpBh1EKyTsBYZm3nEUctTqhO1ipsXf6FFptqYvkU/+XyjO0gh9fJU\n\tKtH5qGz0ll+CYpt8NeH40CEl76og9Qh3WEguNqkwF5hU/h0o2wgjNHXTR0juKlFJaS\n\tcuNnUBToJ1nUw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1686047606;\n\tbh=oMEWLht72sqD1+xkME4lCe0KN7D5yClCMIOmsr8Oz4E=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=cvo9OBgVtUy9muR7wIRvKdb8Zevo/TAC3fEBdHTmrM0x/AM+HpOme9EDNhSkEkoK9\n\tedKK5KunAwBfDg4H8KV9YknuHjrQhZC7AwdgIYAcmMZIy4rRi5ihLaioo7VCkSel0g\n\t0G678QE9NzIPWZ7owmFgIJda31NokrBzDom9vk7k="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"cvo9OBgV\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Tue,  6 Jun 2023 12:33:32 +0200","Message-Id":"<20230606103336.17782-1-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.40.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v5 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\nv4->v5:\n- Check for max size width and height separately in 4/4\n- Fix the cropping rectangle centering in 2/4\n- Add todo notes\n- Add reviewed-by notes\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      | 32 +++++++++-----\n src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 42 ++++++++++++++++---\n src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  1 +\n 3 files changed, 59 insertions(+), 16 deletions(-)\n\n--\n2.40.1"}