From patchwork Mon Oct 26 14:01:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 10252 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 3E373BDB13 for ; Mon, 26 Oct 2020 14:02:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 87F5361E5F; Mon, 26 Oct 2020 15:02:34 +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="SeO9BwqD"; 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 3A74E6034E for ; Mon, 26 Oct 2020 15:02:32 +0100 (CET) From: Umang Jain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail; t=1603720951; bh=8c9Ko6jwc94kdp3OdqXqzB85vWzwgsp7BzF9czQuzDA=; h=From:To:Cc:Subject; b=SeO9BwqDCNZv/ECrQqjnGzyrB3Xvui3FGYpqxAGzYQrH4RUVW3rDDplr41MGCyxhx 2z/UPT6AkYeHmdbQNuInBjS/cQb9gyB/80cvkoxodS1t65Uq1v8AFrOHJInyN+vQL6 rG29UNU2jEfPbjFjwpT6Po31TtiTShG+vIIMvoAMIDY59B8FEcDKhabA91B3pszeGf Tbblkplyww6fY3NkQp8qMampTrHVA2Ud0Q1BTZbMxZoA91Xgcf3mrfsXvIeeqjTXpW NcwWFUdTj0sHFLkNGaykeHGja3j6FmWzqRnT9wqJad4hLfMaY6ZpZwHNAI1pm7BDUa eT01ZfUAUdAJQ== To: libcamera-devel@lists.libcamera.org Date: Mon, 26 Oct 2020 19:31:31 +0530 Message-Id: <20201026140134.44166-1-email@uajain.com> Mime-Version: 1.0 Subject: [libcamera-devel] [PATCH 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" After refactoring the jpeg encoder bits and introducing a new PostProcessor interface, it's time to introduce a simple image thumbnailer to thumbnail the frames captured and embed it via libexif. The patches have been tested locally via vivid PH/cam-file-sink, so there is some level of confidence in the patches. If anyone is interested, I can provide a wip: branch which I used. There were some tweaks to use the PostProcessor (instead of the encoder directly) but nothing major. Patch 1/3 is simply a bugfix I encountered when testing the patches. Patch 2/3 has been reviewed and approved before, when the PostProcessor and Encoder had some new function signatures changes recently hence, I thought that it's best to drop the review tags and ask for a re-review. Patch 3/3 is the actual meat of this series, which in my opinion has been quite simplified after a lot of churn (finally!). Thanks! Umang Jain (3): android: jpeg: Return encoded bytes size from PostProcessorJpeg android: jpeg: encoder_libjpeg: Allow encoding raw frame bytes android: jpeg: exif: Embed a JPEG-encoded thumbnail src/android/jpeg/encoder_libjpeg.cpp | 18 ++-- src/android/jpeg/encoder_libjpeg.h | 7 +- src/android/jpeg/exif.cpp | 16 +++- src/android/jpeg/exif.h | 1 + src/android/jpeg/post_processor_jpeg.cpp | 37 +++++++- src/android/jpeg/post_processor_jpeg.h | 8 +- src/android/jpeg/thumbnailer.cpp | 109 +++++++++++++++++++++++ src/android/jpeg/thumbnailer.h | 37 ++++++++ src/android/meson.build | 1 + 9 files changed, 222 insertions(+), 12 deletions(-) create mode 100644 src/android/jpeg/thumbnailer.cpp create mode 100644 src/android/jpeg/thumbnailer.h