--- a/include/sampler.h Wed Mar 26 14:29:21 2008 +0100
+++ b/include/sampler.h Wed Mar 26 17:03:38 2008 +0100
@@ -77,16 +77,25 @@
/**
* Default sampler.
+ * Implements basic adaptive subsampling and oversampling.
*/
class DefaultSampler: public Sampler
{
int phase;
+ int subsample;
+ int oversample; // 0 = no, 1 = 5x, 2 = 9x, 3 = 16x
public:
- DefaultSampler(Float *abuffer, int &aw, int &ah): Sampler(abuffer, aw, ah), phase(-1) {};
- void init() { phase = 0; };
+ DefaultSampler(Float *abuffer, int &aw, int &ah):
+ Sampler(abuffer, aw, ah), phase(-1), subsample(8), oversample(0) {};
+ void init();
int initSampleSet();
Sample *nextSample(Sample *prev);
void saveSample(Sample *samp, Colour &col);
+
+ void setSubsample(int sub) { subsample = sub; };
+ int getSubsample() { return subsample; };
+ void setOversample(int osa) { oversample = osa; };
+ int getOversample() { return oversample; };
};
#endif