MythTV  master
synaesthesia.cpp
Go to the documentation of this file.
1 // Copyright (c) 2000-2001 Brad Hughes <bhughes@trolltech.com>
2 //
3 // Use, modification and distribution is allowed without limitation,
4 // warranty, or liability of any kind.
5 //
6 // modified 12-2004 by Kyle Schlansker to add 64 bit support
7 //
8 
9 #include "config.h"
10 
11 // C++
12 #include <cinttypes>
13 #include <cmath>
14 #include <cstdint>
15 #include <cstdlib>
16 #include <iostream>
17 using namespace std;
18 
19 // Qt
20 #include <QCoreApplication>
21 #include <QPainter>
22 #include <QImage>
23 
24 // MythTV
25 #include <compat.h>
26 #include <mythlogging.h>
27 
28 // MythMusic
29 #include "mainvisual.h"
30 #include "synaesthesia.h"
31 
33  m_size(0,0),
34 
35  m_maxStarRadius(1),
36  m_fadeMode(Stars),
37  m_pointsAreDiamonds(true),
38  m_brightnessTwiddler(0.3),
39  m_starSize(0.5),
40 
41  m_outWidth(0),
42  m_outHeight(0),
43 
44  m_outputImage(nullptr),
45 
46  m_fgRedSlider(0.0), m_fgGreenSlider(0.5),
47  m_bgRedSlider(0.75), m_bgGreenSlider(0.4),
48 
49  m_energy_avg(80.0)
50 {
51  m_fps = 29;
52 
53  coreInit(); // init cosTable, negSinTable, bitReverse
54  setStarSize(m_starSize); // init scaleDown, maxStarRadius
55  setupPalette(); // init palette
56 }
57 
59 {
60  if (m_outputImage)
61  delete m_outputImage;
62 }
63 
65 {
66 #define sBOUND(x) ((x) > 255 ? 255 : (x))
67 #define sPEAKIFY(x) int(sBOUND((x) - (x)*(255-(x))/255/2))
68 #define sMAX(x,y) ((x) > (y) ? (x) : (y))
69  int i;
70  double scale, fgRed, fgGreen, fgBlue, bgRed, bgGreen, bgBlue;
71  fgRed = m_fgRedSlider;
72  fgGreen = m_fgGreenSlider;
73  fgBlue = 1.0 - sMAX(m_fgRedSlider,m_fgGreenSlider);
74  //scale = sMAX(sMAX(fgRed,fgGreen),fgBlue);
75  scale = (fgRed + fgGreen + fgBlue) / 2.0;
76  fgRed /= scale;
77  fgGreen /= scale;
78  fgBlue /= scale;
79 
80  bgRed = m_bgRedSlider;
81  bgGreen = m_bgGreenSlider;
82  bgBlue = 1.0 - sMAX(m_bgRedSlider,m_bgGreenSlider);
83  //scale = sMAX(sMAX(bgRed,bgGreen),bgBlue);
84  scale = (bgRed + bgGreen + bgBlue) / 2.0;
85  bgRed /= scale;
86  bgGreen /= scale;
87  bgBlue /= scale;
88 
89  for (i = 0; i < 256; i++) {
90  int f = i & 15, b = i / 16;
91  //palette[i * 3 + 0] = sPEAKIFY(b*bgRed*16+f*fgRed*16);
92  //palette[i * 3 + 1] = sPEAKIFY(b*bgGreen*16+f*fgGreen*16);
93  //palette[i * 3 + 2] = sPEAKIFY(b*bgBlue*16+f*fgBlue*16);
94 
95  double red = b * bgRed * 16 + f * fgRed * 16;
96  double green = b * bgGreen * 16 + f * fgGreen * 16;
97  double blue = b * bgBlue * 16 + f * fgBlue * 16;
98 
99  double excess = 0.0;
100  for (int j = 0; j < 5; j++)
101  {
102  red += excess / 3;
103  green += excess / 3;
104  blue += excess / 3;
105  excess = 0.0;
106 
107 
108  if (red > 255) { excess += red - 255; red = 255; }
109  if (green > 255) { excess += green - 255; green = 255; }
110  if (blue > 255) { excess += blue - 255; blue = 255; }
111  }
112 
113  double scale2 = (0.5 + (red + green + blue) / 768.0) / 1.5;
114  red *= scale2;
115  green *= scale2;
116  blue *= scale2;
117 
118  m_palette[i * 3 + 0] = sBOUND(int(red));
119  m_palette[i * 3 + 1] = sBOUND(int(green));
120  m_palette[i * 3 + 2] = sBOUND(int(blue));
121  }
122 }
123 
124 void Synaesthesia::resize(const QSize &newsize)
125 {
126  m_size = newsize;
127 
128  m_size.setHeight(m_size.height() / 2);
129  m_size.setWidth((m_size.width() / 4) * 4);
130  m_outputBmp.size(m_size.width(), m_size.height());
131  m_lastOutputBmp.size(m_size.width(), m_size.height());
132  m_lastLastOutputBmp.size(m_size.width(), m_size.height());
133  m_outWidth = m_size.width();
134  m_outHeight = m_size.height();
135 
136  if (m_outputImage)
137  delete m_outputImage;
138 
139  m_size.setHeight(m_size.height() * 2);
140  m_outputImage = new QImage(m_size, QImage::Format_Indexed8);
141 
142  if (!m_outputImage)
143  {
144  LOG(VB_GENERAL, LOG_ERR,
145  "outputImage in Synaesthesia::resize() is NULL");
146  return;
147  }
148 
149  for (int i = 0; i < 256; i++)
150  m_outputImage->setColor(i, qRgba(m_palette[i * 3], m_palette[i * 3 + 1],
151  m_palette[i * 3 + 2], 255));
152 
153 #if 0
154  surface = SDL_SetVideoMode(size.width(), size.height(), 8, 0);
155 
156  if (!surface)
157  {
158  LOG(VB_GENERAL, LOG_ERR, "Couldn't get SDL surface");
159  return;
160  }
161 
162  SDL_Color sdlPalette[256];
163 
164  for (int i = 0; i < 256; i++)
165  {
166  sdlPalette[i].r = m_palette[i * 3];
167  sdlPalette[i].g = m_palette[i * 3 + 1];
168  sdlPalette[i].b = m_palette[i * 3 + 2];
169  }
170 
171  SDL_SetColors(surface, sdlPalette, 0, 256);
172 #endif
173 }
174 
176 {
177  int sum = 0;
178  for (int j = 0; j < LogSize; j++)
179  {
180  sum = (i & 1) + sum * 2;
181  i >>= 1;
182  }
183 
184  return sum;
185 }
186 
187 void Synaesthesia::fft(double *x, double *y)
188 {
189  int n2 = NumSamples;
190  for (int twoToTheK = 1; twoToTheK < NumSamples; twoToTheK *= 2)
191  {
192  int n1 = n2;
193  n2 /= 2;
194  for (int j = 0; j < n2; j++)
195  {
196  double c = m_cosTable[j * twoToTheK & (NumSamples - 1)],
197  s = m_negSinTable[j * twoToTheK & (NumSamples - 1)];
198  for (int i = j; i < NumSamples; i += n1)
199  {
200  int l = i + n2;
201  double xt = x[i] - x[l];
202  x[i] = (x[i] + x[l]);
203  double yt = y[i] - y[l];
204  y[i] = (y[i] + y[l]);
205  x[l] = xt * c - yt * s;
206  y[l] = xt * s + yt * c;
207  }
208  }
209  }
210 }
211 
212 void Synaesthesia::setStarSize(double lsize)
213 {
214  double fadeModeFudge = (m_fadeMode == Wave ? 0.4 :
215  (m_fadeMode == Flame ? 0.6 : 0.78));
216 
217  int factor;
218  if (lsize > 0.0)
219  factor = int(exp(log(fadeModeFudge) / (lsize * 8.0)) * 255);
220  else
221  factor = 0;
222 
223  if (factor > 255)
224  factor = 255;
225 
226  for (int i = 0; i < 256; i++)
227  m_scaleDown[i] = i * factor>>8;
228 
229  m_maxStarRadius = 1;
230  for (int i = 255; i; i = m_scaleDown[i])
231  m_maxStarRadius++;
232 }
233 
235 {
236  for (int i = 0; i < NumSamples; i++)
237  {
238  m_negSinTable[i] = -sin(3.141592 * 2.0 / NumSamples * i);
239  m_cosTable[i] = cos(3.141592 * 2.0 / NumSamples * i);
240  m_bitReverse[i] = bitReverser(i);
241  }
242 }
243 
244 #define output ((unsigned char*)m_outputBmp.data)
245 #define lastOutput ((unsigned char*)m_lastOutputBmp.data)
246 #define lastLastOutput ((unsigned char*)m_lastLastOutputBmp.data)
247 
248 void Synaesthesia::addPixel(int x, int y, int br1, int br2)
249 {
250  if (x < 0 || x > m_outWidth || y < 0 || y >= m_outHeight)
251  return;
252 
253  unsigned char *p = output + x * 2 + y * m_outWidth * 2;
254  if (p[0] + br1 < 255)
255  p[0] += br1;
256  else
257  p[0] = 255;
258  if (p[1] + br2 < 255)
259  p[1] += br2;
260  else
261  p[1] = 255;
262 }
263 
264 void Synaesthesia::addPixelFast(unsigned char *p, int br1, int br2)
265 {
266  if (p[0] + br1 < 255)
267  p[0] += br1;
268  else
269  p[0] = 255;
270  if (p[1] + br2 < 255)
271  p[1] += br2;
272  else
273  p[1] = 255;
274 }
275 
276 unsigned char Synaesthesia::getPixel(int x, int y, int where)
277 {
278  if (x < 0 || y < 0 || x >= m_outWidth || y >= m_outHeight)
279  return 0;
280 
281  return lastOutput[where];
282 }
283 
285 {
286  uint32_t *ptr = (uint32_t *)output;
287  int i = m_outWidth * m_outHeight * 2 / sizeof(uint32_t);
288  do {
289  uint32_t x = *ptr;
290  if (x)
291  *(ptr++) = x - ((x & (uintptr_t)0xf0f0f0f0) >> 4) -
292  ((x & (uintptr_t)0xe0e0e0e0) >> 5);
293  else
294  ptr++;
295  } while (--i > 0);
296 }
297 
298 void Synaesthesia::fadePixelWave(int x, int y, int where, int step)
299 {
300  short j = short((int(getPixel(x - 1, y, where - 2)) +
301  int(getPixel(x + 1, y, where + 2)) +
302  int(getPixel(x, y - 1, where - step)) +
303  int(getPixel(x, y + 1, where + step))) >> 2) +
304  lastOutput[where];
305 
306  if (!j)
307  {
308  output[where] = 0;
309  return;
310  }
311  j = j - lastLastOutput[where] - 1;
312  if (j < 0)
313  output[where] = 0;
314  else if (j & (255 * 256))
315  output[where] = 255;
316  else
317  output[where] = j;
318 }
319 
321 {
322  unsigned short *t = m_lastLastOutputBmp.data;
325  m_outputBmp.data = t;
326 
327  int x, y, i, j, start, end;
328  int step = m_outWidth*2;
329  for (x = 0, i = 0, j = m_outWidth * (m_outHeight - 1) * 2;
330  x < m_outWidth; x++, i += 2, j += 2)
331  {
332  fadePixelWave(x, 0, i, step);
333  fadePixelWave(x, 0, i + 1, step);
334  fadePixelWave(x, m_outHeight - 1, j, step);
335  fadePixelWave(x, m_outHeight - 1, j + 1, step);
336  }
337 
338  for (y = 1, i = m_outWidth * 2, j = m_outWidth * 4 - 2;
339  y < m_outHeight; y++, i += step, j += step)
340  {
341  fadePixelWave(0, y, i, step);
342  fadePixelWave(0, y, i + 1, step);
343  fadePixelWave(m_outWidth - 1, y, j, step);
344  fadePixelWave(m_outWidth - 1, y, j + 1, step);
345  }
346 
347  for (y = 1, start = m_outWidth * 2 + 2, end = m_outWidth * 4 - 2;
348  y < m_outHeight - 1; y++, start += step, end += step)
349  {
350  int i2 = start;
351  do
352  {
353  short j2 = short((int(lastOutput[i2 - 2]) +
354  int(lastOutput[i2 + 2]) +
355  int(lastOutput[i2 - step]) +
356  int(lastOutput[i2 + step])) >> 2) +
357  lastOutput[i2];
358  if (!j2)
359  {
360  output[i2] = 0;
361  }
362  else
363  {
364  j2 = j2 - lastLastOutput[i2] - 1;
365  if (j2 < 0)
366  output[i2] = 0;
367  else if (j2 & (255*256))
368  output[i2] = 255;
369  else
370  output[i2] = j2;
371  }
372  } while(++i2 < end);
373  }
374 }
375 
376 void Synaesthesia::fadePixelHeat(int x, int y, int where, int step)
377 {
378  short j = short((int(getPixel(x - 1, y, where - 2)) +
379  int(getPixel(x + 1, y, where + 2)) +
380  int(getPixel(x, y - 1, where - step)) +
381  int(getPixel(x, y + 1, where + step))) >> 2) +
382  lastOutput[where];
383  if (!j)
384  {
385  output[where] = 0;
386  return;
387  }
388  j = j -lastLastOutput[where] - 1;
389  if (j < 0)
390  output[where] = 0;
391  else if (j & (255 * 256))
392  output[where] = 255;
393  else
394  output[where] = j;
395 }
396 
398 {
399  unsigned short *t = m_lastLastOutputBmp.data;
402  m_outputBmp.data = t;
403 
404  int x, y, i, j, start, end;
405  int step = m_outWidth * 2;
406  for (x = 0, i = 0, j = m_outWidth * (m_outHeight - 1) * 2;
407  x < m_outWidth; x++, i += 2, j += 2)
408  {
409  fadePixelHeat(x, 0, i, step);
410  fadePixelHeat(x, 0, i + 1, step);
411  fadePixelHeat(x, m_outHeight - 1, j, step);
412  fadePixelHeat(x, m_outHeight - 1, j + 1, step);
413  }
414 
415  for(y = 1, i = m_outWidth * 2, j = m_outWidth * 4 - 2; y < m_outHeight;
416  y++, i += step, j += step)
417  {
418  fadePixelHeat(0, y, i, step);
419  fadePixelHeat(0, y, i + 1, step);
420  fadePixelHeat(m_outWidth - 1, y, j, step);
421  fadePixelHeat(m_outWidth - 1, y, j + 1, step);
422  }
423 
424  for(y = 1, start = m_outWidth * 2 + 2, end = m_outWidth * 4 - 2;
425  y < m_outHeight - 1; y++, start += step, end += step)
426  {
427  int i2 = start;
428  do
429  {
430  short j2 = short((int(lastOutput[i2 - 2]) +
431  int(lastOutput[i2 + 2]) +
432  int(lastOutput[i2 - step]) +
433  int(lastOutput[i2 + step])) >> 2) +
434  lastOutput[i2];
435  if (!j2)
436  output[i2] = 0;
437  else
438  {
439  j2 = j2 - lastLastOutput[i2] +
440  ((lastLastOutput[i2] - lastOutput[i2]) >> 2) - 1;
441  if (j2 < 0)
442  output[i2] = 0;
443  else if (j2 & (255*256))
444  output[i2] = 255;
445  else
446  output[i2] = j2;
447  }
448  } while(++i2 < end);
449  }
450 }
451 
453 {
454  switch(m_fadeMode)
455  {
456  case Stars: fadeFade(); break;
457  case Flame: fadeHeat(); break;
458  case Wave: fadeWave(); break;
459  default: break;
460  }
461 }
462 
464 {
465  fade();
466 
467  if (!node)
468  return false;
469 
470  double x[NumSamples], y[NumSamples];
471  double a[NumSamples], b[NumSamples];
472  double energy;
473  int clarity[NumSamples];
474  int i, j, k;
475 
476  int brightFactor = int(Brightness * m_brightnessTwiddler / (m_starSize + 0.01));
477 
478  int numSamps = NumSamples;
479  if (node->length < NumSamples)
480  numSamps = node->length;
481 
482  memset(x, 0, sizeof(x));
483  memset(y, 0, sizeof(y));
484 
485  for (i = 0; i < numSamps; i++)
486  {
487  x[i] = node->left[i];
488  if (node->right)
489  y[i] = node->right[i];
490  else
491  y[i] = x[i];
492  }
493 
494  fft(x, y);
495 
496  energy = 0.0;
497 
498  for (i = 0 + 1; i < NumSamples / 2; i++)
499  {
500  double x1 = x[m_bitReverse[i]],
501  y1 = y[m_bitReverse[i]],
502  x2 = x[m_bitReverse[NumSamples - i]],
503  y2 = y[m_bitReverse[NumSamples - i]],
504  aa, bb;
505  a[i] = sqrt(aa = (x1 + x2) * (x1 + x2) + (y1 - y2) * (y1 - y2));
506  b[i] = sqrt(bb = (x1 - x2) * (x1 - x2) + (y2 + y2) * (y1 + y2));
507  if (aa + bb != 0.0)
508  clarity[i] = (int)(((x1 + x2) * (x1 - x2) + (y1 + y2) * (y1 - y2)) /
509  (aa + bb) * 256);
510  else
511  clarity[i] = 0;
512 
513  energy += (aa + bb) * i * i;
514  }
515 
516  energy = sqrt(energy / NumSamples) / 65536.0;
517 
518  //int heightFactor = NumSamples / 2 / outHeight + 1;
519  //int actualHeight = NumSamples / 2 / heightFactor;
520  //int heightAdd = (outHeight + actualHeight) >> 1;
521 
522  double brightFactor2 = (brightFactor / 65536.0 / NumSamples) *
523  sqrt(m_outHeight * m_outWidth / (320.0 * 200.0));
524 
525  m_energy_avg = m_energy_avg * 0.95 + energy * 0.05;
526  if (m_energy_avg > 0.0)
527  brightFactor2 *= 80.0 / (m_energy_avg + 5.0);
528 
529  for (i = 1; i < NumSamples / 2; i++)
530  {
531  if (a[i] > 0 || b[i] > 0)
532  {
533  int h = (int)(b[i] * m_outWidth / (a[i] + b[i]));
534  int br1, br2, br = (int)((a[i] + b[i]) * i * brightFactor2);
535  br1 = br * (clarity[i] + 128) >> 8;
536  br2 = br * (128 - clarity[i]) >> 8;
537  if (br1 < 0) br1 = 0; else if (br1 > 255) br1 = 255;
538  if (br2 < 0) br2 = 0; else if (br2 > 255) br2 = 255;
539 
540  int px = h,
541  py = m_outHeight - i * m_outHeight / (NumSamples / 2);
542 
544  {
545  addPixel(px, py, br1, br2);
546  br1 = m_scaleDown[br1];
547  br2 = m_scaleDown[br2];
548 
549  for(j = 1; br1 > 0 || br2 > 0;
550  j++, br1 = m_scaleDown[br1], br2 = m_scaleDown[br2])
551  {
552  for (k = 0; k < j; k++)
553  {
554  addPixel(px - j + k,py - k, br1, br2);
555  addPixel(px + k, py - j + k, br1, br2);
556  addPixel(px + j - k, py + k, br1, br2);
557  addPixel(px - k, py + j - k, br1, br2);
558  }
559  }
560  }
561  else
562  {
563  if (px < m_maxStarRadius || py < m_maxStarRadius ||
564  px > m_outWidth - m_maxStarRadius ||
566  {
567  addPixel(px, py, br1, br2);
568  for( j = 1; br1 > 0 || br2 > 0;
569  j++, br1 = m_scaleDown[br1], br2 = m_scaleDown[br2])
570  {
571  addPixel(px + j, py, br1, br2);
572  addPixel(px, py + j, br1, br2);
573  addPixel(px - j, py, br1, br2);
574  addPixel(px, py - j, br1, br2);
575  }
576  }
577  else
578  {
579  unsigned char *p = output + px * 2 + py * m_outWidth * 2,
580  *p1 = p, *p2 = p, *p3 = p, *p4 = p;
581  addPixelFast(p, br1, br2);
582  for (; br1 > 0 || br2 > 0;
583  br1 = m_scaleDown[br1], br2 = m_scaleDown[br2])
584  {
585  p1 += 2;
586  addPixelFast(p1, br1, br2);
587  p2 -= 2;
588  addPixelFast(p2, br1, br2);
589  p3 += m_outWidth * 2;
590  addPixelFast(p3, br1, br2);
591  p4 -= m_outWidth*2;
592  addPixelFast(p4, br1, br2);
593  }
594  }
595  }
596  }
597  }
598 
599  return false;
600 }
601 
602 bool Synaesthesia::draw(QPainter *p, const QColor &back)
603 {
604  if (!m_outputImage)
605  return true;
606 
607  (void)back;
608 
609  uint32_t *ptrOutput = (uint32_t *)output;
610 
611  for (int j = 0; j < m_outHeight * 2; j += 2)
612  {
613  uint32_t *ptrTop = (uint32_t *)(m_outputImage->scanLine(j));
614  uint32_t *ptrBot = (uint32_t *)(m_outputImage->scanLine(j+1));
615 
616  int i = m_outWidth / 4;
617 
618  do
619  {
620  unsigned int const r1 = *(ptrOutput++);
621  unsigned int const r2 = *(ptrOutput++);
622 
623  unsigned int const v = ((r1 & 0x000000f0ul) >> 4) |
624  ((r1 & 0x0000f000ul) >> 8) |
625  ((r1 & 0x00f00000ul) >> 12) |
626  ((r1 & 0xf0000000ul) >> 16);
627 
628  *(ptrTop++) = v | (((r2 & 0x000000f0ul) << 12) |
629  ((r2 & 0x0000f000ul) << 8) |
630  ((r2 & 0x00f00000ul) << 4) |
631  ((r2 & 0xf0000000ul)));
632 
633  *(ptrBot++) = v | (((r2 & 0x000000f0ul) << 12) |
634  ((r2 & 0x0000f000ul) << 8) |
635  ((r2 & 0x00f00000ul) << 4) |
636  ((r2 & 0xf0000000ul)));
637  } while (--i);
638  }
639 
640  p->drawImage(0, 0, *m_outputImage);
641 
642  return true;
643 }
644 
645 static class SynaesthesiaFactory : public VisFactory
646 {
647  public:
648  const QString &name(void) const override // VisFactory
649  {
650  static QString name = QCoreApplication::translate("Visualizers",
651  "Synaesthesia");
652  return name;
653  }
654 
655  uint plugins(QStringList *list) const override // VisFactory
656  {
657  *list << name();
658  return 1;
659  }
660 
661  VisualBase *create(MainVisual *parent, const QString &pluginName) const override // VisFactory
662  {
663  (void)parent;
664  (void)pluginName;
665  return new Synaesthesia();
666  }
double m_brightnessTwiddler
Definition: synaesthesia.h:58
Bitmap< unsigned short > m_outputBmp
Definition: synaesthesia.h:64
VisualBase * create(MainVisual *parent, const QString &pluginName) const override
void setupPalette(void)
VERBOSE_PREAMBLE Most true
Definition: verbosedefs.h:91
void fadePixelWave(int x, int y, int where, int step)
#define sMAX(x, y)
unsigned char m_palette[768]
Definition: synaesthesia.h:67
void fade(void)
unsigned int uint
Definition: compat.h:140
double m_negSinTable[NumSamples]
Definition: synaesthesia.h:52
uint plugins(QStringList *list) const override
Bitmap< unsigned short > m_lastOutputBmp
Definition: synaesthesia.h:64
#define NumSamples
Definition: synaesthesia.h:13
unsigned char b
Definition: ParseText.cpp:340
bool draw(QPainter *p, const QColor &back) override
bool m_pointsAreDiamonds
Definition: synaesthesia.h:57
double m_energy_avg
Definition: synaesthesia.h:70
unsigned char getPixel(int x, int y, int where)
static int x2
Definition: mythsocket.cpp:61
void addPixelFast(unsigned char *p, int br1, int br2)
unsigned char t
Definition: ParseText.cpp:340
SynaesthesiaFactory SynaesthesiaFactory
double m_fgGreenSlider
Definition: synaesthesia.h:68
Bitmap< unsigned short > m_lastLastOutputBmp
Definition: synaesthesia.h:64
double m_bgRedSlider
Definition: synaesthesia.h:68
#define Stars
Definition: synaesthesia.h:17
long length
Definition: videovisual.h:34
def log(debug, txt)
Definition: utilities.py:5
int bitReverser(int i)
#define LogSize
Definition: synaesthesia.h:11
short * left
Definition: videovisual.h:33
#define sBOUND(x)
#define lastOutput
void fadeWave(void)
void coreInit(void)
double m_fgRedSlider
Definition: synaesthesia.h:68
void setStarSize(double lsize)
void addPixel(int x, int y, int br1, int br2)
void resize(const QSize &size) override
int m_scaleDown[256]
Definition: synaesthesia.h:54
void fadeFade(void)
int m_bitReverse[NumSamples]
Definition: synaesthesia.h:53
void fadeHeat(void)
Pixel * data
Definition: polygon.h:11
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: mythlogging.h:41
#define Wave
Definition: synaesthesia.h:16
void fadePixelHeat(int x, int y, int where, int step)
#define lastLastOutput
void size(int w, int h)
Definition: polygon.h:16
short * right
Definition: videovisual.h:33
void fft(double *x, double *y)
static guint32 * p2
Definition: goom_core.c:35
Synaesthesia(void)
double m_starSize
Definition: synaesthesia.h:59
static guint32 * back
Definition: goom_core.c:34
#define Flame
Definition: synaesthesia.h:15
double m_bgGreenSlider
Definition: synaesthesia.h:68
const QString & name(void) const override
double m_cosTable[NumSamples]
Definition: synaesthesia.h:51
bool process(VisualNode *node) override
int m_fps
Definition: visualize.h:95
virtual ~Synaesthesia()
QImage * m_outputImage
Definition: synaesthesia.h:65
int m_maxStarRadius
Definition: synaesthesia.h:55
static guint32 * p1
Definition: goom_core.c:35
#define output
static int x1
Definition: mythsocket.cpp:60