From patchwork Mon Mar 8 10:13:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 11512 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 B8FFEBD1F1 for ; Mon, 8 Mar 2021 10:14:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7257268AA3; Mon, 8 Mar 2021 11:14:13 +0100 (CET) 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="agZ/ZJfz"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DD2A068AA3 for ; Mon, 8 Mar 2021 11:14:11 +0100 (CET) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6FC458A3; Mon, 8 Mar 2021 11:14:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615198451; bh=EAYWLFCLd/rHD1ON91T8EI4cyoKo2coOAuIYUO12rVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=agZ/ZJfzBj1twuI0MqPb0kQ2bfKweDYS0JYEAP4DWfA5ZlWcDUcICxg+NO8VS8+14 VHhwaS4HQqk/Dg+Ar5Ap4WT4UfypwZPZ3gwPUYtSYbyDaIcP2Dm4HVU6s9mrFqF0Nn MZH7zU2fLi4lgrPaK6vrr1ejMkB5isaRZ1n6HxCg= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Mon, 8 Mar 2021 19:13:55 +0900 Message-Id: <20210308101356.59333-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210308101356.59333-1-paul.elder@ideasonboard.com> References: <20210308101356.59333-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/4] android: jpeg: exif: Fix setGPSLocation longitude 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" There was a copy-paste error that caused the latitude to be set twice and the longitude never. Fix this. This is part of the fix that allows the following CTS test to pass: - android.hardware.cts.CameraTest#testJpegExif Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/android/jpeg/exif.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp index c8b2f072..5225d17f 100644 --- a/src/android/jpeg/exif.cpp +++ b/src/android/jpeg/exif.cpp @@ -392,7 +392,7 @@ void Exif::setGPSLocation(const double *coords) std::tie(deg, min, sec) = degreesToDMS(coords[1]); setString(EXIF_IFD_GPS, static_cast(EXIF_TAG_GPS_LONGITUDE_REF), EXIF_FORMAT_ASCII, deg >= 0 ? "E" : "W"); - setGPSDMS(EXIF_IFD_GPS, static_cast(EXIF_TAG_GPS_LATITUDE), + setGPSDMS(EXIF_IFD_GPS, static_cast(EXIF_TAG_GPS_LONGITUDE), std::abs(deg), min, sec); setByte(EXIF_IFD_GPS, static_cast(EXIF_TAG_GPS_ALTITUDE_REF),