diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-25 12:58:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-25 12:58:50 +0400 |
commit | 78196d60d1a4585c613f822040f7dc339b9558b4 (patch) | |
tree | 77cb1a3f193c5e536f10e6e6a2b31e019ddf4a2e /source/blender | |
parent | 44c82198d4852484493c2e33b3ca4ad67fd76fd8 (diff) |
comment for TODO - rgb_to_bw / rgb_to_grayscale usage.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/intern/math_color_inline.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index 23d70bd148b..58ee898ea28 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -222,8 +222,16 @@ MINLINE void cpack_cpy_3ub(unsigned char r_col[3], const unsigned int pack) r_col[2] = ((pack) >> 16) & 0xFF; } -/* XXX - investigate when/why rgb_to_bw & rgb_to_grayscale are different, - * and why we use both! whats the purpose of this? */ +/* TODO: + * + * regarding #rgb_to_bw vs #rgb_to_grayscale, + * it seems nobody knows why we have both functions which convert color to greys + * but with different influences, this is quite stupid, and should be resolved + * by someone who knows this stuff: see this thread + * http://lists.blender.org/pipermail/bf-committers/2012-June/037180.html + * + * Only conclusion is that rgb_to_grayscale is used more for compositing. + */ MINLINE float rgb_to_bw(const float rgb[3]) { return 0.35f * rgb[0] + 0.45f * rgb[1] + 0.2f * rgb[2]; |