[xiph-commits] r12050 - trunk/sushivision

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Nov 6 19:44:48 PST 2006


Author: xiphmont
Date: 2006-11-06 19:44:46 -0800 (Mon, 06 Nov 2006)
New Revision: 12050

Modified:
   trunk/sushivision/Makefile
   trunk/sushivision/example_fractal.c
   trunk/sushivision/panel-2d.c
Log:
Correct segfault bug in y scaling (work vector must be height size, not width)
Add Rillian's fractal submain example to Makefile (example_fractal)



Modified: trunk/sushivision/Makefile
===================================================================
--- trunk/sushivision/Makefile	2006-11-07 00:11:26 UTC (rev 12049)
+++ trunk/sushivision/Makefile	2006-11-07 03:44:46 UTC (rev 12050)
@@ -2,7 +2,7 @@
 # Fuck the horse it rode in on
 # and Fuck its little dog Libtool too
 
-TARGET  = sushivision
+TARGET  = sushivision.so.0.0.0
 CC      = gcc 
 LD      = gcc
 INSTALL = install
@@ -11,11 +11,14 @@
 BINDIR  = $(PREFIX)/bin
 ETCDIR  = /etc/$(TARGET)
 MANDIR  = $(PREFIX)/man
+SOFLAGS = -shared -nostdlib -fPIC
 
-SRC  = main.c scale.c plot.c slider.c slice.c panel.c panel-2d.c mapping.c dimension.c objective.c example_submain.c
-OBJ  = main.o scale.o plot.o slider.o slice.o panel.o panel-2d.o mapping.o dimension.o objective.o example_submain.o
+SRC  = main.c scale.c plot.c slider.c slice.c panel.c panel-2d.c mapping.c dimension.c objective.c example_submain.c example_fractal.c
+OBJ  = main.o scale.o plot.o slider.o slice.o panel.o panel-2d.o mapping.o dimension.o objective.o 
+OBJ_EX1  = main.o scale.o plot.o slider.o slice.o panel.o panel-2d.o mapping.o dimension.o objective.o example_submain.o
+OBJ_EX2  = main.o scale.o plot.o slider.o slice.o panel.o panel-2d.o mapping.o dimension.o objective.o example_fractal.o
 INC  = sushivision.h
-LIBS = -lpthread
+LIBS = -lpthread -ldl
 CAIROVER =  >= 1.0.0
 GTKVER   =  >= 2.8.0
 GCF  = `pkg-config --static --cflags "gtk+-2.0 $(GTKVER) cairo $(CAIROVER) freetype2 gthread-2.0"`
@@ -24,15 +27,16 @@
 all:    
 	pkg-config --cflags "gtk+-2.0 $(GTKVER) cairo $(CAIROVER) freetype2" 1>/dev/null
 	$(MAKE) target CFLAGS='-O2 $(GCF) $(ADD_DEF)'
-	$(STRIP) $(TARGET)
+	$(MAKE) examples CFLAGS='-O2 $(GCF) $(ADD_DEF)'
 
 debug:
 	pkg-config --cflags "gtk+-2.0 $(GTKVER) cairo $(CAIROVER) freetype2" 1>/dev/null
 	$(MAKE) target CFLAGS='-g -Wall -W -Wno-unused-parameter -D__NO_MATH_INLINES $(GCF) $(ADD_DEF)'
+	$(MAKE) examples CFLAGS='-g -Wall -W -Wno-unused-parameter -D__NO_MATH_INLINES $(GCF) $(ADD_DEF)'
 
 profile:
 	pkg-config --cflags "gtk+-2.0 $(GTKVER) cairo $(CAIROVER) freetype2" 1>/dev/null
-	$(MAKE) target CFLAGS='-pg -g -O2 $(GCF) $(ADD_DEF)' LIBS='-lgprof-helper'
+	$(MAKE) examples CFLAGS='-pg -g -O2 $(GCF) $(ADD_DEF)' LIBS='-lgprof-helper'
 
 clean:
 	rm -f $(OBJ) *.d *.d.* gmon.out $(TARGET)
@@ -52,8 +56,12 @@
 endif
 
 target:  $(OBJ) 
-	$(LD) $(OBJ) $(CFLAGS) -o $(TARGET) $(LIBS) $(LDF)
+	$(LD) $(OBJ) $(CFLAGS) $(SOFLAGS) -o $(TARGET) $(LIBS) $(LDF)
 
+examples:  $(OBJ_EX1) $(OBJ_EX2) 
+	$(LD) $(OBJ_EX1) $(CFLAGS) -o sushivision_example $(LIBS) $(LDF)
+	$(LD) $(OBJ_EX2) $(CFLAGS) -o sushivision_fractal $(LIBS) $(LDF)
+
 install: target
 	$(INSTALL) -d -m 0755 $(BINDIR)
 	$(INSTALL) -m 0755 $(TARGET) $(BINDIR)

Modified: trunk/sushivision/example_fractal.c
===================================================================
--- trunk/sushivision/example_fractal.c	2006-11-07 00:11:26 UTC (rev 12049)
+++ trunk/sushivision/example_fractal.c	2006-11-07 03:44:46 UTC (rev 12050)
@@ -66,8 +66,8 @@
   
   sushiv_new_objective(s,0,"fractal",fractal_objective,0);
 
-  sushiv_new_panel_2d(s,0,"Mandel/Julia Fractal",2,
-		      (double []){0,1.0},
+  sushiv_new_panel_2d(s,0,"Mandel/Julia Fractal",4,
+		      (double []){0, .01, .1, 1.0},
 		      (int []){0,-1},
 		      (int []){0,1,2,3,-1},
 		      0);

Modified: trunk/sushivision/panel-2d.c
===================================================================
--- trunk/sushivision/panel-2d.c	2006-11-07 00:11:26 UTC (rev 12049)
+++ trunk/sushivision/panel-2d.c	2006-11-07 03:44:46 UTC (rev 12050)
@@ -349,9 +349,9 @@
 			 scalespace new,
 			 scalespace old){
   int x,y;
-  double work[w];
-  int mapbase[w];
-  double mapdel[w];
+  double work[h];
+  int mapbase[h];
+  double mapdel[h];
 
   double old_h = old.pixels;
   double new_h = new.pixels;



More information about the commits mailing list