forge
Explore
Log in

Don't you dare go Hollow

U13: remove PixelFormat::is_planar and is_yuv, SampleFormat::is_float; unused in the workspace and edith

Browse files at this commit

e37d4bf24dae5a8091998af91eb419750b2f9eb5Ahmet Kaan GümüşParent: eafd458
crates/ec-core/src/frame.rsmodified+0 -20
@@ -58,20 +58,6 @@ impl PixelFormat {
58 }58 }
59 }59 }
60 60
61- /// True when chroma lives in its own plane(s) rather than packed with luma.
62- pub fn is_planar(&self) -> bool {
63- self.plane_count() > 1
64- }
65-
66- /// True for the YUV families (planar and semi-planar).
67- pub fn is_yuv(&self) -> bool {
68- use PixelFormat::*;
69- matches!(
70- self,
71- I420 | I422 | I444 | I010 | I210 | I410 | I412 | Nv12 | Nv21 | P010 | P016
72- )
73- }
74-
75 /// True when the format carries an alpha channel.61 /// True when the format carries an alpha channel.
76 pub fn has_alpha(&self) -> bool {62 pub fn has_alpha(&self) -> bool {
77 matches!(self, PixelFormat::Rgba8 | PixelFormat::Bgra8)63 matches!(self, PixelFormat::Rgba8 | PixelFormat::Bgra8)
@@ -311,11 +297,6 @@ impl SampleFormat {
311 SampleFormat::F64 => 8,297 SampleFormat::F64 => 8,
312 }298 }
313 }299 }
314-
315- /// True for the float formats.
316- pub fn is_float(&self) -> bool {
317- matches!(self, SampleFormat::F32 | SampleFormat::F64)
318- }
319 }300 }
320 301
321 /// A named speaker position.302 /// A named speaker position.
@@ -526,7 +507,6 @@ mod tests {
526 assert_eq!(PixelFormat::P010.bytes_per_component(), 2);507 assert_eq!(PixelFormat::P010.bytes_per_component(), 2);
527 assert!(PixelFormat::Bgra8.has_alpha());508 assert!(PixelFormat::Bgra8.has_alpha());
528 assert!(!PixelFormat::Nv12.has_alpha());509 assert!(!PixelFormat::Nv12.has_alpha());
529- assert!(PixelFormat::Nv12.is_yuv());
530 }510 }
531 511
532 #[test]512 #[test]