[Gridflow-cvs] [svn] commit: r6073 - /trunk/src/

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Fri Aug 13 12:10:04 EDT 2010


Author: matju
Date: Fri Aug 13 12:10:02 2010
New Revision: 6073

Log:
rename GridOutlet to GridOut (because it isn't an outlet at all) and rename GridObject::out to 'go' because 'out' will be used for something else

Modified:
    trunk/src/aalib.cxx
    trunk/src/classes1.cxx
    trunk/src/classes2.cxx
    trunk/src/classes3.cxx
    trunk/src/dc1394.cxx
    trunk/src/fftw.cxx
    trunk/src/formats.cxx
    trunk/src/gem.cxx
    trunk/src/grid.cxx
    trunk/src/gridflow.hxx
    trunk/src/jpeg.cxx
    trunk/src/mpeg3.cxx
    trunk/src/opencv.cxx
    trunk/src/pdp.cxx
    trunk/src/png.cxx
    trunk/src/quicktimeapple.cxx
    trunk/src/quicktimecamera.cxx
    trunk/src/quicktimehw.cxx
    trunk/src/source_filter.rb
    trunk/src/v4l2.cxx
    trunk/src/videodev.cxx
    trunk/src/x11.cxx

Modified: trunk/src/aalib.cxx
==============================================================================
--- trunk/src/aalib.cxx (original)
+++ trunk/src/aalib.cxx Fri Aug 13 12:10:02 2010
@@ -119,7 +119,7 @@
 
 \def 0 dump () {
 	int32 v[] = {aa_scrheight(context), aa_scrwidth(context), 2};
-	GridOutlet out(this,0,Dim(3,v));
+	GridOut out(this,0,Dim(3,v));
 	for (int y=0; y<aa_scrheight(context); y++) {
 		for (int x=0; x<aa_scrwidth(context); x++) {
 			int32 data[2];

Modified: trunk/src/classes1.cxx
==============================================================================
--- trunk/src/classes1.cxx (original)
+++ trunk/src/classes1.cxx Fri Aug 13 12:10:02 2010
@@ -74,9 +74,9 @@
 	\grin 0
 };
 GRID_INLET(0) {
-	out = new GridOutlet(this,0,in.dim,cast);
-} GRID_FLOW {
-	out->send(n,data);
+	go = new GridOut(this,0,in.dim,cast);
+} GRID_FLOW {
+	go->send(n,data);
 } GRID_END
 \end class {install("#cast",1,1); add_creator("@cast");}
 
@@ -104,11 +104,11 @@
 		}
 	}
 	~GridImport() {}
-	\decl 0 reset() {int32 foo[1]={0}; if (out) while (out->sender) out->send(1,foo);}
+	\decl 0 reset() {int32 foo[1]={0}; if (go) while (go->sender) go->send(1,foo);}
 	\decl 0 symbol(t_symbol *x) {
 		const char *name = x->s_name;
 		long n = strlen(name);
-		if (per_message) out=new GridOutlet(this,0,Dim(n));
+		if (per_message) go=new GridOut(this,0,Dim(n));
 		process(n,(uint8 *)name);
 	}
 	\decl 0 to_ascii(...) {
@@ -116,7 +116,7 @@
 		pd_oprint(os,argc,argv);
 		string s = os.str();
 		long n = s.length();
-		if (per_message) out=new GridOutlet(this,0,Dim(n),cast);
+		if (per_message) go=new GridOut(this,0,Dim(n),cast);
 		process(n,(uint8 *)s.data());
 	}
 	\decl 0 bang() {_0_list(0,0);}
@@ -128,9 +128,9 @@
 		if (in.size()<=0) in.resize(1);
 		if (!in[0]) in[0]=new GridInlet((FObject *)this,stromgol);
 		while (n) {
-			if (!out || !out->sender) out = new GridOutlet(this,0,per_message?in[0]->dim:dim,cast);
-			long n2 = min((long)n,out->dim.prod()-out->dex);
-			out->send(n2,data);
+			if (!go || !go->sender) go = new GridOut(this,0,per_message?in[0]->dim:dim,cast);
+			long n2 = min((long)n,go->dim.prod()-go->dex);
+			go->send(n2,data);
 			n-=n2; data+=n2;
 		}
 	}
@@ -148,7 +148,7 @@
 	if (in.size()<=0) in.resize(1);
 	if (!in[0]) in[0]=new GridInlet((FObject *)this,stromgol);
 	in[0]->from_list(argc,argv,cast);
-	if (!argc && per_message) out = new GridOutlet(this,0,Dim(0),cast);
+	if (!argc && per_message) go = new GridOut(this,0,Dim(0),cast);
 }
 
 \end class {install("#import",2,1); add_creator("@import"); stromgol = &GridImport_grid_0_hand;}
@@ -428,7 +428,7 @@
 	int nd = nb-nc+na-1;
 	COPY(v,in.dim.v,na-1);
 	COPY(v+na-1,r->dim.v+nc,nb-nc);
-	out=new GridOutlet(this,0,Dim(nd,v),r->nt);
+	go=new GridOut(this,0,Dim(nd,v),r->nt);
 	if (nc>0) in.set_chunk(na-1);
 } GRID_FLOW {
 	int na = in.dim.n;
@@ -463,9 +463,9 @@
 		case 4: for (; i<nd; i++, foo+=4) SCOPY(foo,p+4*v[i],4); break; \
 		default:; }; \
 		for (; i<nd; i++, foo+=size) COPY(foo,p+size*v[i],size); \
-		out->send(size*nd,tada); \
+		go->send(size*nd,tada); \
 	} else { \
-		for (int i=0; i<nd; i++) out->send(size,p+size*v[i]); \
+		for (int i=0; i<nd; i++) go->send(size,p+size*v[i]); \
 	} \
 }
 	TYPESWITCH(r->nt,FOO,)
@@ -474,7 +474,7 @@
 	if (in.dim.prod()==0) {
 		long n = in.dim.prod(0,-2);
 		long size = r->dim.prod();
-#define FOO(T) while (n--) out->send(size,(T *)*r);
+#define FOO(T) while (n--) go->send(size,(T *)*r);
 		TYPESWITCH(r->nt,FOO,)
 #undef FOO
 	}
@@ -507,7 +507,7 @@
 	while (lsd>=nn-in.dim.n) {
 		lsd--;
 		//int cs = in.dim.prod(lsd-nn+in.dim.n);
-		if (/*cs*(number_type_table[in.nt].size/8)>GridOutlet::MAX_PACKET_SIZE ||*/
+		if (/*cs*(number_type_table[in.nt].size/8)>GridOut::MAX_PACKET_SIZE ||*/
 			fromb[lsd]!=0 || sizeb[lsd]!=r->dim[lsd]) break;
 	}
 	lsd++;
@@ -553,11 +553,11 @@
 	if (op->size>1 && (in.dim[in.dim.n-1]!=op->size || r->dim[r->dim.n-1]!=op->size))
 		RAISE("using %s requires Dim(...,%d) in both inlets but got: left=%s right=%s",
 			op->name,op->size,in.dim.to_s(),r->dim.to_s());
-	out=new GridOutlet(this,0,in.dim,in.nt);
-	//if (out->inlets.size()==1) post("[#]: 1 receiver with bugger size %s",out->inlets[0]->dim.to_s());
-	if (out->fresh) out->create_buf(); /* force it now (hack) */
-} GRID_FLOW {
-	long moton = out->buf.dim.prod();
+	go=new GridOut(this,0,in.dim,in.nt);
+	//if (go->inlets.size()==1) post("[#]: 1 receiver with bugger size %s",go->inlets[0]->dim.to_s());
+	if (go->fresh) go->create_buf(); /* force it now (hack) */
+} GRID_FLOW {
+	long moton = go->buf.dim.prod();
 	T *rdata = (T *)*r;
 	long loop = r->dim.prod();
 	while (n) {
@@ -565,10 +565,10 @@
 		T tada[pn];
 		COPY(tada,data,pn);
 		if (loop>1) {
-			if (in.dex+pn <= loop) op->zip(pn/op->size,tada,rdata+out->dex); else {
+			if (in.dex+pn <= loop) op->zip(pn/op->size,tada,rdata+go->dex); else {
 				// !@#$ should prebuild and reuse this array when "loop" is small
 				T data2[pn];
-				long ii = mod(out->dex,loop);
+				long ii = mod(go->dex,loop);
 				long m = min(loop-ii,pn);
 				COPY(data2,rdata+ii,m);
 				long nn = m+((pn-m)/loop)*loop;
@@ -577,7 +577,7 @@
 				op->zip(pn/op->size,tada,data2);
 			}
 		} else op->map(pn,tada,loop ? *rdata : T(0));
-		out->send(pn,tada);
+		go->send(pn,tada);
 		n-=pn; data+=pn;
 	}
 } GRID_END
@@ -604,12 +604,12 @@
 	COPY(v+yi,in.dim.v+an-bn,bn);
 	if (seed) SAME_DIM(an-(yi+1),in.dim,(yi+1),seed->dim,0);
 	if (!op->on(*data)->fold) RAISE("operator %s does not support fold",op->name);
-	out=new GridOutlet(this,0,Dim(an-1,v),in.nt);
+	go=new GridOut(this,0,Dim(an-1,v),in.nt);
 	in.set_chunk(yi);
 	if (in.dim.prod(yi)==0) {
-		long n = out->dim.prod();
+		long n = go->dim.prod();
 		T x=0; op->on(x)->neutral(&x,at_left);
-		for(long i=0; i<n; i++) out->send(1,&x);
+		for(long i=0; i<n; i++) go->send(1,&x);
 	}
 } GRID_FLOW {
 	int an = in.dim.n;
@@ -624,7 +624,7 @@
 		else {T neu; op->on(*buf)->neutral(&neu,at_left); op_put->map(zn,buf+i,neu);}
 		op->fold(zn,yn,buf+i,data);
 	}
-	out->send(nn/yn,buf);
+	go->send(nn/yn,buf);
 } GRID_FINISH {
 } GRID_END
 
@@ -645,7 +645,7 @@
 	if (an<=bn) RAISE("minimum 1 more dimension than the right hand");
 	if (seed) SAME_DIM(bn,in.dim,an-bn,seed->dim,0);
 	if (!op->on(*data)->scan) RAISE("operator %s does not support scan",op->name);
-	out=new GridOutlet(this,0,in.dim,in.nt);
+	go=new GridOut(this,0,in.dim,in.nt);
 	in.set_chunk(an-bn-1);
 } GRID_FLOW {
 	int an = in.dim.n;
@@ -662,7 +662,7 @@
 		T seed[zn]; op_put->map(zn,seed,neu);
 		for (long i=0; i<n; i+=factor) op->scan(zn,yn,      seed,buf+i);
 	}
-	out->send(n,buf);
+	go->send(n,buf);
 } GRID_END
 
 \end class {install("#scan",1,1);}
@@ -727,7 +727,7 @@
 	int32 v[n];
 	COPY(v,a.v,a.n-1);
 	COPY(v+a.n-1,b.v+1,b.n-1);
-	out=new GridOutlet(this,0,Dim(n,v),in.nt);
+	go=new GridOut(this,0,Dim(n,v),in.nt);
 	in.set_chunk(a.n-1);
 	long sjk=r->dim.prod(), sj=in.dim.prod(a.n-1), sk=sjk/sj;
 	long chunk = max(1L,MAX_PACKET_SIZE/sjk);
@@ -761,7 +761,7 @@
 		DOT_ADD_MUL_2(4)
 		default:for (int i=0; i<chunk; i++) dot_add_mul(sk,sj,buf2+sk*i,data+sj*i,(T *)*r);
 		}
-		out->send(chunk*sk,buf2);
+		go->send(chunk*sk,buf2);
 		n-=chunk*sj;
 		data+=chunk*sj;
 	}
@@ -780,7 +780,7 @@
 			op->zip(chunk*sk,buf,(T *)*r2+i*off*sk);
 			fold->zip(chunk*sk,buf2,buf);
 		}
-		out->send(chunk*sk,buf2);
+		go->send(chunk*sk,buf2);
 		n-=chunk*sj;
 		data+=chunk*sj;
 	}
@@ -813,7 +813,7 @@
 	int32 v[n];
 	COPY(v,a.v,a.n);
 	COPY(v+a.n,b.v,b.n);
-	out=new GridOutlet(this,0,Dim(n,v),in.nt);
+	go=new GridOut(this,0,Dim(n,v),in.nt);
 } GRID_FLOW {
 	long b_prod = r->dim.prod();
 	if (!b_prod) return; /* nothing to do... and avoid deadly divisions by zero */
@@ -822,7 +822,7 @@
 		while (n) {
 			for (long j=0; j<b_prod; j++) buf[j] = *data;
 			op->zip(b_prod,buf,(T *)*r);
-			out->send(b_prod,buf);
+			go->send(b_prod,buf);
 			data++; n--;
 		}
 		return;
@@ -844,7 +844,7 @@
 	int nn=(n/ch)*ch;
 	for (int j=0; j<nn; j+=ch) op->zip(ch,buf+j,buf2);
 	op->zip(n-nn,buf+nn,buf2);
-	out->send(n,buf);
+	go->send(n,buf);
 } GRID_END
 
 GRID_INPUT(1,r) {} GRID_END
@@ -904,14 +904,14 @@
 	if (from->dim.n==0) {d = Dim(*nn);}
 	else {nn[n]=n;       d = Dim(n+1,nn);}
 	int total = d.prod();
-	out=new GridOutlet(this,0,d,from->nt);
+	go=new GridOut(this,0,d,from->nt);
 	if (total==0) return;
 	int k=0;
 	for(int d=0;;d++) {
 		// here d is the dim# to reset; d=n for none
 		for(;d<n;d++) x[k+d]=fromb[d];
 		k+=n;
-		if (k==64*n) {out->send(k,x); k=0; COPY(x,x+63*n,n);}
+		if (k==64*n) {go->send(k,x); k=0; COPY(x,x+63*n,n);}
 		else {                             COPY(x+k,x+k-n,n);}
 		d--;
 		// here d is the dim# to increment
@@ -921,7 +921,7 @@
 			if (x[k+d]!=to2[d]) break;
 		}
 	}
-	end: if (k) out->send(k,x);
+	end: if (k) go->send(k,x);
 }
 GRID_INPUT(2,step) {} GRID_END
 GRID_INPUT(1,to) {} GRID_END
@@ -940,8 +940,8 @@
 	\grin 0
 };
 GRID_INLET(0) {
-	GridOutlet out(this,0,Dim(in.dim.n));
-	out.send(in.dim.n,in.dim.v);
+	GridOut go(this,0,Dim(in.dim.n));
+	go.send(in.dim.n,in.dim.v);
 } GRID_END
 \end class {install("#dim",1,1); add_creator("@dim");}
 \class GridType : FObject {
@@ -975,18 +975,18 @@
 GRID_INLET(0) {
 	long a=in.dim.prod(), b=dim.prod();
 	if (a<b) temp=new Grid(Dim(a),in.nt);
-	out=new GridOutlet(this,0,dim,in.nt);
+	go=new GridOut(this,0,dim,in.nt);
 } GRID_FLOW {
 	long i = in.dex;
-	if (!temp) {long n2 = min(n,   dim.prod()-i);                             if (n2>0) out->send(n2,data);}
-	else       {long n2 = min(n,in.dim.prod()-i); COPY((T *)*temp+i,data,n2); if (n2>0) out->send(n2,data);}
+	if (!temp) {long n2 = min(n,   dim.prod()-i);                             if (n2>0) go->send(n2,data);}
+	else       {long n2 = min(n,in.dim.prod()-i); COPY((T *)*temp+i,data,n2); if (n2>0) go->send(n2,data);}
 } GRID_FINISH {
 	if (!!temp) {
 		long a = in.dim.prod(), b = dim.prod();
 		if (a) {
-			for (long i=a; i<b; i+=a) out->send(min(a,b-i),(T *)*temp);
+			for (long i=a; i<b; i+=a) go->send(min(a,b-i),(T *)*temp);
 		} else {
-			T foo[1]={0}; for (long i=0; i<b; i++) out->send(1,foo);
+			T foo[1]={0}; for (long i=0; i<b; i++) go->send(1,foo);
 		}
 	}
 	temp=0;

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Fri Aug 13 12:10:02 2010
@@ -776,7 +776,7 @@
 	\decl 0 symbol (t_atom2 a) {_0_list(1,&a);}
 	\decl 0 list (...) {
 		ostringstream o; pd_oprintf(o,format.data(),argc,argv); string s = o.str();
-		GridOutlet out(this,0,Dim(s.size()),cast); out.send(s.size(),(uint8 *)s.data());
+		GridOut out(this,0,Dim(s.size()),cast); out.send(s.size(),(uint8 *)s.data());
 	}
 };
 \end class {install("#sprintf",2,1);}

Modified: trunk/src/classes3.cxx
==============================================================================
--- trunk/src/classes3.cxx (original)
+++ trunk/src/classes3.cxx Fri Aug 13 12:10:02 2010
@@ -100,8 +100,8 @@
 		clock = clock_new(bself,(void(*)())clock_bang_);
 	}
 	void clock_bang () {
-		GridOutlet out(this,0,blah->dim,blah->nt);
-		out.send(blah->dim.prod(),(float32 *)*blah);
+		GridOut go(this,0,blah->dim,blah->nt);
+		go.send(blah->dim.prod(),(float32 *)*blah);
 	}
 	static void clock_bang_ (BFObject *bself) {((GridFromTilde *)bself->self)->clock_bang();}
 	~GridFromTilde () {delete[] sigin; if (sam) delete[] sam;}
@@ -154,7 +154,7 @@
 			if (v[i]!=r->dim[i]) RAISE("dimensions mismatch: dim #%i, left is %d, right is %d",i,v[i],r->dim[i]);
 		}
 	}
-	out=new GridOutlet(this,0,Dim(d.n,v),in.nt);
+	go=new GridOut(this,0,Dim(d.n,v),in.nt);
 	in.set_chunk(w);
 } GRID_FLOW {
 	int w = which_dim;
@@ -170,7 +170,7 @@
 			SCOPY(data4,data,3); SCOPY(data4+3,data2,1);
 			n-=3; data+=3; data2+=1; data4+=4;
 		}
-		out->send(m,data3);
+		go->send(m,data3);
 	} else if (a+b<=16) {
 		int m = n+n*b/a;
 		T data3[m];
@@ -179,16 +179,16 @@
 			COPY(data3+i,data,a); data+=a; i+=a; n-=a;
 			COPY(data3+i,data2,b); data2+=b; i+=b;
 		}
-		out->send(m,data3);
+		go->send(m,data3);
 	} else {
 		while (n) {
-			out->send(a,data);
-			out->send(b,data2);
+			go->send(a,data);
+			go->send(b,data2);
 			data+=a; data2+=b; n-=a;
 		}
 	}
 } GRID_FINISH {
-	if (in.dim.prod()==0) out->send(r->dim.prod(),(T *)*r);
+	if (in.dim.prod()==0) go->send(r->dim.prod(),(T *)*r);
 } GRID_END
 GRID_INPUT(1,r) {} GRID_END
 \end class {install("#join",2,1); add_creator("@join");}
@@ -213,7 +213,7 @@
 
 GRID_INLET(0) {
 	if (in.dim.n<1) RAISE("minimum 1 dimension");
-	out=new GridOutlet(this,0,in.dim);
+	go=new GridOut(this,0,in.dim);
 	in.set_chunk(in.dim.n-1);
 } GRID_FLOW {
 	long m = in.dim.prod(in.dim.n-1);
@@ -223,7 +223,7 @@
 		for (int i=0; i<m; i++) foo[i] = &data[i];
 		qsort(foo,m,sizeof(T *),(comparator_t)GradeFunction<T>::comparator);
 		for (int i=0; i<m; i++) bar[i] = foo[i]-(T *)data;
-		out->send(m,bar);
+		go->send(m,bar);
 	}
 } GRID_END
 
@@ -256,20 +256,20 @@
 		RAISE("would swap dimensions %d and %d but this grid has only %d dimensions", dim1,dim2,in.dim.n);
 	memswap(v+d1,v+d2,1);
 	if (d1==d2) {
-		out=new GridOutlet(this,0,Dim(in.dim.n,v),in.nt);
+		go=new GridOut(this,0,Dim(in.dim.n,v),in.nt);
 	} else {
 		nd = in.dim.prod(1+max(d1,d2));
 		nc = in.dim[max(d1,d2)];
 		nb = nc&&nd ? in.dim.prod(1+min(d1,d2))/nc/nd : 0;
 		na = in.dim[min(d1,d2)];
-		out=new GridOutlet(this,0,Dim(in.dim.n,v),in.nt);
+		go=new GridOut(this,0,Dim(in.dim.n,v),in.nt);
 		in.set_chunk(min(d1,d2));
 	}
 	// Turns a Grid[*,na,*nb,nc,*nd] into a Grid[*,nc,*nb,na,*nd].
 } GRID_FLOW {
 	//T res[na*nb*nc*nd];
 	T *res = NEWBUF(T,na*nb*nc*nd);
-	if (dim1==dim2) { out->send(n,data); return; }
+	if (dim1==dim2) {go->send(n,data); return;}
 	int prod = na*nb*nc*nd;
 	for (; n; n-=prod, data+=prod) {
 		for (long a=0; a<na; a++)
@@ -277,9 +277,9 @@
 				for (long c=0; c<nc; c++)
 					COPY(res +((c*nb+b)*na+a)*nd,
 					     data+((a*nb+b)*nc+c)*nd,nd);
-		out->send(na*nb*nc*nd,res);
-	}
-	DELBUF(res); //!@#$ if an exception was thrown by out->send, this never gets done
+		go->send(na*nb*nc*nd,res);
+	}
+	DELBUF(res); //!@#$ if an exception was thrown by go->send, this never gets done
 } GRID_END
 
 \end class {install("#transpose",3,1); add_creator("@transpose");}
@@ -296,7 +296,7 @@
 	d=dim1;
 	if (d<0) d+=in.dim.n;
 	if (d>=in.dim.n || d<0) RAISE("would reverse dimension %d but this grid has only %d dimensions",dim1,in.dim.n);
-	out=new GridOutlet(this,0,in.dim,in.nt);
+	go=new GridOut(this,0,in.dim,in.nt);
 	in.set_chunk(d);
 } GRID_FLOW {
 	long f1=in.dim.prod(d), f2=in.dim.prod(d+1);
@@ -304,7 +304,7 @@
 		T *data2 = data+f1-f2;
 		//long hf1=f1/2; for (long i=0; i<hf1; i+=f2) memswap(data+i,data2-i,f2);
 		T tada[f1]; for (long i=0; i<f1; i+=f2) COPY(tada+i,data2-i,f2);
-		out->send(f1,tada);
+		go->send(f1,tada);
 		data+=f1; n-=f1;
 	}
 } GRID_END
@@ -322,7 +322,7 @@
 	if (in.dim.n != 3) RAISE("expecting 3 dims");
 	if (in.dim[2] != 1) RAISE("expecting 1 channel");
 	in.set_chunk(1);
-	out=new GridOutlet(this,0,Dim(2), in.nt);
+	go=new GridOut(this,0,Dim(2), in.nt);
 	sumx=0; sumy=0; sum=0; y=0;
 } GRID_FLOW {
 	int sx = in.dim[1];
@@ -340,7 +340,7 @@
 	int32 blah[2];
 	blah[0] = sum ? sumy/sum : 0;
 	blah[1] = sum ? sumx/sum : 0;
-	out->send(2,blah);
+	go->send(2,blah);
 	outlet_float(outlets[1],blah[0]);
 	outlet_float(outlets[2],blah[1]);
 } GRID_END
@@ -371,8 +371,8 @@
 	if (in.dim[2] != 1) RAISE("expecting 1 channel");
 	in.set_chunk(1);
 	switch (order) {
-	    case 1: out=new GridOutlet(this,0,Dim(2  ), in.nt); break;
-	    case 2: out=new GridOutlet(this,0,Dim(2,2), in.nt); break;
+	    case 1: go=new GridOut(this,0,Dim(2  ), in.nt); break;
+	    case 2: go=new GridOut(this,0,Dim(2,2), in.nt); break;
 	    default: RAISE("supports only orders 1 and 2 for now");
 	}
 	sumx=0; sumy=0; sumxy=0; sum=0; y=0;
@@ -409,14 +409,14 @@
 	    case 1: /* centroid vector */
 		blah[0] = sum ? sumy/sum : 0;
 		blah[1] = sum ? sumx/sum : 0;
-		out->send(2,blah);
+		go->send(2,blah);
 	    break;
 	    case 2: /* covariance matrix */
 		blah[0] = sum ? sumy/sum : 0;
 		blah[1] = sum ? sumxy/sum : 0;
 		blah[2] = sum ? sumxy/sum : 0;
 		blah[3] = sum ? sumx/sum : 0;
-		out->send(4,blah);
+		go->send(4,blah);
 	    break;
 	}
 } GRID_END
@@ -488,16 +488,16 @@
 				s.x/s.area};
 			float a[] = {s.area};
 			send_out(3,1,a);
-			GridOutlet o2(this,2,Dim(2));   o2.send(2,cooked+4);
-			GridOutlet o1(this,1,Dim(2,2)); o1.send(4,cooked);
+			GridOut o2(this,2,Dim(2));   o2.send(2,cooked+4);
+			GridOut o1(this,1,Dim(2,2)); o1.send(4,cooked);
 		} else {
 			float32 cooked[4] = {s.y,s.x1,s.y,s.x2};
-			GridOutlet o1(this,1,Dim(2,2)); o1.send(4,cooked);
+			GridOut o1(this,1,Dim(2,2)); o1.send(4,cooked);
 		}
 		label++;
 	}
-	out = new GridOutlet(this,0,Dim(sy,sx,1),in.nt);
-	out->send(n,dat);
+	go = new GridOut(this,0,Dim(sy,sx,1),in.nt);
+	go->send(n,dat);
 	DELBUF(dat);
 } GRID_END
 
@@ -520,13 +520,13 @@
 	COPY(v,in.dim.v,n);
 	v[n-1]--;
 	in.set_chunk(in.dim.n-1);
-	out=new GridOutlet(this,0,Dim(n,v),in.nt);
+	go=new GridOut(this,0,Dim(n,v),in.nt);
 } GRID_FLOW {
 	int m = in.dim.prod(in.dim.n-1);
 	for (; n; n-=m,data+=m) {
 		op_mul->map(m-1,data,(T)z);
 		op_div->map(m-1,data,data[m-1]);
-		out->send(m-1,data);
+		go->send(m-1,data);
 	}	
 } GRID_END
 \end class {install("#perspective",1,1); add_creator("@perspective");}
@@ -558,7 +558,7 @@
 	int32 v[n];
 	for (int i=0; i<n; i++) v[i]=in.dim[i]+diml[i]+dimr[i];
 	in.set_chunk(0);
-	out=new GridOutlet(this,0,Dim(n,v),in.nt);
+	go=new GridOut(this,0,Dim(n,v),in.nt);
 } GRID_FLOW {
 	int sy = in.dim[0];
 	int sx = in.dim[1]; int zx = sx+diml[1]+dimr[1];
@@ -566,13 +566,13 @@
 	int sxc = sx*sc; int zxc = zx*zc;
 	int32 duh[zxc];
 	for (int x=0; x<zxc; x++) duh[x]=0;
-	for (int y=0; y<diml[0]; y++) out->send(zxc,duh);
+	for (int y=0; y<diml[0]; y++) go->send(zxc,duh);
 	for (int y=0; y<sy; y++) {
-		out->send(diml[1]*sc,duh);
-		out->send(sxc,data+y*sxc);
-		out->send(dimr[1]*sc,duh);
+		go->send(diml[1]*sc,duh);
+		go->send(sxc,data+y*sxc);
+		go->send(dimr[1]*sc,duh);
 	}	
-	for (int i=0; i<dimr[0]; i++) out->send(zxc,duh);
+	for (int i=0; i<dimr[0]; i++) go->send(zxc,duh);
 } GRID_END
 
 GRID_INPUT(1,diml_grid) {diml = diml_grid->to_dim();} GRID_END
@@ -680,17 +680,17 @@
 	//a=new Grid(da,in.nt); // with this condition it's 2% faster but takes more RAM.
 	int v[da.n]; COPY(v,da.v,da.n);
 	if (!wrap) {v[0]-=db[0]-1; v[1]-=db[1]-1;}
-	out=new GridOutlet(this,0,Dim(da.n,v),in.nt);
+	go=new GridOut(this,0,Dim(da.n,v),in.nt);
 } GRID_FLOW {
 	COPY((T *)*a+in.dex, data, n);
 } GRID_FINISH {
 	make_plan((T)0);
 	long dbx = b->dim[1];
 	long dby = b->dim[0];
-	long day = out->dim[0];
-	long n =   out->dim.prod(1);
-	long sx =  out->dim[1]+dbx-1;
-	long sxc = out->dim.prod(2)*sx;
+	long day = go->dim[0];
+	long n =   go->dim.prod(1);
+	long sx =  go->dim[1]+dbx-1;
+	long sxc = go->dim.prod(2)*sx;
 	T buf[n];
 	T buf2[sxc];
 	T orh=0;
@@ -706,10 +706,10 @@
 				else      copy_row(buf2,sx,ay+by,0);
 				if (!plan[i].neutral) op->map(sxc,buf2,rh);
 			}
-			fold->zip(n,buf,buf2+bx*out->dim.prod(2));
+			fold->zip(n,buf,buf2+bx*go->dim.prod(2));
 			orh=rh;
 		}
-		out->send(n,buf);
+		go->send(n,buf);
 	}
 	//a=0; // comment this out when trying to recycle a (use the dim.equal above)
 } GRID_END
@@ -749,7 +749,7 @@
 GRID_INLET(0) {
 	Dim &a = in.dim;
 	expect_picture(a);
-	out=new GridOutlet(this,0,Dim(a[0]*scaley,a[1]*scalex,a[2]),in.nt);
+	go=new GridOut(this,0,Dim(a[0]*scaley,a[1]*scalex,a[2]),in.nt);
 	in.set_chunk(1);
 } GRID_FLOW {
 	int rowsize = in.dim.prod(1);
@@ -767,7 +767,7 @@
 		default: LOOP(chans) {for (int c=0; c<chans; c++) Z(c);}
 		}
 		#undef LOOP
-		for (int j=0; j<scaley; j++) out->send(rowsize*scalex,buf);
+		for (int j=0; j<scaley; j++) go->send(rowsize*scalex,buf);
 	}
 	#undef Z
 } GRID_END
@@ -804,7 +804,7 @@
 GRID_INLET(0) {
 	Dim &a = in.dim;
 	if (a.n!=3) RAISE("(height,width,chans) please");
-	out=new GridOutlet(this,0,Dim(a[0]/scaley,a[1]/scalex,a[2]),in.nt);
+	go=new GridOut(this,0,Dim(a[0]/scaley,a[1]/scalex,a[2]),in.nt);
 	in.set_chunk(1);
 	// i don't remember why two rows instead of just one.
 	temp=new Grid(Dim(2,in.dim[1]/scalex,in.dim[2]),in.nt);
@@ -831,9 +831,9 @@
 			}
 			#undef LOOP
 			y++;
-			if (y%scaley==0 && out->sender) {
+			if (y%scaley==0 && go->sender) {
 				op_div->map(rowsize2,buf,(T)(scalex*scaley));
-				out->send(rowsize2,buf);
+				go->send(rowsize2,buf);
 				CLEAR(buf,rowsize2);
 			}
 			data+=rowsize;
@@ -842,7 +842,7 @@
 	#undef Z
 	} else {
 	#define Z(z) buf[p+z]=data[i+z]
-		for (; n>0 && out->sender; data+=rowsize, n-=rowsize,y++) {
+		for (; n>0 && go->sender; data+=rowsize, n-=rowsize,y++) {
 			if (y%scaley!=0) continue;
 			#define LOOP(z) for (int i=0,p=0; p<rowsize2; i+=xinc, p+=z)
 			switch(in.dim[2]) {
@@ -853,7 +853,7 @@
 			default:LOOP(chans) {for (int k=0; k<chans; k++) Z(k);}break;
 			}
 			#undef LOOP
-			out->send(rowsize2,buf);
+			go->send(rowsize2,buf);
 		}
 	}
 	#undef Z
@@ -878,7 +878,7 @@
 	if (a[1]!=r->dim[1]) RAISE("same width please");
 	if (a[0]!=r->dim[0]) RAISE("same height please");
 	in.set_chunk(2);
-	out=new GridOutlet(this,0,r->dim);
+	go=new GridOut(this,0,r->dim);
 } GRID_FLOW {
 	T *rr = ((T *)*r) + in.dex*3/4;
 	T foo[n*3/4];
@@ -890,7 +890,7 @@
 		COMPUTE_ALPHA(2,3);
 	}
 #undef COMPUTE_ALPHA
-	out->send(n*3/4,foo);
+	go->send(n*3/4,foo);
 } GRID_END
 
 GRID_INPUT(1,r) {} GRID_END
@@ -974,7 +974,7 @@
 	if (in.dim.n!=3) RAISE("expecting 3 dimensions");
 	if (in.dim[2]!=color->dim[0]) RAISE("image does not have same number of channels (%d) as stored color (%d)",
 	    in.dim[2], color->dim[0]);
-	out=new GridOutlet(this,0,in.dim,in.nt);
+	go=new GridOut(this,0,in.dim,in.nt);
 	lines_start = lines_stop = 0;
 	in.set_chunk(1);
 	int nl = lines->dim[0];
@@ -1002,7 +1002,7 @@
 			}
 		}
 		if (lines_start == lines_stop) {
-			out->send(f,data);
+			go->send(f,data);
 		} else {
 			int32 xl = in.dim[1];
 			T data2[f];
@@ -1043,7 +1043,7 @@
 				}
 				lines_start=lines_stop;
 			}
-			out->send(f,data2);
+			go->send(f,data2);
 		}
 		n-=f;
 		data+=f;
@@ -1129,7 +1129,7 @@
 		RAISE("right_hand has %d channels, alpha=%d, left_hand has %d, expecting %d or %d",
 			rchan, alpha?1:0, lchan, rchan-(alpha?1:0), rchan);
 	}
-	out=new GridOutlet(this,0,in.dim,in.nt);
+	go=new GridOut(this,0,in.dim,in.nt);
 	in.set_chunk(1);
 } GRID_FLOW {
 	int f = in.dim.prod(1);
@@ -1149,9 +1149,9 @@
 			} else {
 				draw_segment(data2,data,y-py,px);
 			}
-			out->send(f,data2);
+			go->send(f,data2);
 		} else {
-			out->send(f,data);
+			go->send(f,data);
 		}
 	}
 } GRID_END
@@ -1184,7 +1184,7 @@
 
 GRID_INLET(0) {
 	SAME_TYPE(in,color);
-	out=new GridOutlet(this,0,in.dim,in.nt);
+	go=new GridOut(this,0,in.dim,in.nt);
 	if (points->dim.n!=2) RAISE("points should be a 2-D grid");
 	if (points->dim[1] != in.dim.n - color->dim.n) RAISE("wrong number of dimensions");
 	in.set_chunk(0);
@@ -1199,7 +1199,7 @@
 		off *= cn;
 		for (long j=0; j<cn; j++) data[off+j] = cdata[j];
 	}
-//	out->send(data);
+//	go->send(data);
 } GRID_END
 \end class {install("#draw_points",3,1);}
 
@@ -1214,7 +1214,7 @@
 GRID_INLET(0) {
 	if (in.dim.n!=3) RAISE("requires 3 dimensions: dim(y,x,3)");
 	if (in.dim[2]!=3) RAISE("requires 3 channels");
-	out=new GridOutlet(this,0,in.dim,in.nt);
+	go=new GridOut(this,0,in.dim,in.nt);
 	in.set_chunk(2);
 } GRID_FLOW {
 	T tada[n];
@@ -1225,7 +1225,7 @@
 			tada[i+0]=data[i+0]; tada[i+1]=data[i+1]; tada[i+2]=data[i+2];
 		}
 	}
-	out->send(n,tada);
+	go->send(n,tada);
 } GRID_END
 
 \end class {install("#noise_gate_yuvs",2,1);}
@@ -1251,8 +1251,8 @@
 	\decl void _n_float (int inlet, float f) {_n_set(inlet,f); _0_bang();}
 	\decl void _n_list  (int inlet, float f) {_n_set(inlet,f); _0_bang();}
 	\decl 0 bang () {
-		out=new GridOutlet(this,0,a->dim,a->nt);
-		#define FOO(T) out->send(n,(T *)*a);
+		go=new GridOut(this,0,a->dim,a->nt);
+		#define FOO(T) go->send(n,(T *)*a);
 		TYPESWITCH(a->nt,FOO,);
 		#undef FOO
 	}
@@ -1304,8 +1304,8 @@
 	float th = angle * M_PI / 18000;
 	for (int i=0; i<2; i++) for (int j=0; j<2; j++)
 		rotator[(i?to:from)*n+(j?to:from)] = (int32)round(scale*cos(th+(j-i)*M_PI/2));
-	GridOutlet out(this,0,Dim(n,n),int32_e);
-	out.send(n*n,rotator);
+	GridOut go(this,0,Dim(n,n),int32_e);
+	go.send(n*n,rotator);
 }
 \def 0 axis(int from, int to, int n) {
 	if (n<0) RAISE("n-axis number incorrect");
@@ -1344,8 +1344,8 @@
 			cdata[*ldata]++;
 		}
 		for (int i=0; i<numClusters; i++) OP(/)->map(chans,sdata+i*chans,(T)cdata[i]);
-		out = new GridOutlet(this,1,counts->dim,counts->nt); out->send(counts->dim.prod(),(int32 *)*counts);
-		out = new GridOutlet(this,0,  sums->dim,  sums->nt); out->send(  sums->dim.prod(),(T     *)*  sums);
+		go = new GridOut(this,1,counts->dim,counts->nt); go->send(counts->dim.prod(),(int32 *)*counts);
+		go = new GridOut(this,0,  sums->dim,  sums->nt); go->send(  sums->dim.prod(),(T     *)*  sums);
 	}
 };
 
@@ -1390,7 +1390,7 @@
 	if (w<0 || w>=in.dim.n) RAISE("can't join on dim number %d on %d-dimensional grids", which_dim,in.dim.n);
 	if (!r) {t_atom a[1]; SETFLOAT(a,256); r=new Grid(1,a);}
 	SAME_TYPE(in,r);
-	out = new GridOutlet(this,0,in.dim,in.nt);
+	go = new GridOut(this,0,in.dim,in.nt);
 	in.set_chunk(w);
 	int sxc = in.dim.prod(w);
 	size_t rn = r->dim.prod();
@@ -1411,12 +1411,12 @@
 		CLEAR(tada+sxc,sc);
 		if (rn==1) for (int i=sxc-1; i>=0; i--) tada[i   ] = shr8r(tada[i+sc]*256 + (data[i]-tada[i+sc])*rvalue  );
 		else       for (int i=sxc-1; i>=0; i--) tada[i   ] = shr8r(tada[i+sc]*256 + (data[i]-tada[i+sc])*rdata[i]);
-		out->send(sxc,tada);
+		go->send(sxc,tada);
 	    } else {
 		CLEAR(tada,sc);
 		if (rn==1) for (int i=0; i<sxc; i++)    tada[i+sc] = shr8r(tada[i   ]*256 + (data[i]-tada[i   ])*rvalue  );
 		else       for (int i=0; i<sxc; i++)    tada[i+sc] = shr8r(tada[i   ]*256 + (data[i]-tada[i   ])*rdata[i]);
-		out->send(sxc,tada+sc);
+		go->send(sxc,tada+sc);
 	    }
 	}
 } GRID_END
@@ -1435,7 +1435,7 @@
 };
 
 GRID_INLET(0) {	
-	out = new GridOutlet(this,0,in.dim,float32_e);
+	go = new GridOut(this,0,in.dim,float32_e);
 } GRID_FLOW {
 	t_garray *a;
 	int npoints;
@@ -1454,7 +1454,7 @@
 			tada[i] = (npoints ? vec[index].w_float : 0);
 		}
 	}
-	out->send(n,tada);
+	go->send(n,tada);
 } GRID_END
 
 \end class {install("#tabread",1,1);}

Modified: trunk/src/dc1394.cxx
==============================================================================
--- trunk/src/dc1394.cxx (original)
+++ trunk/src/dc1394.cxx Fri Aug 13 12:10:02 2010
@@ -266,7 +266,7 @@
 	//signal(SIGALRM,rien);
 	if (dc1394_single_capture(rh,&camera)!=DC1394_SUCCESS) RAISE("dc1394_single_capture error");
 	//setitimer(ITIMER_REAL,0,0);
-	out=new GridOutlet(this,0,Dim(height,width,1));
+	out=new GridOut(this,0,Dim(height,width,1));
 	//out->send(out->dim.prod(),(uint8 *)camera.capture_buffer);
 	for (int i=0; i<height; i++) out->send(out->dim.prod(1),(uint8 *)camera.capture_buffer+640*i);
 	//if (dc1394_stop_iso_transmission(rh,usenode)!=DC1394_SUCCESS) RAISE("dc1394_stop_iso_transmission error");

Modified: trunk/src/fftw.cxx
==============================================================================
--- trunk/src/fftw.cxx (original)
+++ trunk/src/fftw.cxx Fri Aug 13 12:10:02 2010
@@ -65,7 +65,7 @@
 		v[in.dim.n] = 2;
 		dim = Dim(in.dim.n+1,v);
 	} else dim = Dim(in.dim.n-1,in.dim.v);
-	GridOutlet out(this,0,dim,in.nt);
+	GridOut out(this,0,dim,in.nt);
 	float32 *tada = (float32 *)memalign(16,dim.prod()*sizeof(float32));
 	long chans = in.dim.n>=3 ? in.dim[2] : 1;
 	CHECK_ALIGN16(data,in.nt)

Modified: trunk/src/formats.cxx
==============================================================================
--- trunk/src/formats.cxx (original)
+++ trunk/src/formats.cxx Fri Aug 13 12:10:02 2010
@@ -208,7 +208,7 @@
 		if (endian != is_le()) swap32(head.dimn,(uint32 *)dimv);
 		dim = Dim(head.dimn,dimv);
 	}
-	GridOutlet out(this,0,dim,nt);
+	GridOut out(this,0,dim,nt);
 	long nn = dim.prod();
 	
 #define FOO(T) {T data[nn]; size_t nnn = fread(data,1,nn*sizeof(T),f); \
@@ -307,7 +307,7 @@
 	int maxnum = getuint();
 	if (maxnum!=255) RAISE("expected max to be 255 (8 bits per value)");
 	size_t sxc = sx*sc;
-	GridOutlet out(this,0,Dim(sy,sx,sc),cast);
+	GridOut out(this,0,Dim(sy,sx,sc),cast);
 	uint8 row[sx*3];
 	switch (b) {
 		case '2': case '3': {

Modified: trunk/src/gem.cxx
==============================================================================
--- trunk/src/gem.cxx (original)
+++ trunk/src/gem.cxx Fri Aug 13 12:10:02 2010
@@ -218,7 +218,7 @@
 		  default: ::post("can't produce grid from pix type %d (0x%x)",  im.type, im.type  ); return;}
 		// on OSX, one was GL_UNSIGNED_INT_8_8_8_8 and the other was...?
 		int32 v[] = {im.ysize, im.xsize, channels};
-		GridOutlet out(this,0,Dim(3,v),cast);
+		GridOut out(this,0,Dim(3,v),cast);
 		long sxc = im.xsize*channels;
 		long sy = v[0];
 		bool f = yflip^im.upsidedown;

Modified: trunk/src/grid.cxx
==============================================================================
--- trunk/src/grid.cxx (original)
+++ trunk/src/grid.cxx Fri Aug 13 12:10:02 2010
@@ -103,7 +103,7 @@
 #undef FOO
 }
 
-void GridInlet::begin(GridOutlet *sender) {
+void GridInlet::begin(GridOut *sender) {
 	if (this->sender) RAISE("grid inlet aborting from %s at %ld/%ld because of %s",
 		ARGS(this->sender->parent),long(dex),long(dim.prod()),ARGS(sender->parent));
 	this->sender = sender;
@@ -171,7 +171,7 @@
 }
 
 template <class T> void GridInlet::from_grid2(Grid *g, T foo) {
-	GridOutlet out(0,-1,g->dim,g->nt);
+	GridOut out(0,-1,g->dim,g->nt);
 	begin(&out);
 	size_t n = g->dim.prod();
 	if (n) out.send(n,(T *)*g); else finish();
@@ -184,9 +184,9 @@
 #undef FOO
 }
 
-/* **************** GridOutlet ************************************ */
-
-GridOutlet::GridOutlet(FObject *parent_, int woutlet, const Dim &dim_, NumberTypeE nt_) {
+/* **************** GridOut ************************************ */
+
+GridOut::GridOut(FObject *parent_, int woutlet, const Dim &dim_, NumberTypeE nt_) {
 	parent=parent_; dim=dim_; nt=nt_; dex=0; bufi=0; sender=this; fresh=true;
 	t_atom a[1];
 	SETGRIDOUT(a,this);
@@ -196,7 +196,7 @@
 	}
 }
 
-void GridOutlet::create_buf () {
+void GridOut::create_buf () {
 	int32 lcm_factor = 1;
 	for (uint32 i=0; i<inlets.size(); i++) lcm_factor = lcm(lcm_factor,inlets[i]->factor());
 	//size_t ntsz = number_type_table[nt].size;
@@ -206,7 +206,7 @@
 	buf.init(Dim(v),nt);
 #ifdef TRACEBUFS
 	ostringstream text;
-	oprintf(text,"GridOutlet: %20s buf for sending to  ",buf->dim->to_s());
+	oprintf(text,"GridOut: %20s buf for sending to  ",buf->dim->to_s());
 	for (uint i=0; i<inlets.size(); i++) text << " " << (void *)inlets[i]->parent;
 	post("%s",text.str().data());
 #endif
@@ -215,7 +215,7 @@
 
 // send modifies dex; send_direct doesn't
 template <class T>
-void GridOutlet::send_direct(long n, T *data) {
+void GridOut::send_direct(long n, T *data) {
 	CHECK_BUSY(outlet); CHECK_TYPE(*data,nt); CHECK_ALIGN(data,nt);
 	while (n>0) {
 		long pn = n;//min((long)n,MAX_PACKET_SIZE);
@@ -224,7 +224,7 @@
 	}
 }
 
-void GridOutlet::flush() {
+void GridOut::flush() {
 	if (fresh || !bufi) return;
 #define FOO(T) send_direct(bufi,(T *)buf);
 	TYPESWITCH(buf.nt,FOO,)
@@ -238,7 +238,7 @@
 //!@#$ buffering in outlet still is 8x faster...?
 // send modifies dex; send_direct doesn't
 template <class T>
-void GridOutlet::send_2(long n, T *data) {
+void GridOut::send_2(long n, T *data) {
 	if (!n) return;
 	CHECK_BUSY(outlet); CHECK_ALIGN(data,nt);
 	if (NumberTypeE_type_of(data)!=nt) {
@@ -266,12 +266,12 @@
 	}
 }
 
-void GridOutlet::callback(GridInlet &in) {
+void GridOut::callback(GridInlet &in) {
 	CHECK_BUSY1(outlet);
 	inlets.push_back(&in);
 }
 
-void GridOutlet::finish () {
+void GridOut::finish () {
 	flush();
 	for (uint32 i=0; i<inlets.size(); i++) inlets[i]->finish();
 	sender=0;
@@ -280,7 +280,7 @@
 // never call this. this is a hack to make some things work.
 // i'm trying to circumvent either a bug in the compiler or i don't have a clue. :-(
 void make_gimmick () {
-	GridOutlet foo(0,0,0);
+	GridOut foo(0,0,0);
 #define FOO(S) foo.send(0,(S *)0);
 EACH_NUMBER_TYPE(FOO)
 #undef FOO

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Fri Aug 13 12:10:02 2010
@@ -72,14 +72,14 @@
 #define A_LIST    t_atomtype(13) /* (t_binbuf *) */
 #endif
 #define A_GRID    t_atomtype(14) /* (Grid *)    */
-#define A_GRIDOUT t_atomtype(15) /* (GridOutlet *) */
+#define A_GRIDOUT t_atomtype(15) /* (GridOut *) */
 // the use of w_gpointer here is fake, just because there's no suitable member in the union
 struct Grid;
-struct GridOutlet;
-static inline void SETLIST(   t_atom *a, t_binbuf *b)   {a->a_type = A_LIST;    a->a_gpointer = (t_gpointer *)b;}
-static inline void SETGRID(   t_atom *a, Grid *g)       {a->a_type = A_GRID;    a->a_gpointer = (t_gpointer *)g;}
-static inline void SETGRIDOUT(t_atom *a, GridOutlet *g) {a->a_type = A_GRIDOUT; a->a_gpointer = (t_gpointer *)g;}
-static inline void SETNULL(   t_atom *a)                {a->a_type = A_NULL;    a->a_gpointer = 0;}
+struct GridOut;
+static inline void SETLIST(   t_atom *a, t_binbuf *b) {a->a_type = A_LIST;    a->a_gpointer = (t_gpointer *)b;}
+static inline void SETGRID(   t_atom *a, Grid *g)     {a->a_type = A_GRID;    a->a_gpointer = (t_gpointer *)g;}
+static inline void SETGRIDOUT(t_atom *a, GridOut *g)  {a->a_type = A_GRIDOUT; a->a_gpointer = (t_gpointer *)g;}
+static inline void SETNULL(   t_atom *a)              {a->a_type = A_NULL;    a->a_gpointer = 0;}
 
 typedef t_binbuf t_list;
 
@@ -267,12 +267,12 @@
 	operator float64 () const {if (a_type!=A_FLOAT) RAISE("expected float"); return               a_float ;}
 
 #define TYPECASTER2(T,A,B,C) operator T () const {if (a_type!=A) RAISE("expected "B); return C;}
-	TYPECASTER2(string      ,A_SYMBOL ,"symbol"     , string(a_symbol->s_name))
-	TYPECASTER2(t_symbol   *,A_SYMBOL ,"symbol"     ,        a_symbol         )
-	TYPECASTER2(void       *,A_POINTER,"pointer"    ,               a_gpointer)
-	TYPECASTER2(t_binbuf   *,A_LIST   ,"nested list",   (t_binbuf *)a_gpointer)
-	TYPECASTER2(Grid       *,A_GRID   ,"grid"       ,       (Grid *)a_gpointer)
-	TYPECASTER2(GridOutlet *,A_GRIDOUT,"grid outlet", (GridOutlet *)a_gpointer)
+	TYPECASTER2(string    ,A_SYMBOL ,"symbol"     ,string(a_symbol->s_name))
+	TYPECASTER2(t_symbol *,A_SYMBOL ,"symbol"     ,       a_symbol         )
+	TYPECASTER2(void     *,A_POINTER,"pointer"    ,              a_gpointer)
+	TYPECASTER2(t_binbuf *,A_LIST   ,"nested list",  (t_binbuf *)a_gpointer)
+	TYPECASTER2(Grid     *,A_GRID   ,"grid"       ,      (Grid *)a_gpointer)
+	TYPECASTER2(GridOut  *,A_GRIDOUT,"grid outlet",   (GridOut *)a_gpointer)
 #undef TYPECASTER2
 
 	template <class T> t_atom2 &operator = (T value) {set_atom(this,value); return *this;};
@@ -669,7 +669,7 @@
 	FObject *parent; const GridHandler *gh;
 	
 	// set once per transmission
-	GridOutlet *sender; Dim dim; NumberTypeE nt; /* nt shouldn't need to exist */
+	GridOut *sender; Dim dim; NumberTypeE nt; /* nt shouldn't need to exist */
 	
 	// modified continually
 	long dex; int chunk; PtrGrid buf; /* factor-chunk buffer */ long bufi; /* buffer index: how much of buf is filled */
@@ -679,7 +679,7 @@
 	~GridInlet() {}
 	void set_chunk(long whichdim);
 	int32 factor() {return buf?buf->dim.prod():1;} // which is usually not the same as this->dim->prod(chunk)
-	void begin(GridOutlet *sender);
+	void begin(GridOut *sender);
 	void finish();
 	template <class T> void flow(long n, T *data); // n=-1 is begin, and n=-2 is finish.
 	void from_list(VA, NumberTypeE nt=int32_e) {Grid t(argc,argv,nt); from_grid(&t);}
@@ -738,15 +738,15 @@
 void fclass_install(FClass *fc, FClass *super);
 
 //****************************************************************
-// GridOutlet represents a grid-aware outlet
-struct GridOutlet : CObject {
+// GridOut represents a grid transmission from the perspective of the sender
+struct GridOut : CObject {
 	// number of (minimum,maximum) BYTES to send at once
 	static const long MIN_PACKET_SIZE = 1<<8;
 	static const long MAX_PACKET_SIZE = 1<<12;
 
 	// read-only (set-once)
 	FObject *parent; Dim dim; NumberTypeE nt; vector<GridInlet *> inlets;
-	GridOutlet *sender; // dummy (because of P<Dim> to Dim)
+	GridOut *sender; // dummy (because of P<Dim> to Dim)
 
 	// continually changed
 	long dex; // how many numbers were already sent in this connection
@@ -754,8 +754,8 @@
 	long bufi; // number of bytes used in the buffer
 	bool fresh; /* 0 = buf was inited */
 
-	GridOutlet(FObject *parent_, int woutlet, const Dim &dim_, NumberTypeE nt_=int32_e);
-	~GridOutlet() {}
+	GridOut(FObject *parent_, int woutlet, const Dim &dim_, NumberTypeE nt_=int32_e);
+	~GridOut() {}
 	void callback(GridInlet &in);
 
 	// send/send_direct: data belongs to caller, may be stack-allocated,
@@ -795,6 +795,15 @@
 	string binbuf_string ();
 };
 
+/* not planning to use or rely on those fields at all. it's more about C++ifying the normal interface to it. */
+/*struct _outlet {
+    t_object *o_owner;
+    struct _outlet *o_next;
+    t_outconnect *o_connections;
+    t_symbol *o_sym;
+    //void send () {outlet_bang(
+};*/
+
 // represents objects that have inlets/outlets
 \class FObject {
 	virtual ~FObject ();
@@ -807,7 +816,7 @@
 	void  ninlets_set(int n, bool draw=true);
 	void noutlets_set(int n, bool draw=true);
 	vector<P<GridInlet> > in;
-	P<GridOutlet> out;
+	P<GridOut> go;
 	FObject(BFObject *bself, MESSAGE);
 	template <class T> void send_out(int outlet, int argc, T *argv) {
 		t_atom foo[argc];

Modified: trunk/src/jpeg.cxx
==============================================================================
--- trunk/src/jpeg.cxx (original)
+++ trunk/src/jpeg.cxx Fri Aug 13 12:10:02 2010
@@ -96,7 +96,7 @@
 	jpeg_stdio_src(&djpeg,f);
 	jpeg_read_header(&djpeg,TRUE);
 	int sx=djpeg.image_width, sy=djpeg.image_height, chans=djpeg.num_components;
-	GridOutlet out(this,0,Dim(sy,sx,chans),cast);
+	GridOut out(this,0,Dim(sy,sx,chans),cast);
 	jpeg_start_decompress(&djpeg);
 	uint8 row[sx*chans];
 	uint8 *rows[1] = { row };

Modified: trunk/src/mpeg3.cxx
==============================================================================
--- trunk/src/mpeg3.cxx (original)
+++ trunk/src/mpeg3.cxx Fri Aug 13 12:10:02 2010
@@ -64,7 +64,7 @@
 	uint8 *rows[sy];
 	for (int i=0; i<sy; i++) rows[i]=buf+i*sx*channels;
 	mpeg3_read_frame(mpeg,rows,0,0,sx,sy,sx,sy,MPEG3_RGB888,track);
-	GridOutlet out(this,0,Dim(sy,sx,channels),cast);
+	GridOut out(this,0,Dim(sy,sx,channels),cast);
 	int bs = out.dim.prod(1);
 	for(int y=0; y<sy; y++) out.send(bs,buf+channels*sx*y);
 	DELBUF(buf);

Modified: trunk/src/opencv.cxx
==============================================================================
--- trunk/src/opencv.cxx (original)
+++ trunk/src/opencv.cxx Fri Aug 13 12:10:02 2010
@@ -161,16 +161,16 @@
 	int n = self->cols;
 	int e = CV_MAT_TYPE(cvGetElemType(self));
 	int c = CV_MAT_CN(  cvGetElemType(self));
-	GridOutlet *out = new GridOutlet(obj,0,dim);
+	GridOut *go = new GridOut(obj,0,dim);
 	for (int i=0; i<m; i++) {
 		uchar *meuh = cvPtr2D(self,i,0,0);
 		switch (e) {
-		  case CV_8U:  out->send(c*n,  (uint8 *)meuh); break;
-		  case CV_16S: out->send(c*n,  (int16 *)meuh); break;
-		  case CV_32S: out->send(c*n,  (int32 *)meuh); break;
-		  case CV_32F: out->send(c*n,(float32 *)meuh); break;
+		  case CV_8U:  go->send(c*n,  (uint8 *)meuh); break;
+		  case CV_16S: go->send(c*n,  (int16 *)meuh); break;
+		  case CV_32S: go->send(c*n,  (int32 *)meuh); break;
+		  case CV_32F: go->send(c*n,(float32 *)meuh); break;
 		  #ifndef HAVE_LITE
-		  case CV_64F: out->send(c*n,(float64 *)meuh); break;
+		  case CV_64F: go->send(c*n,(float64 *)meuh); break;
 		  #endif
 		}
 	}
@@ -229,8 +229,8 @@
 	cvRelease(&a);
 	cvRelease(&b);
 	cvRelease(&c);
-	out = new GridOutlet(this,0,in.dim,in.nt);
-	out->send(o->dim.prod(),(T *)o->data);
+	go = new GridOut(this,0,in.dim,in.nt);
+	go->send(o->dim.prod(),(T *)o->data);
 } GRID_END
 GRID_INPUT2(1,r) {} GRID_END
 \end class {}
@@ -271,8 +271,8 @@
 	cvInvert(a,c);
 	cvRelease(&a);
 	cvRelease(&c);
-	out = new GridOutlet(this,0,in.dim,in.nt);
-	out->send(o->dim.prod(),(T *)o->data);
+	go = new GridOut(this,0,in.dim,in.nt);
+	go->send(o->dim.prod(),(T *)o->data);
 } GRID_END
 \end class {install("cv/#Invert",1,1);}
 
@@ -298,9 +298,9 @@
 	cvRelease(&c0);
 	cvRelease(&c1);
 	cvRelease(&c2);
-	out = new GridOutlet(this,2,in.dim,in.nt); out->send(o2->dim.prod(),(T *)o2->data);
-	out = new GridOutlet(this,1,in.dim,in.nt); out->send(o1->dim.prod(),(T *)o1->data);
-	out = new GridOutlet(this,0,in.dim,in.nt); out->send(o0->dim.prod(),(T *)o0->data);
+	go = new GridOut(this,2,in.dim,in.nt); go->send(o2->dim.prod(),(T *)o2->data);
+	go = new GridOut(this,1,in.dim,in.nt); go->send(o1->dim.prod(),(T *)o1->data);
+	go = new GridOut(this,0,in.dim,in.nt); go->send(o0->dim.prod(),(T *)o0->data);
 } GRID_END
 \end class {install("cv/#SVD",1,3);}
 
@@ -327,7 +327,7 @@
 	IplImage *img = cvImageGrid(l);
 	cvEllipse(img,center,axes,angle,start_angle,end_angle,color,thickness,line_type,shift);
 	cvReleaseImageHeader(&img);
-	out = new GridOutlet(this,0,in.dim,in.nt); out->send(in.dim.prod(),(T *)*l);
+	go = new GridOut(this,0,in.dim,in.nt); go->send(in.dim.prod(),(T *)*l);
 } GRID_END
 \end class {install("cv/#Ellipse",1,2);}
 
@@ -447,11 +447,11 @@
 	IplImage *img = cvImageGrid(l);
 	CvSeq *ret = cvHaarDetectObjects(img,cascade,storage,scale_factor,min_neighbors,flags);
 	int n = ret ? ret->total : 0;
-	out = new GridOutlet(this,0,Dim(n,2,2));
+	go = new GridOut(this,0,Dim(n,2,2));
 	for (int i=0; i<n; i++) {
 		CvRect *r = (CvRect *)cvGetSeqElem(ret,i);
 		int32 duh[] = {r->y,r->x,r->y+r->height,r->x+r->width};
-		out->send(4,duh);
+		go->send(4,duh);
 	}
 } GRID_END
 \end class {install("cv/#HaarDetectObjects",2,1);}
@@ -482,8 +482,8 @@
 	int w[in.dim.n];
 	COPY(w,in.dim.v,in.dim.n);
 	w[in.dim.n-1] = 1;
-	out = new GridOutlet(this,0,Dim(in.dim.n,w));
-	out->send(v[0],(int32 *)*o);
+	go = new GridOut(this,0,Dim(in.dim.n,w));
+	go->send(v[0],(int32 *)*o);
 	cvRelease(&a);
 	cvRelease(&c);
 } GRID_END
@@ -512,7 +512,7 @@
 	cvCornerHarris(a,c,block_size,aperture_size,k);
 	cvRelease(&a);
 	cvRelease(&c);
-	out = new GridOutlet(this,0,in.dim,in.nt); out->send(o->dim.prod(),(T *)o->data);
+	go = new GridOut(this,0,in.dim,in.nt); go->send(o->dim.prod(),(T *)o->data);
 } GRID_END
 
 \end class {install("cv/#CornerHarris",1,1);}

Modified: trunk/src/pdp.cxx
==============================================================================
--- trunk/src/pdp.cxx (original)
+++ trunk/src/pdp.cxx Fri Aug 13 12:10:02 2010
@@ -84,7 +84,7 @@
 			*tada++ = YUV2B(datay[1]>>7,u,v);
 		}
 	}
-	GridOutlet o((FObject *)self->daddy,0,Dim(sy,sx,3),int32_e); // why (FObject *) cast ???
+	GridOut o((FObject *)self->daddy,0,Dim(sy,sx,3),int32_e); // why (FObject *) cast ???
 	o.send(sy*sx*3,tada2);
 }
 static void pdpproxy_free(pdpproxy *x) {pdp_imagebase_free(x);}

Modified: trunk/src/png.cxx
==============================================================================
--- trunk/src/png.cxx (original)
+++ trunk/src/png.cxx Fri Aug 13 12:10:02 2010
@@ -119,7 +119,7 @@
 	delete[] row_pointers;
 	row_pointers = 0;
 	png_read_end(png, 0);
-	GridOutlet out(this,0,Dim(height,width,channels),cast);
+	GridOut out(this,0,Dim(height,width,channels),cast);
 	out.send(rowbytes*height,image_data);
 	delete[] image_data;
 	png_destroy_read_struct(&png, &info, NULL);

Modified: trunk/src/quicktimeapple.cxx
==============================================================================
--- trunk/src/quicktimeapple.cxx (original)
+++ trunk/src/quicktimeapple.cxx Fri Aug 13 12:10:02 2010
@@ -191,7 +191,7 @@
 
 //////// début de copier-coller de #io.quicktimeapple 0 bang
 
-	GridOutlet out(this,0,dim,cast);
+	GridOut out(this,0,dim,cast);
 	string cs = colorspace->s_name;
 	int sy = dim[0];
 	int sx = dim[1];

Modified: trunk/src/quicktimecamera.cxx
==============================================================================
--- trunk/src/quicktimecamera.cxx (original)
+++ trunk/src/quicktimecamera.cxx Fri Aug 13 12:10:02 2010
@@ -367,7 +367,7 @@
 static int nn(int c) {return c?c:' ';}
 
 \def 0 bang () {
-	GridOutlet out(this,0,dim,cast);
+	GridOut out(this,0,dim,cast);
 	string cs = colorspace->s_name;
 	int sy = dim[0];
 	int sx = dim[1];

Modified: trunk/src/quicktimehw.cxx
==============================================================================
--- trunk/src/quicktimehw.cxx (original)
+++ trunk/src/quicktimehw.cxx Fri Aug 13 12:10:02 2010
@@ -117,7 +117,7 @@
 		lqt_decode_audio_track(anim,0,output_f,samples,track);
 		float sound2[samples*achannels];
 		for (int i=0; i<samples; i++) for (int j=0; j<achannels; j++) sound2[i*achannels+j] = sound[j*samples+i];
-		GridOutlet out(this,0,Dim(samples,achannels),float32_e);
+		GridOut out(this,0,Dim(samples,achannels),float32_e);
 		out.send(samples*achannels,sound2);
 		advance += samples;
 	    }
@@ -142,7 +142,7 @@
 	uint8 buf[sy*sx*channels];
 	uint8 *rows[sy]; for (int i=0; i<sy; i++) rows[i]=buf+i*sx*channels;
 	quicktime_decode_scaled(anim,0,0,sx,sy,sx,sy,colorspace,rows,track);
-	GridOutlet out(this,0,Dim(sy,sx,channels),cast);
+	GridOut out(this,0,Dim(sy,sx,channels),cast);
 	out.send(sy*sx*channels,buf);
 	started=true;
 //	return INT2NUM(nframe);

Modified: trunk/src/source_filter.rb
==============================================================================
--- trunk/src/source_filter.rb (original)
+++ trunk/src/source_filter.rb Fri Aug 13 12:10:02 2010
@@ -238,7 +238,7 @@
 	fields = line.split(/\s+/)
 	i = fields[0].to_i
 	Out.print "GRINDECL(#{i})"
-	handle_decl "#{i} grid(GridOutlet *foo);"
+	handle_decl "#{i} grid(GridOut *foo);"
 	handle_decl "#{i} list(...);"
 	handle_decl "#{i} float(float f);"
 	$stack[-1].grins[i] = fields.dup
@@ -254,9 +254,9 @@
 	frame.grins.each {|i,v|
 		Out.print "static GridHandler #{cl}_grid_#{i}_hand = GRIN_#{v[1]||'all'}(#{cl}::grinw_#{i});"
 		check = "CHECK_GRIN(#{cl},#{i});"
-		handle_def "#{i} grid(GridOutlet *foo) {#{check}in[#{i}]->begin(foo);}"
-		handle_def "#{i} list(...)             {#{check}in[#{i}]->from_list(argc,argv);}" if not frame.methods["_#{i}_list" ].done
-		handle_def "#{i} float(float f)        {#{check}in[#{i}]->from_float(f);}"        if not frame.methods["_#{i}_float"].done
+		handle_def "#{i} grid(GridOut *foo) {#{check}in[#{i}]->begin(foo);}"
+		handle_def "#{i} list(...)          {#{check}in[#{i}]->from_list(argc,argv);}" if not frame.methods["_#{i}_list" ].done
+		handle_def "#{i} float(float f)     {#{check}in[#{i}]->from_float(f);}"        if not frame.methods["_#{i}_float"].done
 	}
 	if /^class\s*(\w+\s+)?\{(.*)/ =~ line then handle_classinfo("{"+$2) end
 	$stack.pop

Modified: trunk/src/v4l2.cxx
==============================================================================
--- trunk/src/v4l2.cxx (original)
+++ trunk/src/v4l2.cxx Fri Aug 13 12:10:02 2010
@@ -291,62 +291,62 @@
 	int palette = fmt.fmt.pix.pixelformat;
 	if (palette==V4L2_PIX_FMT_YUYV) {
 		uint8 *bufy = buf;
-		GridOutlet out(this,0,cs=="magic"?Dim(sy>>downscale,sx>>downscale,3):dim,cast);
+		GridOut go(this,0,cs=="magic"?Dim(sy>>downscale,sx>>downscale,3):dim,cast);
 		if (cs=="y") {
 		    for(int y=0; y<sy; bufy+=sx, y++) {
 			for (int x=0,xx=0; x<sx; x+=2,xx+=4) {
 				b2[xx+0]=YUV2Y(bufy[x+0],0,0);
 				b2[xx+1]=YUV2Y(bufy[x+2],0,0);
 			}
-			out.send(bs,b2);
+			go.send(bs,b2);
 		    }
 		} else if (cs=="rgb") {
 		    for(int y=0; y<sy; bufy+=2*sx, y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx*2; x+=4,xx+=6) {GETYUYV(x); YUV2RGB(b2+xx,Y1,U,V); YUV2RGB(b2+xx+3,Y2,U,V);}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="rgba") {
 		    for(int y=0; y<sy; bufy+=2*sx, y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx*2; x+=4,xx+=8) {GETYUYV(x); YUV2RGB(b2+xx,Y1,U,V); YUV2RGB(b2+xx+4,Y2,U,V);
 				b2[xx+3]=255; b2[xx+7]=255;}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="yuv") {
 		    for(int y=0; y<sy; bufy+=2*sx, y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx*2; x+=4,xx+=6) {GETYUYV(x); YUV2YUV(b2+xx,Y1,U,V); YUV2YUV(b2+xx+3,Y2,U,V);}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="magic") {
 		    int sx2 = sx/2;
 		    for(int y=0; y<sy; bufy+=2*sx, y+=2) {
  			for (int x=0,xx=0; x<sx2; x+=3,xx+=3) {b2[xx+0]=bufy[x+0]; b2[xx+1]=bufy[x+1]; b2[xx+2]=bufy[x+3];}
-			out.send(bs,b2);
+			go.send(bs,b2);
 		    }
 		}
 	} else if (palette==V4L2_PIX_FMT_YVU420) {
 		uint8 *bufy = buf, *bufu = buf+sx*sy, *bufv = buf+sx*sy*5/4;
-		GridOutlet out(this,0,cs=="magic"?Dim(sy>>downscale,sx>>downscale,3):dim,cast);
+		GridOut go(this,0,cs=="magic"?Dim(sy>>downscale,sx>>downscale,3):dim,cast);
 		if (cs=="y") {
-		    out.send(sy*sx,buf);
+		    go.send(sy*sx,buf);
 		} else if (cs=="rgb") {
 		    for(int y=0; y<sy; bufy+=sx, bufu+=(sx/2)*(y&1), bufv+=(sx/2)*(y&1), y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx; x+=2,xx+=6) {GET420P(x); YUV2RGB(b2+xx,Y1,U,V); YUV2RGB(b2+xx+3,Y2,U,V);}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="rgba") {
 		    for(int y=0; y<sy; bufy+=sx, bufu+=(sx/2)*(y&1), bufv+=(sx/2)*(y&1), y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx; x+=2,xx+=8) {GET420P(x); YUV2RGB(b2+xx,Y1,U,V); YUV2RGB(b2+xx+4,Y2,U,V);
 			b2[xx+3]=255; b2[xx+7]=255;}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="yuv") {
 		    for(int y=0; y<sy; bufy+=sx, bufu+=(sx/2)*(y&1), bufv+=(sx/2)*(y&1), y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx; x+=2,xx+=6) {GET420P(x); YUV2YUV(b2+xx,Y1,U,V); YUV2YUV(b2+xx+3,Y2,U,V);}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="magic") {
 		    int sx2 = sx/2;
 		    for(int y=0; y<sy/2; bufy+=2*sx, bufu+=sx2, bufv+=sx2, y++) {
  			for (int x=0,xx=0; x<sx2; x++,xx+=3) {b2[xx+0]=bufy[x+x]; b2[xx+1]=bufu[x]; b2[xx+2]=bufv[x];}
-			out.send(bs,b2);
+			go.send(bs,b2);
 		    }
 		}
 	} else if (palette==V4L2_PIX_FMT_RGB24) {
-		GridOutlet out(this,0,dim,cast);
+		GridOut go(this,0,dim,cast);
 		uint8 rgb[sx*4];
 		uint8 b2[sx*3];
 		if (cs=="y") {
@@ -356,19 +356,19 @@
 					b2[x+0] = (76*rgb[xx+0]+150*rgb[xx+1]+29*rgb[xx+2])>>8;
 					b2[x+1] = (76*rgb[xx+3]+150*rgb[xx+4]+29*rgb[xx+5])>>8;
 				}
-				out.send(bs,b2);
+				go.send(bs,b2);
 			}
 		} else if (cs=="rgb") {
 			for(int y=0; y<sy; y++) {
 			        bit_packing3->unpack(sx,buf+y*sx*bit_packing3->bytes,rgb);
-			 	out.send(bs,rgb);
+			 	go.send(bs,rgb);
 			}
 		} else if (cs=="rgba") {
 			for(int y=0; y<sy; y++) {
 				uint8 *buf2 = buf+y*sx*bit_packing4->bytes;
 			        bit_packing4->unpack(sx,buf2,rgb);
 			        for (int x=0; x<sx; x++) buf2[4*x+3]=255; /* i hope this is correct. not tested. */
-			 	out.send(bs,rgb);
+			 	go.send(bs,rgb);
 			}
 		} else if (cs=="yuv") {
 			for(int y=0; y<sy; y++) {
@@ -378,7 +378,7 @@
 					b2[xx+1] = RGB2U(rgb[xx+0],rgb[xx+1],rgb[xx+2]);
 					b2[xx+2] = RGB2V(rgb[xx+0],rgb[xx+1],rgb[xx+2]);
 				}
-				out.send(bs,b2);
+				go.send(bs,b2);
 			}
 		} else if (cs=="magic") RAISE("magic colorspace not supported with a RGB palette");
 	} else {

Modified: trunk/src/videodev.cxx
==============================================================================
--- trunk/src/videodev.cxx (original)
+++ trunk/src/videodev.cxx Fri Aug 13 12:10:02 2010
@@ -365,7 +365,7 @@
 	int bs = dim.prod(1); if (downscale) bs/=2;
 	uint8 b2[bs];
 	//post("frame_finished sy=%d sx=%d bs=%d, vp.palette = %d; colorspace = %s",sy,sx,bs,vp.palette,cs.data());
-	GridOutlet out(this,0,cs=="magic"?Dim(sy>>downscale,sx>>downscale,3):dim,cast);
+	GridOut go(this,0,cs=="magic"?Dim(sy>>downscale,sx>>downscale,3):dim,cast);
 	if (vp.palette==VIDEO_PALETTE_YUYV) {
 		uint8 *bufy = buf;
 		if (cs=="y") {
@@ -374,50 +374,50 @@
 				b2[xx+0]=YUV2Y(bufy[x+0],0,0);
 				b2[xx+1]=YUV2Y(bufy[x+2],0,0);
 			}
-			out.send(bs,b2);
+			go.send(bs,b2);
 		    }
 		} else if (cs=="rgb") {
 		    for(int y=0; y<sy; bufy+=2*sx, y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx*2; x+=4,xx+=6) {GETYUYV(x); YUV2RGB(b2+xx,Y1,U,V); YUV2RGB(b2+xx+3,Y2,U,V);}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="rgba") {
 		    for(int y=0; y<sy; bufy+=2*sx, y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx*2; x+=4,xx+=8) {GETYUYV(x); YUV2RGB(b2+xx,Y1,U,V); YUV2RGB(b2+xx+4,Y2,U,V);
 				b2[xx+3]=255; b2[xx+7]=255;}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="yuv") {
 		    for(int y=0; y<sy; bufy+=2*sx, y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx*2; x+=4,xx+=6) {GETYUYV(x); YUV2YUV(b2+xx,Y1,U,V); YUV2YUV(b2+xx+3,Y2,U,V);}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="magic") {
 		    int sx2 = sx/2;
 		    for(int y=0; y<sy; bufy+=2*sx, y+=2) {
  			for (int x=0,xx=0; x<sx2; x+=3,xx+=3) {b2[xx+0]=bufy[x+0]; b2[xx+1]=bufy[x+1]; b2[xx+2]=bufy[x+3];}
-			out.send(bs,b2);
+			go.send(bs,b2);
 		    }
 		}
 	} else if (vp.palette==VIDEO_PALETTE_YUV420P) {
 		uint8 *bufy = buf, *bufu = buf+sx*sy, *bufv = buf+sx*sy*5/4;
 		if (cs=="y") {
-		    out.send(sy*sx,buf);
+		    go.send(sy*sx,buf);
 		} else if (cs=="rgb") {
 		    for(int y=0; y<sy; bufy+=sx, bufu+=(sx/2)*(y&1), bufv+=(sx/2)*(y&1), y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx; x+=2,xx+=6) {GET420P(x); YUV2RGB(b2+xx,Y1,U,V); YUV2RGB(b2+xx+3,Y2,U,V);}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="rgba") {
 		    for(int y=0; y<sy; bufy+=sx, bufu+=(sx/2)*(y&1), bufv+=(sx/2)*(y&1), y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx; x+=2,xx+=8) {GET420P(x); YUV2RGB(b2+xx,Y1,U,V); YUV2RGB(b2+xx+4,Y2,U,V);
 			b2[xx+3]=255; b2[xx+7]=255;}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="yuv") {
 		    for(int y=0; y<sy; bufy+=sx, bufu+=(sx/2)*(y&1), bufv+=(sx/2)*(y&1), y++) {int Y1,Y2,U,V;
 			for (int x=0,xx=0; x<sx; x+=2,xx+=6) {GET420P(x); YUV2YUV(b2+xx,Y1,U,V); YUV2YUV(b2+xx+3,Y2,U,V);}
-			out.send(bs,b2);}
+			go.send(bs,b2);}
 		} else if (cs=="magic") {
 		    int sx2 = sx/2;
 		    for(int y=0; y<sy/2; bufy+=2*sx, bufu+=sx2, bufv+=sx2, y++) {
  			for (int x=0,xx=0; x<sx2; x++,xx+=3) {b2[xx+0]=bufy[x+x]; b2[xx+1]=bufu[x]; b2[xx+2]=bufv[x];}
-			out.send(bs,b2);
+			go.send(bs,b2);
 		    }
 		}
 	} else if (vp.palette==VIDEO_PALETTE_RGB32 || vp.palette==VIDEO_PALETTE_RGB24 || vp.palette==VIDEO_PALETTE_RGB565) {
@@ -431,19 +431,19 @@
 					b2[x+0] = (76*rgb[xx+0]+150*rgb[xx+1]+29*rgb[xx+2])>>8;
 					b2[x+1] = (76*rgb[xx+3]+150*rgb[xx+4]+29*rgb[xx+5])>>8;
 				}
-				out.send(bs,b2);
+				go.send(bs,b2);
 			}
 		} else if (cs=="rgb") {
 			for(int y=0; y<sy; y++) {
 			        bit_packing3->unpack(sx,buf+y*sx*bit_packing3->bytes,rgb);
-			 	out.send(bs,rgb);
+			 	go.send(bs,rgb);
 			}
 		} else if (cs=="rgba") {
 			for(int y=0; y<sy; y++) {
 				uint8 *buf2 = buf+y*sx*bit_packing4->bytes;
 			        bit_packing4->unpack(sx,buf2,rgb);
 			        for (int x=3; x<bs; x+=4) rgb[x]=255;
-			 	out.send(bs,rgb);
+			 	go.send(bs,rgb);
 			}
 		} else if (cs=="yuv") {
 			for(int y=0; y<sy; y++) {
@@ -453,7 +453,7 @@
 					b2[xx+1] = RGB2U(rgb[xx+0],rgb[xx+1],rgb[xx+2]);
 					b2[xx+2] = RGB2V(rgb[xx+0],rgb[xx+1],rgb[xx+2]);
 				}
-				out.send(bs,b2);
+				go.send(bs,b2);
 			}
 		} else if (cs=="magic") {
 		    for(int y=0; y<sy; y+=2) {
@@ -463,7 +463,7 @@
 				b2[x+1] = RGB2U_(rgb[xx+0],rgb[xx+1],rgb[xx+2]);
 				b2[x+2] = RGB2V_(rgb[xx+0],rgb[xx+1],rgb[xx+2]);
 			}
-			out.send(bs,b2);
+			go.send(bs,b2);
 		    }
 		}
 	} else {

Modified: trunk/src/x11.cxx
==============================================================================
--- trunk/src/x11.cxx (original)
+++ trunk/src/x11.cxx Fri Aug 13 12:10:02 2010
@@ -455,13 +455,13 @@
 
 \def 0 bang () {
 	XGetSubImage(display, window, 0, 0, dim[1], dim[0], (unsigned)-1, ZPixmap, ximage, 0, 0);
-	GridOutlet out(this,0,dim,cast);
+	GridOut go(this,0,dim,cast);
 	int sy=dim[0], sx=dim[1], bs=dim.prod(1);
 	uint8 b2[bs];
 	for(int y=0; y<sy; y++) {
 		uint8 *b1 = image + ximage->bytes_per_line * y;
 		bit_packing->unpack(sx,b1,b2);
-		out.send(bs,b2);
+		go.send(bs,b2);
 	}
 }
 



More information about the Gridflow-cvs mailing list