7#ifndef MPIX_OP_PALETTIZE_H
8#define MPIX_OP_PALETTIZE_H
43#define MPIX_REGISTER_PALETTE_OP(id, fn, format_in, format_out) \
44 const struct mpix_palette_op mpix_palette_op_##id = { \
45 .base.name = ("palettize_" #id), \
46 .base.format_src = (MPIX_FMT_##format_in), \
47 .base.format_dst = (MPIX_FMT_##format_out), \
48 .base.window_size = 1, \
49 .base.run = mpix_palettize_op, \
void mpix_convert_palette1_to_rgb24(const uint8_t *src, uint8_t *dst, uint16_t width, const struct mpix_palette *palette)
Convert a line of pixel data from PALETTE1 to RGB24.
void mpix_palettize_op(struct mpix_base_op *op)
Helper to turn a line palettization function into an operation.
void mpix_convert_rgb24_to_palette4(const uint8_t *src, uint8_t *dst, uint16_t width, const struct mpix_palette *palette)
Convert a line of pixel data from RGB24 to PALETTE4.
void mpix_convert_rgb24_to_palette2(const uint8_t *src, uint8_t *dst, uint16_t width, const struct mpix_palette *palette)
Convert a line of pixel data from RGB24 to PALETTE2.
void mpix_convert_palette4_to_rgb24(const uint8_t *src, uint8_t *dst, uint16_t width, const struct mpix_palette *palette)
Convert a line of pixel data from PALETTE4 to RGB24.
void mpix_convert_palette2_to_rgb24(const uint8_t *src, uint8_t *dst, uint16_t width, const struct mpix_palette *palette)
Convert a line of pixel data from PALETTE2 to RGB24.
void mpix_convert_rgb24_to_palette8(const uint8_t *src, uint8_t *dst, uint16_t width, const struct mpix_palette *palette)
Convert a line of pixel data from RGB24 to PALETTE8.
void mpix_convert_palette8_to_rgb24(const uint8_t *src, uint8_t *dst, uint16_t width, const struct mpix_palette *palette)
Convert a line of pixel data from PALETTE8 to RGB24.
void mpix_convert_rgb24_to_palette1(const uint8_t *src, uint8_t *dst, uint16_t width, const struct mpix_palette *palette)
Convert a line of pixel data from RGB24 to PALETTE1.
One step of a line operation pipeline.
Definition op.h:27
Definition op_palettize.h:26
void(* palette_fn)(const uint8_t *s, uint8_t *d, uint16_t w, const struct mpix_palette *p)
Definition op_palettize.h:30
struct mpix_palette * palette
Definition op_palettize.h:32
struct mpix_base_op base
Definition op_palettize.h:28
Color palette as a list of pixels in the described format.
Definition op_palettize.h:18
uint32_t format
Definition op_palettize.h:22
uint8_t * colors
Definition op_palettize.h:20