From e3dce3bccc6cc1485e96eed46bbfa87ed2447c2e Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Wed, 12 Jul 2023 15:06:06 +0200 Subject: [PATCH] gles2_debayer cleanup --- src/gles2_debayer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gles2_debayer.c b/src/gles2_debayer.c index 75d84ee..b02c225 100644 --- a/src/gles2_debayer.c +++ b/src/gles2_debayer.c @@ -116,11 +116,11 @@ gles2_debayer_configure(GLES2Debayer *self, const float *colormatrix, const uint8_t blacklevel) { - glViewport(0, 0, dst_width, dst_height); + glViewport(0, 0, (int)dst_width, (int)dst_height); check_gl(); GLfloat rotation_list[4] = { 0, -1, 0, 1 }; - int rotation_index = 4 - rotation / 90; + int rotation_index = 4 - (int)rotation / 90; GLfloat sin_rot = rotation_list[rotation_index]; GLfloat cos_rot = rotation_list[(rotation_index + 1) % 4]; @@ -161,7 +161,8 @@ gles2_debayer_configure(GLES2Debayer *self, } check_gl(); - GLuint row_length = libmegapixels_mode_width_to_bytes(self->format, src_width); + GLuint row_length = + libmegapixels_mode_width_to_bytes(self->format, src_width); if (libmegapixels_format_bits_per_pixel(self->format) == 10) { assert(src_width % 4 == 0); glUniform1f(self->uniform_row_length, row_length);