mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-07-26 12:04:13 -04:00
Optimization: avoid cvtsd2ss instructions by using explicit floating point litterals. Spectrum histogram calculation optimization
This commit is contained in:
@@ -353,14 +353,15 @@ void GLSpectrum::updateHistogram(const std::vector<Real>& spectrum)
|
||||
quint8* b = m_histogram;
|
||||
quint8* h = m_histogramHoldoff;
|
||||
int sub = 1;
|
||||
int fftMulSize = 100 * m_fftSize;
|
||||
|
||||
if(m_decay > 0)
|
||||
sub += m_decay;
|
||||
|
||||
m_histogramHoldoffCount--;
|
||||
if(m_histogramHoldoffCount <= 0) {
|
||||
for(int i = 0; i < 100 * m_fftSize; i++) {
|
||||
if(*b > 20) {
|
||||
for(int i = 0; i < fftMulSize; i++) {
|
||||
if((*b>>4) > 0) { // *b > 16
|
||||
*b = *b - sub;
|
||||
} else if(*b > 0) {
|
||||
if(*h >= sub) {
|
||||
|
||||
Reference in New Issue
Block a user