projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix some clippy warnings
[nihav.git]
/
nihav-codec-support
/
src
/
codecs
/
mod.rs
diff --git
a/nihav-codec-support/src/codecs/mod.rs
b/nihav-codec-support/src/codecs/mod.rs
index ebdbaa7e56cf97bb715eaa2fc6ad36a27ae0d107..2bac7e27fa5b84313ab1c49ad3f19ade869dfd13 100644
(file)
--- 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)]
/// 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>>,
}
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.
/// 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)]
/// 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>>,
}
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.
/// 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)]
/// }
/// ```
#[allow(dead_code)]
+#[derive(Default)]
pub struct IPBShuffler {
lastframe: Option<NAVideoBufferRef<u8>>,
nextframe: Option<NAVideoBufferRef<u8>>,
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
/// Motion vector data type.
///
/// # Examples