[Gridflow-cvs] [svn] commit: r4556 - /trunk/optional/opencv.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sat Oct 31 20:40:17 EDT 2009


Author: matju
Date: Sat Oct 31 20:40:16 2009
New Revision: 4556

Log:
fixed [cv/#Add] [cv/#Sub] [cv/#Mul] [cv/#Div] [cv/#And] [cv/#Or] [cv/#Xor] right inlet (backstore problem).

Modified:
    trunk/optional/opencv.c

Modified: trunk/optional/opencv.c
==============================================================================
--- trunk/optional/opencv.c (original)
+++ trunk/optional/opencv.c Sat Oct 31 20:40:16 2009
@@ -201,6 +201,9 @@
 };
 \end class {}
 
+// from flow_objects.c
+static void snap_backstore (PtrGrid &r) {if (r.next) {r=r.next.p; r.next=0;}}
+
 \class CvOp2 : CvOp1 {
 	PtrGrid r;
 	\constructor (Grid *r=0) {this->r = r?r:new Grid(new Dim(),int32_e,true);}
@@ -209,6 +212,7 @@
 	\grin 1
 };
 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);
@@ -489,8 +493,6 @@
 
 \end class {install("cv/#KMeans",2,1);}
 
-
-
 \class CvCornerHarris : CvOp1 {
 	\attr int block_size;
 	\attr int aperture_size;



More information about the Gridflow-cvs mailing list