Skip to content

Commit

Permalink
Asserts on Identity
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Nov 1, 2024
1 parent a36f502 commit b2e7a73
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/codecs/avif/yuv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ where
},
"Unsupported bit depth and data type combination"
);
assert_ne!(
matrix,
YuvStandardMatrix::Identity,
"Identity matrix cannot be used on 4:0:0"
);

let y_plane = image.y_plane;
let y_stride = image.y_stride;
Expand Down Expand Up @@ -527,6 +532,11 @@ where
},
"Unsupported bit depth and data type combination"
);
assert_ne!(
matrix,
YuvStandardMatrix::Identity,
"Identity matrix cannot be used on 4:2:0"
);
let y_plane = image.y_plane;
let u_plane = image.u_plane;
let v_plane = image.v_plane;
Expand Down Expand Up @@ -903,6 +913,11 @@ where
},
"Unsupported bit depth and data type combination"
);
assert_ne!(
matrix,
YuvStandardMatrix::Identity,
"Identity matrix cannot be used on 4:2:2"
);
let y_plane = image.y_plane;
let u_plane = image.u_plane;
let v_plane = image.v_plane;
Expand Down

0 comments on commit b2e7a73

Please sign in to comment.