gegl r2498 - in branches/branch_zhangjb: . operations/frequency
- From: zhangjb svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2498 - in branches/branch_zhangjb: . operations/frequency
- Date: Mon, 23 Jun 2008 20:01:12 +0000 (UTC)
Author: zhangjb
Date: Mon Jun 23 20:01:12 2008
New Revision: 2498
URL: http://svn.gnome.org/viewvc/gegl?rev=2498&view=rev
Log:
* operations/frequency/dft-inverse.c: fixed a bug that used POINT_FILTER
by mistake.
* operations/frequency/dft.c: fixed the same bug.
Modified:
branches/branch_zhangjb/ChangeLog
branches/branch_zhangjb/operations/frequency/dft-inverse.c
branches/branch_zhangjb/operations/frequency/dft.c
Modified: branches/branch_zhangjb/operations/frequency/dft-inverse.c
==============================================================================
--- branches/branch_zhangjb/operations/frequency/dft-inverse.c (original)
+++ branches/branch_zhangjb/operations/frequency/dft-inverse.c Mon Jun 23 20:01:12 2008
@@ -22,7 +22,7 @@
#else
-#define GEGL_CHANT_TYPE_POINT_FILTER
+#define GEGL_CHANT_TYPE_FILTER
#define GEGL_CHANT_C_FILE "dft-inverse.c"
#include "gegl-chant.h"
@@ -44,11 +44,7 @@
get_cached_region(GeglOperation *operation,
const GeglRectangle *roi)
{
- GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
- GeglRectangle result = *in_rect;
-
- result.width = 2*(result.width-1);
- return result;
+ return get_bounding_box(operation);
}
static GeglRectangle
@@ -64,7 +60,8 @@
static void
prepare(GeglOperation *operation)
{
- gegl_operation_set_format(operation, "input", babl_format("frequency double"));
+ gegl_operation_set_format(operation, "input",
+ babl_format("frequency double"));
gegl_operation_set_format(operation, "output", babl_format("RGBA double"));
}
Modified: branches/branch_zhangjb/operations/frequency/dft.c
==============================================================================
--- branches/branch_zhangjb/operations/frequency/dft.c (original)
+++ branches/branch_zhangjb/operations/frequency/dft.c Mon Jun 23 20:01:12 2008
@@ -22,7 +22,7 @@
#else
-#define GEGL_CHANT_TYPE_POINT_FILTER
+#define GEGL_CHANT_TYPE_FILTER
#define GEGL_CHANT_C_FILE "dft.c"
#include "gegl-chant.h"
@@ -55,18 +55,15 @@
get_cached_region(GeglOperation *operation,
const GeglRectangle *roi)
{
- GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
- GeglRectangle result = *in_rect;
-
- result.width = FFT_HALF(result.width);
- return result;
+ return get_bounding_box(operation);
}
static void
prepare(GeglOperation *operation)
{
gegl_operation_set_format(operation, "input", babl_format ("RGBA double"));
- gegl_operation_set_format(operation, "output", babl_format ("frequency double"));
+ gegl_operation_set_format(operation, "output",
+ babl_format ("frequency double"));
}
static gboolean
@@ -88,7 +85,8 @@
dst_buf = g_new0(gdouble, 8*width*FFT_HALF(width));
tmp_dst_buf = g_new0(gdouble, width*FFT_HALF(width));
- gegl_buffer_get(input, 1.0, NULL, babl_format ("RGBA double"), src_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_get(input, 1.0, NULL, babl_format ("RGBA double"), src_buf,
+ GEGL_AUTO_ROWSTRIDE);
for (i=0; i<4; i++)
{
@@ -97,7 +95,8 @@
set_freq_component(tmp_dst_buf, dst_buf, i, FFT_HALF(width)*height);
}
- gegl_buffer_set(output, NULL, babl_format ("frequency double"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set(output, NULL, babl_format ("frequency double"), dst_buf,
+ GEGL_AUTO_ROWSTRIDE);
g_free(src_buf);
g_free(dst_buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]