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 {
5858 }
5959 }
6060
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-
7561 /// True when the format carries an alpha channel.
7662 pub fn has_alpha(&self) -> bool {
7763 matches!(self, PixelFormat::Rgba8 | PixelFormat::Bgra8)
@@ -311,11 +297,6 @@ impl SampleFormat {
311297 SampleFormat::F64 => 8,
312298 }
313299 }
314-
315- /// True for the float formats.
316- pub fn is_float(&self) -> bool {
317- matches!(self, SampleFormat::F32 | SampleFormat::F64)
318- }
319300 }
320301
321302 /// A named speaker position.
@@ -526,7 +507,6 @@ mod tests {
526507 assert_eq!(PixelFormat::P010.bytes_per_component(), 2);
527508 assert!(PixelFormat::Bgra8.has_alpha());
528509 assert!(!PixelFormat::Nv12.has_alpha());
529- assert!(PixelFormat::Nv12.is_yuv());
530510 }
531511
532512 #[test]