From patchwork Thu Jun 27 12:51:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20426 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 1D74ABD87C for ; Thu, 27 Jun 2024 12:53:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CB97462C95; Thu, 27 Jun 2024 14:53:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LtJsq83m"; 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 E002B62C95 for ; Thu, 27 Jun 2024 14:53:35 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:6248:8b4b:42bc:2b84]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0FFB72E0; Thu, 27 Jun 2024 14:53:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719492792; bh=DSqodPtS3kfZV5MDSgZJWU9R1MjslJrKFnncimoleNg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LtJsq83mhONyxKumi/+5DlIePGMK8JwoooTWNX25/kucQW5+E0r3ddCaBXyCxsWbE 3KxsgPRBPjTe/7kQnZtOGzEM9lw3PMs/kqq/Xva6TMEqpuJWd6oQjtoe3t/gB1tEYJ QtRNRclhoIn7n0Qucq/WEIo0zRAD2/paT67Hnnxo= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH 1/3] apps: common: dng_writer: Rename packing functions Date: Thu, 27 Jun 2024 14:51:09 +0200 Message-ID: <20240627125310.2533622-2-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240627125310.2533622-1-stefan.klug@ideasonboard.com> References: <20240627125310.2533622-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 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" The old names lead to confusions. Rename to better express the intent. Signed-off-by: Stefan Klug Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/apps/common/dng_writer.cpp | 74 +++++++++++++++++----------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp index d37b0d627cd1..88b225d3e099 100644 --- a/src/apps/common/dng_writer.cpp +++ b/src/apps/common/dng_writer.cpp @@ -128,7 +128,7 @@ struct Matrix3d { namespace { -void packScanlineSBGGR8(void *output, const void *input, unsigned int width) +void packScanlineRaw8(void *output, const void *input, unsigned int width) { const uint8_t *in = static_cast(input); uint8_t *out = static_cast(output); @@ -136,7 +136,7 @@ void packScanlineSBGGR8(void *output, const void *input, unsigned int width) std::copy(in, in + width, out); } -void packScanlineSBGGR16(void *output, const void *input, unsigned int width) +void packScanlineRaw16(void *output, const void *input, unsigned int width) { const uint16_t *in = static_cast(input); uint16_t *out = static_cast(output); @@ -144,7 +144,7 @@ void packScanlineSBGGR16(void *output, const void *input, unsigned int width) std::copy(in, in + width, out); } -void packScanlineSBGGR10P(void *output, const void *input, unsigned int width) +void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width) { const uint8_t *in = static_cast(input); uint8_t *out = static_cast(output); @@ -160,7 +160,7 @@ void packScanlineSBGGR10P(void *output, const void *input, unsigned int width) } } -void packScanlineSBGGR12P(void *output, const void *input, unsigned int width) +void packScanlineRaw12_CSI2P(void *output, const void *input, unsigned int width) { const uint8_t *in = static_cast(input); uint8_t *out = static_cast(output); @@ -174,7 +174,7 @@ void packScanlineSBGGR12P(void *output, const void *input, unsigned int width) } } -void thumbScanlineSBGGRxxP(const FormatInfo &info, void *output, +void thumbScanlineRawXX_CSI2P(const FormatInfo &info, void *output, const void *input, unsigned int width, unsigned int stride) { @@ -296,98 +296,98 @@ const std::map formatInfo = { { formats::SBGGR8, { .bitsPerSample = 8, .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed }, - .packScanline = packScanlineSBGGR8, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw8, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SGBRG8, { .bitsPerSample = 8, .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen }, - .packScanline = packScanlineSBGGR8, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw8, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SGRBG8, { .bitsPerSample = 8, .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen }, - .packScanline = packScanlineSBGGR8, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw8, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SRGGB8, { .bitsPerSample = 8, .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, - .packScanline = packScanlineSBGGR8, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw8, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SBGGR16, { .bitsPerSample = 16, .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed }, - .packScanline = packScanlineSBGGR16, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw16, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SGBRG16, { .bitsPerSample = 16, .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen }, - .packScanline = packScanlineSBGGR16, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw16, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SGRBG16, { .bitsPerSample = 16, .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen }, - .packScanline = packScanlineSBGGR16, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw16, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SRGGB16, { .bitsPerSample = 16, .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, - .packScanline = packScanlineSBGGR16, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw16, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SBGGR10_CSI2P, { .bitsPerSample = 10, .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed }, - .packScanline = packScanlineSBGGR10P, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw10_CSI2P, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SGBRG10_CSI2P, { .bitsPerSample = 10, .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen }, - .packScanline = packScanlineSBGGR10P, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw10_CSI2P, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SGRBG10_CSI2P, { .bitsPerSample = 10, .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen }, - .packScanline = packScanlineSBGGR10P, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw10_CSI2P, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SRGGB10_CSI2P, { .bitsPerSample = 10, .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, - .packScanline = packScanlineSBGGR10P, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw10_CSI2P, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SBGGR12_CSI2P, { .bitsPerSample = 12, .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed }, - .packScanline = packScanlineSBGGR12P, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw12_CSI2P, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SGBRG12_CSI2P, { .bitsPerSample = 12, .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen }, - .packScanline = packScanlineSBGGR12P, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw12_CSI2P, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SGRBG12_CSI2P, { .bitsPerSample = 12, .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen }, - .packScanline = packScanlineSBGGR12P, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw12_CSI2P, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SRGGB12_CSI2P, { .bitsPerSample = 12, .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, - .packScanline = packScanlineSBGGR12P, - .thumbScanline = thumbScanlineSBGGRxxP, + .packScanline = packScanlineRaw12_CSI2P, + .thumbScanline = thumbScanlineRawXX_CSI2P, } }, { formats::SBGGR10_IPU3, { .bitsPerSample = 16, From patchwork Thu Jun 27 12:51:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20427 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 C45EEBD87C for ; Thu, 27 Jun 2024 12:53:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 751AE62C9D; Thu, 27 Jun 2024 14:53:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wBrMEbmN"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3F87762C98 for ; Thu, 27 Jun 2024 14:53:42 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:6248:8b4b:42bc:2b84]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 61F0E2E0; Thu, 27 Jun 2024 14:53:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719492798; bh=YdteIK+RlX3MCfQxROWXtSR7PlZy6FqL60WS/CdvUsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wBrMEbmNF3zzLSw7adUwBZAmbYIIJSG2pM3HyFfPfQtCExDYaMWMVnAo5ijS+tK2s za66TgZCA+X/ATmEs8W1DdR+mxUkRcAdSQmSFlvalJBlKcB2V7dZFOD8ZxqbZRc6x1 paVhGMOoXksW3a1cRo885nlt313LBdcBME1t3pA8= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH 2/3] apps: common: dng_writer: Add thumbnail scanline function for RawXX Date: Thu, 27 Jun 2024 14:51:10 +0200 Message-ID: <20240627125310.2533622-3-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240627125310.2533622-1-stefan.klug@ideasonboard.com> References: <20240627125310.2533622-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 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" Add a thumbnail function for raw formats that are 16bit aligned. This is needed for the upcoming RAW10 and RAW12 implemntation. Use the new function for RAW16 as the thumbScanlineRawXX_CSI2P produces incorrect results for that format (it averages over adjacent bytes, which works for the CSI formats). Signed-off-by: Stefan Klug Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/apps/common/dng_writer.cpp | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp index 88b225d3e099..2cb320ff327b 100644 --- a/src/apps/common/dng_writer.cpp +++ b/src/apps/common/dng_writer.cpp @@ -144,6 +144,30 @@ void packScanlineRaw16(void *output, const void *input, unsigned int width) std::copy(in, in + width, out); } +/* Thumbnail function for raw data aligned to 16bit words */ +void thumbScanlineRawXX(const FormatInfo &info, void *output, + const void *input, unsigned int width, + unsigned int stride) +{ + const uint16_t *in = static_cast(input); + const uint16_t *in2 = static_cast(input) + stride / 2; + uint8_t *out = static_cast(output); + + /* shift down to 8 */ + unsigned int shift = info.bitsPerSample - 8; + + /* simple averaging that produces grey RGB values */ + for (unsigned int x = 0; x < width; x++) { + uint16_t value = (in[0] + in[1] + in2[0] + in2[1]) >> 2; + value = value >> shift; + *out++ = value; + *out++ = value; + *out++ = value; + in += 16; + in2 += 16; + } +} + void packScanlineRaw10_CSI2P(void *output, const void *input, unsigned int width) { const uint8_t *in = static_cast(input); @@ -321,25 +345,25 @@ const std::map formatInfo = { .bitsPerSample = 16, .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed }, .packScanline = packScanlineRaw16, - .thumbScanline = thumbScanlineRawXX_CSI2P, + .thumbScanline = thumbScanlineRawXX, } }, { formats::SGBRG16, { .bitsPerSample = 16, .pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen }, .packScanline = packScanlineRaw16, - .thumbScanline = thumbScanlineRawXX_CSI2P, + .thumbScanline = thumbScanlineRawXX, } }, { formats::SGRBG16, { .bitsPerSample = 16, .pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen }, .packScanline = packScanlineRaw16, - .thumbScanline = thumbScanlineRawXX_CSI2P, + .thumbScanline = thumbScanlineRawXX, } }, { formats::SRGGB16, { .bitsPerSample = 16, .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, .packScanline = packScanlineRaw16, - .thumbScanline = thumbScanlineRawXX_CSI2P, + .thumbScanline = thumbScanlineRawXX, } }, { formats::SBGGR10_CSI2P, { .bitsPerSample = 10, From patchwork Thu Jun 27 12:51:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20428 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 771C5BD87C for ; Thu, 27 Jun 2024 12:53:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 32AFF62E18; Thu, 27 Jun 2024 14:53:47 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="KRy0hpG3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6C8F662C98 for ; Thu, 27 Jun 2024 14:53:46 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:6248:8b4b:42bc:2b84]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 858DC7E0; Thu, 27 Jun 2024 14:53:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719492802; bh=1/I4QbsQrEw/6g98aqGt8GE/jaKXSVL6AvIWKLKjNZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRy0hpG3AE5x8EB5ghdOSWcrqWhGB7Xg5zXoeTPvSxebF/H72VYINPQuAjaweAAb8 trmKCkzO6z46fxp/VT02Gz1iPo+ip2Tr4DZuXAu5a02RcA8ydsdZpwO7SizO6bfker BSverjxHslYit7LG5mgKw6pIkCkiyIuTft22tunQ= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH 3/3] apps: common: dng_writer: Support RAW10 and RAW12 format Date: Thu, 27 Jun 2024 14:51:11 +0200 Message-ID: <20240627125310.2533622-4-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240627125310.2533622-1-stefan.klug@ideasonboard.com> References: <20240627125310.2533622-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 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" Add support for RAW10 and RAW12 to the dng_writer. This is needed on imx8mp to produce tuning images. Both formats were tested on a debix som with a imx335. Signed-off-by: Stefan Klug --- src/apps/common/dng_writer.cpp | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp index 2cb320ff327b..162c41a84011 100644 --- a/src/apps/common/dng_writer.cpp +++ b/src/apps/common/dng_writer.cpp @@ -136,6 +136,34 @@ void packScanlineRaw8(void *output, const void *input, unsigned int width) std::copy(in, in + width, out); } +void packScanlineRaw10(void *output, const void *input, unsigned int width) +{ + const uint16_t *in = static_cast(input); + uint8_t *out = static_cast(output); + + for (unsigned int i = 0; i < width; i += 4) { + *out++ = (in[0] & 0x3fc) >> 2; + *out++ = (in[0] & 0x003) << 6 | (in[1] & 0x3f0) >> 4; + *out++ = (in[1] & 0x00f) << 4 | (in[2] & 0x3c0) >> 6; + *out++ = (in[2] & 0x03f) << 2 | (in[3] & 0x300) >> 8; + *out++ = (in[3] & 0x0ff); + in += 4; + } +} + +void packScanlineRaw12(void *output, const void *input, unsigned int width) +{ + const uint16_t *in = static_cast(input); + uint8_t *out = static_cast(output); + + for (unsigned int i = 0; i < width; i += 2) { + *out++ = (in[0] & 0xff0) >> 4; + *out++ = (in[0] & 0x00f) << 4 | (in[1] & 0xf00) >> 8; + *out++ = (in[1] & 0x0ff); + in += 2; + } +} + void packScanlineRaw16(void *output, const void *input, unsigned int width) { const uint16_t *in = static_cast(input); @@ -341,6 +369,54 @@ const std::map formatInfo = { .packScanline = packScanlineRaw8, .thumbScanline = thumbScanlineRawXX_CSI2P, } }, + { formats::SBGGR10, { + .bitsPerSample = 10, + .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, + .packScanline = packScanlineRaw10, + .thumbScanline = thumbScanlineRawXX, + } }, + { formats::SGBRG10, { + .bitsPerSample = 10, + .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, + .packScanline = packScanlineRaw10, + .thumbScanline = thumbScanlineRawXX, + } }, + { formats::SGRBG10, { + .bitsPerSample = 10, + .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, + .packScanline = packScanlineRaw10, + .thumbScanline = thumbScanlineRawXX, + } }, + { formats::SRGGB10, { + .bitsPerSample = 10, + .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, + .packScanline = packScanlineRaw10, + .thumbScanline = thumbScanlineRawXX, + } }, + { formats::SBGGR12, { + .bitsPerSample = 12, + .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, + .packScanline = packScanlineSBGGR12, + .thumbScanline = thumbScanlineRawXX, + } }, + { formats::SGBRG12, { + .bitsPerSample = 12, + .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, + .packScanline = packScanlineSBGGR12, + .thumbScanline = thumbScanlineRawXX, + } }, + { formats::SGRBG12, { + .bitsPerSample = 12, + .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, + .packScanline = packScanlineSBGGR12, + .thumbScanline = thumbScanlineRawXX, + } }, + { formats::SRGGB12, { + .bitsPerSample = 12, + .pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue }, + .packScanline = packScanlineSBGGR12, + .thumbScanline = thumbScanlineRawXX, + } }, { formats::SBGGR16, { .bitsPerSample = 16, .pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },