# HG changeset patch # User Chris Cannam # Date 1242809531 0 # Node ID d0920575b48ac4bad3e3e99cdf8e90bdaed99a22 # Parent 2e25bdc9f826f19e8280de530ff76cb1356090cc * pass allocator through to sub-cuts (duh) diff -r 2e25bdc9f826 -r d0920575b48a plugins/AdaptiveSpectrogram.cpp --- a/plugins/AdaptiveSpectrogram.cpp Tue May 19 16:18:11 2009 +0000 +++ b/plugins/AdaptiveSpectrogram.cpp Wed May 20 08:52:11 2009 +0000 @@ -319,7 +319,8 @@ int res, int x, int y, int h, Cutting *&top, Cutting *&bottom, - Cutting *&left, Cutting *&right) const + Cutting *&left, Cutting *&right, + BlockAllocator *allocator) const { if (m_threaded && !m_threadsInUse) { @@ -354,16 +355,16 @@ // Splitting this way keeps us in the same resolution, // but with two vertical subregions of height h/2. - top = cut(s, res, x, y + h/2, h/2, 0); - bottom = cut(s, res, x, y, h/2, 0); + top = cut(s, res, x, y + h/2, h/2, allocator); + bottom = cut(s, res, x, y, h/2, allocator); // The "horizontal" division is a left/right split. Splitting // this way places us in resolution res/2, which has lower // vertical resolution but higher horizontal resolution. We // need to double x accordingly. - left = cut(s, res/2, 2 * x, y/2, h/2, 0); - right = cut(s, res/2, 2 * x + 1, y/2, h/2, 0); + left = cut(s, res/2, 2 * x, y/2, h/2, allocator); + right = cut(s, res/2, 2 * x + 1, y/2, h/2, allocator); } } @@ -387,7 +388,7 @@ if (h > 1 && res > s.minres) { Cutting *top = 0, *bottom = 0, *left = 0, *right = 0; - getSubCuts(s, res, x, y, h, top, bottom, left, right); + getSubCuts(s, res, x, y, h, top, bottom, left, right, allocator); double vcost = top->cost + bottom->cost; double hcost = left->cost + right->cost; diff -r 2e25bdc9f826 -r d0920575b48a plugins/AdaptiveSpectrogram.h --- a/plugins/AdaptiveSpectrogram.h Tue May 19 16:18:11 2009 +0000 +++ b/plugins/AdaptiveSpectrogram.h Wed May 20 08:52:11 2009 +0000 @@ -260,7 +260,8 @@ void getSubCuts(const Spectrograms &, int res, int x, int y, int h, Cutting *&top, Cutting *&bottom, - Cutting *&left, Cutting *&right) const; + Cutting *&left, Cutting *&right, + BlockAllocator *allocator) const; void printCutting(Cutting *, std::string) const;