log10 + contrast tweaks

This commit is contained in:
Mike Walters
2015-06-24 21:19:44 +01:00
parent 2335fcd12e
commit a9152be753
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ void InputSource::GetViewport(float *dest, int x, int y, int width, int height,
float re = m_fftw_out[k][0];
float im = m_fftw_out[k][1];
float mag = sqrt(re * re + im * im) / m_fft_size;
float magdb = 10 * log(mag);
float magdb = 10 * log2(mag) / log2(10);
*dest = magdb;
dest++;
}