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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-08 17:55:53 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-08 17:55:53 +0400
commit4487103e61ba1277027d8d4a9105a3f1b29e204c (patch)
tree7658f4570e1c0ded316ac94458e739f9ffeaa319 /source/blender/blenlib/BLI_utildefines.h
parent3dead22c7322cf72ee63a003ba50940abc12e7c9 (diff)
Color:
* Accelerated sRGB <=> linear conversion using lookup table, this can speed up loading of images in the compositor and simple renders quite a bit. * Dithering now uses the Floyd-Steinberg algorithm. Previously it would simply randomize each pixel slightly, adding noise, now that should be reduced. Patch #29309 by David M.
Diffstat (limited to 'source/blender/blenlib/BLI_utildefines.h')
-rw-r--r--source/blender/blenlib/BLI_utildefines.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index abe8fb7d8fe..45049dd6207 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -108,6 +108,7 @@
#define FTOCHAR(val) ((val)<=0.0f)? 0 : (((val)>(1.0f-0.5f/255.0f))? 255 : (char)((255.0f*(val))+0.5f))
#define FTOUSHORT(val) ((val >= 1.0f-0.5f/65535)? 65535: (val <= 0.0f)? 0: (unsigned short)(val*65535.0f + 0.5f))
+#define USHORTTOUCHAR(val) ((unsigned char)(((val)+0x80)>>8))
#define F3TOCHAR3(v2, v1) { \
(v1)[0]= FTOCHAR((v2[0])); \
(v1)[1]= FTOCHAR((v2[1])); \