![]() |
The open imaging DSP library
|
Implementing new conversion operations. More...
Macros | |
#define | MPIX_REGISTER_CONVERT_OP(id, fn, format_in, format_out) |
Define a new format conversion operation. | |
Functions | |
uint8_t | mpix_rgb24_get_luma_bt709 (const uint8_t rgb24[3]) |
Get the luminance (luma channel) of an RGB24 pixel. | |
void | mpix_convert_rgb24_to_rgb24 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB24 to RGB24 (null conversion). | |
void | mpix_convert_rgb332_to_rgb24 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB332 to RGB24. | |
void | mpix_convert_rgb24_to_rgb332 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB24 to RGB332 little-endian. | |
void | mpix_convert_rgb565le_to_rgb24 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB565 little-endian to RGB24. | |
void | mpix_convert_rgb565be_to_rgb24 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB565 big-endian to RGB24. | |
void | mpix_convert_rgb24_to_rgb565le (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB24 to RGB565 little-endian. | |
void | mpix_convert_rgb24_to_rgb565be (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB24 to RGB565 big-endian. | |
void | mpix_convert_yuyv_to_rgb24_bt709 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from YUYV to RGB24 (BT.709 coefficients). | |
void | mpix_convert_rgb24_to_yuyv_bt709 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB24 to YUYV (BT.709 coefficients). | |
void | mpix_convert_rgb24_to_yuv24_bt709 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB24 to YUV24 (BT.709 coefficients). | |
void | mpix_convert_yuv24_to_rgb24_bt709 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from YUV24 to RGB24 (BT.709 coefficients). | |
void | mpix_convert_yuyv_to_yuv24 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from YUYV to YUV24. | |
void | mpix_convert_yuv24_to_yuyv (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from YUV24 to YUYV. | |
void | mpix_convert_y8_to_rgb24_bt709 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from Y8 to RGB24. | |
void | mpix_convert_rgb24_to_y8_bt709 (const uint8_t *src, uint8_t *dst, uint16_t width) |
Convert a line of pixel data from RGB24 to Y8. | |
void | mpix_op_convert (struct mpix_base_op *op) |
Helper to turn a format conversion function into an operation. | |
Implementing new conversion operations.
SPDX-License-Identifier: Apache-2.0
#define MPIX_REGISTER_CONVERT_OP | ( | id, | |
fn, | |||
format_in, | |||
format_out | |||
) |
Define a new format conversion operation.
id | Short identifier to differentiate operations of the same type. |
fn | Function converting one input line. |
format_in | The input format for that operation. |
format_out | The Output format for that operation. |
void mpix_convert_rgb24_to_rgb24 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB24 to RGB24 (null conversion).
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb24_to_rgb332 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB24 to RGB332 little-endian.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb24_to_rgb565be | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB24 to RGB565 big-endian.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb24_to_rgb565le | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB24 to RGB565 little-endian.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb24_to_y8_bt709 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB24 to Y8.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb24_to_yuv24_bt709 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB24 to YUV24 (BT.709 coefficients).
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb24_to_yuyv_bt709 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB24 to YUYV (BT.709 coefficients).
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb332_to_rgb24 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB332 to RGB24.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb565be_to_rgb24 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB565 big-endian to RGB24.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_rgb565le_to_rgb24 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from RGB565 little-endian to RGB24.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_y8_to_rgb24_bt709 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from Y8 to RGB24.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_yuv24_to_rgb24_bt709 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from YUV24 to RGB24 (BT.709 coefficients).
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_yuv24_to_yuyv | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from YUV24 to YUYV.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_yuyv_to_rgb24_bt709 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from YUYV to RGB24 (BT.709 coefficients).
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_convert_yuyv_to_yuv24 | ( | const uint8_t * | src, |
uint8_t * | dst, | ||
uint16_t | width | ||
) |
Convert a line of pixel data from YUYV to YUV24.
See mpix/formats.h for the definition of the input and output formats.
You only need to call this function to work directly on raw buffers. See mpix_image_convert for converting between formats.
src | Buffer of the input line in the format, XXX in mpix_convert_XXX_to_YYY() . |
dst | Buffer of the output line in the format, YYY in mpix_convert_XXX_to_YYY() . |
width | Width of the lines in number of pixels. |
void mpix_op_convert | ( | struct mpix_base_op * | op | ) |
Helper to turn a format conversion function into an operation.
The line conversion function is to be provided in op->arg0
. It processes on the input line to convert it to the destination format.
op | Current operation in progress. |
uint8_t mpix_rgb24_get_luma_bt709 | ( | const uint8_t | rgb24[3] | ) |
Get the luminance (luma channel) of an RGB24 pixel.
rgb24 | Pointer to an RGB24 pixel: red, green, blue channels. |