X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-indeo%2Fsrc%2Fcodecs%2Findeo3enc%2Fcell.rs;fp=nihav-indeo%2Fsrc%2Fcodecs%2Findeo3enc%2Fcell.rs;h=e5ad44c13110885458d29b0744c4c5f3af0f8e4e;hp=6f641eb3c87355a8f6db9f98552b5e79365463c9;hb=f5c61879b56145c3fe371edeb58fb3b7abd94851;hpb=bafe9cd4a4016dc550e2cd5311628024c8368023 diff --git a/nihav-indeo/src/codecs/indeo3enc/cell.rs b/nihav-indeo/src/codecs/indeo3enc/cell.rs index 6f641eb..e5ad44c 100644 --- a/nihav-indeo/src/codecs/indeo3enc/cell.rs +++ b/nihav-indeo/src/codecs/indeo3enc/cell.rs @@ -619,13 +619,11 @@ impl CellEncoder { let dst = &mut data[x + y * stride..]; let mut dst_idx = stride; for line in 0..4 { - for x in 0..4 { - let top = dst[dst_idx - stride + x * 2]; - let cur = cell[(line + 1) * 4 + x]; - dst[dst_idx + x * 2] = (top + cur) >> 1; - dst[dst_idx + x * 2 + 1] = (top + cur) >> 1; - dst[dst_idx + stride + x * 2] = cur; - dst[dst_idx + stride + x * 2 + 1] = cur; + for x in 0..8 { + let top = dst[dst_idx - stride + x]; + let cur = cell[(line + 1) * 4 + x / 2]; + dst[dst_idx + x] = (top + cur) >> 1; + dst[dst_idx + stride + x] = cur; } dst_idx += stride * 2; }