Instituting denoise branch to work on improvements to RT denoise. Most definitely a work in progress, but the patch is becoming quite complicated so it is definitely worth having it backed up on Google code.

This commit is contained in:
Emil Martinec
2012-01-22 21:42:07 -06:00
commit 325d8d1620
1363 changed files with 292924 additions and 0 deletions

38
rtengine/labimage.cc Normal file
View File

@@ -0,0 +1,38 @@
#include "labimage.h"
#include <memory.h>
namespace rtengine {
LabImage::LabImage (int w, int h) : fromImage(false), W(w), H(h) {
L = new float*[H];
a = new float*[H];
b = new float*[H];
data = new float [W*H*3];
float * index = data;
for (int i=0; i<H; i++)
L[i] = index + i*W;
index+=W*H;
for (int i=0; i<H; i++)
a[i] = index + i*W;
index+=W*H;
for (int i=0; i<H; i++)
b[i] = index + i*W;
}
LabImage::~LabImage () {
if (!fromImage) {
delete [] L;
delete [] a;
delete [] b;
delete [] data;
}
}
void LabImage::CopyFrom(LabImage *Img){
memcpy(data, Img->data, W*H*3*sizeof(float));
}
}