{"id":8750,"url":"https://patchwork.libcamera.org/api/1.1/covers/8750/?format=json","web_url":"https://patchwork.libcamera.org/cover/8750/","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":"<20200713084727.232422-1-naush@raspberrypi.com>","date":"2020-07-13T08:47:18","name":"[libcamera-devel,WIP,0/9] Zero-copy RAW stream work","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"mbox":"https://patchwork.libcamera.org/cover/8750/mbox/","series":[{"id":1100,"url":"https://patchwork.libcamera.org/api/1.1/series/1100/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1100","date":"2020-07-13T08:47:18","name":"Zero-copy RAW stream work","version":1,"mbox":"https://patchwork.libcamera.org/series/1100/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/8750/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 3E60ABD790\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Jul 2020 08:47:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA401605B4;\n\tMon, 13 Jul 2020 10:47:35 +0200 (CEST)","from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 676DD6055F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Jul 2020 10:47:34 +0200 (CEST)","by mail-wm1-x334.google.com with SMTP id j18so12484906wmi.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Jul 2020 01:47:34 -0700 (PDT)","from naushir-VirtualBox.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tg14sm23203357wrm.93.2020.07.13.01.47.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 13 Jul 2020 01:47:33 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Lu1BWRt9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=l4GQcte6WruaPFP0ijJ706A69abSIPxOkAsmMQZVBJM=;\n\tb=Lu1BWRt9APFGc8crDbLvLHjSBB/Obs4janMCPgbKl3n7snUwZ8CKlTfpWubkAfG9aT\n\tpngF/YsZEy7EMGZv/qm6otuvarfs19YjK73etipLOXXLz2yJYiouIq5hBQYkxqtHe6U7\n\t/5LHo83d7sgA4mkxaWujYI/4yppYRQK4W9CfmyWnDWfVOBaL/KfVcQ8w9NINkYwK5fmN\n\t+vtSeIUDPHh84HUkq5pAEdhtIVz9iovryJ8V0H1rrJw7Nlh7bB39nJ5XLjpyhNwdF/8l\n\tRlKrZV9kdSAoDodrI2dLAnkSMe9c95NFEAVB3iYhHQeISqJZX0ySHry5FKZKzgMj1T5T\n\tWf0A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=l4GQcte6WruaPFP0ijJ706A69abSIPxOkAsmMQZVBJM=;\n\tb=tF9B3BAPrL9e1lb8SHDvJz0T7RWHNxFEPoR8mFUCVjZTeOrwp5R5+yfxHyq2pYpEd7\n\t8L/kWRXsjomnrDtZF9iQAB7jjz9qRW/eTXAbidvHqRHngXbOInSvXArGmkVd+ssx9/PZ\n\tlepE0w0RVdihFVILNTFSxsuB0kJ743USewVPrMc8Tk0fci+I5p57gP1HEi4VJuxKoPbx\n\t/pyizSTXJMINEEURiAzy/A1AnXzCegrk6a+/lfriejpGFFuE0ku4jyiSVSLqbh2DuTDz\n\t4pWjetp1x8hKw4D0b47vNLeQXAXNv9Y/LpbWB3x8kQwDYPV0hqsQrYNN0uNGBCGXbQ8m\n\tAVCw==","X-Gm-Message-State":"AOAM531N8UVhfjJgSYFktSWpO6CYTYuJ5ptYZoMZSSVueaHWfuTsfSOz\n\tVuw6uXP4MHez9Xd/6gap/ukB3U7qgzo=","X-Google-Smtp-Source":"ABdhPJxlHUfBQMx4O27zimCQv8aLguTVzzVIPXuUfliej0F1KQanHJUWGfKpayoNmSEb88n1vadE7A==","X-Received":"by 2002:a7b:c763:: with SMTP id x3mr16912229wmk.47.1594630053686;\n\tMon, 13 Jul 2020 01:47:33 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 13 Jul 2020 09:47:18 +0100","Message-Id":"<20200713084727.232422-1-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Subject":"[libcamera-devel] [WIP PATCH 0/9] Zero-copy RAW stream work","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":"Hi,\n\nHere is a preliminary set of patches to rework the Raspberry Pi stream handling to\nsupport zero-copy captures.  The biggest change here is that we now export/import\nbuffers for all our streams, instead of v4l2_videodevice::allocate().  This will\nallow any stream buffer to be returned to the application without a copy step.\nThis includes the statistics buffer (once we have a mechanism for requesting it).\n\nThis is still a work in progress, and in particular, patch 2 needs to be reworked\nonce Laurent's change for passing IPA configuration parameters is merged.  However,\neverything else is in a more-or-less finished state, so I would appreciate any\ncomments.\n\nRegards,\nNaush\n\n\nNaushir Patuck (9):\n  libcamera: pipeline: raspberrypi: Move RPiStream into a separate\n    header\n  libcamera: pipeline: ipa: raspberrypi: Rework drop frame signalling\n  libcamera: pipeline: raspberrypi: Add some debug logging\n  libcamera: pipeline: raspberrypi: Increase the number of RAW buffers\n  libcamera: pipeline: raspberrypi: Remove const qualifier from\n    RPiStream\n  libcamera: pipeline: raspberrypi: Rework stream buffer logic for\n    zero-copy\n  libcamera: pipeline: raspberrypi: Fix bug in passing configuration to\n    IPA\n  libcamera: pipeline: raspberrypi: Add more robust stream buffer logic\n  libcamera: pipeline: raspberrypi: Move RPiStream methods to a cpp file\n\n include/libcamera/ipa/raspberrypi.h           |   2 +-\n src/ipa/raspberrypi/raspberrypi.cpp           |  21 +-\n .../pipeline/raspberrypi/meson.build          |   1 +\n .../pipeline/raspberrypi/raspberrypi.cpp      | 415 ++++++------------\n .../pipeline/raspberrypi/rpi_stream.cpp       | 167 +++++++\n .../pipeline/raspberrypi/rpi_stream.h         | 154 +++++++\n 6 files changed, 464 insertions(+), 296 deletions(-)\n create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.h"}