{"id":9645,"url":"https://patchwork.libcamera.org/api/1.1/covers/9645/?format=json","web_url":"https://patchwork.libcamera.org/cover/9645/","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":"<20200918094233.5273-1-naush@raspberrypi.com>","date":"2020-09-18T09:42:21","name":"[libcamera-devel,v8,00/12] 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/9645/mbox/","series":[{"id":1295,"url":"https://patchwork.libcamera.org/api/1.1/series/1295/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1295","date":"2020-09-18T09:42:21","name":"Zero-copy RAW stream work","version":8,"mbox":"https://patchwork.libcamera.org/series/1295/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/9645/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 E9A98C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 18 Sep 2020 09:43:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 487B262FB1;\n\tFri, 18 Sep 2020 11:43:57 +0200 (CEST)","from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 80D7C60367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 18 Sep 2020 11:43:55 +0200 (CEST)","by mail-wr1-x431.google.com with SMTP id e16so4955528wrm.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 18 Sep 2020 02:43:55 -0700 (PDT)","from naushir-VirtualBox.pitowers.org\n\t([2a00:1098:3142:14:a00:27ff:fe4d:f6a2])\n\tby smtp.gmail.com with ESMTPSA id\n\tn2sm4792472wma.29.2020.09.18.02.43.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 18 Sep 2020 02:43:53 -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=\"JIJ6t16s\"; 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=7kMhUF+YAuDJnuxuR8bsx+I4/zt11xRwomq8dwpvBB8=;\n\tb=JIJ6t16szPE/oBjDOqvd2v4kZbfM552DNpAB+K9RgZHbr4toO9R3MYcDT5ksL8Qps6\n\tko/p/et+d72AHu98WGQRqBeoayVrc912c8oIPdLXue/r57di3O/Pz/F5ubR6adG8pFxe\n\tgsFe80zppICEMlqTQZyVq3hjMwVQa2bS1JpphYggLCoYWboceRH0bpMw5IlyoTtuDMki\n\t5qNsoY1sMig6REEPwXV4ZChunIQxIrS49c2qNAOrlz5zj4vPdsXsYOEYFoeUZs9wm1xt\n\t/URXUfZU0aTseccjRIu46EQzlF9CanUCykP5enCtcj70Ldf2TCASxgby/hj9ZPapvHlg\n\t0Y0w==","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=7kMhUF+YAuDJnuxuR8bsx+I4/zt11xRwomq8dwpvBB8=;\n\tb=Wna1oNb2lEW1e1xA41tAJMJtWmc5N2WMNozG6nZs97kdLuHFBZb9TTZcv5EgVmP+mq\n\tlMbRlV7eESOhHme55EoY1SaZZBu/fRjMJ3v6twpMoQkAtrR1MJJEAyRcb5kqdv9VcOxd\n\tI0JXlOxiV8TmZN4Rf0pUJtNTEwNijXqCdL2bj4WSWffiojZteWZRyntAD1u00atO4C06\n\tgFkvp+z+Q8OtqZyuO5cX5hlcePSRDmRxaYB3gK9Fhgl9l/oq9qIhe5/6RludxWJ1fIgM\n\tbyeoVP8vIJERJBe+YA85wjh5tCjUPE6Wk7wgGx9OzNEyBGOzvH4YDM5JalsaPOgWXHxZ\n\tRtuA==","X-Gm-Message-State":"AOAM530SuWmhJo1/Gxw3F1r/YmDuNvcRUoCyoQGX31rDmSCmNh9iygRf\n\tl6RuXBNQKflQsnxszYp+jMQt1dRzDImLDA==","X-Google-Smtp-Source":"ABdhPJzw3yRi9NcbaVCiTaAYHXDVupSFkwYTUDfgWtfwrJXPX1j+Ce2+OLIZLST1tQnqgJ4Gno+d2w==","X-Received":"by 2002:a5d:60c6:: with SMTP id x6mr3519834wrt.157.1600422234496;\n\tFri, 18 Sep 2020 02:43:54 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 18 Sep 2020 10:42:21 +0100","Message-Id":"<20200918094233.5273-1-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v8 00/12] 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 all,\n\nHere is patch v8 for the zero-copy work.  The only difference between this and v7 is how the stream internally generates ids for buffers.  To keep things modular, i've added a IdGenerator class in patch 10/12.  This simply uses an incrementing counter and stores a queue of retuned ids for reuse.  If we decide that something more efficient may be needed (e.g. Laurent's idea of using a bitfield, assuming we can ensure we have limited set of buffers in flight), then it should be easy enough just to change the class implementation.  However, for now, I think this implementation provides a good compromise between simplicity and performance.\n\nThanks,\nNaush\n\n\nNaushir Patuck (12):\n  libcamera: pipeline: raspberrypi: Move RPiStream into a separate file\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: ipa: raspberrypi: Remove use of FrameBuffer\n    cookie\n  pipeline: raspberrypi: Use an unordered_map for the stream buffer list\n  pipeline: raspberrypi: Use an unordered_set to store IPA buffer ids\n  pipeline: ipa: raspberrypi: Handle any externally allocated\n    FrameBuffer\n\n include/libcamera/ipa/raspberrypi.h           |  13 +-\n src/ipa/raspberrypi/raspberrypi.cpp           |  26 +-\n .../pipeline/raspberrypi/meson.build          |   1 +\n .../pipeline/raspberrypi/raspberrypi.cpp      | 575 ++++++++----------\n .../pipeline/raspberrypi/rpi_stream.cpp       | 236 +++++++\n .../pipeline/raspberrypi/rpi_stream.h         | 180 ++++++\n 6 files changed, 681 insertions(+), 350 deletions(-)\n create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.h"}