diff --git a/src/codecs/avif/yuv.rs b/src/codecs/avif/yuv.rs index a41b99a7a3..747cce8381 100644 --- a/src/codecs/avif/yuv.rs +++ b/src/codecs/avif/yuv.rs @@ -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; @@ -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; @@ -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;