});
}
-#[allow(clippy::cyclomatic_complexity)]
+#[allow(clippy::cognitive_complexity)]
fn luma_mc(dst: &mut [u8], mut didx: usize, dstride: usize, src: &[u8], mut sidx: usize, sstride: usize, w: usize, h: usize, cx: usize, cy: usize) {
if (cx == 0) && (cy == 0) {
for _ in 0..h {
luma_mc(dst, doffset, dstride, src, soffset, sstride, w, h, cx, cy);
} else {
let mut ebuf: [u8; 70*70] = [0; 70*70];
- edge_emu(prev_frame, (x as isize) + (dx as isize) - 2, (y as isize) + (dy as isize) - 2, w+5, h+5, &mut ebuf, 70, 0, 0);
+ edge_emu(prev_frame, (x as isize) + (dx as isize) - 2, (y as isize) + (dy as isize) - 2, w+5, h+5, &mut ebuf, 70, 0, 4);
luma_mc(dst, doffset, dstride, &ebuf, 70*2 + 2, 70, w, h, cx, cy);
}
}
chroma_mc(frame.data, doffset, dstride, src, soffset, sstride, cw, ch, cx, cy);
} else {
let mut ebuf: [u8; 40*40] = [0; 40*40];
- edge_emu(prev_frame, ((x >> 1) as isize) + (dx as isize), ((y >> 1) as isize) + (dy as isize), cw+1, ch+1, &mut ebuf, 40, comp, 0);
+ edge_emu(prev_frame, ((x >> 1) as isize) + (dx as isize), ((y >> 1) as isize) + (dy as isize), cw+1, ch+1, &mut ebuf, 40, comp, 3);
chroma_mc(frame.data, doffset, dstride, &ebuf, 0, 40, cw, ch, cx, cy);
}
}
filter_luma_edge(frame.data, offset, 1, stride, mode_l, mode_r, lim1, lim2);
}
if ((str_l | str_r) >= 2) && deblock_chroma {
- for comp in 1..2 {
+ for comp in 1..3 {
let stride = frame.stride[comp];
let offset = frame.offset[comp] + (xpos >> 1) + (ypos >> 1) * stride;
filter_chroma_edge(frame.data, offset, 1, stride, mode_l, mode_r, lim1, lim2);
filter_luma_edge(frame.data, offset, stride, 1, mode_t, mode_d, lim1, lim2);
}
if ((str_t | str_d) >= 2) && deblock_chroma {
- for comp in 1..2 {
+ for comp in 1..3 {
let stride = frame.stride[comp];
let offset = frame.offset[comp] + (xpos >> 1) + (ypos >> 1) * stride;
filter_chroma_edge(frame.data, offset, stride, 1, mode_t, mode_d, lim1, lim2);
sum += diff;
}
}
- #[allow(clippy::cyclomatic_complexity)]
+ #[allow(clippy::cognitive_complexity)]
pub fn pred_angle(&self, dst: &mut [u8], mut doff: usize, dstride: usize, size: usize, angle: usize, filter: bool) {
let mut filtered1: [u8; 96] = [0; 96];
let mut filtered2: [u8; 96] = [0; 96];