Bug correction in the slicer class
This commit is contained in:
@@ -24,8 +24,6 @@
|
|||||||
#include <slicer.h>
|
#include <slicer.h>
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
using namespace rtengine;
|
|
||||||
|
|
||||||
// If no parameter set, everything = 0 -> process all the image
|
// If no parameter set, everything = 0 -> process all the image
|
||||||
Block::Block() {
|
Block::Block() {
|
||||||
posX = 0;
|
posX = 0;
|
||||||
@@ -45,7 +43,7 @@ Block::Block(unsigned int x, unsigned int y, unsigned int w, unsigned int h) {
|
|||||||
* Slice a sub-region to process in blocks who's size is given by the number of processor
|
* Slice a sub-region to process in blocks who's size is given by the number of processor
|
||||||
* and the number of pixel per block (and hence the memory footprint)
|
* and the number of pixel per block (and hence the memory footprint)
|
||||||
*/
|
*/
|
||||||
Slicer::Slicer(unsigned int imageWidth, unsigned int imageHeight, Block *subRegion, unsigned int pixels, const char* nomFichier) {
|
Slicer::Slicer(unsigned int imageWidth, unsigned int imageHeight, Block *subRegion, unsigned int pixels) {
|
||||||
// If the sub-region has a portrait shape, X and Y coordinates are swapped for better result
|
// If the sub-region has a portrait shape, X and Y coordinates are swapped for better result
|
||||||
// It will be swapped back when sending back the block coordinates
|
// It will be swapped back when sending back the block coordinates
|
||||||
region.width = !(subRegion->width) ? imageWidth : subRegion->width;
|
region.width = !(subRegion->width) ? imageWidth : subRegion->width;
|
||||||
|
@@ -23,8 +23,6 @@
|
|||||||
//maximum number of pixel per block
|
//maximum number of pixel per block
|
||||||
#define PIXELS_PER_BLOCK 250000
|
#define PIXELS_PER_BLOCK 250000
|
||||||
|
|
||||||
namespace rtengine {
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Used to specify a subregion of an image and to specify a cell in this subregion
|
* Used to specify a subregion of an image and to specify a cell in this subregion
|
||||||
*/
|
*/
|
||||||
@@ -56,10 +54,8 @@ class Slicer {
|
|||||||
public:
|
public:
|
||||||
unsigned int blockNumber; // number of block for the sub-region
|
unsigned int blockNumber; // number of block for the sub-region
|
||||||
unsigned int maxPixelNumber; // number of pixel of the biggest block (for memory allocation purpose)
|
unsigned int maxPixelNumber; // number of pixel of the biggest block (for memory allocation purpose)
|
||||||
Slicer(unsigned int imageWidth, unsigned int imageHeight, Block *subRegion, unsigned int pixels, const char* nomFichier);
|
Slicer(unsigned int imageWidth, unsigned int imageHeight, Block *subRegion, unsigned int pixels);
|
||||||
void get_block(unsigned int blockId, Block *block);
|
void get_block(unsigned int blockId, Block *block);
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user