7#ifndef MPIX_OP_CONVERT_H
8#define MPIX_OP_CONVERT_H
13#include <mpix/image.h>
19struct mpix_convert_op {
23 void (*convert_fn)(
const uint8_t *src, uint8_t *dst, uint16_t width);
34#define MPIX_REGISTER_CONVERT_OP(id, fn, format_in, format_out) \
35 const struct mpix_convert_op mpix_convert_op_##id = { \
36 .base.name = ("convert_" #id), \
37 .base.format_src = (MPIX_FMT_##format_in), \
38 .base.format_dst = (MPIX_FMT_##format_out), \
39 .base.window_size = 1, \
40 .base.run = (mpix_convert_op), \
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).
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_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_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_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_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_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_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_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_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_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_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_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_op_convert(struct mpix_base_op *op)
Helper to turn a format conversion function into an operation.
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_rgb24(const uint8_t *src, uint8_t *dst, uint16_t width)
Convert a line of pixel data from RGB24 to RGB24 (null conversion).
One step of a line operation pipeline.
Definition op.h:27
uint16_t width
Definition op.h:37