projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix clippy warnings
[nihav.git]
/
nihav-duck
/
src
/
codecs
/
vpcommon.rs
diff --git
a/nihav-duck/src/codecs/vpcommon.rs
b/nihav-duck/src/codecs/vpcommon.rs
index 8474dc6a211561ecf347535a80352bbd3e736bc9..eb84f4ef19582f295d679460e314882730f48cdf 100644
(file)
--- a/
nihav-duck/src/codecs/vpcommon.rs
+++ b/
nihav-duck/src/codecs/vpcommon.rs
@@
-17,9
+17,10
@@
pub const VP_YUVA420_FORMAT: NAPixelFormaton = NAPixelFormaton{
palette: false
};
palette: false
};
-#[derive(Clone,Copy,Debug,PartialEq)]
+#[derive(Clone,Copy,Debug,PartialEq
,Default
)]
#[allow(dead_code)]
pub enum VPMBType {
#[allow(dead_code)]
pub enum VPMBType {
+ #[default]
Intra,
InterNoMV,
InterMV,
Intra,
InterNoMV,
InterMV,
@@
-51,10
+52,6
@@
impl VPMBType {
}
}
}
}
-impl Default for VPMBType {
- fn default() -> Self { VPMBType::Intra }
-}
-
#[derive(Default)]
pub struct VPShuffler {
lastframe: Option<NAVideoBufferRef<u8>>,
#[derive(Default)]
pub struct VPShuffler {
lastframe: Option<NAVideoBufferRef<u8>>,
@@
-71,18
+68,10
@@
impl VPShuffler {
self.goldframe = Some(buf);
}
pub fn get_last(&mut self) -> Option<NAVideoBufferRef<u8>> {
self.goldframe = Some(buf);
}
pub fn get_last(&mut self) -> Option<NAVideoBufferRef<u8>> {
- if let Some(ref frm) = self.lastframe {
- Some(frm.clone())
- } else {
- None
- }
+ self.lastframe.as_ref().cloned()
}
pub fn get_golden(&mut self) -> Option<NAVideoBufferRef<u8>> {
}
pub fn get_golden(&mut self) -> Option<NAVideoBufferRef<u8>> {
- if let Some(ref frm) = self.goldframe {
- Some(frm.clone())
- } else {
- None
- }
+ self.goldframe.as_ref().cloned()
}
pub fn has_refs(&self) -> bool {
self.lastframe.is_some()
}
pub fn has_refs(&self) -> bool {
self.lastframe.is_some()