summaryrefslogtreecommitdiff
path: root/simple-yuv.c
diff options
context:
space:
mode:
Diffstat (limited to 'simple-yuv.c')
-rw-r--r--simple-yuv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/simple-yuv.c b/simple-yuv.c
index 97ae9a2..052983a 100644
--- a/simple-yuv.c
+++ b/simple-yuv.c
@@ -116,7 +116,6 @@ paint_source(struct window *window, uint32_t time)
static void
paint_pixels(struct window *window, uint32_t time)
{
- struct buffer *buffer = window->back;
int width = window->width, height = window->height;
const int halfh = height / 2;
const int halfw = width / 2;
@@ -156,8 +155,8 @@ paint_pixels(struct window *window, uint32_t time)
for (i = 0; i < halfh; i++) {
for (x = 0; x < halfw; x++) {
- u[i * buffer->stride1 + x] = i > x + 30 ? 200 : 10;
- v[i * buffer->stride2 + x] = i > x - 30 ? 150 : 50;
+ *u++ = i > x + 30 ? 200 : 10;
+ *v++ = i > x - 30 ? 150 : 50;
}
}
}