gles2_debayer cleanup

This commit is contained in:
Martijn Braam
2023-07-12 15:06:06 +02:00
parent 5f270c1ef0
commit e3dce3bccc

View File

@@ -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);