pub struct TransformOperation;Expand description
Transform operations for frequency domain processing
Implementations§
Source§impl TransformOperation
impl TransformOperation
Sourcepub fn dct_2d(
device: &GpuDevice,
input: &[f32],
output: &mut [f32],
width: u32,
height: u32,
) -> Result<()>
pub fn dct_2d( device: &GpuDevice, input: &[f32], output: &mut [f32], width: u32, height: u32, ) -> Result<()>
Compute 2D DCT (Discrete Cosine Transform)
Computes the forward DCT on 8x8 blocks. Input dimensions must be multiples of 8.
§Arguments
device- GPU deviceinput- Input data (f32 values)output- Output DCT coefficientswidth- Data width (must be multiple of 8)height- Data height (must be multiple of 8)
§Errors
Returns an error if dimensions are invalid or if the GPU operation fails.
Sourcepub fn idct_2d(
device: &GpuDevice,
input: &[f32],
output: &mut [f32],
width: u32,
height: u32,
) -> Result<()>
pub fn idct_2d( device: &GpuDevice, input: &[f32], output: &mut [f32], width: u32, height: u32, ) -> Result<()>
Compute 2D IDCT (Inverse Discrete Cosine Transform)
Computes the inverse DCT on 8x8 blocks. Input dimensions must be multiples of 8.
§Arguments
device- GPU deviceinput- Input DCT coefficientsoutput- Output reconstructed datawidth- Data width (must be multiple of 8)height- Data height (must be multiple of 8)
§Errors
Returns an error if dimensions are invalid or if the GPU operation fails.
Sourcepub fn dct_2d_general(
device: &GpuDevice,
input: &[f32],
output: &mut [f32],
width: u32,
height: u32,
) -> Result<()>
pub fn dct_2d_general( device: &GpuDevice, input: &[f32], output: &mut [f32], width: u32, height: u32, ) -> Result<()>
Compute general 2D DCT using row-column decomposition
This method works for any dimensions, not just multiples of 8.
§Arguments
device- GPU deviceinput- Input data (f32 values)output- Output DCT coefficientswidth- Data widthheight- Data height
§Errors
Returns an error if dimensions are invalid or if the GPU operation fails.
Auto Trait Implementations§
impl Freeze for TransformOperation
impl RefUnwindSafe for TransformOperation
impl Send for TransformOperation
impl Sync for TransformOperation
impl Unpin for TransformOperation
impl UnsafeUnpin for TransformOperation
impl UnwindSafe for TransformOperation
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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