[xiph-commits] r12051 - trunk/sushivision

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Nov 6 21:37:03 PST 2006


Author: xiphmont
Date: 2006-11-06 21:37:02 -0800 (Mon, 06 Nov 2006)
New Revision: 12051

Modified:
   trunk/sushivision/example_fractal.c
   trunk/sushivision/panel-2d.c
Log:
Correct another pair of 'Y is opposite polarity of X native' bugs in computation/display.

Y should behave/align properly now.



Modified: trunk/sushivision/example_fractal.c
===================================================================
--- trunk/sushivision/example_fractal.c	2006-11-07 03:44:46 UTC (rev 12050)
+++ trunk/sushivision/example_fractal.c	2006-11-07 05:37:02 UTC (rev 12051)
@@ -19,6 +19,7 @@
  * 
  */
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <math.h>
 #include "sushivision.h"
@@ -39,7 +40,7 @@
     if (z*z + zi*zi > 4.0) return (double)i/MAX_ITER;
   }
 
-  return 0.0;
+  return NAN;
 }
 
 int sushiv_submain(int argc, char *argv[]){

Modified: trunk/sushivision/panel-2d.c
===================================================================
--- trunk/sushivision/panel-2d.c	2006-11-07 03:44:46 UTC (rev 12050)
+++ trunk/sushivision/panel-2d.c	2006-11-07 05:37:02 UTC (rev 12051)
@@ -355,10 +355,10 @@
 
   double old_h = old.pixels;
   double new_h = new.pixels;
-  double old_lo = scalespace_value(&old,0);
-  double old_hi = scalespace_value(&old,old_h);
-  double new_lo = scalespace_value(&new,0);
-  double new_hi = scalespace_value(&new,new_h);
+  double old_lo = scalespace_value(&old,old_h);
+  double old_hi = scalespace_value(&old,0);
+  double new_lo = scalespace_value(&new,new_h);
+  double new_hi = scalespace_value(&new,0);
   double newscale = (new_hi-new_lo)/new_h;
   double oldscale = old_h/(old_hi-old_lo);
   
@@ -721,8 +721,8 @@
   for(i=0;i<d;i++){
     sushiv_dimension_t *dim = p->dimension_list[i];
     if(dim == p2->y_d){
-      y_min = scalespace_value(&sy,0);
-      y_max = scalespace_value(&sy,h);
+      y_min = scalespace_value(&sy,h);
+      y_max = scalespace_value(&sy,0);
       y_d = dim->number;
       break;
     }



More information about the commits mailing list