From e37d4bf24dae5a8091998af91eb419750b2f9eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Dec 2026 13:36:26 +0300 Subject: [PATCH] U13: remove PixelFormat::is_planar and is_yuv, SampleFormat::is_float; unused in the workspace and edith --- crates/ec-core/src/frame.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/crates/ec-core/src/frame.rs b/crates/ec-core/src/frame.rs index 3e292298..82d73a39 100644 --- a/crates/ec-core/src/frame.rs +++ b/crates/ec-core/src/frame.rs @@ -58,20 +58,6 @@ impl PixelFormat { } } - /// True when chroma lives in its own plane(s) rather than packed with luma. - pub fn is_planar(&self) -> bool { - self.plane_count() > 1 - } - - /// True for the YUV families (planar and semi-planar). - pub fn is_yuv(&self) -> bool { - use PixelFormat::*; - matches!( - self, - I420 | I422 | I444 | I010 | I210 | I410 | I412 | Nv12 | Nv21 | P010 | P016 - ) - } - /// True when the format carries an alpha channel. pub fn has_alpha(&self) -> bool { matches!(self, PixelFormat::Rgba8 | PixelFormat::Bgra8) @@ -311,11 +297,6 @@ impl SampleFormat { SampleFormat::F64 => 8, } } - - /// True for the float formats. - pub fn is_float(&self) -> bool { - matches!(self, SampleFormat::F32 | SampleFormat::F64) - } } /// A named speaker position. @@ -526,7 +507,6 @@ mod tests { assert_eq!(PixelFormat::P010.bytes_per_component(), 2); assert!(PixelFormat::Bgra8.has_alpha()); assert!(!PixelFormat::Nv12.has_alpha()); - assert!(PixelFormat::Nv12.is_yuv()); } #[test]