diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2011-11-30 14:20:38 +0100 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2011-11-30 15:11:50 +0100 |
commit | 11590ac0b631e50ed6e7776ba918417b0011f752 (patch) | |
tree | 3bf777ff6dc800f6311547c15414ade7304984a7 /gst/audiovisualizers/gstdrawhelpers.h | |
parent | b5ebf76d32b198fde4457e19e660f8458af0da02 (diff) | |
download | gstreamer-plugins-bad-11590ac0b631e50ed6e7776ba918417b0011f752.tar.gz |
spacescope: add color-modes
In colormode we split the signal in low,mid,high frequency parts and draw them
separately into red, gree, blue color channels.
Diffstat (limited to 'gst/audiovisualizers/gstdrawhelpers.h')
-rw-r--r-- | gst/audiovisualizers/gstdrawhelpers.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gst/audiovisualizers/gstdrawhelpers.h b/gst/audiovisualizers/gstdrawhelpers.h index 290713f34..815fae35e 100644 --- a/gst/audiovisualizers/gstdrawhelpers.h +++ b/gst/audiovisualizers/gstdrawhelpers.h @@ -24,8 +24,12 @@ _vd[(_y * _st) + _x] = _c; \ } G_STMT_END +#define draw_dot_c(_vd, _x, _y, _st, _c) G_STMT_START { \ + _vd[(_y * _st) + _x] |= _c; \ +} G_STMT_END + #define draw_dot_aa(_vd, _x, _y, _st, _c, _f) G_STMT_START { \ - guint32 _oc, _nc, _c1, _c2, _c3; \ + guint32 _oc, _c1, _c2, _c3; \ \ _oc = _vd[(_y * _st) + _x]; \ _c3 = (_oc & 0xff) + ((_c & 0xff) * _f); \ @@ -34,8 +38,7 @@ _c2 = MIN(_c2, 255); \ _c1 = ((_oc & 0xff0000) >> 16) + (((_c & 0xff0000) >> 16) * _f); \ _c1 = MIN(_c1, 255); \ - _nc = (_c1 << 16) | (_c2 << 8) | _c3; \ - _vd[(_y * _st) + _x] = _nc; \ + _vd[(_y * _st) + _x] = (_c1 << 16) | (_c2 << 8) | _c3; \ } G_STMT_END #define draw_line(_vd, _x1, _x2, _y1, _y2, _st, _c) G_STMT_START { \ |