diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-03-17 17:20:33 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-03-17 17:20:33 +0300 |
commit | dd38dce7f0ae604396d1e96bc49500369fdedf29 (patch) | |
tree | 2b32e776f0bb972705d2c884cb6d5ec77deaf714 /source/blender/editors/space_sequencer/sequencer_scopes.c | |
parent | 42aac45d7f0e0f43725093e97ebb8175a95aa247 (diff) |
Part 2 of D1082 by Troy Sobotka, remove our functions that do luma
calculations and use the OCIO one instead.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_scopes.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_scopes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 24b3776da6d..b4bcfb4eb07 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -32,6 +32,7 @@ #include "BLI_math_color.h" #include "BLI_utildefines.h" +#include "IMB_colormanagement.h" #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -167,7 +168,7 @@ static ImBuf *make_waveform_view_from_ibuf_byte(ImBuf *ibuf) for (x = 0; x < ibuf->x; x++) { const unsigned char *rgb = src + 4 * (ibuf->x * y + x); - float v = (float)rgb_to_luma_byte(rgb) / 255.0f; + float v = (float)IMB_colormanagement_get_luminance_byte(rgb) / 255.0f; unsigned char *p = tgt; p += 4 * (w * ((int) (v * (h - 3)) + 1) + x + 1); @@ -207,7 +208,7 @@ static ImBuf *make_waveform_view_from_ibuf_float(ImBuf *ibuf) for (x = 0; x < ibuf->x; x++) { const float *rgb = src + 4 * (ibuf->x * y + x); - float v = rgb_to_luma(rgb); + float v = IMB_colormanagement_get_luminance(rgb); unsigned char *p = tgt; CLAMP(v, 0.0f, 1.0f); |