[{"id":11527,"web_url":"https://patchwork.libcamera.org/comment/11527/","msgid":"<20200724001926.GG21353@pendragon.ideasonboard.com>","date":"2020-07-24T00:19:26","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: Add\n\tColourCorrectionMatrix control","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nThank you for the patch, and sorry for the late review.\n\nOn Sat, Jul 04, 2020 at 10:59:12AM +0100, David Plowman wrote:\n> This control is principally for returning, in the image metadata, the\n> CCM (Colour Correction Matrix) used by the imaging pipeline. By which\n> we mean the 3x3 matrix that is applied to the camera RGB pixels after\n> subtraction of black levels and white-balancing, but before any gamma\n> transformation.\n> \n> Some implementations may also choose to let an application set\n> explicit colour matrices, using this as a control.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  src/libcamera/control_ids.yaml | 12 ++++++++++++\n>  1 file changed, 12 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index 8c3e4c7..23c3f06 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -251,4 +251,16 @@ controls:\n>          higher than anyone could reasonably want. Negative values are\n>          not allowed. Note also that sharpening is not applied to raw\n>          streams.\n> +\n> +  - ColourCorrectionMatrix:\n> +      type: float\n> +      description: |\n> +        The 3x3 matrix that converts camera RGB to sRGB within the\n> +        imaging pipeline. This should describe the matrix that is used\n> +        after pixels have been white-balanced, but before any gamma\n> +        transformation. The 3x3 matrix is stored in conventional reading\n> +        order in an array of 9 floating point values.\n> +\n> +      size: [9]\n\nI'd write this\n\n      size: [3x3]\n\nWe don't parse the size value yet, libcamera only uses it to determine\nif a control contains a single value or is an array. With this changed,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nIf this is the only change needed, I'll update the code when applying\nthe patch.\n\n> +\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 6BF2ABD878\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Jul 2020 00:19:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0CE3861167;\n\tFri, 24 Jul 2020 02:19:34 +0200 (CEST)","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 6A47560539\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Jul 2020 02:19:33 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E5151279;\n\tFri, 24 Jul 2020 02:19:32 +0200 (CEST)"],"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=\"EyE9ikYk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1595549973;\n\tbh=zjH7bveKVpRRn8be2B8j6K9breiYmXAIhXePeYmpBWs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=EyE9ikYkTFFuX4md8MjH7LxB5/liMBcZV7HiFH8xLjJWupyrXQb6eQtZ4QULstUjK\n\tsRj7mj4z8QFty0AqFmqTVzJNf8yVpClgh9SKFrwq7MER7626lUr/ZzXUah4/H1CebE\n\t0aE3IljcYF4HqyW/Hf951Q54vgnoWWzSTJ+aOl2k=","Date":"Fri, 24 Jul 2020 03:19:26 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<20200724001926.GG21353@pendragon.ideasonboard.com>","References":"<20200704095914.17344-1-david.plowman@raspberrypi.com>\n\t<20200704095914.17344-2-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200704095914.17344-2-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: Add\n\tColourCorrectionMatrix control","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>"}}]