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:
authorCampbell Barton <ideasman42@gmail.com>2007-10-26 19:32:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-10-26 19:32:36 +0400
commit2a2453d3e20e662d5af05b359a71458fa8daabf1 (patch)
tree059356f764dcab1911e0785c098284eabcccad22 /source/blender/nodes/intern/CMP_util.h
parent83eba96db23fd438369ffae1197b5b40737164c0 (diff)
nodes from eechlo
* glare * tonemap * lense distort * fast gauss blur http://projects.blender.org/tracker/?func=detail&atid=127&aid=7505&group_id=9 made fast gauss blur an option for the blur node rather then a separate node.
Diffstat (limited to 'source/blender/nodes/intern/CMP_util.h')
-rw-r--r--source/blender/nodes/intern/CMP_util.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/CMP_util.h b/source/blender/nodes/intern/CMP_util.h
index 83f85160625..7cb10b75f3a 100644
--- a/source/blender/nodes/intern/CMP_util.h
+++ b/source/blender/nodes/intern/CMP_util.h
@@ -176,7 +176,46 @@ void do_hsva_to_rgba(bNode *node, float *out, float *in);
void do_ycca_to_rgba(bNode *node, float *out, float *in);
void gamma_correct_compbuf(CompBuf *img, int inversed);
+void convolve(CompBuf* dst, CompBuf* in1, CompBuf* in2);
extern void node_ID_title_cb(void *node_v, void *unused_v);
+
+/* utility functions used by glare, tonemap and lense distortion */
+/* soms macros for color handling */
+typedef float fRGB[4];
+/* clear color */
+#define fRGB_clear(c) { c[0]=c[1]=c[2]=0.f; }
+/* copy c2 to c1 */
+#define fRGB_copy(c1, c2) { c1[0]=c2[0]; c1[1]=c2[1]; c1[2]=c2[2]; }
+/* add c2 to c1 */
+#define fRGB_add(c1, c2) { c1[0]+=c2[0]; c1[1]+=c2[1]; c1[2]+=c2[2]; }
+/* subtract c2 from c1 */
+#define fRGB_sub(c1, c2) { c1[0]-=c2[0]; c1[1]-=c2[1]; c1[2]-=c2[2]; }
+/* multiply c by float value s */
+#define fRGB_mult(c, s) { c[0]*=s; c[1]*=s; c[2]*=s; }
+/* multiply c2 by s and add to c1 */
+#define fRGB_madd(c1, c2, s) { c1[0]+=c2[0]*s; c1[1]+=c2[1]*s; c1[2]+=c2[2]*s; }
+/* multiply c2 by color c1 */
+#define fRGB_colormult(c, cs) { c[0]*=cs[0]; c[1]*=cs[1]; c[2]*=cs[2]; }
+/* multiply c2 by color c3 and add to c1 */
+#define fRGB_colormadd(c1, c2, c3) { c1[0]+=c2[0]*c3[0]; c1[1]+=c2[1]*c3[1]; c1[2]+=c2[2]*c3[2]; }
+/* multiply c2 by color rgb, rgb as separate arguments */
+#define fRGB_rgbmult(c, r, g, b) { c[0]*=(r); c[1]*=(g); c[2]*=(b); }
+/* swap colors c1 & c2 */
+#define fRGB_swap(c1, c2) { float _t=c1[0]; c1[0]=c2[0]; c2[0]=_t;\
+ _t=c1[1]; c1[1]=c2[1]; c2[1]=_t;\
+ _t=c1[2]; c1[2]=c2[2]; c2[2]=_t; }
+
+void qd_getPixel(CompBuf* src, int x, int y, float* col);
+void qd_setPixel(CompBuf* src, int x, int y, float* col);
+void qd_addPixel(CompBuf* src, int x, int y, float* col);
+void qd_multPixel(CompBuf* src, int x, int y, float f);
+void qd_getPixelLerpWrap(CompBuf* src, float u, float v, float* col);
+void qd_getPixelLerp(CompBuf* src, float u, float v, float* col);
+void qd_getPixelLerpChan(CompBuf* src, float u, float v, int chan, float* out);
+CompBuf* qd_downScaledCopy(CompBuf* src, int scale);
+void IIR_gauss(CompBuf* src, float sigma, int chan, int xy);
+/* end utility funcs */
+
#endif