From 4b943867b65ee4d266c17c611af3e68f133458ef Mon Sep 17 00:00:00 2001 From: prokrypt Date: Fri, 18 Aug 2023 19:14:48 -0700 Subject: [PATCH] Remove sqrt() :| --- src/drm_iface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drm_iface.c b/src/drm_iface.c index 563bc42..fa3b5c8 100644 --- a/src/drm_iface.c +++ b/src/drm_iface.c @@ -213,14 +213,17 @@ static size_t sharp_memory_gray8_to_mono_tagged_dither(u8 *buf, int width, int h if (g_param_dither == 1) { *dM=ditherMatrix1; + msize=2; } else if (g_param_dither == 2) { *dM=ditherMatrix2; + msize=2; } else if (g_param_dither == 3) { *dM=ditherMatrix3; + msize=4; } else { *dM=ditherMatrix4; + msize=4; } - msize=sqrt(sizeof(dM)); // Iterate over lines from [0, height) for (line = 0; line < height; line++) {