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
@@ -127,13 +127,14 @@ func movingSquarePatch(baseColor baseColorFunc) FrameRenderer {
}
func renderBasePattern(dst []byte, width, height int, baseColor baseColorFunc) error {
stride := V210LineSize(width)
for y := 0; y < height; y++ {
for x := 0; x < width; x += 6 {
var pixels [6]YCbCr10
for i := range pixels {
pixels[i] = baseColor(x+i, y, width, height)
}
offset := (y*width + x) / 6 * 16
offset := y*stride + x/6*16
packV210Block(dst[offset:offset+16], pixels)
}
}