From patchwork Wed Sep 9 15:54:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9557 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 17EE6BDB1D for ; Wed, 9 Sep 2020 15:51:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8880B62CBA; Wed, 9 Sep 2020 17:51:18 +0200 (CEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 97F5360534 for ; Wed, 9 Sep 2020 17:51:17 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 790A81BF20D; Wed, 9 Sep 2020 15:51:16 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 9 Sep 2020 17:54:49 +0200 Message-Id: <20200909155457.153907-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/8] android: camera_device: Allocate internal buffers 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: , Cc: hanlinchen@chromium.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This series adds to the CameraDevice class the ability to reserve buffers on behalf of CameraStream instances used for post-processing purposes. As the comments in patch 1/8 details, libcamera streams that are created by the HAL to be processed to produce frames in Android required format need to have memory allocated on their behalf by libcamera. The series instruments the FrameBufferAllocator class with an interface to get and return references to the FrameBuffer allocated in the internal pool. CameraDevice gets instrumented with a FrameBufferAllocator which gets used to provide buffers to HAL-created streams. The series is developed on top of: [PATCH v3 00/11] android: camera_device: Fix JPEG/RAW sizes With these series, and the following patch applied: [RFC] libcamera: ipu3: Always use sensor full frame size this is the result of cros_camera_test: [----------] 61 tests from Camera3StillCaptureTest/Camera3JpegResolutionTest (43379 ms total) [----------] Global test environment tear-down [==========] 61 tests from 1 test suite ran. (43379 ms total) [ PASSED ] 59 tests. [ FAILED ] 2 tests, listed below: [ FAILED ] Camera3StillCaptureTest/Camera3JpegResolutionTest.JpegResolutionTest/4, where GetParam() = (0, 320x240, 4160x3104) [ FAILED ] Camera3StillCaptureTest/Camera3JpegResolutionTest.JpegResolutionTest/20, where GetParam() = (0, 4160x3104, 320x240) Thanks j Jacopo Mondi (8): android: camera_device: Add CameraStream::Type android: camera_device: Add frame allocator libcamera: frame_buffer_allocator: Add clear() android: camera_device: Clear allocator at configureStream libcamera: framebuffer_allocator: Get and return buffers android: camera_device: Allocate buffer pool android: camera_device: Use libcamera buffer pool android: camera_device: Add stream mapping log include/libcamera/framebuffer_allocator.h | 6 ++ src/android/camera_device.cpp | 106 ++++++++++++++++++---- src/android/camera_device.h | 89 +++++++++++++++++- src/libcamera/framebuffer_allocator.cpp | 68 +++++++++++++- 4 files changed, 245 insertions(+), 24 deletions(-) --- 2.28.0