apps: common: dng_writer: Support RAW16 formats
Add support for RAW16 formats to the DNGWriter helpers so that we can produce dng files from the mali-c55. Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
9411578be8
commit
5155150bbf
1 changed files with 32 additions and 0 deletions
|
@ -136,6 +136,14 @@ void packScanlineSBGGR8(void *output, const void *input, unsigned int width)
|
||||||
std::copy(in, in + width, out);
|
std::copy(in, in + width, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void packScanlineSBGGR16(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);
|
||||||
|
|
||||||
|
std::copy(in, in + width, out);
|
||||||
|
}
|
||||||
|
|
||||||
void packScanlineSBGGR10P(void *output, const void *input, unsigned int width)
|
void packScanlineSBGGR10P(void *output, const void *input, unsigned int width)
|
||||||
{
|
{
|
||||||
const uint8_t *in = static_cast<const uint8_t *>(input);
|
const uint8_t *in = static_cast<const uint8_t *>(input);
|
||||||
|
@ -309,6 +317,30 @@ const std::map<PixelFormat, FormatInfo> formatInfo = {
|
||||||
.packScanline = packScanlineSBGGR8,
|
.packScanline = packScanlineSBGGR8,
|
||||||
.thumbScanline = thumbScanlineSBGGRxxP,
|
.thumbScanline = thumbScanlineSBGGRxxP,
|
||||||
} },
|
} },
|
||||||
|
{ formats::SBGGR16, {
|
||||||
|
.bitsPerSample = 16,
|
||||||
|
.pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },
|
||||||
|
.packScanline = packScanlineSBGGR16,
|
||||||
|
.thumbScanline = thumbScanlineSBGGRxxP,
|
||||||
|
} },
|
||||||
|
{ formats::SGBRG16, {
|
||||||
|
.bitsPerSample = 16,
|
||||||
|
.pattern = { CFAPatternGreen, CFAPatternBlue, CFAPatternRed, CFAPatternGreen },
|
||||||
|
.packScanline = packScanlineSBGGR16,
|
||||||
|
.thumbScanline = thumbScanlineSBGGRxxP,
|
||||||
|
} },
|
||||||
|
{ formats::SGRBG16, {
|
||||||
|
.bitsPerSample = 16,
|
||||||
|
.pattern = { CFAPatternGreen, CFAPatternRed, CFAPatternBlue, CFAPatternGreen },
|
||||||
|
.packScanline = packScanlineSBGGR16,
|
||||||
|
.thumbScanline = thumbScanlineSBGGRxxP,
|
||||||
|
} },
|
||||||
|
{ formats::SRGGB16, {
|
||||||
|
.bitsPerSample = 16,
|
||||||
|
.pattern = { CFAPatternRed, CFAPatternGreen, CFAPatternGreen, CFAPatternBlue },
|
||||||
|
.packScanline = packScanlineSBGGR16,
|
||||||
|
.thumbScanline = thumbScanlineSBGGRxxP,
|
||||||
|
} },
|
||||||
{ formats::SBGGR10_CSI2P, {
|
{ formats::SBGGR10_CSI2P, {
|
||||||
.bitsPerSample = 10,
|
.bitsPerSample = 10,
|
||||||
.pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },
|
.pattern = { CFAPatternBlue, CFAPatternGreen, CFAPatternGreen, CFAPatternRed },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue