The open imaging DSP library
Loading...
Searching...
No Matches
op_qoi.h
1
7#ifndef MPIX_QOI_H
8#define MPIX_QOI_H
9
10#include <stdlib.h>
11#include <stdint.h>
12
13#include <mpix/op.h>
14
20
28 uint8_t alpha[1u << 8];
29};
30
39#define MPIX_REGISTER_QOI_PALETTE_OP(id, op, fmt_src, fmt_dst) \
40 const struct mpix_qoi_palette_op mpix_qoi_palette_op_##id = { \
41 .base.name = ("qoi_palette_" #id), \
42 .base.format_src = (MPIX_FMT_##fmt_src), \
43 .base.format_dst = (MPIX_FMT_##fmt_dst), \
44 .base.window_size = 1, \
45 .base.run = op, \
46 }
47
56#define MPIX_REGISTER_QOI_CONVERT_OP(id, op, fmt_src, fmt_dst) \
57 const struct mpix_qoi_convert_op mpix_qoi_convert_op_##id = { \
58 .base.name = ("qoi_convert_" #id), \
59 .base.format_src = (MPIX_FMT_##fmt_src), \
60 .base.format_dst = (MPIX_FMT_##fmt_dst), \
61 .base.window_size = 1, \
62 .base.run = (op), \
63 }
64
68int mpix_image_qoi_depalettize(struct mpix_image *img, size_t max_sz, struct mpix_palette *plt);
69
73int mpix_image_qoi_encode(struct mpix_image *img, size_t max_sz);
74
75#endif
int mpix_image_qoi_depalettize(struct mpix_image *img, size_t max_sz, struct mpix_palette *plt)
int mpix_image_qoi_encode(struct mpix_image *img, size_t max_sz)
One step of a line operation pipeline.
Definition op.h:27
Represent the image currently being processed.
Definition image.h:18
Color palette as a list of pixels in the described format.
Definition op_palettize.h:18
Definition op_qoi.h:16
struct mpix_base_op base
Definition op_qoi.h:18
Definition op_qoi.h:22
uint8_t alpha[1u<< 8]
Definition op_qoi.h:28
struct mpix_base_op base
Definition op_qoi.h:24
struct mpix_palette * palette
Definition op_qoi.h:26