Skip to content

Commit

Permalink
Make avif/yuv.rs 1.70-compatible (#2382)
Browse files Browse the repository at this point in the history
  • Loading branch information
FreezyLemon authored Nov 18, 2024
1 parent 317bc16 commit d6879d9
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/codecs/avif/yuv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ use crate::error::DecodingError;
use crate::{ImageError, ImageFormat};
use num_traits::AsPrimitive;
use std::fmt::{Display, Formatter};
use std::mem::size_of;

#[derive(Debug, Copy, Clone)]
/// Representation of inversion matrix
struct CbCrInverseTransform<T> {
pub y_coef: T,
pub cr_coef: T,
pub cb_coef: T,
pub g_coeff_1: T,
pub g_coeff_2: T,
y_coef: T,
cr_coef: T,
cb_coef: T,
g_coeff_1: T,
g_coeff_2: T,
}

impl CbCrInverseTransform<f32> {
Expand Down Expand Up @@ -162,11 +163,11 @@ pub(crate) enum YuvIntensityRange {

#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
struct YuvChromaRange {
pub bias_y: u32,
pub bias_uv: u32,
pub range_y: u32,
pub range_uv: u32,
pub range: YuvIntensityRange,
bias_y: u32,
bias_uv: u32,
range_y: u32,
range_uv: u32,
range: YuvIntensityRange,
}

impl YuvIntensityRange {
Expand Down

0 comments on commit d6879d9

Please sign in to comment.