[Gridflow-cvs] [svn] commit: r5611 - in /trunk/src: fftw.cxx gem.cxx jpeg.cxx opencv.cxx png.cxx quicktimehw.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Wed May 5 22:46:10 EDT 2010


Author: matju
Date: Wed May  5 22:46:10 2010
New Revision: 5611

Log:
Dim,GridInlet&

Modified:
    trunk/src/fftw.cxx
    trunk/src/gem.cxx
    trunk/src/jpeg.cxx
    trunk/src/opencv.cxx
    trunk/src/png.cxx
    trunk/src/quicktimehw.cxx

Modified: trunk/src/fftw.cxx
==============================================================================
--- trunk/src/fftw.cxx (original)
+++ trunk/src/fftw.cxx Wed May  5 22:46:10 2010
@@ -47,14 +47,14 @@
 	if (plan) {fftwf_destroy_plan(plan); plan=0;}
 }
 GRID_INLET(0) {
-	if (in->nt != float32_e)                  RAISE("expecting float32");
+	if (in.nt != float32_e)               RAISE("expecting float32");
 	if (real && sign==-1) {
 	  if (in.dim.n != 2 && in.dim.n != 3) RAISE("expecting 2 or 3 dimensions: rows,columns,channels?");
 	} else {
 	  if (in.dim.n != 3 && in.dim.n != 4) RAISE("expecting 3 or 4 dimensions: rows,columns,channels?,complex");
-	  if (in.dim[in.dim.n-1]!=2)      RAISE("expecting Dim(...,2): real,imaginary (got %d)",in.dim[2]);
+	  if (in.dim[in.dim.n-1]!=2)          RAISE("expecting Dim(...,2): real,imaginary (got %d)",in.dim[2]);
 	}
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	if (skip==1 && real) RAISE("can't do 1-D FFT in real mode, sorry");
 	Dim dim;
@@ -70,7 +70,7 @@
 	long chans = in.dim.n>=3 ? in.dim[2] : 1;
 	CHECK_ALIGN16(data,in->nt)
 	CHECK_ALIGN16(tada,in->nt)
-	if (plan && haslastdim && !lastdim.equal(in.dim) && chans!=lastchans && real==lastreal) {fftwf_destroy_plan(plan); plan=0;}
+	if (plan && haslastdim && lastdim != in.dim && chans!=lastchans && real==lastreal) {fftwf_destroy_plan(plan); plan=0;}
 	int v[] = {in.dim[0],in.dim[1],in.dim.n>2?in.dim[2]:1};
 //	if (chans==1) {
 //		if (skip==0) plan = fftwf_plan_dft_2d(v[0],v[1],data,tada,sign,0);

Modified: trunk/src/gem.cxx
==============================================================================
--- trunk/src/gem.cxx (original)
+++ trunk/src/gem.cxx Wed May  5 22:46:10 2010
@@ -157,8 +157,8 @@
 GRID_INLET(1) {
 	if (in.dim.n != 3) RAISE("expecting 3 dimensions: rows,columns,channels");
 	int c = in.dim[2];
-	if (c!=3 && c!=4)    RAISE("expecting 3 or 4 channels (got %d)",in.dim[2]);
-	in->set_chunk(1);
+	if (c!=3 && c!=4)  RAISE("expecting 3 or 4 channels (got %d)",in.dim[2]);
+	in.set_chunk(1);
 	imageStruct &im = m_pixBlock.image;
 	im.clear();
 	im.ysize = in.dim[0];

Modified: trunk/src/jpeg.cxx
==============================================================================
--- trunk/src/jpeg.cxx (original)
+++ trunk/src/jpeg.cxx Wed May  5 22:46:10 2010
@@ -54,7 +54,7 @@
 GRID_INLET(0) {
 	if (in.dim.n!=3)      RAISE("expecting 3 dimensions: rows,columns,channels");
 	if (in.dim[2]!=3) RAISE("expecting 3 channels (got %d)",in.dim[2]);
-	in->set_chunk(1);
+	in.set_chunk(1);
 	cjpeg.err = jpeg_std_error(&jerr);
 	jpeg_create_compress(&cjpeg);
 	jpeg_stdio_dest(&cjpeg,f);

Modified: trunk/src/opencv.cxx
==============================================================================
--- trunk/src/opencv.cxx (original)
+++ trunk/src/opencv.cxx Wed May  5 22:46:10 2010
@@ -215,8 +215,8 @@
 GRID_INLET(0) {
 	snap_backstore(r);
 	SAME_TYPE(in,r);
-	if (!in->dim.equal(r->dim)) RAISE("dimension mismatch: left:%s right:%s",in.dim.to_s(),r->dim.to_s());
-	in->set_chunk(0);
+	if (in.dim != r->dim) RAISE("dimension mismatch: left:%s right:%s",in.dim.to_s(),r->dim.to_s());
+	in.set_chunk(0);
 } GRID_FLOW {
 	PtrGrid l = new Grid(in.dim,(T *)data);
 	PtrGrid o = new Grid(in.dim,in.nt);
@@ -258,7 +258,7 @@
 GRID_INLET(0) {
 	if (in.dim.n!=2) RAISE("should have 2 dimensions");
 	if (in.dim[0] != in.dim[1]) RAISE("matrix should be square");
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	//post("l=%p, r=%p", &*l, &*r);
 	PtrGrid l = new Grid(in.dim,(T *)data);
@@ -281,7 +281,7 @@
 GRID_INLET(0) {
 	if (in.dim.n!=2) RAISE("should have 2 dimensions");
 	if (in.dim[0] != in.dim[1]) RAISE("matrix should be square");
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	PtrGrid l = new Grid(in.dim,(T *)data);
 	PtrGrid o0 = new Grid(in.dim,in.nt);
@@ -319,7 +319,7 @@
 	}
 };
 GRID_INLET(0) {
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	PtrGrid l = new Grid(in.dim,in.nt); COPY((T *)*l,data,in.dim.prod());
 	IplImage *img = cvImageGrid(l);
@@ -338,7 +338,7 @@
 	~CvApproxPoly () {cvReleaseMemStorage(&storage);}
 };
 GRID_INLET(0) {
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	PtrGrid l = new Grid(in.dim,(T *)data); CvArr *a = cvGrid(l,mode);
 	CvSeq *seq = cvApproxPoly(a,sizeof(CvMat),storage,CV_POLY_APPROX_DP,accuracy,closed);
@@ -353,7 +353,7 @@
 	\constructor () {}
 };
 GRID_INLET(0) {
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 //	cvCalcOpticalFlowHS(prev,curr,use_previous, CvArr* velx, CvArr* vely, lambda, CvTermCriteria criteria );
 } GRID_END
@@ -363,7 +363,7 @@
 	\constructor () {}
 };
 GRID_INLET(0) {
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 } GRID_END
 \end class {install("cv/#CalcOpticalFlowLK",1,1);}
@@ -372,7 +372,7 @@
 	\constructor () {}
 };
 GRID_INLET(0) {
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 } GRID_END
 \end class {install("cv/#CalcOpticalFlowBM",1,1);}
@@ -381,7 +381,7 @@
 	\constructor () {}
 };
 GRID_INLET(0) {
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 } GRID_END
 \end class {install("cv/#CalcOpticalFlowPyrLK",1,1);}
@@ -439,7 +439,7 @@
 	\grin 0
 };
 GRID_INLET(0) {
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	PtrGrid l = new Grid(in.dim,(T *)data);
 	IplImage *img = cvImageGrid(l);
@@ -474,7 +474,7 @@
 
 GRID_INLET(0) {
 	if (in.dim.n<1) RAISE("should have at least 1 dimension");
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	int32 v[] = {in.dim.prod(0)/in.dim.prod(-1),in.dim.prod(-1)};
 	PtrGrid l = new Grid(Dim(2,v),(T *)data);
@@ -506,7 +506,7 @@
 };
 
 GRID_INLET(0) {
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	PtrGrid l = new Grid(in.dim,(T *)data);
 	CvArr *a = (CvMat *)cvGrid(l,mode,2);

Modified: trunk/src/png.cxx
==============================================================================
--- trunk/src/png.cxx (original)
+++ trunk/src/png.cxx Wed May  5 22:46:10 2010
@@ -46,7 +46,7 @@
 	if (in.dim.n!=3) RAISE("expecting 3 dimensions: rows,columns,channels");
 	int sc = in.dim[2];
 	if (sc<1 || sc>4)  RAISE("expecting 1 to 4 channels (got %d)",sc);
-	in->set_chunk(0);
+	in.set_chunk(0);
 } GRID_FLOW {
 	png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
 	if (!png) RAISE("!png");

Modified: trunk/src/quicktimehw.cxx
==============================================================================
--- trunk/src/quicktimehw.cxx (original)
+++ trunk/src/quicktimehw.cxx Wed May  5 22:46:10 2010
@@ -161,9 +161,9 @@
 GRID_INLET(0) {
 	if (in.dim.n != 3)           RAISE("expecting 3 dimensions: rows,columns,channels");
 	if (in.dim[2]!=channels) RAISE("expecting %d channels (got %d)",channels,in.dim[2]);
-	in->set_chunk(0);
+	in.set_chunk(0);
 	if (gotdim) {
-		if (!dim.equal(in.dim)) RAISE("all frames should be same size");
+		if (dim != in.dim) RAISE("all frames should be same size");
 	} else {
 		// first frame: have to do setup
 		dim = in.dim;



More information about the Gridflow-cvs mailing list