[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48737] trunk/blender/source/blender: correct another case of nonnull (all should be correct now), and comment about color conversion.

Campbell Barton ideasman42 at gmail.com
Sun Jul 8 19:51:29 CEST 2012


Revision: 48737
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48737
Author:   campbellbarton
Date:     2012-07-08 17:51:28 +0000 (Sun, 08 Jul 2012)
Log Message:
-----------
correct another case of nonnull (all should be correct now), and comment about color conversion.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_idprop.h
    trunk/blender/source/blender/blenlib/intern/math_color_inline.c

Modified: trunk/blender/source/blender/blenkernel/BKE_idprop.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_idprop.h	2012-07-08 17:18:01 UTC (rev 48736)
+++ trunk/blender/source/blender/blenkernel/BKE_idprop.h	2012-07-08 17:51:28 UTC (rev 48737)
@@ -180,7 +180,7 @@
 int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous, 
                       struct IDProperty *pnew)
 #ifdef __GNUC__
-__attribute__((nonnull))
+__attribute__((nonnull  (1, 3))) /* 'group', 'pnew' */
 #endif
 ;
 

Modified: trunk/blender/source/blender/blenlib/intern/math_color_inline.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_color_inline.c	2012-07-08 17:18:01 UTC (rev 48736)
+++ trunk/blender/source/blender/blenlib/intern/math_color_inline.c	2012-07-08 17:51:28 UTC (rev 48737)
@@ -237,6 +237,10 @@
 	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];




More information about the Bf-blender-cvs mailing list