{"id":8691,"url":"https://patchwork.libcamera.org/api/1.1/covers/8691/?format=json","web_url":"https://patchwork.libcamera.org/cover/8691/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20200709084128.5316-1-jacopo@jmondi.org>","date":"2020-07-09T08:41:08","name":"[libcamera-devel,v2,00/20] libcamera: ipu3: Rework configuration","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/cover/8691/mbox/","series":[{"id":1091,"url":"https://patchwork.libcamera.org/api/1.1/series/1091/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1091","date":"2020-07-09T08:41:08","name":"libcamera: ipu3: Rework configuration","version":2,"mbox":"https://patchwork.libcamera.org/series/1091/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/8691/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 34CF3BD790\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Jul 2020 08:38:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C9F9B61186;\n\tThu,  9 Jul 2020 10:38:01 +0200 (CEST)","from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2946E61158\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Jul 2020 10:38:00 +0200 (CEST)","from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 0EEFD10001C;\n\tThu,  9 Jul 2020 08:37:58 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu,  9 Jul 2020 10:41:08 +0200","Message-Id":"<20200709084128.5316-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.27.0","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 00/20] libcamera: ipu3: Rework\n\tconfiguration","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hello,\n   this second version combines what was sent in v1 to just rework the\nstream validation process with the computation of the ImgU configuration\nparameters.\n\nThe series steers things in the opposite direction compared to v1 when it\ncomes to stream assignment. V1 moved stream assignment to configure(), we\nhere retain it in validateion AND remove it from configure(), by using\nStreamConfiguration::setStream() to remove the custom array of Streams that\nwas used to keep the association in place.\n\nIn order to be able to use setStream() at validate() time, the Camera class has\nbeen changed to not zero the streams array between calls to the pipeline handler\nvalidate() and configure() functions. The intent of that sequence was to make\nsure streams where populated after configure(), the restriction that that has\nto happen at configure and not validate is now lifted, and what we only care\nabout is that -after- validate+configure we have streams correctly populated.\n\nWhen reworking validation all the assumptions about how streams have to be\nassigned have been reworked, allowing multiple YUV outputs and not restricting\nthe usage of the main output to streams which are full-size only.\n\nThe ImgU outputs are now always (at least) 32 pixels in size smaller than\nthe input frame. This is not a requirement stated anywhere in the documentation,\nbut inspecting the xml configuration file for ChromeOS and the results from\nthe pipe configuration tool[1] it seems best results are obtained by giving the\nIF and BDS components at least 32 pixels to scale/crop.\n\nSpeaking of pipe configuration, IF, and BDS, this series introduces in the\nIPU3 pipeline handler dynamic calculation of the pipeline intermediate\ncomponents sizes, by importing the procedures implemented in the pipeline\nconfiguration script provided by Intel:\n\n[1] https://github.com/intel/intel-ipu3-pipecfg\n\nThe tool has been first ported as a standalone C++ application, its computation\nverified against the python script results, and then integrated in the IPU3\npipeline handler.\n\nThe computed results match the python script ones for all the cases I have\ntested (all the stream combination modes, and configurations with explicit\nsizes).\n\nUnfortunately, the parameters computed by the python tool differs from the ones\nreported in the ChromeOS .xml configuration files. A github issue has been\nopened asking for directions, but as of now, we can only assume the script\nis correct.\n\nAs now we calculate the proper pipeline configuration, restrictions on the\nmaximum available sizes have been removed as well.\n\nJacopo Mondi (20):\n  libcamera: ipu3: Rename mbusCodesToInfo\n  libcamera: ipu3: Remove streams from generateConfiguration\n  libcamera: ipu3: Make sure the config is valid\n  libcamera: ipu3: cio2: Report format and sizes\n  libcamera: ipu3: Do not overwrite StreamConfiguration\n  libcamera: ipu3: Report StreamFormats\n  libcamera: ipu3: Remove initialization of Size\n  libcamera: ipu3: Validate the stream combination\n  libcamera: camera: Zero streams before validate()\n  libcamera: ipu3: Adjust and assign streams in validate()\n  libcamera: ipu3: Adjust full frame picture to 32 pixels\n  libcamera: ipu3: Always use the maximum frame size\n  libcamera: ipu3: Store CameraData as mutable in CameraConfiguration\n  libcamera: ipu3: Remove streams from IPU3CameraConfiguration\n  libcamera: ipu3: Remove camera_ from IPU3CameraConfiguration\n  libcamera: geometry: Add isNull() function to Rectangle class\n  libcamera: ipu3: imgu: Calculate ImgU pipe configuration\n  libcamera: ipu3: Calculate ImgU pipe configuration\n  lbcamera: ipu3: Configure ImgU with the computed parameters\n  libcamera: ipu3: imgu: Rename configureInput()\n\n include/libcamera/geometry.h         |   1 +\n src/libcamera/camera.cpp             |   4 +-\n src/libcamera/geometry.cpp           |   6 +\n src/libcamera/pipeline/ipu3/cio2.cpp |  58 +++-\n src/libcamera/pipeline/ipu3/cio2.h   |   5 +\n src/libcamera/pipeline/ipu3/imgu.    |   0\n src/libcamera/pipeline/ipu3/imgu.cpp | 401 +++++++++++++++++++++++++--\n src/libcamera/pipeline/ipu3/imgu.h   |  22 +-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 389 ++++++++++++--------------\n 9 files changed, 648 insertions(+), 238 deletions(-)\n create mode 100644 src/libcamera/pipeline/ipu3/imgu.\n\n--\n2.27.0"}