[{"id":14314,"web_url":"https://patchwork.libcamera.org/comment/14314/","msgid":"<X+LCTXQMCP5e8xmO@pendragon.ideasonboard.com>","date":"2020-12-23T04:06:37","subject":"Re: [libcamera-devel] [PATCH v2 5/9] android: camera_device: Report\n\tColorFilterArrangement","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Fri, Dec 18, 2020 at 05:47:50PM +0100, Jacopo Mondi wrote:\n> Report the ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT property\n> inspecting the draft property reported by the libcamera Camera.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/android/camera_device.cpp | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 1c7bf4ed8073..bad8a51ae7f7 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -897,7 +897,10 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n>  \tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_SENSITIVITY_RANGE,\n>  \t\t\t\t  &sensitivityRange, 2);\n>  \n> +\t/* Report the color filter arrangement: default it to GRBG. */\n\nHow about not adding ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT at all\nwhen libcamera doesn't report the property ? This metadata tag is only\nmandatory when raw capture is supported, and for sensors that don't\nsupport capturing the Bayer pattern, we won't be able to support raw\ncapture.\n\n>  \tuint16_t filterArr = ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG;\n> +\tif (properties.contains(properties::draft::ColorFilterArrangement))\n> +\t\tfilterArr = properties.get(properties::draft::ColorFilterArrangement);\n>  \tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,\n>  \t\t\t\t  &filterArr, 1);\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 936AAC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Dec 2020 04:06:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 34B7B615AC;\n\tWed, 23 Dec 2020 05:06:48 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 29BB860320\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Dec 2020 05:06:46 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 92A0EA32;\n\tWed, 23 Dec 2020 05:06:45 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Aoe1wsbJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1608696405;\n\tbh=2Ht8QWqGF7aruF8GGJAYQ8W39cL/GTGPuWC6mHTQXII=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Aoe1wsbJVYjWgEj4qYpBbuUlpT3OzmlSyq6EQMfmNPlsdmO9FBu6ofRRETEUEegJv\n\t2daaDviCOYoLee7RB7ESsk6HJBag8ZDEN0NuQjfuECnwOulqHmilkBGW148AsrFSaN\n\tAQ/btWngxSlyL8MPnfKaqszQcIlk3RnVPnwMNk00=","Date":"Wed, 23 Dec 2020 06:06:37 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<X+LCTXQMCP5e8xmO@pendragon.ideasonboard.com>","References":"<20201218164754.81422-1-jacopo@jmondi.org>\n\t<20201218164754.81422-6-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201218164754.81422-6-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v2 5/9] android: camera_device: Report\n\tColorFilterArrangement","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]