Struct libjxl_sys::JxlCmsInterface
source · [−]#[repr(C)]pub struct JxlCmsInterface {
pub init_data: *mut c_void,
pub init: jpegxl_cms_init_func,
pub get_src_buf: jpegxl_cms_get_buffer_func,
pub get_dst_buf: jpegxl_cms_get_buffer_func,
pub run: jpegxl_cms_run_func,
pub destroy: jpegxl_cms_destroy_func,
}
Expand description
Interface for performing colorspace transforms. The @c init function can be called several times to instantiate several transforms, including before other transforms have been destroyed.
The call sequence for a given colorspace transform could look like the
following:
@dot
digraph calls {
newrank = true
node [shape = box, fontname = monospace]
init [label = “user_data <- init(\l
init_data = data,\l
num_threads = 3,\l
pixels_per_thread = 20,\l
input = (sRGB, 3 channels),\l
output = (Display-P3, 3 channels),\l
intensity_target = 255\l
)\l”]
subgraph cluster_0 {
color = lightgrey
label = “thread 1”
labeljust = “c”
run_1_1 [label = “run(\l
user_data,\l
thread = 1,\l
input = in[0],\l
output = out[0],\l
num_pixels = 20\l
)\l”]
run_1_2 [label = “run(\l
user_data,\l
thread = 1,\l
input = in[3],\l
output = out[3],\l
num_pixels = 20\l
)\l”]
}
subgraph cluster_1 {
color = lightgrey
label = “thread 2”
labeljust = “l”
run_2_1 [label = “run(\l
user_data,\l
thread = 2,\l
input = in[1],\l
output = out[1],\l
num_pixels = 20\l
)\l”]
run_2_2 [label = “run(\l
user_data,\l
thread = 2,\l
input = in[4],\l
output = out[4],\l
num_pixels = 13\l
)\l”]
}
subgraph cluster_3 {
color = lightgrey
label = “thread 3”
labeljust = “c”
run_3_1 [label = “run(\l
user_data,\l
thread = 3,\l
input = in[2],\l
output = out[2],\l
num_pixels = 20\l
)\l”]
}
init -> {run_1_1; run_2_1; run_3_1; rank = same}
run_1_1 -> run_1_2
run_2_1 -> run_2_2
{run_1_2; run_2_2, run_3_1} -> “destroy(user_data)”
}
@enddot
Fields
init_data: *mut c_void
CMS-specific data that will be passed to @ref init.
init: jpegxl_cms_init_func
Prepares a colorspace transform as described in the documentation of @ref jpegxl_cms_init_func.
get_src_buf: jpegxl_cms_get_buffer_func
Returns a buffer that can be used as input to @c run.
get_dst_buf: jpegxl_cms_get_buffer_func
Returns a buffer that can be used as output from @c run.
run: jpegxl_cms_run_func
Executes the transform on a batch of pixels, per @ref jpegxl_cms_run_func.
destroy: jpegxl_cms_destroy_func
Cleans up the transform.
Trait Implementations
sourceimpl Clone for JxlCmsInterface
impl Clone for JxlCmsInterface
sourcefn clone(&self) -> JxlCmsInterface
fn clone(&self) -> JxlCmsInterface
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for JxlCmsInterface
impl Debug for JxlCmsInterface
sourceimpl Default for JxlCmsInterface
impl Default for JxlCmsInterface
impl Copy for JxlCmsInterface
Auto Trait Implementations
impl RefUnwindSafe for JxlCmsInterface
impl !Send for JxlCmsInterface
impl !Sync for JxlCmsInterface
impl Unpin for JxlCmsInterface
impl UnwindSafe for JxlCmsInterface
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more