5
5
* Colorspace conversions.
11
CSConverter_fn (void * dst_image,
12
const tv_image_format *dst_format,
13
const void * src_image,
14
const tv_image_format *src_format,
15
const void * user_data);
20
CSConverter_fn * convert;
21
const void * user_data;
11
25
* Try to find an available converter, returns -1 on error or the
12
26
* converter id on success.
14
int lookup_csconvert(enum tveng_frame_pixformat src_fmt,
15
enum tveng_frame_pixformat dest_fmt);
28
int lookup_csconvert(tv_pixfmt src_pixfmt,
29
tv_pixfmt dst_pixfmt);
18
32
* Converts from src to dest.
20
void csconvert(int id, const char *src, char *dest,
21
int src_stride, int dest_stride, int width, int height);
34
gboolean csconvert(void * dst_image,
35
const tv_image_format *dst_format,
36
const void * src_image,
37
const tv_image_format *src_format);
24
* Builds the appropiate conversion tables.
25
* The format of the fields is the same as in the visual info reported
28
void build_csconvert_tables(int rmask, int rshift, int rprec,
29
int gmask, int gshift, int gprec,
30
int bmask, int bshift, int bprec);
40
* Registers a converter. Returns -1 and does nothing when there
41
* already a converter for the given pair, something else on success.
42
* User data will be passed to the converter each time it's called.
44
int register_converter (const char *name,
47
CSConverter_fn *converter,
48
const void *user_data);
51
* Registers a bunch of converters at once. Does the same thing as
52
* registering them one by one, it's just convenience. Returns
53
* the number of successfully registered converters.
55
int register_converters (const char *name,
32
59
/* startup and shutdown of the conversions */
33
60
void startup_csconvert(void);