gles2_debayer cleanup
This commit is contained in:
@@ -116,11 +116,11 @@ gles2_debayer_configure(GLES2Debayer *self,
|
|||||||
const float *colormatrix,
|
const float *colormatrix,
|
||||||
const uint8_t blacklevel)
|
const uint8_t blacklevel)
|
||||||
{
|
{
|
||||||
glViewport(0, 0, dst_width, dst_height);
|
glViewport(0, 0, (int)dst_width, (int)dst_height);
|
||||||
check_gl();
|
check_gl();
|
||||||
|
|
||||||
GLfloat rotation_list[4] = { 0, -1, 0, 1 };
|
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 sin_rot = rotation_list[rotation_index];
|
||||||
GLfloat cos_rot = rotation_list[(rotation_index + 1) % 4];
|
GLfloat cos_rot = rotation_list[(rotation_index + 1) % 4];
|
||||||
@@ -161,7 +161,8 @@ gles2_debayer_configure(GLES2Debayer *self,
|
|||||||
}
|
}
|
||||||
check_gl();
|
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) {
|
if (libmegapixels_format_bits_per_pixel(self->format) == 10) {
|
||||||
assert(src_width % 4 == 0);
|
assert(src_width % 4 == 0);
|
||||||
glUniform1f(self->uniform_row_length, row_length);
|
glUniform1f(self->uniform_row_length, row_length);
|
||||||
|
Reference in New Issue
Block a user