The open imaging DSP library
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
mpix/op_bayer.h

Implementing new debayer operations. More...

Data Structures

struct  mpix_bayer_op
 

Macros

#define MPIX_REGISTER_BAYER_OP(id, fn, format_in, win_sz)
 Define a new bayer format conversion operation.
 

Functions

void mpix_convert_rggb8_to_rgb24_3x3 (const uint8_t *i0, const uint8_t *i1, const uint8_t *i2, uint8_t *rgb24, uint16_t width)
 Convert a line from RGGB8 to RGB24 with 3x3 method.
 
void mpix_convert_grbg8_to_rgb24_3x3 (const uint8_t *i0, const uint8_t *i1, const uint8_t *i2, uint8_t *rgb24, uint16_t width)
 Convert a line from GRBG8 to RGB24 with 3x3 method.
 
void mpix_convert_bggr8_to_rgb24_3x3 (const uint8_t *i0, const uint8_t *i1, const uint8_t *i2, uint8_t *rgb24, uint16_t width)
 Convert a line from BGGR8 to RGB24 with 3x3 method.
 
void mpix_convert_gbrg8_to_rgb24_3x3 (const uint8_t *i0, const uint8_t *i1, const uint8_t *i2, uint8_t *rgb24, uint16_t width)
 Convert a line from GBRG8 to RGB24 with 3x3 method.
 
void mpix_convert_rggb8_to_rgb24_2x2 (const uint8_t *i0, const uint8_t *i1, uint8_t *rgb24, uint16_t width)
 Convert a line from RGGB8 to RGB24 with 2x2 method.
 
void mpix_convert_gbrg8_to_rgb24_2x2 (const uint8_t *i0, const uint8_t *i1, uint8_t *rgb24, uint16_t width)
 Convert a line from GBRG8 to RGB24 with 2x2 method.
 
void mpix_convert_bggr8_to_rgb24_2x2 (const uint8_t *i0, const uint8_t *i1, uint8_t *rgb24, uint16_t width)
 Convert a line from BGGR8 to RGB24 with 2x2 method.
 
void mpix_convert_grbg8_to_rgb24_2x2 (const uint8_t *i0, const uint8_t *i1, uint8_t *rgb24, uint16_t width)
 Convert a line from GRBG8 to RGB24 with 2x2 method.
 

Detailed Description

Implementing new debayer operations.

SPDX-License-Identifier: Apache-2.0

Macro Definition Documentation

◆ MPIX_REGISTER_BAYER_OP

#define MPIX_REGISTER_BAYER_OP (   id,
  fn,
  format_in,
  win_sz 
)
Value:
const struct mpix_bayer_op mpix_bayer_op_##id = { \
.base.name = ("bayer_" #id), \
.base.format_src = (MPIX_FMT_##format_in), \
.base.format_dst = MPIX_FMT_RGB24, \
.base.window_size = (win_sz), \
.base.run = (fn), \
}
#define MPIX_FMT_RGB24
Definition formats.h:95
uint32_t format_src
Definition op.h:33
const uint8_t * name
Definition op.h:31
void(* run)(struct mpix_base_op *op)
Definition op.h:51
Definition op_bayer.h:16
struct mpix_base_op base
Definition op_bayer.h:18

Define a new bayer format conversion operation.

Parameters
idShort identifier to differentiate operations of the same type.
fnFunction performing the operation.
format_inThe input format for that operation.
win_szThe number of line of context needed for that debayer operation.

Function Documentation

◆ mpix_convert_bggr8_to_rgb24_2x2()

void mpix_convert_bggr8_to_rgb24_2x2 ( const uint8_t *  i0,
const uint8_t *  i1,
uint8_t *  rgb24,
uint16_t  width 
)

Convert a line from BGGR8 to RGB24 with 2x2 method.

Parameters
i0Buffer of the input row number 0 in bayer format (1 byte per pixel).
i1Buffer of the input row number 1 in bayer format (1 byte per pixel).
rgb24Buffer of the output row in RGB24 format (3 bytes per pixel).
widthWidth of the lines in number of pixels.

◆ mpix_convert_bggr8_to_rgb24_3x3()

void mpix_convert_bggr8_to_rgb24_3x3 ( const uint8_t *  i0,
const uint8_t *  i1,
const uint8_t *  i2,
uint8_t *  rgb24,
uint16_t  width 
)

Convert a line from BGGR8 to RGB24 with 3x3 method.

Parameters
i0Buffer of the input row number 0 in bayer format (1 byte per pixel).
i1Buffer of the input row number 1 in bayer format (1 byte per pixel).
i2Buffer of the input row number 2 in bayer format (1 byte per pixel).
rgb24Buffer of the output row in RGB24 format (3 bytes per pixel).
widthWidth of the lines in number of pixels.

◆ mpix_convert_gbrg8_to_rgb24_2x2()

void mpix_convert_gbrg8_to_rgb24_2x2 ( const uint8_t *  i0,
const uint8_t *  i1,
uint8_t *  rgb24,
uint16_t  width 
)

Convert a line from GBRG8 to RGB24 with 2x2 method.

Parameters
i0Buffer of the input row number 0 in bayer format (1 byte per pixel).
i1Buffer of the input row number 1 in bayer format (1 byte per pixel).
rgb24Buffer of the output row in RGB24 format (3 bytes per pixel).
widthWidth of the lines in number of pixels.

◆ mpix_convert_gbrg8_to_rgb24_3x3()

void mpix_convert_gbrg8_to_rgb24_3x3 ( const uint8_t *  i0,
const uint8_t *  i1,
const uint8_t *  i2,
uint8_t *  rgb24,
uint16_t  width 
)

Convert a line from GBRG8 to RGB24 with 3x3 method.

Parameters
i0Buffer of the input row number 0 in bayer format (1 byte per pixel).
i1Buffer of the input row number 1 in bayer format (1 byte per pixel).
i2Buffer of the input row number 2 in bayer format (1 byte per pixel).
rgb24Buffer of the output row in RGB24 format (3 bytes per pixel).
widthWidth of the lines in number of pixels.

◆ mpix_convert_grbg8_to_rgb24_2x2()

void mpix_convert_grbg8_to_rgb24_2x2 ( const uint8_t *  i0,
const uint8_t *  i1,
uint8_t *  rgb24,
uint16_t  width 
)

Convert a line from GRBG8 to RGB24 with 2x2 method.

Parameters
i0Buffer of the input row number 0 in bayer format (1 byte per pixel).
i1Buffer of the input row number 1 in bayer format (1 byte per pixel).
rgb24Buffer of the output row in RGB24 format (3 bytes per pixel).
widthWidth of the lines in number of pixels.

◆ mpix_convert_grbg8_to_rgb24_3x3()

void mpix_convert_grbg8_to_rgb24_3x3 ( const uint8_t *  i0,
const uint8_t *  i1,
const uint8_t *  i2,
uint8_t *  rgb24,
uint16_t  width 
)

Convert a line from GRBG8 to RGB24 with 3x3 method.

Parameters
i0Buffer of the input row number 0 in bayer format (1 byte per pixel).
i1Buffer of the input row number 1 in bayer format (1 byte per pixel).
i2Buffer of the input row number 2 in bayer format (1 byte per pixel).
rgb24Buffer of the output row in RGB24 format (3 bytes per pixel).
widthWidth of the lines in number of pixels.

◆ mpix_convert_rggb8_to_rgb24_2x2()

void mpix_convert_rggb8_to_rgb24_2x2 ( const uint8_t *  i0,
const uint8_t *  i1,
uint8_t *  rgb24,
uint16_t  width 
)

Convert a line from RGGB8 to RGB24 with 2x2 method.

Parameters
i0Buffer of the input row number 0 in bayer format (1 byte per pixel).
i1Buffer of the input row number 1 in bayer format (1 byte per pixel).
rgb24Buffer of the output row in RGB24 format (3 bytes per pixel).
widthWidth of the lines in number of pixels.

◆ mpix_convert_rggb8_to_rgb24_3x3()

void mpix_convert_rggb8_to_rgb24_3x3 ( const uint8_t *  i0,
const uint8_t *  i1,
const uint8_t *  i2,
uint8_t *  rgb24,
uint16_t  width 
)

Convert a line from RGGB8 to RGB24 with 3x3 method.

Parameters
i0Buffer of the input row number 0 in bayer format (1 byte per pixel).
i1Buffer of the input row number 1 in bayer format (1 byte per pixel).
i2Buffer of the input row number 2 in bayer format (1 byte per pixel).
rgb24Buffer of the output row in RGB24 format (3 bytes per pixel).
widthWidth of the lines in number of pixels.