From patchwork Tue Oct 27 21:24:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 10269 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 48911C3B5C for ; Tue, 27 Oct 2020 21:24:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D200D621C2; Tue, 27 Oct 2020 22:24:57 +0100 (CET) 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="VVrUFDAF"; 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 8D7706205F for ; Tue, 27 Oct 2020 22:24:56 +0100 (CET) From: Umang Jain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail; t=1603833896; bh=tIRem2GRgy2Jen2okxTUhw9vOt49zQryfVBk19noQ/A=; h=From:To:Cc:Subject; b=VVrUFDAFkOw33anIVcEVNIwf42XSsbtB9y0vXVq705ATK/4gVNlHiTNXKdTbYz08X rYTSNjFXVKsgsnXs/Y5Jms/4F+AQBeLLuQYaFUH375AlqnoJXvQ1uoFHadpxAFA/NX Mwainr2E+8Stxu7Kc8oQDFoNSipFoDelMnUZfCi+yJgKFQ3Pfi85qDURfiWvbaqKhG v3r6Nxut8DFkqzwViWrGYnb4OjcYJudjBvAelGLktlX0TXv4UK7lwWrLJ1LFU4oc24 Lu4yTK0ijB/3InDSUFcfkHSUJKQ91QoDbm5r1Z5MxbnnQzrhRAE7a88D0orfFFLcWd WTjptRw3wgwIQ== To: libcamera-devel@lists.libcamera.org Date: Wed, 28 Oct 2020 02:54:44 +0530 Message-Id: <20201027212447.131431-1-email@uajain.com> Mime-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/3] android: jpeg: exif: Embed a JPEG-encoded thumbnail 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" Changes in v2: - Drop patch 1/3 from v1. - Use pointers instead of reference if the function is making change to the parameter. - Split Thumbnailer class and its usage into 2 patches. - More rigorous const correct-ness in patch 1/3 There are two major open-ended topics I would like further commenta on: 1. Whether to keep thumbnailEncoder_ inside PostProcessorJpeg or move it to Thumbnailer class itself? Hiroh suggests that it might be useful to keep it in the latter, so let's discuss it widely of what makes sense. 2. Fate of EncoderLibJpeg::encode() introduced in patch 1/3. This is basically allowing us to encode from raw bytes, but is still internal to EncoderLibJpeg(and uses the same naming as Encoder::encode() virtual function). Should I rename it to something else, while keeping it internal to EncoderLibJpeg? Also, I wonder if this is a potential candidate for Encoder interface too? In the sense that Encoder(s) have a way to encode stuff directly handed to them as bytes. Thanks for the reviews all of you! Umang Jain (3): android: jpeg: encoder_libjpeg: Allow encoding raw frame bytes android: jpeg: Introduce a simple image thumbnailer android: jpeg: post_processor_jpeg: Embed thumbnail into Exif metadata src/android/jpeg/encoder_libjpeg.cpp | 18 ++-- src/android/jpeg/encoder_libjpeg.h | 7 +- src/android/jpeg/exif.cpp | 24 ++++- src/android/jpeg/exif.h | 2 + src/android/jpeg/post_processor_jpeg.cpp | 34 +++++++ src/android/jpeg/post_processor_jpeg.h | 8 +- src/android/jpeg/thumbnailer.cpp | 113 +++++++++++++++++++++++ src/android/jpeg/thumbnailer.h | 36 ++++++++ src/android/meson.build | 1 + 9 files changed, 233 insertions(+), 10 deletions(-) create mode 100644 src/android/jpeg/thumbnailer.cpp create mode 100644 src/android/jpeg/thumbnailer.h