diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-07-09 15:31:53 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-07-09 15:31:53 -0400 |
commit | a12efc4dac522c08a37adc1366dd12ac990a4130 (patch) | |
tree | 0cad3e2264ab1d019234a9c08ac625b1bad561c6 | |
parent | 4f594e1f57c41e9ac0833cc2e85255ba9646354b (diff) |
Fix test pattern
-rw-r--r-- | simple-yuv.c | 5 |
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; } } } |