aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-codec-support/src
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2022-09-22 17:53:58 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2022-09-22 17:53:58 +0200
commit6f2630992fe340ad1a122ec10c649f756e478185 (patch)
treec8c95d46546cd71e2cd5e15faef02ca9acd2b70b /nihav-codec-support/src
parentf44bddc9b5520507c7571b89763de668238d790a (diff)
downloadnihav-6f2630992fe340ad1a122ec10c649f756e478185.tar.gz
fix some clippy warnings
Diffstat (limited to 'nihav-codec-support/src')
-rw-r--r--nihav-codec-support/src/codecs/mod.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/nihav-codec-support/src/codecs/mod.rs b/nihav-codec-support/src/codecs/mod.rs
index ebdbaa7..2bac7e2 100644
--- a/nihav-codec-support/src/codecs/mod.rs
+++ b/nihav-codec-support/src/codecs/mod.rs
@@ -25,6 +25,7 @@ use std::mem;
/// shuffler.add_frame(frame.clone()); // tells frame manager to use the frame as the next reference
/// ```
#[allow(dead_code)]
+#[derive(Default)]
pub struct HAMShuffler<T: Copy> {
lastframe: Option<NAVideoBufferRef<T>>,
}
@@ -62,10 +63,6 @@ impl<T: Copy> HAMShuffler<T> {
}
}
-impl<T: Copy> Default for HAMShuffler<T> {
- fn default() -> Self { Self { lastframe: None } }
-}
-
/// Frame manager for codecs with intra and inter frames.
///
/// This frame manager simplifies frame management for the case when codec decodes new frame using previous frame as source of some data.
@@ -85,6 +82,7 @@ impl<T: Copy> Default for HAMShuffler<T> {
/// shuffler.add_frame(frame.clone()); // tells frame manager to use the frame as the next reference
/// ```
#[allow(dead_code)]
+#[derive(Default)]
pub struct IPShuffler {
lastframe: Option<NAVideoBufferRef<u8>>,
}
@@ -112,10 +110,6 @@ impl IPShuffler {
}
}
-impl Default for IPShuffler {
- fn default() -> Self { Self { lastframe: None } }
-}
-
/// Frame manager for codecs with I-, P- and B-frames.
///
/// This frame manager simplifies frame management for the case when codec uses I/P/B frame scheme.
@@ -146,6 +140,7 @@ impl Default for IPShuffler {
/// }
/// ```
#[allow(dead_code)]
+#[derive(Default)]
pub struct IPBShuffler {
lastframe: Option<NAVideoBufferRef<u8>>,
nextframe: Option<NAVideoBufferRef<u8>>,
@@ -202,10 +197,6 @@ impl IPBShuffler {
}
}
-impl Default for IPBShuffler {
- fn default() -> Self { Self { lastframe: None, nextframe: None } }
-}
-
/// Motion vector data type.
///
/// # Examples