| 1 | |
| 2 | |
| 3 | use super::*; |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | pub(crate) fn replay_filters( |
| 10 | loop_filter: &LoopFilterParams, |
| 11 | cdef: &CdefParams, |
| 12 | fctx: &FrameCtx, |
| 13 | ) -> Option<Picture> { |
| 14 | #[cfg(test)] |
| 15 | if REPLAY_DISABLED.load(std::sync::atomic::Ordering::Relaxed) { |
| 16 | return None; |
| 17 | } |
| 18 | replay_inner(loop_filter, cdef, None, fctx).map(|(picture, _)| picture) |
| 19 | } |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | pub(crate) fn replay_final( |
| 36 | loop_filter: &LoopFilterParams, |
| 37 | cdef: &CdefParams, |
| 38 | idx_grid: &[u8], |
| 39 | want_stages: bool, |
| 40 | fctx: &FrameCtx, |
| 41 | ) -> Option<(Picture, Option<FilterStages>)> { |
| 42 | #[cfg(test)] |
| 43 | if REPLAY_DISABLED.load(std::sync::atomic::Ordering::Relaxed) { |
| 44 | return None; |
| 45 | } |
| 46 | replay_inner(loop_filter, cdef, Some((idx_grid, want_stages)), fctx) |
| 47 | } |
| 48 | |
| 49 | fn replay_inner( |
| 50 | loop_filter: &LoopFilterParams, |
| 51 | cdef: &CdefParams, |
| 52 | |
| 53 | |
| 54 | final_pass: Option<(&[u8], bool)>, |
| 55 | fctx: &FrameCtx, |
| 56 | ) -> Option<(Picture, Option<FilterStages>)> { |
| 57 | REPLAY.with_borrow_mut(|slot| { |
| 58 | let r = slot.as_mut()?; |
| 59 | let hit = matches!(&r.deblocked, Some((lf, ..)) if lf == loop_filter); |
| 60 | |
| 61 | |
| 62 | |
| 63 | let mut share = false; |
| 64 | let cpt = crate::par::timer(crate::par::S_COPY); |
| 65 | let unit_cols = r.neighbours.mi_cols.div_ceil(2); |
| 66 | let unit_rows = r.neighbours.mi_rows.div_ceil(2); |
| 67 | let (mut y, mut u, mut v) = if hit { |
| 68 | let work = r.work.take(); |
| 69 | let wrote = std::mem::take(&mut r.wrote); |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | let superset = |
| 78 | |cur: (u8, u8), old: (u8, u8)| cur.0 >= old.0 && (cur.1 != 0 || old.1 == 0); |
| 79 | let (skip_y, skip_uv) = match (final_pass, &r.work_cdef) { |
| 80 | (None, Some(old)) if old.bits == 0 && cdef.bits == 0 => ( |
| 81 | superset( |
| 82 | (cdef.y_pri_strength[0], cdef.y_sec_strength[0]), |
| 83 | (old.y_pri_strength[0], old.y_sec_strength[0]), |
| 84 | ), |
| 85 | superset( |
| 86 | (cdef.uv_pri_strength[0], cdef.uv_sec_strength[0]), |
| 87 | (old.uv_pri_strength[0], old.uv_sec_strength[0]), |
| 88 | ), |
| 89 | ), |
| 90 | _ => (false, false), |
| 91 | }; |
| 92 | let (deblocked, scratch) = (&r.deblocked, &mut r.scratch); |
| 93 | let (_, dy, du, dv) = deblocked.as_ref().expect("just matched"); |
| 94 | match work { |
| 95 | Some((mut wy, mut wu, mut wv)) => { |
| 96 | if !skip_y { |
| 97 | restore_written(&mut wy, dy, &wrote, 1, unit_cols, 8); |
| 98 | } |
| 99 | if !skip_uv { |
| 100 | restore_written(&mut wu, du, &wrote, 2, unit_cols, 4); |
| 101 | restore_written(&mut wv, dv, &wrote, 2, unit_cols, 4); |
| 102 | } |
| 103 | (wy, wu, wv) |
| 104 | } |
| 105 | None => ( |
| 106 | pooled(dy, scratch), |
| 107 | pooled(du, scratch), |
| 108 | pooled(dv, scratch), |
| 109 | ), |
| 110 | } |
| 111 | } else { |
| 112 | |
| 113 | |
| 114 | for plane in r.work.take().into_iter().flat_map(|(a, b, c)| [a, b, c]) { |
| 115 | r.scratch.push(plane.data.into_owned()); |
| 116 | } |
| 117 | r.work_cdef = None; |
| 118 | if let Some((_, dy, du, dv)) = r.deblocked.take() { |
| 119 | r.scratch.push(dy.data.into_owned()); |
| 120 | r.scratch.push(du.data.into_owned()); |
| 121 | r.scratch.push(dv.data.into_owned()); |
| 122 | } |
| 123 | let (cap_y, cap_u, cap_v, scratch) = (&r.y, &r.u, &r.v, &mut r.scratch); |
| 124 | let (mut y, mut u, mut v) = ( |
| 125 | pooled(cap_y, scratch), |
| 126 | pooled(cap_u, scratch), |
| 127 | pooled(cap_v, scratch), |
| 128 | ); |
| 129 | let _t = crate::par::timer(crate::par::S_DEBLOCK); |
| 130 | apply_deblock( |
| 131 | &mut y, |
| 132 | &mut u, |
| 133 | &mut v, |
| 134 | loop_filter, |
| 135 | &r.neighbours, |
| 136 | r.frame_width, |
| 137 | r.frame_height, |
| 138 | fctx, |
| 139 | ); |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | share = cdef_all_zero(cdef); |
| 148 | if !share { |
| 149 | let scratch = &mut r.scratch; |
| 150 | r.deblocked = Some(( |
| 151 | *loop_filter, |
| 152 | pooled(&y, scratch), |
| 153 | pooled(&u, scratch), |
| 154 | pooled(&v, scratch), |
| 155 | )); |
| 156 | } |
| 157 | (y, u, v) |
| 158 | }; |
| 159 | drop(cpt); |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | if let Some((grid, _)) = final_pass.filter(|(g, _)| !g.is_empty()) { |
| 165 | fctx.cdef_idx_grid.with(|g| *g.borrow_mut() = grid.to_vec()); |
| 166 | } |
| 167 | let ct = crate::par::timer(crate::par::S_CDEF); |
| 168 | let mut wrote = std::mem::take(&mut r.wrote); |
| 169 | wrote.clear(); |
| 170 | wrote.resize(unit_cols * unit_rows, 0); |
| 171 | r.work_cdef = Some(*cdef); |
| 172 | let pre = r |
| 173 | .deblocked |
| 174 | .as_ref() |
| 175 | .map(|(_, dy, du, dv)| (dy.data.as_ref(), du.data.as_ref(), dv.data.as_ref())); |
| 176 | apply_cdef( |
| 177 | &mut y, |
| 178 | &mut u, |
| 179 | &mut v, |
| 180 | cdef, |
| 181 | &r.neighbours, |
| 182 | (r.frame_width, r.frame_height), |
| 183 | fctx, |
| 184 | pre, |
| 185 | Some(&mut wrote), |
| 186 | ); |
| 187 | drop(ct); |
| 188 | if final_pass.is_some_and(|(_, want)| want) { |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | let snapshot = if share { |
| 194 | |
| 195 | |
| 196 | Some(plane_snapshot(&y, 0)) |
| 197 | } else { |
| 198 | r.deblocked |
| 199 | .as_ref() |
| 200 | .map(|(_, dy, ..)| plane_snapshot(dy, 0)) |
| 201 | }; |
| 202 | let scratch = &mut r.scratch; |
| 203 | r.final_luma = snapshot.map(|d| (pooled(&y, scratch), d)); |
| 204 | } |
| 205 | let stages = final_pass.and_then(|(_, want)| { |
| 206 | want.then(|| FilterStages { |
| 207 | deblocked: [y.data.to_vec(), u.data.to_vec(), v.data.to_vec()], |
| 208 | cdefed: [y.data.to_vec(), u.data.to_vec(), v.data.to_vec()], |
| 209 | stride: [y.width, u.width, v.width], |
| 210 | }) |
| 211 | }); |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | let (fw, fh) = (r.frame_width, r.frame_height); |
| 223 | if fw == r.width && fh == r.height { |
| 224 | fctx.last_frame_wide_margin.with(|m| *m.borrow_mut() = None); |
| 225 | r.wrote = Vec::new(); |
| 226 | r.work_cdef = None; |
| 227 | if share { |
| 228 | let picture = Picture { |
| 229 | width: r.width, |
| 230 | height: r.height, |
| 231 | y: y.data.to_vec(), |
| 232 | u: u.data.to_vec(), |
| 233 | v: v.data.to_vec(), |
| 234 | }; |
| 235 | r.deblocked = Some((*loop_filter, y, u, v)); |
| 236 | return Some((picture, stages)); |
| 237 | } |
| 238 | return Some(( |
| 239 | Picture { |
| 240 | width: r.width, |
| 241 | height: r.height, |
| 242 | y: y.data.into_owned(), |
| 243 | u: u.data.into_owned(), |
| 244 | v: v.data.into_owned(), |
| 245 | }, |
| 246 | stages, |
| 247 | )); |
| 248 | } |
| 249 | let crop = |plane: &PlaneBuf<'_>, w: usize, h: usize| -> Vec<u16> { |
| 250 | let mut out = Vec::with_capacity(w * h); |
| 251 | for row in 0..h { |
| 252 | out.extend(plane.data[row * plane.width..][..w].iter().copied()); |
| 253 | } |
| 254 | out |
| 255 | }; |
| 256 | let (tw, th) = (r.true_width, r.true_height); |
| 257 | fctx.last_frame_wide_margin.with(|m| { |
| 258 | *m.borrow_mut() = (tw > fw || th > fh).then(|| Picture { |
| 259 | width: tw, |
| 260 | height: th, |
| 261 | y: crop(&y, tw, th), |
| 262 | u: crop(&u, round_ss(tw, ss_x(fctx)), round_ss(th, ss_y(fctx))), |
| 263 | v: crop(&v, round_ss(tw, ss_x(fctx)), round_ss(th, ss_y(fctx))), |
| 264 | }); |
| 265 | }); |
| 266 | let out = Picture { |
| 267 | width: fw, |
| 268 | height: fh, |
| 269 | y: crop(&y, fw, fh), |
| 270 | u: crop(&u, round_ss(fw, ss_x(fctx)), round_ss(fh, ss_y(fctx))), |
| 271 | v: crop(&v, round_ss(fw, ss_x(fctx)), round_ss(fh, ss_y(fctx))), |
| 272 | }; |
| 273 | |
| 274 | |
| 275 | |
| 276 | if share { |
| 277 | r.wrote = Vec::new(); |
| 278 | r.work_cdef = None; |
| 279 | r.deblocked = Some((*loop_filter, y, u, v)); |
| 280 | } else { |
| 281 | |
| 282 | |
| 283 | r.wrote = wrote; |
| 284 | r.work = Some((y, u, v)); |
| 285 | } |
| 286 | Some((out, stages)) |
| 287 | }) |
| 288 | } |
| 289 | |
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | pub(crate) fn replay_restoration( |
| 307 | lr: &LoopRestorationParams, |
| 308 | units: &[Option<crate::restoration::WienerInfo>], |
| 309 | fctx: &FrameCtx, |
| 310 | ) -> Option<Vec<u16>> { |
| 311 | #[cfg(test)] |
| 312 | if REPLAY_DISABLED.load(std::sync::atomic::Ordering::Relaxed) { |
| 313 | return None; |
| 314 | } |
| 315 | REPLAY.with_borrow_mut(|slot| { |
| 316 | let r = slot.as_mut()?; |
| 317 | let (cdefed, deblocked) = r.final_luma.as_ref()?; |
| 318 | let (fw, fh) = (r.frame_width, r.frame_height); |
| 319 | let mut grid = crate::restoration::RestorationGrid::with_ss( |
| 320 | lr, |
| 321 | fw as u32, |
| 322 | fh as u32, |
| 323 | fctx.subsampling_x.get(), |
| 324 | fctx.subsampling_y.get(), |
| 325 | ); |
| 326 | let (horz, vert) = (grid.horz_units[0], grid.vert_units[0]); |
| 327 | if horz == 0 || units.len() != horz * vert { |
| 328 | return None; |
| 329 | } |
| 330 | for (i, filter) in units.iter().enumerate() { |
| 331 | if let Some(info) = filter { |
| 332 | grid.set( |
| 333 | 0, |
| 334 | i / horz, |
| 335 | i % horz, |
| 336 | crate::restoration::UnitFilter::Wiener(*info), |
| 337 | ); |
| 338 | } |
| 339 | } |
| 340 | let stride = cdefed.width; |
| 341 | let mut out = scratch_empty(); |
| 342 | crate::restoration::apply_loop_restoration_plane( |
| 343 | &cdefed.data, |
| 344 | &deblocked.data, |
| 345 | stride, |
| 346 | fw, |
| 347 | fh, |
| 348 | 0, |
| 349 | lr.frame_restoration_type[0], |
| 350 | lr.loop_restoration_size[0], |
| 351 | &grid, |
| 352 | 0, |
| 353 | &mut out, |
| 354 | None, |
| 355 | fctx, |
| 356 | ); |
| 357 | fctx.last_frame_wide_margin.with(|m| { |
| 358 | if let Some(p) = m.borrow_mut().as_mut() { |
| 359 | let tw = p.width; |
| 360 | for row in 0..p.height.min(fh) { |
| 361 | let n = tw.min(fw); |
| 362 | p.y[row * tw..][..n].copy_from_slice(&out[row * stride..][..n]); |
| 363 | } |
| 364 | } |
| 365 | }); |
| 366 | let mut y = Vec::with_capacity(fw * fh); |
| 367 | for row in 0..fh { |
| 368 | y.extend(out[row * stride..][..fw].iter().copied()); |
| 369 | } |
| 370 | scratch_return(out); |
| 371 | Some(y) |
| 372 | }) |
| 373 | } |
| 374 | |
| 375 | |
| 376 | |
| 377 | |
| 378 | |
| 379 | |
| 380 | |
| 381 | pub(super) fn crop_owned(plane: PlaneBuf<'_>, w: usize, h: usize) -> Vec<u16> { |
| 382 | let stride = plane.width; |
| 383 | let mut data = plane.data.into_owned(); |
| 384 | if stride == w { |
| 385 | data.truncate(w * h); |
| 386 | return data; |
| 387 | } |
| 388 | let mut out = Vec::with_capacity(w * h); |
| 389 | for row in 0..h { |
| 390 | out.extend(data[row * stride..][..w].iter().copied()); |
| 391 | } |
| 392 | out |
| 393 | } |
| 394 | |
| 395 | |
| 396 | |
| 397 | |
| 398 | pub(super) fn scratch_return(v: Vec<u16>) { |
| 399 | let mut p = PLANE_SCRATCH.lock().unwrap(); |
| 400 | if p.len() < SCRATCH_CAP { |
| 401 | p.push(v); |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | |
| 406 | |
| 407 | #[derive(Clone, Copy)] |
| 408 | pub(super) struct CdefPlaneGeom { |
| 409 | pub(super) stride: usize, |
| 410 | pub(super) true_w: usize, |
| 411 | pub(super) true_h: usize, |
| 412 | } |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | pub(super) struct CdefBandDst<'a> { |
| 419 | pub(super) data: [&'a mut [u16]; 3], |
| 420 | pub(super) row0: [usize; 3], |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | pub(super) wrote: Option<&'a mut [u8]>, |
| 428 | pub(super) wrote_row0: usize, |
| 429 | } |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | #[allow(clippy::too_many_arguments)] |
| 437 | pub(super) fn cdef_band( |
| 438 | r_lo: usize, |
| 439 | r_hi: usize, |
| 440 | mut dst: CdefBandDst<'_>, |
| 441 | geom: [CdefPlaneGeom; 3], |
| 442 | src_y: &[u16], |
| 443 | src_u: &[u16], |
| 444 | src_v: &[u16], |
| 445 | cdef: &CdefParams, |
| 446 | skip_grid: &Neighbours, |
| 447 | idx_grid: &[u8], |
| 448 | sb_cols: usize, |
| 449 | coeff_shift: i32, |
| 450 | damping: i32, |
| 451 | damping_uv: i32, |
| 452 | (frame_w, frame_h): (usize, usize), |
| 453 | fctx: &crate::decode::FrameCtx, |
| 454 | ) { |
| 455 | let unit_cols = skip_grid.mi_cols.div_ceil(2); |
| 456 | let strength_idx = |mi_r: usize, mi_c: usize| -> usize { |
| 457 | if sb_cols == 0 { |
| 458 | return 0; |
| 459 | } |
| 460 | let (sb_r, sb_c) = (mi_r / SB_MI as usize, mi_c / SB_MI as usize); |
| 461 | idx_grid.get(sb_r * sb_cols + sb_c).copied().unwrap_or(0) as usize |
| 462 | }; |
| 463 | |
| 464 | |
| 465 | |
| 466 | |
| 467 | |
| 468 | let mut win_y = [0i16; 256]; |
| 469 | let mut win_uv = [0i16; 256]; |
| 470 | let mut mi_r = r_lo; |
| 471 | while mi_r < r_hi { |
| 472 | let mut mi_c = 0usize; |
| 473 | while mi_c < skip_grid.mi_cols { |
| 474 | if skip_grid.is_skip_txfm(mi_r, mi_c) { |
| 475 | hit!(CDEF_SKIPPED_UNITS); |
| 476 | } |
| 477 | if !skip_grid.is_skip_txfm(mi_r, mi_c) { |
| 478 | let sidx = strength_idx(mi_r, mi_c); |
| 479 | let (ox, oy) = (mi_c * 4, mi_r * 4); |
| 480 | |
| 481 | |
| 482 | |
| 483 | if cdef.y_pri_strength[sidx] == 0 |
| 484 | && cdef.y_sec_strength[sidx] == 0 |
| 485 | && cdef.uv_pri_strength[sidx] == 0 |
| 486 | && cdef.uv_sec_strength[sidx] == 0 |
| 487 | { |
| 488 | mi_c += 2; |
| 489 | continue; |
| 490 | } |
| 491 | let g = geom[0]; |
| 492 | cdef_gather( |
| 493 | src_y, g.stride, g.true_w, g.true_h, ox, oy, 8, 8, &mut win_y, |
| 494 | ); |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | let (dir, var) = cdef_find_dir(&win_y, 8 + 2 * CDEF_BORDER, coeff_shift); |
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | let y_pri_strength = i32::from(cdef.y_pri_strength[sidx]) << coeff_shift; |
| 510 | let y_sec_strength = i32::from(cdef.y_sec_strength[sidx]) << coeff_shift; |
| 511 | let y_dir = if y_pri_strength != 0 { dir } else { 0 }; |
| 512 | let t = cdef_adjust_strength(y_pri_strength, var); |
| 513 | |
| 514 | if crate::envflags::env_flag!("EC_AV1_CDEF_DBG") { |
| 515 | eprintln!( |
| 516 | "EC_CDEF mi_r={mi_r} mi_c={mi_c} x={ox} y={oy} sidx={sidx} dir={dir} var={var} t={t} pri={y_pri_strength} sec={y_sec_strength} damp={damping}" |
| 517 | ); |
| 518 | } |
| 519 | let enable_primary = t != 0; |
| 520 | let enable_secondary = y_sec_strength != 0; |
| 521 | if (ox + 8 > frame_w || oy + 8 > frame_h) |
| 522 | && (enable_primary |
| 523 | || enable_secondary |
| 524 | || cdef.uv_pri_strength[sidx] != 0 |
| 525 | || cdef.uv_sec_strength[sidx] != 0) |
| 526 | { |
| 527 | hit!(CDEF_STRADDLE_UNITS); |
| 528 | } |
| 529 | if enable_primary || enable_secondary { |
| 530 | cdef_filter_block( |
| 531 | &win_y, |
| 532 | &mut *dst.data[0], |
| 533 | g.stride, |
| 534 | ox, |
| 535 | oy - dst.row0[0], |
| 536 | 8, |
| 537 | 8, |
| 538 | t, |
| 539 | y_sec_strength, |
| 540 | y_dir, |
| 541 | damping, |
| 542 | damping, |
| 543 | enable_primary, |
| 544 | enable_secondary, |
| 545 | coeff_shift, |
| 546 | fctx, |
| 547 | ); |
| 548 | } |
| 549 | |
| 550 | let t_uv = i32::from(cdef.uv_pri_strength[sidx]) << coeff_shift; |
| 551 | let uv_sec_strength = i32::from(cdef.uv_sec_strength[sidx]) << coeff_shift; |
| 552 | |
| 553 | |
| 554 | |
| 555 | |
| 556 | let uv_dir = if t_uv != 0 { |
| 557 | match (ss_x(fctx), ss_y(fctx)) { |
| 558 | (1, 0) => CDEF_DIR_CONV422[dir], |
| 559 | (0, 1) => CDEF_DIR_CONV440[dir], |
| 560 | _ => dir, |
| 561 | } |
| 562 | } else { |
| 563 | 0 |
| 564 | }; |
| 565 | let enable_primary_uv = t_uv != 0; |
| 566 | let enable_secondary_uv = uv_sec_strength != 0; |
| 567 | if let Some(w) = dst.wrote.as_deref_mut() { |
| 568 | let mark = u8::from(enable_primary || enable_secondary) |
| 569 | | (u8::from(enable_primary_uv || enable_secondary_uv) << 1); |
| 570 | w[(mi_r / 2 - dst.wrote_row0) * unit_cols + mi_c / 2] = mark; |
| 571 | } |
| 572 | if enable_primary_uv || enable_secondary_uv { |
| 573 | let (cox, coy) = (ox >> ss_x(fctx), oy >> ss_y(fctx)); |
| 574 | let (csize_x, csize_y) = (8 >> ss_x(fctx), 8 >> ss_y(fctx)); |
| 575 | for (p, src_p) in [(1usize, src_u), (2, src_v)] { |
| 576 | let gp = geom[p]; |
| 577 | cdef_gather( |
| 578 | src_p, |
| 579 | gp.stride, |
| 580 | gp.true_w, |
| 581 | gp.true_h, |
| 582 | cox, |
| 583 | coy, |
| 584 | csize_x, |
| 585 | csize_y, |
| 586 | &mut win_uv, |
| 587 | ); |
| 588 | cdef_filter_block( |
| 589 | &win_uv, |
| 590 | &mut *dst.data[p], |
| 591 | gp.stride, |
| 592 | cox, |
| 593 | coy - dst.row0[p], |
| 594 | csize_x, |
| 595 | csize_y, |
| 596 | t_uv, |
| 597 | uv_sec_strength, |
| 598 | uv_dir, |
| 599 | damping_uv, |
| 600 | damping_uv, |
| 601 | enable_primary_uv, |
| 602 | enable_secondary_uv, |
| 603 | coeff_shift, |
| 604 | fctx, |
| 605 | ); |
| 606 | } |
| 607 | } |
| 608 | } |
| 609 | mi_c += 2; |
| 610 | } |
| 611 | mi_r += 2; |
| 612 | } |
| 613 | } |