gegl r2344 - in branches/branch_zhangjb: . operations/frequency



Author: zhangjb
Date: Fri May 23 14:56:55 2008
New Revision: 2344
URL: http://svn.gnome.org/viewvc/gegl?rev=2344&view=rev

Log:
* operations/frequency/dft-grey.c: added some test code.
* operations/frequency/preview-frequency-grey.c: disabled some test code.


Modified:
   branches/branch_zhangjb/ChangeLog
   branches/branch_zhangjb/operations/frequency/dft-grey.c
   branches/branch_zhangjb/operations/frequency/preview-frequency-grey.c

Modified: branches/branch_zhangjb/operations/frequency/dft-grey.c
==============================================================================
--- branches/branch_zhangjb/operations/frequency/dft-grey.c	(original)
+++ branches/branch_zhangjb/operations/frequency/dft-grey.c	Fri May 23 14:56:55 2008
@@ -91,6 +91,10 @@
   gdouble *src_buf;
   gdouble *dst_buf;
   GeglRectangle extent = get_bounding_box(operation);
+  
+#if 0
+  printf("extent: x = %d, width = %d\n", extent.x, extent.width);
+#endif
 
   src_buf = g_new0(gdouble, width*height);
   gegl_buffer_get(input, 1.0, 
@@ -141,24 +145,21 @@
     }
 #endif
 
-#if 0 
-  printf("extent: x = %d, width = %d\n", extent.x, extent.width);
-#endif
-  
+  //gegl_buffer_set_extent(output, &extent);
   gegl_buffer_set(output, 
                   &extent, babl_format_new(babl_model("Y"),
                                         babl_type("double"),
                                         babl_component("Y"),
-                                        NULL), (gdouble *)dst_buf, GEGL_AUTO_ROWSTRIDE);
+                                        NULL), dst_buf, GEGL_AUTO_ROWSTRIDE);
 
   
-#if 0  
-  gegl_buffer_get(input, 1.0, 
-                    NULL, babl_format_new(babl_model("Y"),
+#if 1  
+  gegl_buffer_get(output, 1.0, 
+                  &extent, babl_format_new(babl_model("Y"),
                                           babl_type("double"),
                                           babl_component("Y"),
-                                          NULL), src_buf, GEGL_AUTO_ROWSTRIDE);
-  printf("output: width = %d, height = %d\n", 2*FFT_HALF(width), height);
+                                          NULL), dst_buf, GEGL_AUTO_ROWSTRIDE);
+  printf("output: width = %d, height = %d\n", gegl_buffer_get_width(output), gegl_buffer_get_height(output));
   for (y=0; y<height; y++)
     {
       for (x=0; x<2*FFT_HALF(width); x++)

Modified: branches/branch_zhangjb/operations/frequency/preview-frequency-grey.c
==============================================================================
--- branches/branch_zhangjb/operations/frequency/preview-frequency-grey.c	(original)
+++ branches/branch_zhangjb/operations/frequency/preview-frequency-grey.c	Fri May 23 14:56:55 2008
@@ -69,7 +69,7 @@
                                         babl_component("Y"),
                                         NULL), src_buf, GEGL_AUTO_ROWSTRIDE);
   
-#if 1
+#if 0
   int x, y;
   printf("input: width = %d, height = %d\n", width, height);
   for (y=0; y<height; y++)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]