From patchwork Thu Aug 26 21:30:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13515 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 1FCDBBD87D for ; Thu, 26 Aug 2021 21:30:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2377C68932; Thu, 26 Aug 2021 23:30:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="TvJNfzbj"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 369E368920 for ; Thu, 26 Aug 2021 23:30:26 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.246]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0223F191F; Thu, 26 Aug 2021 23:30:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1630013425; bh=u0d5sXoete/pr733en7yokVRDcy/oylAETz1sqbXMNw=; h=From:To:Cc:Subject:Date:From; b=TvJNfzbjoCGji4QHrONo4PDNHyTbRIFfn6lZLhf3jMJj5E8R21wyCtm4tD9pWOXP3 aJ3q9sSWx0n+jbhSzFXd42wS/gXhe4Y+QVzfhsrxTPjJUd8ZX+VbPw8MbYzV7wX4tA qQNsRAcm7mjPmp54BbSx7fWPMZ/oSTl6VYpmGzx8= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Fri, 27 Aug 2021 03:00:11 +0530 Message-Id: <20210826213016.1829504-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/5] android: Async post-processing 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 aims to enable async post-processing of streams in the HAL layer. Pathch[1-4]/5 lays the groundwork. Patch 5/5 is the real deal. This is an RFC since I still have a few more \todos to address in 5/5. One in particular (which is also a source of crash) is marked with [BLOCKER] in 5/5. Testing: post-processor-jpeg runs in a separate thread and saves an image on shutter-click. Streaming of image data continues as usual. However, on next shutter-click(i.e. trying to click yet-another-image) the post-processor-worker thread fails to start, aborting the camera service. This is [BLOCKER] I am currently resolving on my end. Umang Jain (5): android: post_processor: Inherit from libcamera::Object android: camera_stream: Pass FrameBuffer pointer instead of reference android: post_processor: Notify post processing completion status android: camera_stream: Notify process() status with a Signal android: Run post processing in a separate thread src/android/camera_device.cpp | 94 +++++++++++++++++++++--- src/android/camera_device.h | 21 +++++- src/android/camera_stream.cpp | 54 ++++++++++++-- src/android/camera_stream.h | 56 +++++++++++++- src/android/jpeg/encoder.h | 2 +- src/android/jpeg/encoder_libjpeg.cpp | 4 +- src/android/jpeg/encoder_libjpeg.h | 2 +- src/android/jpeg/post_processor_jpeg.cpp | 13 +++- src/android/jpeg/post_processor_jpeg.h | 4 +- src/android/jpeg/thumbnailer.cpp | 4 +- src/android/jpeg/thumbnailer.h | 2 +- src/android/post_processor.h | 13 +++- src/android/yuv/post_processor_yuv.cpp | 22 +++--- src/android/yuv/post_processor_yuv.h | 4 +- 14 files changed, 248 insertions(+), 47 deletions(-)