pub struct GpuFrame<'a> {
pub input: GpuInput<'a>,
pub raster_width: u32,
pub raster_height: u32,
pub cpp: u32,
pub window: Rect,
pub origin: (u32, u32),
pub linearization: Option<&'a [u16]>,
}Expand description
A frame to process: an input raster plus the window and coordinate anchors.
Fields§
§input: GpuInput<'a>§raster_width: u32Size of the uploaded raster in pixels.
raster_height: u32§cpp: u32§window: RectWindow of the raster to process (region decodes); full raster by default.
origin: (u32, u32)Sensor coordinates of the window origin (anchors the CFA and black patterns).
linearization: Option<&'a [u16]>Optional linearisation curve applied to integer samples (v -> lut[min(v, len-1)]).
Implementations§
Source§impl<'a> GpuFrame<'a>
impl<'a> GpuFrame<'a>
pub fn from_packed(p: &PackedPayload<'a>) -> Self
pub fn from_u16(data: &'a [u16], width: u32, height: u32, cpp: u32) -> Self
pub fn from_f32(data: &'a [f32], width: u32, height: u32, cpp: u32) -> Self
Sourcepub fn with_window(self, r: Rect) -> Self
pub fn with_window(self, r: Rect) -> Self
Process only r (raster coordinates); the origin moves with it.
pub fn with_origin(self, origin: (u32, u32)) -> Self
pub fn with_linearization(self, lut: Option<&'a [u16]>) -> Self
Sourcepub fn upload_bytes(&self) -> usize
pub fn upload_bytes(&self) -> usize
Bytes uploaded for this frame.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GpuFrame<'a>
impl<'a> RefUnwindSafe for GpuFrame<'a>
impl<'a> Send for GpuFrame<'a>
impl<'a> Sync for GpuFrame<'a>
impl<'a> Unpin for GpuFrame<'a>
impl<'a> UnsafeUnpin for GpuFrame<'a>
impl<'a> UnwindSafe for GpuFrame<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more