Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 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 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 1061:861f40fc9958 | 1062:38ecdd5924ac | 
|---|---|
| 2554 } | 2554 } | 
| 2555 return out; | 2555 return out; | 
| 2556 } | 2556 } | 
| 2557 | 2557 | 
| 2558 // order: | 2558 // order: | 
| 2559 // get column -> scale -> distribute/interpolate -> record extents -> normalise -> peak pick -> apply display gain | 2559 // get column -> scale -> record extents -> normalise -> peak pick -> apply display gain -> distribute/interpolate | 
| 2560 | 2560 | 
| 2561 int | 2561 int | 
| 2562 SpectrogramLayer::paintDrawBuffer(LayerGeometryProvider *v, | 2562 SpectrogramLayer::paintDrawBuffer(LayerGeometryProvider *v, | 
| 2563 int w, | 2563 int w, | 
| 2564 int h, | 2564 int h, | 
| 2675 sx, | 2675 sx, | 
| 2676 minbin, | 2676 minbin, | 
| 2677 maxbin - minbin + 1); | 2677 maxbin - minbin + 1); | 
| 2678 } | 2678 } | 
| 2679 | 2679 | 
| 2680 vector<float> distributed = | 2680 column = scaleColumn(column); | 
| 2681 distributeColumn(scaleColumn(column), | 2681 | 
| 2682 recordColumnExtents(column, | |
| 2683 sx, | |
| 2684 overallMag, | |
| 2685 overallMagChanged); | |
| 2686 | |
| 2687 preparedColumn = | |
| 2688 distributeColumn(applyDisplayGain | |
| 2689 (peakPickColumn | |
| 2690 (normalizeColumn | |
| 2691 (column))), | |
| 2682 h, | 2692 h, | 
| 2683 binfory, | 2693 binfory, | 
| 2684 minbin, | 2694 minbin, | 
| 2685 interpolate); | 2695 interpolate); | 
| 2686 | |
| 2687 recordColumnExtents(distributed, | |
| 2688 sx, | |
| 2689 overallMag, | |
| 2690 overallMagChanged); | |
| 2691 | |
| 2692 preparedColumn = | |
| 2693 applyDisplayGain(peakPickColumn | |
| 2694 (normalizeColumn(distributed))); | |
| 2695 | 2696 | 
| 2696 psx = sx; | 2697 psx = sx; | 
| 2697 } | 2698 } | 
| 2698 | 2699 | 
| 2699 //!!! now peak of all preparedColumns for this pixel | 2700 //!!! now peak of all preparedColumns for this pixel | 
