Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Nov 5, 2024
1 parent fb80e62 commit db8cbc0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/y_to_rgb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use rayon::prelude::{ParallelSlice, ParallelSliceMut};

// Chroma subsampling always assumed as 400
fn y_to_rgbx<const DESTINATION_CHANNELS: u8>(
gray_image: YuvGrayImage<u8>,
gray_image: &YuvGrayImage<u8>,
rgba: &mut [u8],
rgba_stride: u32,
range: YuvRange,
Expand Down Expand Up @@ -192,7 +192,7 @@ fn y_to_rgbx<const DESTINATION_CHANNELS: u8>(
/// on the specified width, height, and strides, or if invalid YUV range or matrix is provided.
///
pub fn yuv400_to_rgb(
gray_image: YuvGrayImage<u8>,
gray_image: &YuvGrayImage<u8>,
rgb: &mut [u8],
rgb_stride: u32,
range: YuvRange,
Expand All @@ -219,7 +219,7 @@ pub fn yuv400_to_rgb(
/// on the specified width, height, and strides, or if invalid YUV range or matrix is provided.
///
pub fn yuv400_to_bgr(
gray_image: YuvGrayImage<u8>,
gray_image: &YuvGrayImage<u8>,
bgr: &mut [u8],
bgr_stride: u32,
range: YuvRange,
Expand All @@ -246,7 +246,7 @@ pub fn yuv400_to_bgr(
/// on the specified width, height, and strides, or if invalid YUV range or matrix is provided.
///
pub fn yuv400_to_rgba(
gray_image: YuvGrayImage<u8>,
gray_image: &YuvGrayImage<u8>,
rgba: &mut [u8],
rgba_stride: u32,
range: YuvRange,
Expand All @@ -273,7 +273,7 @@ pub fn yuv400_to_rgba(
/// on the specified width, height, and strides, or if invalid YUV range or matrix is provided.
///
pub fn yuv400_to_bgra(
gray_image: YuvGrayImage<u8>,
gray_image: &YuvGrayImage<u8>,
bgra: &mut [u8],
bgra_stride: u32,
range: YuvRange,
Expand Down
6 changes: 3 additions & 3 deletions src/y_with_alpha_to_rgb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn y_with_alpha_to_rgbx<
const DESTINATION_CHANNELS: u8,
const BIT_DEPTH: usize,
>(
gray_alpha_image: YuvGrayAlphaImage<V>,
gray_alpha_image: &YuvGrayAlphaImage<V>,
rgba: &mut [V],
rgba_stride: u32,
range: YuvRange,
Expand Down Expand Up @@ -159,7 +159,7 @@ where
/// on the specified width, height, and strides, or if invalid YUV range or matrix is provided.
///
pub fn yuv400_with_alpha_to_rgba(
gray_alpha_image: YuvGrayAlphaImage<u8>,
gray_alpha_image: &YuvGrayAlphaImage<u8>,
rgba: &mut [u8],
rgba_stride: u32,
range: YuvRange,
Expand Down Expand Up @@ -193,7 +193,7 @@ pub fn yuv400_with_alpha_to_rgba(
/// on the specified width, height, and strides, or if invalid YUV range or matrix is provided.
///
pub fn yuv400_with_alpha_to_bgra(
gray_alpha_image: YuvGrayAlphaImage<u8>,
gray_alpha_image: &YuvGrayAlphaImage<u8>,
bgra: &mut [u8],
bgra_stride: u32,
range: YuvRange,
Expand Down

0 comments on commit db8cbc0

Please sign in to comment.