Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/BKE_idprop.h2
-rw-r--r--source/blender/blenlib/intern/math_color_inline.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 0f9c987b47c..3cf4a2c5cdc 100644
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@ -180,7 +180,7 @@ __attribute__((nonnull))
int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous,
struct IDProperty *pnew)
#ifdef __GNUC__
-__attribute__((nonnull))
+__attribute__((nonnull (1, 3))) /* 'group', 'pnew' */
#endif
;
diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c
index a3835b5bb4a..6b90cbfe9c3 100644
--- a/source/blender/blenlib/intern/math_color_inline.c
+++ b/source/blender/blenlib/intern/math_color_inline.c
@@ -237,6 +237,10 @@ MINLINE float rgb_to_bw(const float rgb[3])
return 0.35f * rgb[0] + 0.45f * rgb[1] + 0.2f * rgb[2];
}
+/* non-linear luma from ITU-R BT.601-2
+ * see: http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC11
+ * note: the values used for are not exact matches to those documented above,
+ * but they are from the same */
MINLINE float rgb_to_grayscale(const float rgb[3])
{
return 0.3f * rgb[0] + 0.58f * rgb[1] + 0.12f * rgb[2];