summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/error_diffusion.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gpu/error_diffusion.c')
-rw-r--r--video/out/gpu/error_diffusion.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/gpu/error_diffusion.c b/video/out/gpu/error_diffusion.c
index 88c0903d35..72063c39a1 100644
--- a/video/out/gpu/error_diffusion.c
+++ b/video/out/gpu/error_diffusion.c
@@ -110,7 +110,7 @@ void pass_error_diffusion(struct gl_shader_cache *sc,
// Initialize the ring buffer.
GLSL("for (int i = int(gl_LocalInvocationIndex); i < %d; i += %d) ",
ring_buffer_size, block_size);
- GLSL("err_rgb8[i] = 0;\n");
+ GLSL("err_rgb8[i] = 0u;\n");
GLSL("for (int block_id = 0; block_id < %d; ++block_id) {\n", blocks);
@@ -170,7 +170,7 @@ void pass_error_diffusion(struct gl_shader_cache *sc,
"int((err_u32 >> %d) & 255u) - 128,"
"int( err_u32 & 255u) - 128"
") / %d.0;\n", dither_quant, bitshift_r, bitshift_g, uint8_mul);
- GLSL("err_rgb8[idx] = 0;\n");
+ GLSL("err_rgb8[idx] = 0u;\n");
// Write the dithered pixel.
GLSL("vec3 dithered = round(pix);\n");
@@ -227,7 +227,8 @@ void pass_error_diffusion(struct gl_shader_cache *sc,
}
// Different kernels for error diffusion.
-// Patterns are from http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT
+// Patterns are from <https://web.archive.org/web/20181031005427/
+// http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT>
const struct error_diffusion_kernel mp_error_diffusion_kernels[] = {
{
.name = "simple",