From patchwork Tue Jul 20 10:13:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13053 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 137FBC0109 for ; Tue, 20 Jul 2021 10:13:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CAA0A68542; Tue, 20 Jul 2021 12:13:28 +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="O9dKyBbQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1F18668521 for ; Tue, 20 Jul 2021 12:13:28 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0DC41443; Tue, 20 Jul 2021 12:13:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626776007; bh=rz5X/sWfBsiMTCFJhar1UOJqv3uUzbLAu4rkrHCLTf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O9dKyBbQCxBvKbw6J42RRbBEM3SyGoRmnYUACrk1GE4jvyMJBcZlYoEo+nHHYbdiJ GnGJHGZD9wXc2kSQEE+jz2sz72wsjAYHMnocJgcpjf1BK+SF4YZROifFlQ3LUT0ti7 I2tYzUczE7m1jKwxGUSfrlVbHELQPYzHMtyQ7pBI= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Tue, 20 Jul 2021 19:13:02 +0900 Message-Id: <20210720101307.26010-5-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210720101307.26010-1-paul.elder@ideasonboard.com> References: <20210720101307.26010-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 4/9] android: jpeg: get ISO from SENSOR_SENSITIVITY 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" The data for the exif ISO tag needs to come from SENSOR_SENSITIVITY. Set it. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- This on its own doesn't fix any CTS tests, but it prevents a test failure later on when we add the proper static metadata for the FULL hardware level. --- src/android/jpeg/post_processor_jpeg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp index 0e93f365..3160a784 100644 --- a/src/android/jpeg/post_processor_jpeg.cpp +++ b/src/android/jpeg/post_processor_jpeg.cpp @@ -119,7 +119,10 @@ int PostProcessorJpeg::process(const FrameBuffer &source, ret = requestMetadata.getEntry(ANDROID_LENS_APERTURE, &entry); if (ret) exif.setAperture(*entry.data.f); - exif.setISO(100); + + ret = resultMetadata->getEntry(ANDROID_SENSOR_SENSITIVITY, &entry); + exif.setISO(ret ? *entry.data.i32 : 100); + exif.setFlash(Exif::Flash::FlashNotPresent); exif.setWhiteBalance(Exif::WhiteBalance::Auto);