MCPcopy Index your code
hub / github.com/ImageOptim/libimagequant / liq_histogram_quantize

Function liq_histogram_quantize

imagequant-sys/src/ffi.rs:530–542  ·  view source on GitHub ↗
(hist: &mut liq_histogram, attr: &liq_attr, write_only_output: &mut MaybeUninit<Option<Box<liq_result>>>)

Source from the content-addressed store, hash-verified

528#[no_mangle]
529#[inline(never)]
530pub extern "C" fn liq_histogram_quantize(hist: &mut liq_histogram, attr: &liq_attr, write_only_output: &mut MaybeUninit<Option<Box<liq_result>>>) -> liq_error {
531 if bad_object!(attr, LIQ_ATTR_MAGIC) ||
532 bad_object!(hist, LIQ_HISTOGRAM_MAGIC) { return Error::InvalidPointer; }
533 let attr = &attr.inner;
534 let hist = &mut hist.inner;
535
536 let res = hist.quantize(attr)
537 .map(|inner| liq_result {
538 magic_header: LIQ_RESULT_MAGIC,
539 inner,
540 });
541 store_boxed_result(res, write_only_output)
542}
543
544#[no_mangle]
545#[inline(never)]

Callers 2

test_zero_histogramFunction · 0.85
test_histogramFunction · 0.85

Calls 2

store_boxed_resultFunction · 0.85
quantizeMethod · 0.45

Tested by 2

test_zero_histogramFunction · 0.68
test_histogramFunction · 0.68