correct another case of nonnull (all should be correct now), and comment about color...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 8 Jul 2012 17:51:28 +0000 (17:51 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 8 Jul 2012 17:51:28 +0000 (17:51 +0000)
source/blender/blenkernel/BKE_idprop.h
source/blender/blenlib/intern/math_color_inline.c

index 0f9c987b47cda6d51458d38f65c8331a15b73c58..3cf4a2c5cdcd8de739cd32f107fa30f458c66973 100644 (file)
@@ -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
 ;
 
index a3835b5bb4a4228dec30c872d3a1f6f3984eded6..6b90cbfe9c3c93ca7a0f7d2ab88febc7f026a1ed 100644 (file)
@@ -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];