{"id":10074,"url":"https://patchwork.libcamera.org/api/1.1/patches/10074/?format=json","web_url":"https://patchwork.libcamera.org/patch/10074/","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":"<20201016053754.17251-2-email@uajain.com>","date":"2020-10-16T05:37:53","name":"[libcamera-devel,v2,1/2] android: post_processor: Introduce a PostProcessor interface","commit_ref":"3d946a2e609ced0331563558e120361f153ef442","pull_url":null,"state":"accepted","archived":false,"hash":"e0eb8f157d0e015eca28b453689b0408976ff1ba","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/people/1/?format=json","name":"Umang Jain","email":"email@uajain.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10074/mbox/","series":[{"id":1377,"url":"https://patchwork.libcamera.org/api/1.1/series/1377/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1377","date":"2020-10-16T05:37:52","name":"android: Introduce PostProcessor interface","version":2,"mbox":"https://patchwork.libcamera.org/series/1377/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10074/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10074/checks/","tags":{},"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 5FB63BE174\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 16 Oct 2020 05:38:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2D42460E5A;\n\tFri, 16 Oct 2020 07:38:06 +0200 (CEST)","from mail.uajain.com (static.126.159.217.95.clients.your-server.de\n\t[95.217.159.126])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 531EB60354\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Oct 2020 07:38:04 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"HTDZhIxF\"; dkim-atps=neutral","From":"Umang Jain <email@uajain.com>","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail;\n\tt=1602826683; bh=KTlKugmAmfObqwGs37aWbkUtA/JAOec/2eR28mqa27c=;\n\th=From:To:Cc:Subject:In-Reply-To:References;\n\tb=HTDZhIxFxjzREwaQ8dNYPmzinKUObaXkrSQAKlpa8u82y5Q9tOPSCZGz5vrjERDfv\n\tZBKiAg+6fNwH+flcGWhh3eZtSrb6ksxBpfdK4hPDIZykaff5SNd0awBaniVia/jhID\n\tIeuJayPzjdwpQXtbYK5pqyiTB/FhWzyDVphtbcKjRVOQ5RLFflmHLzNSQkYNdUZFIR\n\tjLN/wUm3gz1J1mpZ7rlultfWVV3tD/G6FHcInYsxexwdqOWnzjPU6JiYSk/E8m59je\n\tfy46LdmCjWWEBNBvEUrvawMUr9ScNYIps1dk+NYEgM3jtg2l99i5IkUodffgfHJa2b\n\t/orSq2curNyRA==","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 16 Oct 2020 11:07:53 +0530","Message-Id":"<20201016053754.17251-2-email@uajain.com>","In-Reply-To":"<20201016053754.17251-1-email@uajain.com>","References":"<20201016053754.17251-1-email@uajain.com>","Mime-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 1/2] android: post_processor: Introduce\n\ta PostProcessor interface","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":"Introduce a PostProcessor interface for the streams that require any\nkind of processing (refer to CameraStream::Type) for their consumption\nby the HAL layer. The PostProcessor interface can be configured via\nconfigure() and the actual processing can be initiated using process().\n\nThe post-processing layer can be extended to have multiple post\nprocessors for various stream configurations. As of now, we only have\none post processor (JPEG), hence the subsequent commit will port its\nfunction to this interface.\n\nSigned-off-by: Umang Jain <email@uajain.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/post_processor.h | 28 ++++++++++++++++++++++++++++\n 1 file changed, 28 insertions(+)\n create mode 100644 src/android/post_processor.h","diff":"diff --git a/src/android/post_processor.h b/src/android/post_processor.h\nnew file mode 100644\nindex 0000000..a891c43\n--- /dev/null\n+++ b/src/android/post_processor.h\n@@ -0,0 +1,28 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2020, Google Inc.\n+ *\n+ * post_processor.h - CameraStream Post Processing Interface\n+ */\n+#ifndef __ANDROID_POST_PROCESSOR_H__\n+#define __ANDROID_POST_PROCESSOR_H__\n+\n+#include <libcamera/buffer.h>\n+#include <libcamera/span.h>\n+#include <libcamera/stream.h>\n+\n+class CameraMetadata;\n+\n+class PostProcessor\n+{\n+public:\n+\tvirtual ~PostProcessor() {}\n+\n+\tvirtual int configure(const libcamera::StreamConfiguration &inCfg,\n+\t\t\t      const libcamera::StreamConfiguration &outCfg) = 0;\n+\tvirtual int process(const libcamera::FrameBuffer *source,\n+\t\t\t    const libcamera::Span<uint8_t> &destination,\n+\t\t\t    CameraMetadata *metadata) = 0;\n+};\n+\n+#endif /* __ANDROID_POST_PROCESSOR_H__ */\n","prefixes":["libcamera-devel","v2","1/2"]}