aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-core/src/io
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-core/src/io
parentf44bddc9b5520507c7571b89763de668238d790a (diff)
downloadnihav-6f2630992fe340ad1a122ec10c649f756e478185.tar.gz
fix some clippy warnings
Diffstat (limited to 'nihav-core/src/io')
-rw-r--r--nihav-core/src/io/codebook.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/nihav-core/src/io/codebook.rs b/nihav-core/src/io/codebook.rs
index 0ec8883..6ea3b1e 100644
--- a/nihav-core/src/io/codebook.rs
+++ b/nihav-core/src/io/codebook.rs
@@ -144,7 +144,7 @@ pub trait CodebookReader<S> {
pub const TABLE_FILL_VALUE: u32 = 0x7F;
const MAX_LUT_BITS: u8 = 10;
-fn fill_lut_msb(table: &mut Vec<u32>, off: usize,
+fn fill_lut_msb(table: &mut [u32], off: usize,
code: u32, bits: u8, lut_bits: u8, symidx: u32, esc: bool) -> CodebookResult<()> {
if !esc {
let fill_len = lut_bits - bits;
@@ -164,7 +164,7 @@ fn fill_lut_msb(table: &mut Vec<u32>, off: usize,
Ok(())
}
-fn fill_lut_lsb(table: &mut Vec<u32>, off: usize,
+fn fill_lut_lsb(table: &mut [u32], off: usize,
code: u32, bits: u8, lut_bits: u8, symidx: u32, esc: bool) -> CodebookResult<()> {
if !esc {
let fill_len = lut_bits - bits;
@@ -184,7 +184,7 @@ fn fill_lut_lsb(table: &mut Vec<u32>, off: usize,
Ok(())
}
-fn fill_lut(table: &mut Vec<u32>, mode: CodebookMode,
+fn fill_lut(table: &mut [u32], mode: CodebookMode,
off: usize, code: u32, bits: u8, lut_bits: u8, symidx: u32, esc: bool) -> CodebookResult<bool> {
match mode {
CodebookMode::MSB => fill_lut_msb(table, off, code, bits, lut_bits, symidx, esc)?,
@@ -346,7 +346,7 @@ impl<S: Copy> Codebook<S> {
}
for bucket in escape_list.values() {
- build_esc_lut(&mut table, mode, &bucket)?;
+ build_esc_lut(&mut table, mode, bucket)?;
}
for i in 0..cb.len() {