Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make avif-native 1.70-compatible #2382

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading