let dstride = dst.get_stride(comp);
let doff = dst.get_offset(comp);
let mut ddta = dst.get_data_mut();
- let mut dbuf: &mut [u8] = ddta.as_mut_slice();
+ let dbuf: &mut [u8] = ddta.as_mut_slice();
let x = if comp > 0 { dx/2 } else { dx };
let y = if comp > 0 { dy/2 } else { dy };
let sx_ = (if comp > 0 { sx >> 1 } else { sx }) - pre;
let dstride = dst.get_stride(comp);
let doff = dst.get_offset(comp);
let mut ddta = dst.get_data_mut();
- let mut dbuf: &mut [u8] = ddta.as_mut_slice();
+ let dbuf: &mut [u8] = ddta.as_mut_slice();
let x = if comp > 0 { dx/2 } else { dx };
let y = if comp > 0 { dy/2 } else { dy };
let sx_ = ((if comp > 0 { sx >> 1 } else { sx }) - pre) as usize;
blk[i + 4*8], blk[i + 5*8], blk[i + 6*8], blk[i + 7*8]);
}
for i in 0..8 {
- let mut row = &mut blk[i*8..(i+1)*8];
+ let row = &mut blk[i*8..(i+1)*8];
haar_transform!(row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7]);
}
}
fn haar8x8_row(blk: &mut[i32; 64]) {
for i in 0..8 {
- let mut row = &mut blk[i*8..(i+1)*8];
+ let row = &mut blk[i*8..(i+1)*8];
haar_transform!(row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7]);
}
}
haar_transform!(blk[i + 0*4], blk[i + 1*4], blk[i + 2*4], blk[i + 3*4]);
}
for i in 0..4 {
- let mut row = &mut blk[i*4..(i+1)*4];
+ let row = &mut blk[i*4..(i+1)*4];
haar_transform!(row[0], row[1], row[2], row[3]);
}
}
fn haar4x4_row(blk: &mut[i32; 64]) {
for i in 0..4 {
- let mut row = &mut blk[i*4..(i+1)*4];
+ let row = &mut blk[i*4..(i+1)*4];
haar_transform!(row[0], row[1], row[2], row[3]);
}
}
blk[i + 4*8], blk[i + 5*8], blk[i + 6*8], blk[i + 7*8], pass1);
}
for i in 0..8 {
- let mut row = &mut blk[i*8..(i+1)*8];
+ let row = &mut blk[i*8..(i+1)*8];
slant_transform!(row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], pass2);
}
}
let pass = |x: i32| (x + 1) >> 1;
for i in 0..8 {
- let mut row = &mut blk[i*8..(i+1)*8];
+ let row = &mut blk[i*8..(i+1)*8];
slant_transform!(row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], pass);
}
}
slant_transform!(blk[i + 0*4], blk[i + 1*4], blk[i + 2*4], blk[i + 3*4], pass1);
}
for i in 0..4 {
- let mut row = &mut blk[i*4..(i+1)*4];
+ let row = &mut blk[i*4..(i+1)*4];
slant_transform!(row[0], row[1], row[2], row[3], pass2);
}
}
let pass = |x: i32| (x + 1) >> 1;
for i in 0..4 {
- let mut row = &mut blk[i*4..(i+1)*4];
+ let row = &mut blk[i*4..(i+1)*4];
slant_transform!(row[0], row[1], row[2], row[3], pass);
}
}
match mode {
0 => {
for _ in 0..h {
- let mut dest = &mut dst[didx..didx+w];
+ let dest = &mut dst[didx..didx+w];
dest.copy_from_slice(&src[sidx..sidx+w]);
sidx += sstride;
didx += dstride;