diff options
author | Hans Goudey <h.goudey@me.com> | 2020-08-12 21:19:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-08-12 21:19:05 +0300 |
commit | 31705201dddebf7e3be5c4533b89f380aad1ede1 (patch) | |
tree | 53c8be86b15e9ebd96dd60cad52e6acac8ce2324 /source/blender/imbuf/intern/colormanagement.c | |
parent | ea4c327c977223922c41c889fa2bd51403409dca (diff) | |
parent | 337b6d075880ea44ff5183804a387dc98673ffb9 (diff) |
Merge branch 'master' into active-fcurve-keyframe
Diffstat (limited to 'source/blender/imbuf/intern/colormanagement.c')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 5c9ebbaba21..2c42d59a2d9 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -698,7 +698,7 @@ void colormanagement_init(void) OCIO_configRelease(config); } - /* If there're no valid display/views, use fallback mode. */ + /* If there are no valid display/views, use fallback mode. */ if (global_tot_display == 0 || global_tot_view == 0) { printf("Color management: no displays/views in the config, using fallback mode instead\n"); @@ -1399,9 +1399,8 @@ const char *IMB_colormanagement_get_float_colorspace(ImBuf *ibuf) if (ibuf->float_colorspace) { return ibuf->float_colorspace->name; } - else { - return IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_SCENE_LINEAR); - } + + return IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_SCENE_LINEAR); } const char *IMB_colormanagement_get_rect_colorspace(ImBuf *ibuf) @@ -1409,9 +1408,8 @@ const char *IMB_colormanagement_get_rect_colorspace(ImBuf *ibuf) if (ibuf->rect_colorspace) { return ibuf->rect_colorspace->name; } - else { - return IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE); - } + + return IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE); } bool IMB_colormanagement_space_is_data(ColorSpace *colorspace) @@ -2344,7 +2342,7 @@ void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer, } } else { - memcpy(out, in, sizeof(float) * 4 * width); + memcpy(out, in, sizeof(float[4]) * width); } } } @@ -3513,7 +3511,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, size_t display_offset = ((size_t)display_stride * i + xmin) * 4; memcpy( - display_buffer + display_offset, byte_buffer + byte_offset, 4 * sizeof(char) * width); + display_buffer + display_offset, byte_buffer + byte_offset, sizeof(char[4]) * width); } } } @@ -3958,7 +3956,7 @@ static void curve_mapping_to_ocio_settings(CurveMapping *curve_mapping, { int i; - BKE_curvemapping_initialize(curve_mapping); + BKE_curvemapping_init(curve_mapping); BKE_curvemapping_premultiply(curve_mapping, false); BKE_curvemapping_table_RGBA( curve_mapping, &curve_mapping_settings->lut, &curve_mapping_settings->lut_size); |