[xiph-commits] r12392 - trunk/sushivision
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Mon Jan 29 14:26:32 PST 2007
Author: xiphmont
Date: 2007-01-29 14:26:31 -0800 (Mon, 29 Jan 2007)
New Revision: 12392
Modified:
trunk/sushivision/example_fractal.c
trunk/sushivision/panel-2d.c
Log:
Fast scaling change made to slightly improve discontinuous case was worse for continuous; revert it
Revert fractal example to normal demo
Modified: trunk/sushivision/example_fractal.c
===================================================================
--- trunk/sushivision/example_fractal.c 2007-01-29 22:19:10 UTC (rev 12391)
+++ trunk/sushivision/example_fractal.c 2007-01-29 22:26:31 UTC (rev 12392)
@@ -54,20 +54,13 @@
s=sushiv_new_instance();
- sushiv_new_dimension_discrete(s,0,"Re(c)",
- 5,(double []){-2.25,-0.75,0,0.25,0.75},
- NULL,1,1000,0);
- sushiv_new_dimension_discrete(s,1,"Im(c)",
- 5,(double []){-2,-1,0,1,2},
- NULL,1,1000,0);
+ sushiv_new_dimension(s,0,"Re(c)",
+ 5,(double []){-2.25,-0.75,0,0.25,0.75},
+ NULL,0);
+ sushiv_new_dimension(s,1,"Im(c)",
+ 5,(double []){-2,-1,0,1,2},
+ NULL,0);
- //sushiv_new_dimension(s,0,"Re(c)",
- // 5,(double []){-2.25,-0.75,0,0.25,0.75},
- // NULL,0);
- //sushiv_new_dimension(s,1,"Im(c)",
- // 5,(double []){-2,-1,0,1,2},
- // NULL,0);
-
sushiv_new_dimension(s,2,"Re(z0)",
5,(double []){-2.25,-1,0,1,2.25},
NULL,0);
Modified: trunk/sushivision/panel-2d.c
===================================================================
--- trunk/sushivision/panel-2d.c 2007-01-29 22:19:10 UTC (rev 12391)
+++ trunk/sushivision/panel-2d.c 2007-01-29 22:26:31 UTC (rev 12392)
@@ -837,8 +837,8 @@
double newscale = (new_hi-new_lo)/new_w;
double oldscale = old_w/(old_hi-old_lo);
for(x=0;x<w;x++){
- double xval = (x+.5)*newscale+new_lo;
- double map = ((xval-old_lo)*oldscale)-.5;
+ double xval = (x)*newscale+new_lo;
+ double map = ((xval-old_lo)*oldscale);
mapbase[x]=(int)floor(map);
mapdel[x]=map-floor(map);
}
@@ -881,8 +881,8 @@
double oldscale = old_h/(old_hi-old_lo);
for(y=0;y<h;y++){
- double yval = (y+.5)*newscale+new_lo;
- double map = ((yval-old_lo)*oldscale)-.5;
+ double yval = (y)*newscale+new_lo;
+ double map = ((yval-old_lo)*oldscale);
mapbase[y]=(int)floor(map);
mapdel[y]=map-floor(map);
}
More information about the commits
mailing list