[{"id":23418,"web_url":"https://patchwork.libcamera.org/comment/23418/","msgid":"<YqrvyRF8y8inxhCx@pendragon.ideasonboard.com>","date":"2022-06-16T08:54:33","subject":"Re: [libcamera-devel] [PATCH] qcam: dng: Make TIFFTAG_CFAPATTERN\n\tvariable count","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jean-Michel,\n\nThank you for the patch.\n\nOn Thu, Jun 16, 2022 at 10:46:42AM +0200, Jean-Michel Hautbois via libcamera-devel wrote:\n> Since libtiff version 20201219, the CFAPATTERN tag is using a variable\n> count and not the fixed 4 values size.\n> For reference, the commit introducing this is:\n> \n> \tcommit 2eb5a954cb7b7ad61559da00743c4b0e2fce34d0\n> \tAuthor: Sam Hasinoff <hasinoff@google.com>\n> \tDate:   Sun Mar 8 21:23:16 2020 +0100\n> \tMake TIFFTAG_CFAPATTERN variable count\n> \n> Add a version check in the DNGWriter::write function when this tag is\n> written as this breaks the raw capture in qcam.\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  src/qcam/dng_writer.cpp | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/qcam/dng_writer.cpp b/src/qcam/dng_writer.cpp\n> index 34c8df5a..bfb867c6 100644\n> --- a/src/qcam/dng_writer.cpp\n> +++ b/src/qcam/dng_writer.cpp\n> @@ -506,7 +506,10 @@ int DNGWriter::write(const char *filename, const Camera *camera,\n>  \tTIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);\n>  \tTIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);\n>  \tTIFFSetField(tif, TIFFTAG_CFAREPEATPATTERNDIM, cfaRepeatPatternDim);\n> -\tTIFFSetField(tif, TIFFTAG_CFAPATTERN, info->pattern);\n> +\tif (TIFFLIB_VERSION < 20201219))\n\nExtra parenthesis. Apart from that,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\t\tTIFFSetField(tif, TIFFTAG_CFAPATTERN, info->pattern);\n> +\telse\n> +\t\tTIFFSetField(tif, TIFFTAG_CFAPATTERN, 4, info->pattern);\n>  \tTIFFSetField(tif, TIFFTAG_CFAPLANECOLOR, 3, cfaPlaneColor);\n>  \tTIFFSetField(tif, TIFFTAG_CFALAYOUT, 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 6E961BD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 16 Jun 2022 08:54:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7FBF765635;\n\tThu, 16 Jun 2022 10:54:46 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A7EDD601F1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 16 Jun 2022 10:54:45 +0200 (CEST)","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 D9443415;\n\tThu, 16 Jun 2022 10:54:44 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655369686;\n\tbh=edbHOyS+RocPIP98dQ8kxalaK7xAbC23U9RhXt5ynRY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=3DSPz3X2FXiGjLkEX/O20FjNYakfRg7diXh3Y7hYoG7Sq+fo5aUdWrpbz4AR/Olqk\n\tPksVlMRqtHB8MsH/gPRm5YfsLR9Wl5UEU67eF5CW/dinGRWcFRGR2PKAkQFZMsuNqV\n\tuqgqtEiia5uhLs46Zww8RG5JzTNvdPCz1cgVub1Ijqz9WymizyraHJyvh3olI5Sjsp\n\tJCwqjMLUvBa6ps5WrVi22iRkK78irXAwUKtw6ipZ5QtmO5ESeqnMxTZU2uFrimlgLa\n\teMHuLHneH0LTt53N7iEht8b+urMeQLx/sH2FxtXldecHLlINfdR+T5GpRCIKICB8C/\n\t4QVal0zwy4nmA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1655369685;\n\tbh=edbHOyS+RocPIP98dQ8kxalaK7xAbC23U9RhXt5ynRY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=csaz3mZlcvUhx16F3h/7nlZlq+tNMYvO5CNYcj15RvfFKeWLsbR1mweKD04N2/l6k\n\tRbBB7hZU6dGfRGb1n/I+L0hFSzcqladXSQHsYXWWqtWxGtZq76vh7RcjNXrwKixC5Y\n\tlWFXTjRkmsK62ck9/TGTTYi1wrRTIhDqv6SXZpdE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"csaz3mZl\"; dkim-atps=neutral","Date":"Thu, 16 Jun 2022 11:54:33 +0300","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<YqrvyRF8y8inxhCx@pendragon.ideasonboard.com>","References":"<20220616084642.59823-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220616084642.59823-1-jeanmichel.hautbois@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] qcam: dng: Make TIFFTAG_CFAPATTERN\n\tvariable count","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]