From patchwork Thu Oct 8 14:10:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 10022 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 576E6BEEE0 for ; Thu, 8 Oct 2020 14:11:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 258E8605D1; Thu, 8 Oct 2020 16:11:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="VOxFZ5c1"; dkim-atps=neutral Received: from mail.uajain.com (static.126.159.217.95.clients.your-server.de [95.217.159.126]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 932B26035D for ; Thu, 8 Oct 2020 16:10:58 +0200 (CEST) From: Umang Jain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail; t=1602166258; bh=73s4xjI1ABvJvhINL3UUIfGgLTKIalqMEcGIFiei4Jc=; h=From:To:Cc:Subject:In-Reply-To:References; b=VOxFZ5c1vnvOUKDkLdPq+6LD95iyz1ntDY1YfLB7UWONXUDeupgQDexG2ilSkNoU0 HQkVbQRAS/Awkz/uAiZddvouvDophD+xjZLVa/2UWi5orGHJzQxsqiL5tMtiUJL/0X eh/PQjqvUO4Gq4gfKTbF08ZDnA7RPs7dzLTcBFpZ8obK/MYbxnUGEqturyxpf+Id3U vtjSdM9sOObujGPsn+BqBlmkGZUYL/Pk4Er6jSpayXwv+ug9DdWONFPyJpThl0YeCT z594Ssqvqs6qqjGrIdhpQqgJXp+lBwRKIejvm6vr6bWFPkz+10N7D8bKy4zj++xtko u6YOAmG268MYQ== To: libcamera-devel@lists.libcamera.org Date: Thu, 8 Oct 2020 19:40:36 +0530 Message-Id: <20201008141038.83425-2-email@uajain.com> In-Reply-To: <20201008141038.83425-1-email@uajain.com> References: <20201008141038.83425-1-email@uajain.com> Mime-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 1/3] android: post_processor: Introduce a PostProcessor interface X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Introduce a PostProcessor interface for the streams that require any kind of processing for their consumption by the HAL layer. The PostProcessor interface can be configured via configure() and the actual processing can be initiated using process(). The interface is similar to the Encoder interface. The PostProcessor is meant to replace the Encoder interface and introduce a more generic post-processing layer which can be extended to have multiple post processors for various stream configurations. As of now, we only have one post processor (JPEG), hence the subsequent commit will port its function to this interface. Signed-off-by: Umang Jain --- src/android/post_processor.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/android/post_processor.h diff --git a/src/android/post_processor.h b/src/android/post_processor.h new file mode 100644 index 0000000..fa676c9 --- /dev/null +++ b/src/android/post_processor.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.1-or-later */ +/* + * Copyright (C) 2020, Google Inc. + * + * post_processor.h - CameraStream Post Processing Interface + */ +#ifndef __ANDROID_POST_PROCESSOR_H__ +#define __ANDROID_POST_PROCESSOR_H__ + +#include + +#include +#include +#include + +class CameraMetadata; + +class PostProcessor +{ +public: + virtual ~PostProcessor() {}; + + virtual int configure(const libcamera::StreamConfiguration &cfg) = 0; + virtual int process(const libcamera::FrameBuffer *source, + const libcamera::Span &destination, + CameraMetadata *metadata, + ...) = 0; +}; + +#endif /* __ANDROID_POST_PROCESSOR_H__ */