diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-11 06:59:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-11 06:59:18 +0300 |
commit | 60fa2644cbeff322a38bc3a1f01934df91de4e30 (patch) | |
tree | 43da3ee6edd8f9402e458775598da9edcc0c6866 /source/blender/blenkernel/intern | |
parent | b211e4193f2ea1a1cffef6b4b76ae5597922fec2 (diff) |
Fix error in white-balance w/ float buffer
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/seqmodifier.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c index 4365579da1a..6e9cbbfff0c 100644 --- a/source/blender/blenkernel/intern/seqmodifier.c +++ b/source/blender/blenkernel/intern/seqmodifier.c @@ -215,20 +215,24 @@ static void whiteBalance_apply_threaded(int width, int height, unsigned char *re mul_v3_v3(result, multiplier); - if (mask_rect_float) + if (mask_rect_float) { copy_v3_v3(mask, mask_rect_float + pixel_index); - else if (mask_rect) + } + else if (mask_rect) { rgb_uchar_to_float(mask, mask_rect + pixel_index); + } result[0] = result[0] * (1.0f - mask[0]) + result[0] * mask[0]; result[1] = result[1] * (1.0f - mask[1]) + result[1] * mask[1]; result[2] = result[2] * (1.0f - mask[2]) + result[2] * mask[2]; - if (rect_float) + if (rect_float) { copy_v3_v3(rect_float + pixel_index, result); - else + } + else { IMB_colormanagement_scene_linear_to_colorspace_v3(result, data->colorspace); - premul_float_to_straight_uchar(rect + pixel_index, result); + premul_float_to_straight_uchar(rect + pixel_index, result); + } } } } |