LIBJXL_DOC
cms_interface.h
Go to the documentation of this file.
1 /* Copyright (c) the JPEG XL Project Authors. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-style
4  * license that can be found in the LICENSE file.
5  */
6 
18 #ifndef JXL_CMS_INTERFACE_H_
19 #define JXL_CMS_INTERFACE_H_
20 
21 #include <jxl/color_encoding.h>
22 #include <jxl/types.h>
23 #include <stddef.h>
24 #include <stdint.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
39 typedef JXL_BOOL (*jpegxl_cms_set_fields_from_icc_func)(void* user_data,
40  const uint8_t* icc_data,
41  size_t icc_size,
43  JXL_BOOL* cmyk);
44 
47 typedef struct {
49  struct {
50  const uint8_t* data;
51  size_t size;
52  } icc;
53 
60 
64  size_t num_channels;
66 
103 typedef void* (*jpegxl_cms_init_func)(void* init_data, size_t num_threads,
104  size_t pixels_per_thread,
105  const JxlColorProfile* input_profile,
106  const JxlColorProfile* output_profile,
107  float intensity_target);
108 
116 typedef float* (*jpegxl_cms_get_buffer_func)(void* user_data, size_t thread);
117 
141 typedef JXL_BOOL (*jpegxl_cms_run_func)(void* user_data, size_t thread,
142  const float* input_buffer,
143  float* output_buffer,
144  size_t num_pixels);
145 
149 typedef void (*jpegxl_cms_destroy_func)(void*);
150 
227 typedef struct {
232 
234  void* init_data;
248 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #endif /* JXL_CMS_INTERFACE_H_ */
254 
jpegxl_cms_set_fields_from_icc_func set_fields_from_icc
Definition: cms_interface.h:231
#define JXL_BOOL
Definition: types.h:29
Data types for the JPEG XL API, for both encoding and decoding.
void(* jpegxl_cms_destroy_func)(void *)
Definition: cms_interface.h:149
Definition: color_encoding.h:114
JxlColorEncoding color_encoding
Definition: cms_interface.h:59
JXL_BOOL(* jpegxl_cms_set_fields_from_icc_func)(void *user_data, const uint8_t *icc_data, size_t icc_size, JxlColorEncoding *c, JXL_BOOL *cmyk)
Definition: cms_interface.h:39
Definition: cms_interface.h:227
void * init_data
Definition: cms_interface.h:234
Color Encoding definitions used by JPEG XL. All CIE units are for the standard 1931 2 degree observer...
jpegxl_cms_init_func init
Definition: cms_interface.h:237
jpegxl_cms_run_func run
Definition: cms_interface.h:244
void *(* jpegxl_cms_init_func)(void *init_data, size_t num_threads, size_t pixels_per_thread, const JxlColorProfile *input_profile, const JxlColorProfile *output_profile, float intensity_target)
Definition: cms_interface.h:103
jpegxl_cms_destroy_func destroy
Definition: cms_interface.h:246
float *(* jpegxl_cms_get_buffer_func)(void *user_data, size_t thread)
Definition: cms_interface.h:116
jpegxl_cms_get_buffer_func get_src_buf
Definition: cms_interface.h:239
Definition: cms_interface.h:47
jpegxl_cms_get_buffer_func get_dst_buf
Definition: cms_interface.h:241
size_t num_channels
Definition: cms_interface.h:64
JXL_BOOL(* jpegxl_cms_run_func)(void *user_data, size_t thread, const float *input_buffer, float *output_buffer, size_t num_pixels)
Definition: cms_interface.h:141
void * set_fields_data
Definition: cms_interface.h:229