projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace vec.truncate(0) with vec.clear()
[nihav.git]
/
nihav-codec-support
/
src
/
codecs
/
h263
/
mod.rs
diff --git
a/nihav-codec-support/src/codecs/h263/mod.rs
b/nihav-codec-support/src/codecs/h263/mod.rs
index 8c3ca655088008480e30e64f32c7d63d66123770..e357778175a840552b8b794945254a5cd04935f2 100644
(file)
--- a/
nihav-codec-support/src/codecs/h263/mod.rs
+++ b/
nihav-codec-support/src/codecs/h263/mod.rs
@@
-2,6
+2,7
@@
use nihav_core::codecs::DecoderResult;
use super::{MV, ZERO_MV};
use nihav_core::frame::{NAVideoBuffer, NAVideoBufferRef};
use super::{MV, ZERO_MV};
use nihav_core::frame::{NAVideoBuffer, NAVideoBufferRef};
+#[allow(clippy::erasing_op)]
#[allow(clippy::many_single_char_names)]
pub mod code;
pub mod data;
#[allow(clippy::many_single_char_names)]
pub mod code;
pub mod data;
@@
-357,9
+358,9
@@
impl CBPInfo {
fn new() -> Self { CBPInfo{ cbp: Vec::new(), q: Vec::new(), mb_w: 0 } }
fn reset(&mut self, mb_w: usize) {
self.mb_w = mb_w;
fn new() -> Self { CBPInfo{ cbp: Vec::new(), q: Vec::new(), mb_w: 0 } }
fn reset(&mut self, mb_w: usize) {
self.mb_w = mb_w;
- self.cbp.
truncate(0
);
+ self.cbp.
clear(
);
self.cbp.resize(self.mb_w * 2, 0);
self.cbp.resize(self.mb_w * 2, 0);
- self.q.
truncate(0
);
+ self.q.
clear(
);
self.q.resize(self.mb_w * 2, 0);
}
fn update_row(&mut self) {
self.q.resize(self.mb_w * 2, 0);
}
fn update_row(&mut self) {