[weston,1/2,v5] simple-dmabuf-drm: nv12: properly fill Y plane

Submitted by Emilio Pozuelo Monfort on July 19, 2018, 2:45 p.m.

Details

Message ID 20180719144502.28665-1-emilio.pozuelo@collabora.co.uk
State New
Series "simple-dmabuf-drm: fix build with --disable-egl"
Headers show

Commit Message

Emilio Pozuelo Monfort July 19, 2018, 2:45 p.m.
We want 0..255 values, not 0..254.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
---
No changes in this version.

 clients/simple-dmabuf-drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/clients/simple-dmabuf-drm.c b/clients/simple-dmabuf-drm.c
index bd0f9224..5bc5323e 100644
--- a/clients/simple-dmabuf-drm.c
+++ b/clients/simple-dmabuf-drm.c
@@ -347,7 +347,7 @@  fill_content(struct buffer *my_buf, uint64_t modifier)
 			for (y = 0; y < my_buf->height * 2/3; y++) {
 				pix8 = my_buf->mmap + y * my_buf->stride;
 				for (x = 0; x < my_buf->width; x++)
-					*pix8++ = x % 0xff;
+					*pix8++ = x % 256;
 			}
 			/* second plane (CbCr) is half the size of Y
 			   plane (last 1/3 of the buffer) */