gegl r2286 - in branches/branch_zhangjb: . operations/frequency tests/frequency
- From: zhangjb svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2286 - in branches/branch_zhangjb: . operations/frequency tests/frequency
- Date: Tue, 13 May 2008 16:01:41 +0100 (BST)
Author: zhangjb
Date: Tue May 13 15:01:41 2008
New Revision: 2286
URL: http://svn.gnome.org/viewvc/gegl?rev=2286&view=rev
Log:
Added a test case into gegl from an independent project.
* Makefile.am: added path tests/frequency.
* tests/frequency/hello-world-fourier.c: a test case.
* tests/frequency/makefile: makefile for hello-world-fourier.
Added:
branches/branch_zhangjb/tests/frequency/ (props changed)
branches/branch_zhangjb/tests/frequency/hello-world-fourier.c (contents, props changed)
branches/branch_zhangjb/tests/frequency/makefile
Modified:
branches/branch_zhangjb/ (props changed)
branches/branch_zhangjb/ChangeLog
branches/branch_zhangjb/Makefile.am
branches/branch_zhangjb/operations/frequency/ (props changed)
branches/branch_zhangjb/operations/frequency/dft.c
Modified: branches/branch_zhangjb/Makefile.am
==============================================================================
--- branches/branch_zhangjb/Makefile.am (original)
+++ branches/branch_zhangjb/Makefile.am Tue May 13 15:01:41 2008
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = dist-bzip2
-SUBDIRS= gegl operations bin tools
+SUBDIRS= gegl operations bin tools tests/frequency
if ENABLE_DOCS
SUBDIRS+= docs
endif
Modified: branches/branch_zhangjb/operations/frequency/dft.c
==============================================================================
--- branches/branch_zhangjb/operations/frequency/dft.c (original)
+++ branches/branch_zhangjb/operations/frequency/dft.c Tue May 13 15:01:41 2008
@@ -81,8 +81,7 @@
fft_out[fft_complex_get_half_id(i, i, width, height)][0]/33614026;
}
}
- gegl_buffer_set(output, NULL, babl_format("Y float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set(output, NULL, babl_format("Y float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
fftw_destroy_plan(fftplan);
fftw_free(fft_out);
Added: branches/branch_zhangjb/tests/frequency/hello-world-fourier.c
==============================================================================
--- (empty file)
+++ branches/branch_zhangjb/tests/frequency/hello-world-fourier.c Tue May 13 15:01:41 2008
@@ -0,0 +1,42 @@
+#include <gegl.h>
+
+gint main(gint argc, gchar **argv)
+{
+ gegl_init(&argc, &argv);
+
+ {
+ GeglNode *gegl = gegl_node_new();
+ gint frame;
+
+ GeglNode *display = gegl_node_create_child(gegl, "display");
+ GeglNode *image = gegl_node_new_child(
+ gegl,
+ "operation",
+ "load",
+ "path",
+ "/home/bear/GSoC2008/workspace/images/lena.png",
+ NULL);
+ GeglNode *proc = gegl_node_new_child(gegl, "operation", "dft", NULL);
+ GeglNode *grey = gegl_node_new_child(gegl, "operation", "grey", NULL);
+ GeglNode *save = gegl_node_new_child(
+ gegl,
+ "operation",
+ "png-save",
+ "path",
+ "/home/bear/GSoC2008/workspace/images/forSave/test.png",
+ NULL);
+
+ gegl_node_link_many(image, proc, save, NULL);
+ // gegl_node_link_many(image, grey, display, NULL);
+
+ // gegl_node_process(save);
+ for (frame=0; frame<50; frame++) {
+ gegl_node_process(display);
+ }
+
+ g_object_unref(gegl);
+ }
+
+ gegl_exit();
+ return 0;
+}
Added: branches/branch_zhangjb/tests/frequency/makefile
==============================================================================
--- (empty file)
+++ branches/branch_zhangjb/tests/frequency/makefile Tue May 13 15:01:41 2008
@@ -0,0 +1,7 @@
+all: gegl_test
+
+clean:
+ rm gegl_test
+
+gegl_test: hello-world-fourier.c
+ gcc -g -o gegl_test `pkg-config --libs --cflags gegl` hello-world-fourier.c
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]