V210 issue fix + correct packing
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user