V210 issue fix + correct packing

This commit is contained in:
Dmitry Sergeev
2026-09-18 01:30:11 +03:00
parent efa958723a
commit 4d8035a434
24 changed files with 218 additions and 84 deletions
+2 -1
View File
@@ -45,6 +45,7 @@ func patchMovingSquare(
lastBlockX := min(width, (lastPixelX+5)/6*6)
firstY := max(0, int(math.Floor(bounds.minY)))
lastY := min(height, int(math.Ceil(bounds.maxY)))
stride := V210LineSize(width)
for y := firstY; y < lastY; y++ {
for x := firstBlockX; x < lastBlockX; x += 6 {
@@ -57,7 +58,7 @@ func patchMovingSquare(
}
pixels[i] = color
}
offset := (y*width + x) / 6 * 16
offset := y*stride + x/6*16
packV210Block(dst[offset:offset+16], pixels)
}
}