Mercurial > hg > svgui
changeset 1062:38ecdd5924ac spectrogram-minor-refactor
A more sensible order for column operations
author | Chris Cannam |
---|---|
date | Fri, 17 Jun 2016 10:19:55 +0100 |
parents | 861f40fc9958 |
children | a0f234acd6e7 |
files | layer/SpectrogramLayer.cpp |
diffstat | 1 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/SpectrogramLayer.cpp Wed Jun 15 14:43:51 2016 +0100 +++ b/layer/SpectrogramLayer.cpp Fri Jun 17 10:19:55 2016 +0100 @@ -2556,7 +2556,7 @@ } // order: -// get column -> scale -> distribute/interpolate -> record extents -> normalise -> peak pick -> apply display gain +// get column -> scale -> record extents -> normalise -> peak pick -> apply display gain -> distribute/interpolate int SpectrogramLayer::paintDrawBuffer(LayerGeometryProvider *v, @@ -2677,21 +2677,22 @@ maxbin - minbin + 1); } - vector<float> distributed = - distributeColumn(scaleColumn(column), + column = scaleColumn(column); + + recordColumnExtents(column, + sx, + overallMag, + overallMagChanged); + + preparedColumn = + distributeColumn(applyDisplayGain + (peakPickColumn + (normalizeColumn + (column))), h, binfory, minbin, interpolate); - - recordColumnExtents(distributed, - sx, - overallMag, - overallMagChanged); - - preparedColumn = - applyDisplayGain(peakPickColumn - (normalizeColumn(distributed))); psx = sx; }