[{"id":30094,"web_url":"https://patchwork.libcamera.org/comment/30094/","msgid":"<171949381801.3790642.18027179092916600098@ping.linuxembedded.co.uk>","date":"2024-06-27T13:10:18","subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2024-06-27 13:51:10)\n> Add a thumbnail function for raw formats that are 16bit aligned.\n> This is needed for the upcoming RAW10 and RAW12 implemntation.\n> \n> Use the new function for RAW16 as the thumbScanlineRawXX_CSI2P produces\n> incorrect results for that format (it averages over adjacent bytes,\n> which works for the CSI formats).\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  src/apps/common/dng_writer.cpp | 32 ++++++++++++++++++++++++++++----\n>  1 file changed, 28 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp\n> index 88b225d3e099..2cb320ff327b 100644\n> --- a/src/apps/common/dng_writer.cpp\n> +++ b/src/apps/common/dng_writer.cpp\n> @@ -144,6 +144,30 @@ void packScanlineRaw16(void *output, const void *input, unsigned int width)\n>         std::copy(in, in + width, out);\n>  }\n>  \n> +/* Thumbnail function for raw data aligned to 16bit words */\n> +void thumbScanlineRawXX(const FormatInfo &info, void *output,\n\nYup, I could still be tempted to call this thumbScanlineRaw ... unless\n...\n\n> +                         const void *input, unsigned int width,\n> +                         unsigned int stride)\n> +{\n> +       const uint16_t *in = static_cast<const uint16_t *>(input);\n> +       const uint16_t *in2 = static_cast<const uint16_t *>(input) + stride / 2;\n> +       uint8_t *out = static_cast<uint8_t *>(output);\n> +\n> +       /* shift down to 8 */\n> +       unsigned int shift = info.bitsPerSample - 8;\n> +\n> +       /* simple averaging that produces grey RGB values */\n\ngrey rgb values?\n\n> +       for (unsigned int x = 0; x < width; x++) {\n> +               uint16_t value = (in[0] + in[1] + in2[0] + in2[1]) >> 2;\n> +               value = value >> shift;\n> +               *out++ = value;\n> +               *out++ = value;\n> +               *out++ = value;\n> +               in += 16;\n> +               in2 += 16;\n\nDoes this code work for 8,10,12,14 bit data? Or is the implication that\nit only handled data algined to 16bit (per pixel?) so perhaps that's 10,\n12, 14, 16?\n\n\n\n> +       }\n> +}\n> +\n>  void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width)\n>  {\n>         const uint8_t *in = static_cast<const uint8_t *>(input);\n> @@ -321,25 +345,25 @@ const std::map<PixelFormat, FormatInfo> formatInfo = {\n>                 .bitsPerSample = 16,\n>                 .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },\n>                 .packScanline = packScanlineRaw16,\n> -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> +               .thumbScanline = thumbScanlineRawXX,\n>         } },\n>         { formats::SGBRG16, {\n>                 .bitsPerSample = 16,\n>                 .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen },\n>                 .packScanline = packScanlineRaw16,\n> -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> +               .thumbScanline = thumbScanlineRawXX,\n>         } },\n>         { formats::SGRBG16, {\n>                 .bitsPerSample = 16,\n>                 .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen },\n>                 .packScanline = packScanlineRaw16,\n> -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> +               .thumbScanline = thumbScanlineRawXX,\n>         } },\n>         { formats::SRGGB16, {\n>                 .bitsPerSample = 16,\n>                 .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue },\n>                 .packScanline = packScanlineRaw16,\n> -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> +               .thumbScanline = thumbScanlineRawXX,\n>         } },\n>         { formats::SBGGR10_CSI2P, {\n>                 .bitsPerSample = 10,\n> -- \n> 2.43.0\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 799ABBDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jun 2024 13:10:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C336C62C99;\n\tThu, 27 Jun 2024 15:10:21 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C4804619E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 15:10:20 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B860B593;\n\tThu, 27 Jun 2024 15:09:56 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Gq1udIFs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719493796;\n\tbh=q15P01NKckVY70YUdj26YSMMlsb84c2glIo7qa/yHPc=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Gq1udIFstLMrwsewgni/kQk/Ywwi6+TB1oY8F7xmjJ/+HpNIE4mzi6UOzMR4xcNAi\n\tf4v7nfcee2auBs7ZVd9tCfZ3hmg3c1ZYIjqDJTaO4CSAyBfXjd5cWmePebAz4sB7b5\n\t7Cu+flOy9WqXOePLleZbOHtjEE8baEjsU42tXoH8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240627125310.2533622-3-stefan.klug@ideasonboard.com>","References":"<20240627125310.2533622-1-stefan.klug@ideasonboard.com>\n\t<20240627125310.2533622-3-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 27 Jun 2024 14:10:18 +0100","Message-ID":"<171949381801.3790642.18027179092916600098@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30096,"web_url":"https://patchwork.libcamera.org/comment/30096/","msgid":"<CAHW6GYKOJOXs_eeMAi32i8qfXx0n_rEOFp5UoFnJaOOcEhS5nw@mail.gmail.com>","date":"2024-06-27T13:27:57","subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Stefan\n\nLooks good to me!\n\nOn Thu, 27 Jun 2024 at 13:53, Stefan Klug <stefan.klug@ideasonboard.com> wrote:\n>\n> Add a thumbnail function for raw formats that are 16bit aligned.\n> This is needed for the upcoming RAW10 and RAW12 implemntation.\n>\n> Use the new function for RAW16 as the thumbScanlineRawXX_CSI2P produces\n> incorrect results for that format (it averages over adjacent bytes,\n> which works for the CSI formats).\n>\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  src/apps/common/dng_writer.cpp | 32 ++++++++++++++++++++++++++++----\n>  1 file changed, 28 insertions(+), 4 deletions(-)\n>\n> diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp\n> index 88b225d3e099..2cb320ff327b 100644\n> --- a/src/apps/common/dng_writer.cpp\n> +++ b/src/apps/common/dng_writer.cpp\n> @@ -144,6 +144,30 @@ void packScanlineRaw16(void *output, const void *input, unsigned int width)\n>         std::copy(in, in + width, out);\n>  }\n>\n> +/* Thumbnail function for raw data aligned to 16bit words */\n> +void thumbScanlineRawXX(const FormatInfo &info, void *output,\n> +                         const void *input, unsigned int width,\n> +                         unsigned int stride)\n> +{\n> +       const uint16_t *in = static_cast<const uint16_t *>(input);\n> +       const uint16_t *in2 = static_cast<const uint16_t *>(input) + stride / 2;\n> +       uint8_t *out = static_cast<uint8_t *>(output);\n> +\n> +       /* shift down to 8 */\n> +       unsigned int shift = info.bitsPerSample - 8;\n> +\n> +       /* simple averaging that produces grey RGB values */\n> +       for (unsigned int x = 0; x < width; x++) {\n> +               uint16_t value = (in[0] + in[1] + in2[0] + in2[1]) >> 2;\n> +               value = value >> shift;\n> +               *out++ = value;\n> +               *out++ = value;\n> +               *out++ = value;\n\nJust a small question as to whether you might want to subtract some\nblack level and apply some \"fake\" gamma? It might make the thumbnails\nlook a bit nicer. But just a matter of taste, I think, not something\nI'd worry over!\n\nDavid\n\n> +               in += 16;\n> +               in2 += 16;\n> +       }\n> +}\n> +\n>  void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width)\n>  {\n>         const uint8_t *in = static_cast<const uint8_t *>(input);\n> @@ -321,25 +345,25 @@ const std::map<PixelFormat, FormatInfo> formatInfo = {\n>                 .bitsPerSample = 16,\n>                 .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },\n>                 .packScanline = packScanlineRaw16,\n> -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> +               .thumbScanline = thumbScanlineRawXX,\n>         } },\n>         { formats::SGBRG16, {\n>                 .bitsPerSample = 16,\n>                 .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen },\n>                 .packScanline = packScanlineRaw16,\n> -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> +               .thumbScanline = thumbScanlineRawXX,\n>         } },\n>         { formats::SGRBG16, {\n>                 .bitsPerSample = 16,\n>                 .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen },\n>                 .packScanline = packScanlineRaw16,\n> -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> +               .thumbScanline = thumbScanlineRawXX,\n>         } },\n>         { formats::SRGGB16, {\n>                 .bitsPerSample = 16,\n>                 .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue },\n>                 .packScanline = packScanlineRaw16,\n> -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> +               .thumbScanline = thumbScanlineRawXX,\n>         } },\n>         { formats::SBGGR10_CSI2P, {\n>                 .bitsPerSample = 10,\n> --\n> 2.43.0\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 67F05BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jun 2024 13:28:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4EFDD62C99;\n\tThu, 27 Jun 2024 15:28:12 +0200 (CEST)","from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com\n\t[IPv6:2607:f8b0:4864:20::22b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 554A2619E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 15:28:10 +0200 (CEST)","by mail-oi1-x22b.google.com with SMTP id\n\t5614622812f47-3c9d70d93dbso5270832b6e.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 06:28:10 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"j4e+QX+A\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1719494889; x=1720099689;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=XChvee0upxopkoddJUW01MaYAfZIbB2XSbGng66zd5Y=;\n\tb=j4e+QX+Au1b3WjiTdbLxwTUkgnASDrT2LhjlezTl8ac00nkM0gOAmvR7L0s4YYgV+o\n\tell+FSv1llqT+AdGA72j5WpkzsC4TCqfndPkbs9m8GyC7PwOmvIQZENFH67Qiktq7xXa\n\t67OiVOUcPUYrGlQgUum6Z7TMHjKuLnIJGDg89xQ7ggPFFlxRmlI+gUaUS70aB1/n5858\n\tdL6xfbVUCc5u7i/60nkXQxblZqb7sc0a827wUNz4nsAN0JlC6qSoIa+yjzYQ5XArpdLh\n\txO2xyIWrAQeFDExt9K5h8qMe1+1kdDUo7/FC9sVuA7QrPTOfBNAeclp0lItb2x+fd5dm\n\tPpug==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1719494889; x=1720099689;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=XChvee0upxopkoddJUW01MaYAfZIbB2XSbGng66zd5Y=;\n\tb=ZmVKYNBDoWVYkhbSXjWI47LL9yDRov9cai5QiQ0p9JYrTyxqKAT9T3891LV2VwrhvC\n\t+h00PXB4DNYXGPKWdUjFTPaR0dIXdrATrTA1989dMiY1xD3cGJh0o6+cV/Udy4LdqjJL\n\tjlu9zpIcHw/SP+SO/N6hsw4EGbi66SllgX5wCIWZRRzlGKtkTj3XwImLUSPly9qP3+Ih\n\txezAYc9T16L4Hla4U7xDW0Tyw5+9LYPCmJTYPSSOE7Cj3xvIfGiDms0A55N+1hd/3tG9\n\tNe83J7qrfs4n35SzgfQa83wy3ZMPDMCmjlsNvJPfg1DEMORgx+YFYCeMf5/ttKd1+TIV\n\tOv2w==","X-Gm-Message-State":"AOJu0YyJrSu6cKCiWx14GyuSi4Ei4MfddT5ueKpm2CwHV5BgWue55tTa\n\txLsYyRneCjA6qROKWcC1B8XdXlCdVnry1RiDLp8zi4btt22ozgE2Ds6J2cxTmqh+7l+HOBT2vuJ\n\tySs6UyEfjdOaJd8Wn1Z2vNty7Ydu2uWID2zNLxw==","X-Google-Smtp-Source":"AGHT+IHkvrqfpCOfc5CwbF6Zy2hHjXSU/qS8wqxKr6cKwZkucLKCzxkBPLU+PEaOOzDWOvNAAaLOwwA6TCg2C69Sz60=","X-Received":"by 2002:a05:6808:23c2:b0:3d6:2c22:4b20 with SMTP id\n\t5614622812f47-3d62c22500emr1151214b6e.23.1719494888838;\n\tThu, 27 Jun 2024 06:28:08 -0700 (PDT)","MIME-Version":"1.0","References":"<20240627125310.2533622-1-stefan.klug@ideasonboard.com>\n\t<20240627125310.2533622-3-stefan.klug@ideasonboard.com>","In-Reply-To":"<20240627125310.2533622-3-stefan.klug@ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 27 Jun 2024 14:27:57 +0100","Message-ID":"<CAHW6GYKOJOXs_eeMAi32i8qfXx0n_rEOFp5UoFnJaOOcEhS5nw@mail.gmail.com>","Subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30097,"web_url":"https://patchwork.libcamera.org/comment/30097/","msgid":"<20240627133710.GB15017@pendragon.ideasonboard.com>","date":"2024-06-27T13:37:10","subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Stefan,\n\nThank you for the patch.\n\nOn Thu, Jun 27, 2024 at 02:51:10PM +0200, Stefan Klug wrote:\n> Add a thumbnail function for raw formats that are 16bit aligned.\n> This is needed for the upcoming RAW10 and RAW12 implemntation.\n> \n> Use the new function for RAW16 as the thumbScanlineRawXX_CSI2P produces\n> incorrect results for that format (it averages over adjacent bytes,\n> which works for the CSI formats).\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  src/apps/common/dng_writer.cpp | 32 ++++++++++++++++++++++++++++----\n>  1 file changed, 28 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp\n> index 88b225d3e099..2cb320ff327b 100644\n> --- a/src/apps/common/dng_writer.cpp\n> +++ b/src/apps/common/dng_writer.cpp\n> @@ -144,6 +144,30 @@ void packScanlineRaw16(void *output, const void *input, unsigned int width)\n>  \tstd::copy(in, in + width, out);\n>  }\n>  \n> +/* Thumbnail function for raw data aligned to 16bit words */\n> +void thumbScanlineRawXX(const FormatInfo &info, void *output,\n> +\t\t\t  const void *input, unsigned int width,\n> +\t\t\t  unsigned int stride)\n> +{\n> +\tconst uint16_t *in = static_cast<const uint16_t *>(input);\n> +\tconst uint16_t *in2 = static_cast<const uint16_t *>(input) + stride / 2;\n> +\tuint8_t *out = static_cast<uint8_t *>(output);\n> +\n> +\t/* shift down to 8 */\n\n\t/* Shift down to 8. */\n\n> +\tunsigned int shift = info.bitsPerSample - 8;\n> +\n> +\t/* simple averaging that produces grey RGB values */\n\nSimilarly here.\n\n> +\tfor (unsigned int x = 0; x < width; x++) {\n> +\t\tuint16_t value = (in[0] + in[1] + in2[0] + in2[1]) >> 2;\n> +\t\tvalue = value >> shift;\n> +\t\t*out++ = value;\n> +\t\t*out++ = value;\n> +\t\t*out++ = value;\n> +\t\tin += 16;\n> +\t\tin2 += 16;\n> +\t}\n> +}\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\n>  void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width)\n>  {\n>  \tconst uint8_t *in = static_cast<const uint8_t *>(input);\n> @@ -321,25 +345,25 @@ const std::map<PixelFormat, FormatInfo> formatInfo = {\n>  \t\t.bitsPerSample = 16,\n>  \t\t.pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },\n>  \t\t.packScanline = packScanlineRaw16,\n> -\t\t.thumbScanline = thumbScanlineRawXX_CSI2P,\n> +\t\t.thumbScanline = thumbScanlineRawXX,\n>  \t} },\n>  \t{ formats::SGBRG16, {\n>  \t\t.bitsPerSample = 16,\n>  \t\t.pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen },\n>  \t\t.packScanline = packScanlineRaw16,\n> -\t\t.thumbScanline = thumbScanlineRawXX_CSI2P,\n> +\t\t.thumbScanline = thumbScanlineRawXX,\n>  \t} },\n>  \t{ formats::SGRBG16, {\n>  \t\t.bitsPerSample = 16,\n>  \t\t.pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen },\n>  \t\t.packScanline = packScanlineRaw16,\n> -\t\t.thumbScanline = thumbScanlineRawXX_CSI2P,\n> +\t\t.thumbScanline = thumbScanlineRawXX,\n>  \t} },\n>  \t{ formats::SRGGB16, {\n>  \t\t.bitsPerSample = 16,\n>  \t\t.pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue },\n>  \t\t.packScanline = packScanlineRaw16,\n> -\t\t.thumbScanline = thumbScanlineRawXX_CSI2P,\n> +\t\t.thumbScanline = thumbScanlineRawXX,\n>  \t} },\n>  \t{ formats::SBGGR10_CSI2P, {\n>  \t\t.bitsPerSample = 10,","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 B95F9BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jun 2024 13:37:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0C93562C95;\n\tThu, 27 Jun 2024 15:37:33 +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 547AD62C95\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 15:37:31 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [193.209.96.36])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 43E30593;\n\tThu, 27 Jun 2024 15:37:07 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"HeQThagV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719495427;\n\tbh=auSlBfAkblN/foNcfVJZtnRl6ZQT2tQtJ+Tftzln8JE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HeQThagVwhieLiKGKV6e+r8Vj572tCPhgYXfhdc+P+ACnHPNDWGbNmtsdaMuVyHwO\n\tPuIioMTWlq0HELIKYu9y5cPaVd8K/NvX5zCewW7MzekqLHbXdeaFRphOrb88m5mYMp\n\t+uo68J/8a6KFKYBF4qXi5xWAljzENGB6TYsP7VW0=","Date":"Thu, 27 Jun 2024 16:37:10 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","Message-ID":"<20240627133710.GB15017@pendragon.ideasonboard.com>","References":"<20240627125310.2533622-1-stefan.klug@ideasonboard.com>\n\t<20240627125310.2533622-3-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240627125310.2533622-3-stefan.klug@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30099,"web_url":"https://patchwork.libcamera.org/comment/30099/","msgid":"<yr3z3dyadh5ne2szcwizttgugl4nmiz3fcxay2kvyax5z7eed2@idhzcyfvhpuh>","date":"2024-06-27T13:50:33","subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"On Thu, Jun 27, 2024 at 02:10:18PM +0100, Kieran Bingham wrote:\n> Quoting Stefan Klug (2024-06-27 13:51:10)\n> > Add a thumbnail function for raw formats that are 16bit aligned.\n> > This is needed for the upcoming RAW10 and RAW12 implemntation.\n> > \n> > Use the new function for RAW16 as the thumbScanlineRawXX_CSI2P produces\n> > incorrect results for that format (it averages over adjacent bytes,\n> > which works for the CSI formats).\n> > \n> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > ---\n> >  src/apps/common/dng_writer.cpp | 32 ++++++++++++++++++++++++++++----\n> >  1 file changed, 28 insertions(+), 4 deletions(-)\n> > \n> > diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp\n> > index 88b225d3e099..2cb320ff327b 100644\n> > --- a/src/apps/common/dng_writer.cpp\n> > +++ b/src/apps/common/dng_writer.cpp\n> > @@ -144,6 +144,30 @@ void packScanlineRaw16(void *output, const void *input, unsigned int width)\n> >         std::copy(in, in + width, out);\n> >  }\n> >  \n> > +/* Thumbnail function for raw data aligned to 16bit words */\n> > +void thumbScanlineRawXX(const FormatInfo &info, void *output,\n> \n> Yup, I could still be tempted to call this thumbScanlineRaw ... unless\n> ...\n> \n> > +                         const void *input, unsigned int width,\n> > +                         unsigned int stride)\n> > +{\n> > +       const uint16_t *in = static_cast<const uint16_t *>(input);\n> > +       const uint16_t *in2 = static_cast<const uint16_t *>(input) + stride / 2;\n> > +       uint8_t *out = static_cast<uint8_t *>(output);\n> > +\n> > +       /* shift down to 8 */\n> > +       unsigned int shift = info.bitsPerSample - 8;\n> > +\n> > +       /* simple averaging that produces grey RGB values */\n> \n> grey rgb values?\n\nI was looking for the rigt words here. We produce rgb thumbnails, but to\nease the averaging and to prevent the need for debayering only grey is\noutput. See commit 2223579dfee\n\n\n> \n> > +       for (unsigned int x = 0; x < width; x++) {\n> > +               uint16_t value = (in[0] + in[1] + in2[0] + in2[1]) >> 2;\n> > +               value = value >> shift;\n> > +               *out++ = value;\n> > +               *out++ = value;\n> > +               *out++ = value;\n> > +               in += 16;\n> > +               in2 += 16;\n> \n> Does this code work for 8,10,12,14 bit data? Or is the implication that\n> it only handled data algined to 16bit (per pixel?) so perhaps that's 10,\n> 12, 14, 16?\n\nIt only handles formats that are aligned 16bit per pixel (so Raw8 is\nexcluded) Proposals for a better name are very welcome :-)\n\nCheers,\nStefan\n\n> \n> \n> \n> > +       }\n> > +}\n> > +\n> >  void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width)\n> >  {\n> >         const uint8_t *in = static_cast<const uint8_t *>(input);\n> > @@ -321,25 +345,25 @@ const std::map<PixelFormat, FormatInfo> formatInfo = {\n> >                 .bitsPerSample = 16,\n> >                 .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },\n> >                 .packScanline = packScanlineRaw16,\n> > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > +               .thumbScanline = thumbScanlineRawXX,\n> >         } },\n> >         { formats::SGBRG16, {\n> >                 .bitsPerSample = 16,\n> >                 .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen },\n> >                 .packScanline = packScanlineRaw16,\n> > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > +               .thumbScanline = thumbScanlineRawXX,\n> >         } },\n> >         { formats::SGRBG16, {\n> >                 .bitsPerSample = 16,\n> >                 .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen },\n> >                 .packScanline = packScanlineRaw16,\n> > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > +               .thumbScanline = thumbScanlineRawXX,\n> >         } },\n> >         { formats::SRGGB16, {\n> >                 .bitsPerSample = 16,\n> >                 .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue },\n> >                 .packScanline = packScanlineRaw16,\n> > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > +               .thumbScanline = thumbScanlineRawXX,\n> >         } },\n> >         { formats::SBGGR10_CSI2P, {\n> >                 .bitsPerSample = 10,\n> > -- \n> > 2.43.0\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 7E3CCBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jun 2024 13:50:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9642762C9B;\n\tThu, 27 Jun 2024 15:50:38 +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 BDAD662C95\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 15:50:36 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:6248:8b4b:42bc:2b84])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 95242593;\n\tThu, 27 Jun 2024 15:50:12 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mDLS51In\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719496212;\n\tbh=Re7AqPY98uJ96pndrqoaIxq4fwZTJOg0izHGI0X8Cv8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mDLS51Ins6uiQlJq33cF795iR+STppP54xUd7IASaNv8V4dXbHxuOJO/m4Yuz3Dh/\n\tBmnEr8K0e4KjnmEh757W94uKb9vb/GesCxbF+LUn9/gNhSNYpZPdYrDN2+HKqkoj3y\n\tx2WZO68wfeoljTvbl2+Gg+kvdMd/EaRnzHCD54xI=","Date":"Thu, 27 Jun 2024 15:50:33 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","Message-ID":"<yr3z3dyadh5ne2szcwizttgugl4nmiz3fcxay2kvyax5z7eed2@idhzcyfvhpuh>","References":"<20240627125310.2533622-1-stefan.klug@ideasonboard.com>\n\t<20240627125310.2533622-3-stefan.klug@ideasonboard.com>\n\t<171949381801.3790642.18027179092916600098@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<171949381801.3790642.18027179092916600098@ping.linuxembedded.co.uk>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30101,"web_url":"https://patchwork.libcamera.org/comment/30101/","msgid":"<sppiu6q26pc3q3nczp3rrqbjouawcyhgj44jdl46gflpkcwr6g@q5o4jcd4f4ml>","date":"2024-06-27T14:02:01","subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi David,\n\nOn Thu, Jun 27, 2024 at 02:27:57PM +0100, David Plowman wrote:\n> Hi Stefan\n> \n> Looks good to me!\n\nThanks\n\n> \n> On Thu, 27 Jun 2024 at 13:53, Stefan Klug <stefan.klug@ideasonboard.com> wrote:\n> >\n> > Add a thumbnail function for raw formats that are 16bit aligned.\n> > This is needed for the upcoming RAW10 and RAW12 implemntation.\n> >\n> > Use the new function for RAW16 as the thumbScanlineRawXX_CSI2P produces\n> > incorrect results for that format (it averages over adjacent bytes,\n> > which works for the CSI formats).\n> >\n> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > ---\n> >  src/apps/common/dng_writer.cpp | 32 ++++++++++++++++++++++++++++----\n> >  1 file changed, 28 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp\n> > index 88b225d3e099..2cb320ff327b 100644\n> > --- a/src/apps/common/dng_writer.cpp\n> > +++ b/src/apps/common/dng_writer.cpp\n> > @@ -144,6 +144,30 @@ void packScanlineRaw16(void *output, const void *input, unsigned int width)\n> >         std::copy(in, in + width, out);\n> >  }\n> >\n> > +/* Thumbnail function for raw data aligned to 16bit words */\n> > +void thumbScanlineRawXX(const FormatInfo &info, void *output,\n> > +                         const void *input, unsigned int width,\n> > +                         unsigned int stride)\n> > +{\n> > +       const uint16_t *in = static_cast<const uint16_t *>(input);\n> > +       const uint16_t *in2 = static_cast<const uint16_t *>(input) + stride / 2;\n> > +       uint8_t *out = static_cast<uint8_t *>(output);\n> > +\n> > +       /* shift down to 8 */\n> > +       unsigned int shift = info.bitsPerSample - 8;\n> > +\n> > +       /* simple averaging that produces grey RGB values */\n> > +       for (unsigned int x = 0; x < width; x++) {\n> > +               uint16_t value = (in[0] + in[1] + in2[0] + in2[1]) >> 2;\n> > +               value = value >> shift;\n> > +               *out++ = value;\n> > +               *out++ = value;\n> > +               *out++ = value;\n> \n> Just a small question as to whether you might want to subtract some\n> black level and apply some \"fake\" gamma? It might make the thumbnails\n> look a bit nicer. But just a matter of taste, I think, not something\n> I'd worry over!\n\nThat would surely be nicer. I'd also like to have some colors in there.\nDo you see the thumbnails a lot? I actually had to dig where the\nthumbnails get displayed (in my case only the overview in RawTherapy)\nbecause in my daily use I never saw them.\n\nCheers,\nStefan\n\n> \n> David\n> \n> > +               in += 16;\n> > +               in2 += 16;\n> > +       }\n> > +}\n> > +\n> >  void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width)\n> >  {\n> >         const uint8_t *in = static_cast<const uint8_t *>(input);\n> > @@ -321,25 +345,25 @@ const std::map<PixelFormat, FormatInfo> formatInfo = {\n> >                 .bitsPerSample = 16,\n> >                 .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },\n> >                 .packScanline = packScanlineRaw16,\n> > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > +               .thumbScanline = thumbScanlineRawXX,\n> >         } },\n> >         { formats::SGBRG16, {\n> >                 .bitsPerSample = 16,\n> >                 .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen },\n> >                 .packScanline = packScanlineRaw16,\n> > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > +               .thumbScanline = thumbScanlineRawXX,\n> >         } },\n> >         { formats::SGRBG16, {\n> >                 .bitsPerSample = 16,\n> >                 .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen },\n> >                 .packScanline = packScanlineRaw16,\n> > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > +               .thumbScanline = thumbScanlineRawXX,\n> >         } },\n> >         { formats::SRGGB16, {\n> >                 .bitsPerSample = 16,\n> >                 .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue },\n> >                 .packScanline = packScanlineRaw16,\n> > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > +               .thumbScanline = thumbScanlineRawXX,\n> >         } },\n> >         { formats::SBGGR10_CSI2P, {\n> >                 .bitsPerSample = 10,\n> > --\n> > 2.43.0\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 48869BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jun 2024 14:02:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 551D462C9A;\n\tThu, 27 Jun 2024 16:02:06 +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 1D2B2619E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 16:02:05 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:6248:8b4b:42bc:2b84])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 287762E0;\n\tThu, 27 Jun 2024 16:01:41 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rHPIyE/A\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719496901;\n\tbh=IK84LetXm2nM9DVoSGz2YQ6mQJvluUc9TcVvU8blFAQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=rHPIyE/Ab0k2AQCz6jY+6EEavbn5BfbL+7t3uQus78rTs8mLESHuhLvti96AOgSN9\n\t+YuAj0P1EUUmKmrKEtpHBQA2dR33J57t/EZLPIubb6BKIsouXgwJ5Pzs51jYt3sis5\n\tElcpzH3oWXBMryZb+G2ZUEph7yixpjg3R9oyFD1Q=","Date":"Thu, 27 Jun 2024 16:02:01 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","Message-ID":"<sppiu6q26pc3q3nczp3rrqbjouawcyhgj44jdl46gflpkcwr6g@q5o4jcd4f4ml>","References":"<20240627125310.2533622-1-stefan.klug@ideasonboard.com>\n\t<20240627125310.2533622-3-stefan.klug@ideasonboard.com>\n\t<CAHW6GYKOJOXs_eeMAi32i8qfXx0n_rEOFp5UoFnJaOOcEhS5nw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAHW6GYKOJOXs_eeMAi32i8qfXx0n_rEOFp5UoFnJaOOcEhS5nw@mail.gmail.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30104,"web_url":"https://patchwork.libcamera.org/comment/30104/","msgid":"<171949942674.3790642.8683126914541290175@ping.linuxembedded.co.uk>","date":"2024-06-27T14:43:46","subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2024-06-27 14:50:33)\n> On Thu, Jun 27, 2024 at 02:10:18PM +0100, Kieran Bingham wrote:\n> > Quoting Stefan Klug (2024-06-27 13:51:10)\n> > > Add a thumbnail function for raw formats that are 16bit aligned.\n> > > This is needed for the upcoming RAW10 and RAW12 implemntation.\n> > > \n> > > Use the new function for RAW16 as the thumbScanlineRawXX_CSI2P produces\n> > > incorrect results for that format (it averages over adjacent bytes,\n> > > which works for the CSI formats).\n> > > \n> > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > > ---\n> > >  src/apps/common/dng_writer.cpp | 32 ++++++++++++++++++++++++++++----\n> > >  1 file changed, 28 insertions(+), 4 deletions(-)\n> > > \n> > > diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp\n> > > index 88b225d3e099..2cb320ff327b 100644\n> > > --- a/src/apps/common/dng_writer.cpp\n> > > +++ b/src/apps/common/dng_writer.cpp\n> > > @@ -144,6 +144,30 @@ void packScanlineRaw16(void *output, const void *input, unsigned int width)\n> > >         std::copy(in, in + width, out);\n> > >  }\n> > >  \n> > > +/* Thumbnail function for raw data aligned to 16bit words */\n> > > +void thumbScanlineRawXX(const FormatInfo &info, void *output,\n> > \n> > Yup, I could still be tempted to call this thumbScanlineRaw ... unless\n> > ...\n> > \n> > > +                         const void *input, unsigned int width,\n> > > +                         unsigned int stride)\n> > > +{\n> > > +       const uint16_t *in = static_cast<const uint16_t *>(input);\n> > > +       const uint16_t *in2 = static_cast<const uint16_t *>(input) + stride / 2;\n> > > +       uint8_t *out = static_cast<uint8_t *>(output);\n> > > +\n> > > +       /* shift down to 8 */\n> > > +       unsigned int shift = info.bitsPerSample - 8;\n> > > +\n> > > +       /* simple averaging that produces grey RGB values */\n> > \n> > grey rgb values?\n> \n> I was looking for the rigt words here. We produce rgb thumbnails, but to\n> ease the averaging and to prevent the need for debayering only grey is\n> output. See commit 2223579dfee\n\nAha you mean the output is in greyscale ? Oh - right that's what the\naveraging is doing. I see now.\n\n\n\n> \n> \n> > \n> > > +       for (unsigned int x = 0; x < width; x++) {\n> > > +               uint16_t value = (in[0] + in[1] + in2[0] + in2[1]) >> 2;\n> > > +               value = value >> shift;\n> > > +               *out++ = value;\n> > > +               *out++ = value;\n> > > +               *out++ = value;\n\nAnd storing the average value in each of RGB gives 'greyscale' only.\n\nI'd misunderstood this on the first pass.\n\n> > > +               in += 16;\n> > > +               in2 += 16;\n> > \n> > Does this code work for 8,10,12,14 bit data? Or is the implication that\n> > it only handled data algined to 16bit (per pixel?) so perhaps that's 10,\n> > 12, 14, 16?\n> \n> It only handles formats that are aligned 16bit per pixel (so Raw8 is\n> excluded) Proposals for a better name are very welcome :-)\n\nI guess that would be the special case as thumbScanlineRaw8\n\n\nThis is fine for me.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Cheers,\n> Stefan\n> \n> > \n> > \n> > \n> > > +       }\n> > > +}\n> > > +\n> > >  void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width)\n> > >  {\n> > >         const uint8_t *in = static_cast<const uint8_t *>(input);\n> > > @@ -321,25 +345,25 @@ const std::map<PixelFormat, FormatInfo> formatInfo = {\n> > >                 .bitsPerSample = 16,\n> > >                 .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },\n> > >                 .packScanline = packScanlineRaw16,\n> > > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > > +               .thumbScanline = thumbScanlineRawXX,\n> > >         } },\n> > >         { formats::SGBRG16, {\n> > >                 .bitsPerSample = 16,\n> > >                 .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen },\n> > >                 .packScanline = packScanlineRaw16,\n> > > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > > +               .thumbScanline = thumbScanlineRawXX,\n> > >         } },\n> > >         { formats::SGRBG16, {\n> > >                 .bitsPerSample = 16,\n> > >                 .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen },\n> > >                 .packScanline = packScanlineRaw16,\n> > > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > > +               .thumbScanline = thumbScanlineRawXX,\n> > >         } },\n> > >         { formats::SRGGB16, {\n> > >                 .bitsPerSample = 16,\n> > >                 .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue },\n> > >                 .packScanline = packScanlineRaw16,\n> > > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > > +               .thumbScanline = thumbScanlineRawXX,\n> > >         } },\n> > >         { formats::SBGGR10_CSI2P, {\n> > >                 .bitsPerSample = 10,\n> > > -- \n> > > 2.43.0\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 406CBBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jun 2024 14:43:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 04A4362C99;\n\tThu, 27 Jun 2024 16:43:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6F544619E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 16:43:49 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 727452C5;\n\tThu, 27 Jun 2024 16:43:25 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"a2P++oHZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719499405;\n\tbh=c5BuJl1FxPbNG+aCxx1DjwntFp+AtKwKzUKuBcnrx98=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=a2P++oHZ9WiZLL5n27QIpzVM4vIHJ1U5sbDHcuSpzE7WitAT96Pu4lEky3/tgM7dJ\n\tVh0PgBpAz66w0Ah5LnSmnQgZR8gAtkLn2Az1PQPjkHzwinh2r4RzveiIHbY15B0Kr7\n\t0U3FSpEKHXiokO/wruCUsYml+dIdjaX7Iz3WjoxY=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<yr3z3dyadh5ne2szcwizttgugl4nmiz3fcxay2kvyax5z7eed2@idhzcyfvhpuh>","References":"<20240627125310.2533622-1-stefan.klug@ideasonboard.com>\n\t<20240627125310.2533622-3-stefan.klug@ideasonboard.com>\n\t<171949381801.3790642.18027179092916600098@ping.linuxembedded.co.uk>\n\t<yr3z3dyadh5ne2szcwizttgugl4nmiz3fcxay2kvyax5z7eed2@idhzcyfvhpuh>","Subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Date":"Thu, 27 Jun 2024 15:43:46 +0100","Message-ID":"<171949942674.3790642.8683126914541290175@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30105,"web_url":"https://patchwork.libcamera.org/comment/30105/","msgid":"<CAHW6GYJH8rr37UbQpqYcV90eXc36sxXCcZ-NjCiKOLcKhp-aPg@mail.gmail.com>","date":"2024-06-27T14:49:19","subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Stefan\n\nOn Thu, 27 Jun 2024 at 15:02, Stefan Klug <stefan.klug@ideasonboard.com> wrote:\n>\n> Hi David,\n>\n> On Thu, Jun 27, 2024 at 02:27:57PM +0100, David Plowman wrote:\n> > Hi Stefan\n> >\n> > Looks good to me!\n>\n> Thanks\n>\n> >\n> > On Thu, 27 Jun 2024 at 13:53, Stefan Klug <stefan.klug@ideasonboard.com> wrote:\n> > >\n> > > Add a thumbnail function for raw formats that are 16bit aligned.\n> > > This is needed for the upcoming RAW10 and RAW12 implemntation.\n> > >\n> > > Use the new function for RAW16 as the thumbScanlineRawXX_CSI2P produces\n> > > incorrect results for that format (it averages over adjacent bytes,\n> > > which works for the CSI formats).\n> > >\n> > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > > ---\n> > >  src/apps/common/dng_writer.cpp | 32 ++++++++++++++++++++++++++++----\n> > >  1 file changed, 28 insertions(+), 4 deletions(-)\n> > >\n> > > diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp\n> > > index 88b225d3e099..2cb320ff327b 100644\n> > > --- a/src/apps/common/dng_writer.cpp\n> > > +++ b/src/apps/common/dng_writer.cpp\n> > > @@ -144,6 +144,30 @@ void packScanlineRaw16(void *output, const void *input, unsigned int width)\n> > >         std::copy(in, in + width, out);\n> > >  }\n> > >\n> > > +/* Thumbnail function for raw data aligned to 16bit words */\n> > > +void thumbScanlineRawXX(const FormatInfo &info, void *output,\n> > > +                         const void *input, unsigned int width,\n> > > +                         unsigned int stride)\n> > > +{\n> > > +       const uint16_t *in = static_cast<const uint16_t *>(input);\n> > > +       const uint16_t *in2 = static_cast<const uint16_t *>(input) + stride / 2;\n> > > +       uint8_t *out = static_cast<uint8_t *>(output);\n> > > +\n> > > +       /* shift down to 8 */\n> > > +       unsigned int shift = info.bitsPerSample - 8;\n> > > +\n> > > +       /* simple averaging that produces grey RGB values */\n> > > +       for (unsigned int x = 0; x < width; x++) {\n> > > +               uint16_t value = (in[0] + in[1] + in2[0] + in2[1]) >> 2;\n> > > +               value = value >> shift;\n> > > +               *out++ = value;\n> > > +               *out++ = value;\n> > > +               *out++ = value;\n> >\n> > Just a small question as to whether you might want to subtract some\n> > black level and apply some \"fake\" gamma? It might make the thumbnails\n> > look a bit nicer. But just a matter of taste, I think, not something\n> > I'd worry over!\n>\n> That would surely be nicer. I'd also like to have some colors in there.\n> Do you see the thumbnails a lot? I actually had to dig where the\n> thumbnails get displayed (in my case only the overview in RawTherapy)\n> because in my daily use I never saw them.\n\nColours are more of a hassle because you have white balance and a\ncolour matrix to apply. You have all the information so it's doable.\nBut I think it's mostly a question of whether you can be bothered...\n\nThere are indeed ever fewer places where a thumbnail seems necessary.\nSome older versions of operating systems maybe, but these days not so\nmuch. So not changing anything at all seems fair enough to me!\n\nDavid\n\n>\n> Cheers,\n> Stefan\n>\n> >\n> > David\n> >\n> > > +               in += 16;\n> > > +               in2 += 16;\n> > > +       }\n> > > +}\n> > > +\n> > >  void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width)\n> > >  {\n> > >         const uint8_t *in = static_cast<const uint8_t *>(input);\n> > > @@ -321,25 +345,25 @@ const std::map<PixelFormat, FormatInfo> formatInfo = {\n> > >                 .bitsPerSample = 16,\n> > >                 .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },\n> > >                 .packScanline = packScanlineRaw16,\n> > > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > > +               .thumbScanline = thumbScanlineRawXX,\n> > >         } },\n> > >         { formats::SGBRG16, {\n> > >                 .bitsPerSample = 16,\n> > >                 .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen },\n> > >                 .packScanline = packScanlineRaw16,\n> > > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > > +               .thumbScanline = thumbScanlineRawXX,\n> > >         } },\n> > >         { formats::SGRBG16, {\n> > >                 .bitsPerSample = 16,\n> > >                 .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen },\n> > >                 .packScanline = packScanlineRaw16,\n> > > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > > +               .thumbScanline = thumbScanlineRawXX,\n> > >         } },\n> > >         { formats::SRGGB16, {\n> > >                 .bitsPerSample = 16,\n> > >                 .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue },\n> > >                 .packScanline = packScanlineRaw16,\n> > > -               .thumbScanline = thumbScanlineRawXX_CSI2P,\n> > > +               .thumbScanline = thumbScanlineRawXX,\n> > >         } },\n> > >         { formats::SBGGR10_CSI2P, {\n> > >                 .bitsPerSample = 10,\n> > > --\n> > > 2.43.0\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 C6BD9BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jun 2024 14:49:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1809862C9B;\n\tThu, 27 Jun 2024 16:49:33 +0200 (CEST)","from mail-oi1-x236.google.com (mail-oi1-x236.google.com\n\t[IPv6:2607:f8b0:4864:20::236])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 47F6C619E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 16:49:31 +0200 (CEST)","by mail-oi1-x236.google.com with SMTP id\n\t5614622812f47-3d5611cdc52so867321b6e.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jun 2024 07:49:31 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"G9DeyUVJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1719499770; x=1720104570;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=ZeVIltErRjH88i1ysKRaLOzIaVdhJh2YbnNpztujI6s=;\n\tb=G9DeyUVJyXPG5lgu/zy/cihoSYgUEICp7ojQ1yVH2HcdKHoSTfYErugpi2uG7Pg6Lj\n\tq7dRIoviOHnslIjEzDo0nACxOlwAKGK3VygckQRCUucpgw9aFPG5+dk2VT0QwI2ppX33\n\t5wUVxJngNtWMGqvyayq1HWI0/3TdwbW4zux/4LgMJwHpJTdT/7eTqwuld9FBrdU7jg16\n\tmhVeLFgSATpTg+S9ZnFdBHxXjVxnNaw5K9dARzjQeU5RYCyHBCj4tulsP7WOrzIm3Ca6\n\tT6ku0CZjOE46QhtE4UQeF7bNLlGaK+HtrfU4AL54XSTyU6Wp/PoKwrbxWCcadrBdnLiG\n\tPRLg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1719499770; x=1720104570;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=ZeVIltErRjH88i1ysKRaLOzIaVdhJh2YbnNpztujI6s=;\n\tb=ICO3Hrq1jPwmiv1f0HAhqZubjmxS4eSlxxoV7iWFuEM24HSh55jWwPPc1espoS+Lgm\n\tYro9BZg4xuyVdUxtgJQ8xVTN3eAYuuJYDdrmQGXZfuvrsxtCi9v2rlm8U/yVIejylvcf\n\tXriHNJEiXpL7PlAiecho4ubeWx++0IuhsradAmtXYxF36ecRqoXJKl4pDMr8X2occWKT\n\tPcO+2LFEe6+4yVG1PP55Z7bY9kmAz/OucAGA4PzFMoxliPcpGM8xd9H/HBWx83hmt16D\n\tNHXu4OZDINE00bS5QoCV7O/71eimu2K6krzkyU4J61MZ5TdWvivNQ+7xYrOQYgPD8q6n\n\tGaqA==","X-Gm-Message-State":"AOJu0YwGnQKkqP4+Xj9yWM2qfMoYcN/M5+ahKSNwekgBXQ0fiO/CnpAo\n\tx+M/jbYlESb8btQ1zJCwGIvNlDrs5hIoVvo55273Jav9/gRSHEdkT9kC51zjv45AAsNc7PeKSYD\n\tlmiw6Gx1z50K1n0PbuBUzupda3c3ZPRuXdOvQosGmWn3rwP6LNc0=","X-Google-Smtp-Source":"AGHT+IHX4GFkib0blG1bwK0Hlan3E59uIzUu93nW8YUvh28dIZuTUpcUZbmKVHR/zmsJKvwJEPkJSIW204R6KHofgEg=","X-Received":"by 2002:a05:6808:3987:b0:3d2:1ce7:43da with SMTP id\n\t5614622812f47-3d545a7ed17mr16648171b6e.49.1719499769991;\n\tThu, 27 Jun 2024 07:49:29 -0700 (PDT)","MIME-Version":"1.0","References":"<20240627125310.2533622-1-stefan.klug@ideasonboard.com>\n\t<20240627125310.2533622-3-stefan.klug@ideasonboard.com>\n\t<CAHW6GYKOJOXs_eeMAi32i8qfXx0n_rEOFp5UoFnJaOOcEhS5nw@mail.gmail.com>\n\t<sppiu6q26pc3q3nczp3rrqbjouawcyhgj44jdl46gflpkcwr6g@q5o4jcd4f4ml>","In-Reply-To":"<sppiu6q26pc3q3nczp3rrqbjouawcyhgj44jdl46gflpkcwr6g@q5o4jcd4f4ml>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 27 Jun 2024 15:49:19 +0100","Message-ID":"<CAHW6GYJH8rr37UbQpqYcV90eXc36sxXCcZ-NjCiKOLcKhp-aPg@mail.gmail.com>","Subject":"Re: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline\n\tfunction for RawXX","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]