Skip to main content

conversion_cost

Function conversion_cost 

Source
pub fn conversion_cost(
    from: PixelDescriptor,
    to: PixelDescriptor,
) -> ConversionCost
Expand description

Compute the two-axis conversion cost for fromto.

This is the cost of our conversion kernels — it doesn’t include any consumer-side cost. Intent-independent.

Provenance is inferred from from (conservative: assumes current depth is the true origin). Use conversion_cost_with_provenance when the data has been widened from a lower-precision source.