From patchwork Mon Mar 1 15:01:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11418 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 C0D3BBD808 for ; Mon, 1 Mar 2021 15:00:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 368CD60522; Mon, 1 Mar 2021 16:00:50 +0100 (CET) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 03FDB60521 for ; Mon, 1 Mar 2021 16:00:49 +0100 (CET) X-Originating-IP: 93.61.96.190 Received: from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) (Authenticated sender: jacopo@jmondi.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 5B80940007; Mon, 1 Mar 2021 15:00:46 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Mon, 1 Mar 2021 16:01:01 +0100 Message-Id: <20210301150111.61791-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/10] Support memory backends 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: Han-lin Chen , Daniel Hung-yu Wu Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello v2 takes into account comments received from Laurent - Introduce an android_platform combo option in place of android_memory_backend - Implement PIMPL using libcamera::Extensible in place of the custom implementation - Use libcamera::Span<> in the CameraBuffer interface - Minor style fixups The biggest controversy is now patch 8/10: how to maintain compatibility with the existing generic implementation. I left the patch as it was to collect more feedback but I don't feel strongly attached to it (the contrary :) Tested by - JPEG capture with CCA on ChromeOS - Works with the generic backend as it used to - Works with the cbm backend - CTS android.hardware.camera2.cts.ImageReaderTest with cbm backend making sure the calculated buffer size is correct ( aka < maxJpegBufferSize) - Picture capture with OpenCamera which results in a well formed picture Thanks j Jacopo Mondi (10): meson: options: Add option to select the Android platform android: Introduce CameraBuffer interface android: camera_buffer: Drop 'const' from buffer_handle_t android: camera_device: Rename buffer fields android: Move buffer mapping to CameraStream android: camera_buffer: Implement libcamera::Extensible android: post_processor: Use CameraBuffer API android: jpeg: Use maxJpegBufferSize() for compatibility android: mm: Provide helper macro for PIMPL android: Introduce Chromium OS buffer manager meson_options.txt | 6 + src/android/camera_buffer.h | 59 ++++++++++ src/android/camera_device.cpp | 51 +------- src/android/camera_device.h | 6 - src/android/camera_stream.cpp | 16 ++- src/android/camera_stream.h | 2 +- src/android/jpeg/post_processor_jpeg.cpp | 29 +++-- src/android/jpeg/post_processor_jpeg.h | 2 +- src/android/meson.build | 2 + src/android/mm/cros_camera_buffer.cpp | 141 +++++++++++++++++++++++ src/android/mm/generic_camera_buffer.cpp | 89 ++++++++++++++ src/android/mm/meson.build | 9 ++ src/android/post_processor.h | 4 +- src/android/yuv/post_processor_yuv.cpp | 20 ++-- src/android/yuv/post_processor_yuv.h | 6 +- 15 files changed, 357 insertions(+), 85 deletions(-) create mode 100644 src/android/camera_buffer.h create mode 100644 src/android/mm/cros_camera_buffer.cpp create mode 100644 src/android/mm/generic_camera_buffer.cpp create mode 100644 src/android/mm/meson.build --- 2.30.0