From patchwork Tue Aug 4 21:46:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 9193 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 753CABD87A for ; Tue, 4 Aug 2020 21:47:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8812D60552; Tue, 4 Aug 2020 23:47:17 +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="DBooJi1h"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 70D7560545 for ; Tue, 4 Aug 2020 23:47:16 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BABDE27B; Tue, 4 Aug 2020 23:47:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1596577635; bh=Qw6nRK06IJDT1qXTi1X/RkCDlHFQpu3zuSGwpVrUnQI=; h=From:To:Cc:Subject:Date:From; b=DBooJi1h7+S/qUVSDV0PmA6yJKHPOH6UMWiwEnYmTjATPlc4RYveWLukD0hgkh40i PssG2dv5hY/ozF9Q2rglY/BPNiLqJoX6L8Ce/O8W5BYfHAzORSPI81Y6VtibtzprZT Jg94zT7HYYlFu+5k2Yl89CG7wRGzHIASCSDoin6Q= From: Kieran Bingham To: libcamera devel Date: Tue, 4 Aug 2020 22:46:58 +0100 Message-Id: <20200804214711.177645-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 00/13] android: JPEG support 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" A revision of the recently posted JPEG support for the android layer, this includes fixups to review comments and an addition of a test case for the newly introduced mapped-buffers class. With just these patches applied, the CCA application runs and can capture an image successfully. There is still plenty to do on top however: - The JPEG compression does not run in a separate thread - Added streams do not have buffering - RAW API could be used for JPEG compression - EXIF tag support is started but not included in this series. - No rescaler is supported yet I believe all comments from previous review are integrated in this version, and while there is still plenty more to do for JPEG, this is headed towards a suitable base point. Kieran Bingham (13): libcamera: buffer: Correct FrameBuffer references libcamera: formats: add numPlanes helper libcamera: buffer: Create a MappedBuffer test: mapped-buffers: Provide MappedBuffer test libcamera: buffer: Convert copyFrom to use MappedFrameBuffer android: camera_device: Fix trivial spelling android: camera_device: Report an error in notifyError() android: camera_device: Only construct required planes android: camera_device: Query plane length android: camera_device: Report configuration changes from validate() android: camera_device: Generate ResultMetadata earlier android: Introduce JPEG compression android: camera_device: Support MJPEG stream construction include/libcamera/internal/buffer.h | 47 +++++ include/libcamera/internal/formats.h | 2 + src/android/camera_device.cpp | 290 ++++++++++++++++++++++++--- src/android/camera_device.h | 12 ++ src/android/jpeg/compressor.h | 28 +++ src/android/jpeg/compressor_jpeg.cpp | 217 ++++++++++++++++++++ src/android/jpeg/compressor_jpeg.h | 45 +++++ src/android/meson.build | 1 + src/libcamera/buffer.cpp | 205 ++++++++++++++++--- src/libcamera/formats.cpp | 18 ++ src/libcamera/meson.build | 2 + test/mapped-buffers.cpp | 113 +++++++++++ test/meson.build | 1 + 13 files changed, 925 insertions(+), 56 deletions(-) create mode 100644 include/libcamera/internal/buffer.h create mode 100644 src/android/jpeg/compressor.h create mode 100644 src/android/jpeg/compressor_jpeg.cpp create mode 100644 src/android/jpeg/compressor_jpeg.h create mode 100644 test/mapped-buffers.cpp