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