Loading...
Searching...
No Matches
cms_interface.h
Go to the documentation of this file.
/* Copyright (c) the JPEG XL Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
#ifndef JXL_CMS_INTERFACE_H_
#define JXL_CMS_INTERFACE_H_
#include <jxl/color_encoding.h>
#include <jxl/types.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef 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);
typedef struct {
struct {
const uint8_t* data;
size_t size;
} icc;
JxlColorEncoding color_encoding;
size_t num_channels;
} JxlColorProfile;
typedef 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);
typedef float* (*jpegxl_cms_get_buffer_func)(void* user_data, size_t thread);
typedef JXL_BOOL (*jpegxl_cms_run_func)(void* user_data, size_t thread,
const float* input_buffer,
float* output_buffer,
size_t num_pixels);
typedef void (*jpegxl_cms_destroy_func)(void*);
typedef struct {
void* set_fields_data;
jpegxl_cms_set_fields_from_icc_func set_fields_from_icc;
void* init_data;
jpegxl_cms_init_func init;
jpegxl_cms_get_buffer_func get_src_buf;
jpegxl_cms_get_buffer_func get_dst_buf;
jpegxl_cms_run_func run;
jpegxl_cms_destroy_func destroy;
} JxlCmsInterface;
#ifdef __cplusplus
}
#endif
#endif /* JXL_CMS_INTERFACE_H_ */
color_encoding.h
Color Encoding definitions used by JPEG XL. All CIE units are for the standard 1931 2 degree observer...
jpegxl_cms_set_fields_from_icc_func
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
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:141
jpegxl_cms_get_buffer_func
float *(* jpegxl_cms_get_buffer_func)(void *user_data, size_t thread)
Definition cms_interface.h:116
jpegxl_cms_destroy_func
void(* jpegxl_cms_destroy_func)(void *)
Definition cms_interface.h:149
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:103
JXL_BOOL
#define JXL_BOOL
Definition types.h:29
JxlCmsInterface
Definition cms_interface.h:227
JxlCmsInterface::get_src_buf
jpegxl_cms_get_buffer_func get_src_buf
Definition cms_interface.h:239
JxlCmsInterface::init
jpegxl_cms_init_func init
Definition cms_interface.h:237
JxlCmsInterface::set_fields_data
void * set_fields_data
Definition cms_interface.h:229
JxlCmsInterface::destroy
jpegxl_cms_destroy_func destroy
Definition cms_interface.h:246
JxlCmsInterface::set_fields_from_icc
jpegxl_cms_set_fields_from_icc_func set_fields_from_icc
Definition cms_interface.h:231
JxlCmsInterface::get_dst_buf
jpegxl_cms_get_buffer_func get_dst_buf
Definition cms_interface.h:241
JxlCmsInterface::run
jpegxl_cms_run_func run
Definition cms_interface.h:244
JxlCmsInterface::init_data
void * init_data
Definition cms_interface.h:234
JxlColorEncoding
Definition color_encoding.h:114
JxlColorProfile
Definition cms_interface.h:47
JxlColorProfile::color_encoding
JxlColorEncoding color_encoding
Definition cms_interface.h:59
JxlColorProfile::num_channels
size_t num_channels
Definition cms_interface.h:64
types.h
Data types for the JPEG XL API, for both encoding and decoding.