LIBJXL: jxl/cms_interface.h Source File

LIBJXL

Loading...
Searching...
No Matches
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
24#if defined(__cplusplus) || defined(c_plusplus)
25extern "C" {
26#endif
27
30 typedef struct {
32 struct {
33 const uint8_t* data;
34 size_t size;
35 } icc;
36
42 JxlColorEncoding color_encoding;
43
47 size_t num_channels;
48} JxlColorProfile;
49
85 typedef void* (*jpegxl_cms_init_func)(void* init_data, size_t num_threads,
86 size_t pixels_per_thread,
87 const JxlColorProfile* input_profile,
88 const JxlColorProfile* output_profile,
89 float intensity_target);
90
98 typedef float* (*jpegxl_cms_get_buffer_func)(void* user_data, size_t thread);
99
123 typedef JXL_BOOL (*jpegxl_cms_run_func)(void* user_data, size_t thread,
124 const float* input_buffer,
125 float* output_buffer,
126 size_t num_pixels);
127
131 typedef void (*jpegxl_cms_destroy_func)(void*);
132
209 typedef struct {
211 void* init_data;
214 jpegxl_cms_init_func init;
216 jpegxl_cms_get_buffer_func get_src_buf;
218 jpegxl_cms_get_buffer_func get_dst_buf;
221 jpegxl_cms_run_func run;
223 jpegxl_cms_destroy_func destroy;
224} JxlCmsInterface;
225
226#if defined(__cplusplus) || defined(c_plusplus)
227}
228#endif
229
230#endif /* JXL_CMS_INTERFACE_H_ */
231
color_encoding.h
Color Encoding definitions used by JPEG XL. All CIE units are for the standard 1931 2 degree observer...
jpegxl_cms_run_func
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:123
jpegxl_cms_get_buffer_func
float *(* jpegxl_cms_get_buffer_func)(void *user_data, size_t thread)
Definition: cms_interface.h:98
JXL_BOOL
#define JXL_BOOL
Definition: types.h:31
jpegxl_cms_destroy_func
void(* jpegxl_cms_destroy_func)(void *)
Definition: cms_interface.h:131
jpegxl_cms_init_func
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:85
JxlCmsInterface
Definition: cms_interface.h:209
JxlCmsInterface::get_src_buf
jpegxl_cms_get_buffer_func get_src_buf
Definition: cms_interface.h:216
JxlCmsInterface::init
jpegxl_cms_init_func init
Definition: cms_interface.h:214
JxlCmsInterface::destroy
jpegxl_cms_destroy_func destroy
Definition: cms_interface.h:223
JxlCmsInterface::get_dst_buf
jpegxl_cms_get_buffer_func get_dst_buf
Definition: cms_interface.h:218
JxlCmsInterface::run
jpegxl_cms_run_func run
Definition: cms_interface.h:221
JxlCmsInterface::init_data
void * init_data
Definition: cms_interface.h:211
JxlColorEncoding
Definition: color_encoding.h:116
JxlColorProfile
Definition: cms_interface.h:30
JxlColorProfile::color_encoding
JxlColorEncoding color_encoding
Definition: cms_interface.h:42
JxlColorProfile::num_channels
size_t num_channels
Definition: cms_interface.h:47
types.h
Data types for the JPEG XL API, for both encoding and decoding.