7#ifndef MPIX_OP_KERNEL_H
8#define MPIX_OP_KERNEL_H
38 void (*kernel_fn)(
const uint8_t *src[], uint8_t *dst, uint16_t w);
49#define MPIX_REGISTER_KERNEL_5X5_OP(id, fn, t, fmt) \
50 const struct mpix_kernel_op mpix_kernel_5x5_op_##id = { \
51 .base.name = ("kernel_5x5_" #id), \
52 .base.format_src = (MPIX_FMT_##fmt), \
53 .base.format_dst = (MPIX_FMT_##fmt), \
54 .base.window_size = 5, \
55 .base.run = mpix_kernel_5x5_op, \
57 .type = (MPIX_KERNEL_##t), \
68#define MPIX_REGISTER_KERNEL_3X3_OP(id, fn, t, fmt) \
69 const struct mpix_kernel_op mpix_kernel_3x3_op_##id = { \
70 .base.name = ("kernel_3x3_" #id), \
71 .base.format_src = (MPIX_FMT_##fmt), \
72 .base.format_dst = (MPIX_FMT_##fmt), \
73 .base.window_size = 3, \
74 .base.run = mpix_kernel_3x3_op, \
76 .type = (MPIX_KERNEL_##t), \
void mpix_edgedetect_rgb24_3x3(const uint8_t *in[3], uint8_t *out, uint16_t width)
Apply a 3x3 edge detection kernel to an RGB24 input window and produce one RGB24 line.
void mpix_identity_rgb24_3x3(const uint8_t *in[3], uint8_t *out, uint16_t width)
Apply a 3x3 identity kernel to an RGB24 input window and produce one RGB24 line.
void mpix_sharpen_rgb24_3x3(const uint8_t *in[3], uint8_t *out, uint16_t width)
Apply a 3x3 sharpen kernel to an RGB24 input window and produce one RGB24 line.
void mpix_kernel_5x5_op(struct mpix_base_op *op)
Helper to turn a 5x5 kernel conversion function into an operation.
mpix_kernel_type
Definition op_kernel.h:18
void mpix_median_rgb24_5x5(const uint8_t *in[5], uint8_t *out, uint16_t width)
Apply a 5x5 median denoise kernel to an RGB24 input window and produce one RGB24 line.
void mpix_gaussianblur_rgb24_3x3(const uint8_t *in[3], uint8_t *out, uint16_t width)
Apply a 3x3 gaussian blur kernel to an RGB24 input window and produce one RGB24 line.
void mpix_kernel_3x3_op(struct mpix_base_op *op)
Helper to turn a 3x3 kernel conversion function into an operation.
void mpix_identity_rgb24_5x5(const uint8_t *in[5], uint8_t *out, uint16_t width)
Apply a 5x5 identity kernel to an RGB24 input window and produce one RGB24 line.
void mpix_median_rgb24_3x3(const uint8_t *in[3], uint8_t *out, uint16_t width)
Apply a 3x3 median denoise kernel to an RGB24 input window and produce one RGB24 line.
void mpix_sharpen_rgb24_5x5(const uint8_t *in[5], uint8_t *out, uint16_t width)
Apply a 5x5 unsharp kernel to an RGB24 input window and produce one RGB24 line.
@ MPIX_KERNEL_EDGE_DETECT
Definition op_kernel.h:22
@ MPIX_KERNEL_GAUSSIAN_BLUR
Definition op_kernel.h:24
@ MPIX_KERNEL_DENOISE
Definition op_kernel.h:28
@ MPIX_KERNEL_SHARPEN
Definition op_kernel.h:26
@ MPIX_KERNEL_IDENTITY
Definition op_kernel.h:20
One step of a line operation pipeline.
Definition op.h:27
uint16_t width
Definition op.h:37
Definition op_kernel.h:32
enum mpix_kernel_type type
Definition op_kernel.h:36
struct mpix_base_op base
Definition op_kernel.h:34