# HG changeset patch # User Chris Cannam # Date 1466155195 -3600 # Node ID 38ecdd5924aca0191af517af079962b2f088b6e8 # Parent 861f40fc9958a2bd109d5dc475bf58cf600f3941 A more sensible order for column operations diff -r 861f40fc9958 -r 38ecdd5924ac layer/SpectrogramLayer.cpp --- 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 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; }