From patchwork Thu Oct 8 14:10:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 10021 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 1C605BEEE0 for ; Thu, 8 Oct 2020 14:10:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A64B6605C6; Thu, 8 Oct 2020 16:10:54 +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="RYc25IQU"; 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 4A9916035D for ; Thu, 8 Oct 2020 16:10:52 +0200 (CEST) From: Umang Jain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail; t=1602166251; bh=9k3NvncXeFURQMhaCa0kXHltC+9vwxEVQsQjGczQED4=; h=From:To:Cc:Subject; b=RYc25IQUrn/SljNAD8Y10BNb75PJpZHjUVmPuCAzOSsjpLwTvisFZtFmn5K3nubmu NmDROqPzVaEqdneCMjNmAlIUntWyG3VthV1M7uJRrceJ5IdOt72KxXfyvIcrTr47uP RQlJgK8ohNpyjPl4MHhqDngrtLJJAkran8vQiDNLQeOSrAJWBrWFFpPHMqwVp8+zmN gFZJivA07hr1mDE43Dzsrl6WpIjDksEjzGHvRyQyn6ZKQB4rKBvLNavgHr5V7xbgA6 kHBAzBdZLbJJjiqf3r6di+8WEWTaiYkMqUlUzf1w1po2hbXwFffipWReXKkc/VJMjW OEwBTTJXsmVdg== To: libcamera-devel@lists.libcamera.org Date: Thu, 8 Oct 2020 19:40:35 +0530 Message-Id: <20201008141038.83425-1-email@uajain.com> Mime-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/3] Introduce PostProcessor Interface for CameraStream 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" This series introduces a post processing generic interface that ideally abstracts away the processing details (like the exposed JPEG Encoder) from the CameraStream. We only have one PostProcessor (JPEG) as of now but the interface is implemented in such a way that there can be many PostProcessor(s). Patch 2/2 port of JPEG Encoder to PostProcessorJPEG shows how a PostProcessor shall look. Patch 3/3 adds a further processing element (a scaler) to this PostProcessor. Just keeping it RFC to show where this current work is headed. Feel free to comment on the direction and/or specifics of the work. I would recommend to leave out the Patch 3/3 for review, as it is still in-flux addressing the past reviews. The series is compile test only. Umang Jain (3): android: post_processor: Introduce a PostProcessor interface android: jpeg: Port to PostProcessor interface android: jpeg: Add a basic NV12 image thumbnailer src/android/camera_device.h | 1 - src/android/camera_stream.cpp | 74 ++-------- src/android/camera_stream.h | 9 +- src/android/jpeg/encoder.h | 25 ---- ...er_libjpeg.cpp => post_processor_jpeg.cpp} | 103 ++++++++++++-- ...ncoder_libjpeg.h => post_processor_jpeg.h} | 27 ++-- src/android/jpeg/thumbnailer.cpp | 134 ++++++++++++++++++ src/android/jpeg/thumbnailer.h | 34 +++++ src/android/meson.build | 3 +- src/android/post_processor.h | 30 ++++ 10 files changed, 332 insertions(+), 108 deletions(-) delete mode 100644 src/android/jpeg/encoder.h rename src/android/jpeg/{encoder_libjpeg.cpp => post_processor_jpeg.cpp} (65%) rename src/android/jpeg/{encoder_libjpeg.h => post_processor_jpeg.h} (55%) create mode 100644 src/android/jpeg/thumbnailer.cpp create mode 100644 src/android/jpeg/thumbnailer.h create mode 100644 src/android/post_processor.h