[1/3] apps: common: dng_writer: Rename packing functions
diff mbox series

Message ID 20240627125310.2533622-2-stefan.klug@ideasonboard.com
State Superseded
Headers show
Series
  • dng_writer: Add support for RAW10 and RAW 12
Related show

Commit Message

Stefan Klug June 27, 2024, 12:51 p.m. UTC
The old names lead to confusions. Rename to better express the intent.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/apps/common/dng_writer.cpp | 74 +++++++++++++++++-----------------
 1 file changed, 37 insertions(+), 37 deletions(-)

Comments

Kieran Bingham June 27, 2024, 12:58 p.m. UTC | #1
Quoting Stefan Klug (2024-06-27 13:51:09)
> The old names lead to confusions. Rename to better express the intent.
> 
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> ---
>  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<const uint8_t *>(input);
>         uint8_t *out = static_cast<uint8_t *>(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<const uint16_t *>(input);
>         uint16_t *out = static_cast<uint16_t *>(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<const uint8_t *>(input);
>         uint8_t *out = static_cast<uint8_t *>(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<const uint8_t *>(input);
>         uint8_t *out = static_cast<uint8_t *>(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,

Does the XX add value here? I'd be tempted to drop this to thumbScanlineRaw_CSI2P

But eitherway


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>




>                            const void *input, unsigned int width,
>                            unsigned int stride)
>  {
> @@ -296,98 +296,98 @@ const std::map<PixelFormat, FormatInfo> 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,
> -- 
> 2.43.0
>
Laurent Pinchart June 27, 2024, 1:07 p.m. UTC | #2
On Thu, Jun 27, 2024 at 01:58:29PM +0100, Kieran Bingham wrote:
> Quoting Stefan Klug (2024-06-27 13:51:09)
> > The old names lead to confusions. Rename to better express the intent.
> > 
> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> > ---
> >  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<const uint8_t *>(input);
> >         uint8_t *out = static_cast<uint8_t *>(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<const uint16_t *>(input);
> >         uint16_t *out = static_cast<uint16_t *>(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<const uint8_t *>(input);
> >         uint8_t *out = static_cast<uint8_t *>(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<const uint8_t *>(input);
> >         uint8_t *out = static_cast<uint8_t *>(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,
> 
> Does the XX add value here? I'd be tempted to drop this to thumbScanlineRaw_CSI2P
> 
> But eitherway
> 
> 
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

I think I have a slight preference for s/XX//, but either way,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> >                            const void *input, unsigned int width,
> >                            unsigned int stride)
> >  {
> > @@ -296,98 +296,98 @@ const std::map<PixelFormat, FormatInfo> 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,

Patch
diff mbox series

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<const uint8_t *>(input);
 	uint8_t *out = static_cast<uint8_t *>(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<const uint16_t *>(input);
 	uint16_t *out = static_cast<uint16_t *>(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<const uint8_t *>(input);
 	uint8_t *out = static_cast<uint8_t *>(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<const uint8_t *>(input);
 	uint8_t *out = static_cast<uint8_t *>(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<PixelFormat, FormatInfo> 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,