MCPcopy Create free account
hub / github.com/ImageOptim/libimagequant / row_f_shared

Method row_f_shared

src/rows.rs:101–110  ·  view source on GitHub ↗
(&'px self, temp_row: &mut [MaybeUninit<RGBA>], temp_row_f: &'px mut [MaybeUninit<f_pixel>], row: usize)

Source from the content-addressed store, hash-verified

99
100 #[must_use]
101 pub fn row_f_shared<'px>(&'px self, temp_row: &mut [MaybeUninit<RGBA>], temp_row_f: &'px mut [MaybeUninit<f_pixel>], row: usize) -> &'px [f_pixel] {
102 if let Some(pixels) = self.px.f_pixels.as_ref() {
103 &pixels[self.px.width as usize * row..]
104 } else {
105 let lut = gamma_lut(self.px.gamma);
106 let row_pixels = self.px.row_rgba(temp_row, row);
107
108 DynamicRows::convert_row_to_f(temp_row_f, row_pixels, &lut)
109 }
110 }
111
112 #[must_use]
113 pub fn row_rgba<'px>(&'px self, temp_row: &'px mut [MaybeUninit<RGBA>], row: usize) -> &'px [RGBA] {

Callers 1

remap_to_paletteFunction · 0.80

Calls 2

gamma_lutFunction · 0.85
row_rgbaMethod · 0.80

Tested by

no test coverage detected