[Gridflow-cvs] [svn] commit: r3309 - in /trunk/format: jpeg.c mpeg3.c netpbm.c png.c quicktimehw.c videodev.c x11.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Mar 27 13:42:33 EDT 2008


Author: matju
Date: Thu Mar 27 13:42:33 2008
New Revision: 3309

Log:
changing @cast to C++

Modified:
    trunk/format/jpeg.c
    trunk/format/mpeg3.c
    trunk/format/netpbm.c
    trunk/format/png.c
    trunk/format/quicktimehw.c
    trunk/format/videodev.c
    trunk/format/x11.c

Modified: trunk/format/jpeg.c
==============================================================================
--- trunk/format/jpeg.c (original)
+++ trunk/format/jpeg.c Thu Mar 27 13:42:33 2008
@@ -92,8 +92,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,new Dim(sy, sx, chans),
-		NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
+	GridOutlet out(this,0,new Dim(sy,sx,chans),cast);
 	jpeg_start_decompress(&djpeg);
 	uint8 row[sx*chans];
 	uint8 *rows[1] = { row };

Modified: trunk/format/mpeg3.c
==============================================================================
--- trunk/format/mpeg3.c (original)
+++ trunk/format/mpeg3.c Thu Mar 27 13:42:33 2008
@@ -53,8 +53,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,new Dim(sy, sx, channels),
-		NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
+	GridOutlet out(this,0,new Dim(sy,sx,channels),cast);
 	int bs = out.dim->prod(1);
 	for(int y=0; y<sy; y++) {
 		uint8 *row = buf+channels*sx*y;

Modified: trunk/format/netpbm.c
==============================================================================
--- trunk/format/netpbm.c (original)
+++ trunk/format/netpbm.c Thu Mar 27 13:42:33 2008
@@ -45,8 +45,7 @@
 	//inpam.allocation_depth = 3;
 	pnm_readpaminit(f, &inpam, /*PAM_STRUCT_SIZE(tuple_type)*/ sizeof(struct pam));
 	tuple *tuplerow = pnm_allocpamrow(&inpam);
-	GridOutlet out(this,0,new Dim(inpam.height, inpam.width, inpam.depth),
-		NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
+	GridOutlet out(this,0,new Dim(inpam.height,inpam.width,inpam.depth),cast);
 	uint8 buf[inpam.width*3];
 	for (int i=0; i<inpam.height; i++) {
 		pnm_readpamrow(&inpam, tuplerow);

Modified: trunk/format/png.c
==============================================================================
--- trunk/format/png.c (original)
+++ trunk/format/png.c Thu Mar 27 13:42:33 2008
@@ -100,7 +100,7 @@
 	delete[] row_pointers;
 	row_pointers = 0;
 	png_read_end(png, 0);
-	GridOutlet out(this,0,new Dim(height, width, channels), NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
+	GridOutlet out(this,0,new Dim(height, width, channels), cast);
 	out.send(rowbytes*height,image_data);
 	delete[] image_data;
 	png_destroy_read_struct(&png, &info, NULL);

Modified: trunk/format/quicktimehw.c
==============================================================================
--- trunk/format/quicktimehw.c (original)
+++ trunk/format/quicktimehw.c Thu Mar 27 13:42:33 2008
@@ -82,8 +82,7 @@
 	uint8 *buf = new uint8[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,new Dim(sy, sx, channels),
-	NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
+	GridOutlet out(this,0,new Dim(sy,sx,channels),cast);
 	out.give(sy*sx*channels,buf);
 	started=true;
 //	return INT2NUM(nframe);

Modified: trunk/format/videodev.c
==============================================================================
--- trunk/format/videodev.c (original)
+++ trunk/format/videodev.c Thu Mar 27 13:42:33 2008
@@ -348,8 +348,7 @@
 	//post("sy=%d sx=%d bs=%d",sy,sx,bs);
 	//post("frame_finished, vp.palette = %d; colorspace = %s",vp.palette,rb_sym_name(colorspace));
 	if (vp.palette==VIDEO_PALETTE_YUV420P) {
-		GridOutlet out(this,0,colorspace==SYM(magic)?new Dim(sy,sx,3):dim,
-			NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
+		GridOutlet out(this,0,colorspace==SYM(magic)?new Dim(sy,sx,3):dim,cast);
 		if (colorspace==SYM(y)) {
 			out.send(sy*sx,buf);
 		} else if (colorspace==SYM(rgb)) {
@@ -404,7 +403,7 @@
 			}
 		}
 	} else if (vp.palette==VIDEO_PALETTE_RGB32 || vp.palette==VIDEO_PALETTE_RGB24 || vp.palette==VIDEO_PALETTE_RGB565) {
-		GridOutlet out(this,0,dim,NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
+		GridOutlet out(this,0,dim,cast);
 		uint8 rgb[sx*3];
 		uint8 b2[sx*3];
 		if (colorspace==SYM(y)) {

Modified: trunk/format/x11.c
==============================================================================
--- trunk/format/x11.c (original)
+++ trunk/format/x11.c Thu Mar 27 13:42:33 2008
@@ -222,9 +222,8 @@
 }
 
 \def 0 bang () {
-	XGetSubImage(display, window, 0, 0, dim->get(1), dim->get(0),
-		(unsigned)-1, ZPixmap, ximage, 0, 0);
-	GridOutlet out(this,0,dim,NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
+	XGetSubImage(display, window, 0, 0, dim->get(1), dim->get(0), (unsigned)-1, ZPixmap, ximage, 0, 0);
+	GridOutlet out(this,0,dim,cast);
 	int sy=dim->get(0), sx=dim->get(1), bs=dim->prod(1);
 	uint8 b2[bs];
 	for(int y=0; y<sy; y++) {



More information about the Gridflow-cvs mailing list