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:
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r--source/blender/blenlib/intern/math_color.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 2b6a091cc8d..f0ef8b2c93d 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -25,6 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
* */
+#include <assert.h>
#include "BLI_math.h"
@@ -133,6 +134,8 @@ void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, in
cb=(-0.16874f*sr)-(0.33126f*sg)+(0.5f*sb)+128.0f;
cr=(0.5f*sr)-(0.41869f*sg)-(0.08131f*sb)+128.0f;
break;
+ default:
+ assert(!"invalid colorspace");
}
*ly=y;
@@ -163,6 +166,8 @@ void ycc_to_rgb(float y, float cb, float cr, float *lr, float *lg, float *lb, in
g=y-0.34414f*cb - 0.71414f*cr + 135.45984f;
b=y+1.772f*cb - 226.816f;
break;
+ default:
+ assert(!"invalid colorspace");
}
*lr=r/255.0f;
*lg=g/255.0f;