gegl r2392 - in branches/branch_zhangjb: . operations/frequency
- From: zhangjb svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2392 - in branches/branch_zhangjb: . operations/frequency
- Date: Fri, 6 Jun 2008 09:06:40 +0000 (UTC)
Author: zhangjb
Date: Fri Jun 6 09:06:39 2008
New Revision: 2392
URL: http://svn.gnome.org/viewvc/gegl?rev=2392&view=rev
Log:
fixed a bug.
* operations/frequency/dft-grey.c:
* operations/frequency/dft-inverse-grey.c:
* operations/frequency/dft-inverse.c:
* operations/frequency/dft.c:
* operations/frequency/preview-frequency-grey.c:
* operations/frequency/preview-frequency.c:
Modified:
branches/branch_zhangjb/ChangeLog
branches/branch_zhangjb/operations/frequency/dft-grey.c
branches/branch_zhangjb/operations/frequency/dft-inverse-grey.c
branches/branch_zhangjb/operations/frequency/dft-inverse.c
branches/branch_zhangjb/operations/frequency/dft.c
branches/branch_zhangjb/operations/frequency/preview-frequency-grey.c
branches/branch_zhangjb/operations/frequency/preview-frequency.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 Jun 6 09:06:39 2008
@@ -35,7 +35,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width += 2;
+ result.width = 2*((result.width/2)+1);
return result;
}
@@ -56,7 +56,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width += 2;
+ result.width = 2*((result.width/2)+1);
return result;
}
Modified: branches/branch_zhangjb/operations/frequency/dft-inverse-grey.c
==============================================================================
--- branches/branch_zhangjb/operations/frequency/dft-inverse-grey.c (original)
+++ branches/branch_zhangjb/operations/frequency/dft-inverse-grey.c Fri Jun 6 09:06:39 2008
@@ -35,7 +35,8 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width -= 2;
+ result.width = 2*((result.width/2)-1)
+;
return result;
}
@@ -46,7 +47,8 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width -= 2;
+ result.width = 2*((result.width/2)-1)
+;
return result;
}
@@ -81,7 +83,7 @@
GeglBuffer *output,
const GeglRectangle *result)
{
- gint width = gegl_buffer_get_width(input)-2;
+ gint width = 2*(gegl_buffer_get_width(input)/2-1);
gint height = gegl_buffer_get_height(input);
gdouble *src_buf;
gdouble *dst_buf;
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 Fri Jun 6 09:06:39 2008
@@ -36,7 +36,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width -= 2;
+ result.width = 2*((result.width/2)-1);
return result;
}
@@ -47,7 +47,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width -= 2;
+ result.width = 2*((result.width/2)-1);
return result;
}
@@ -75,7 +75,7 @@
GeglBuffer *output,
const GeglRectangle *result)
{
- gint width = gegl_buffer_get_width(input)-2; /* width always refers to the image's (not buffer's) width. */
+ gint width = 2*(gegl_buffer_get_width(input)/2-1); /* width always refers to the image's (not buffer's) width. */
gint height = gegl_buffer_get_height(input);
gdouble *src_buf;
gdouble *dst_buf;
Modified: branches/branch_zhangjb/operations/frequency/dft.c
==============================================================================
--- branches/branch_zhangjb/operations/frequency/dft.c (original)
+++ branches/branch_zhangjb/operations/frequency/dft.c Fri Jun 6 09:06:39 2008
@@ -36,7 +36,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width += 2;
+ result.width = 2*((result.width/2)+1);
return result;
}
@@ -57,7 +57,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width += 2;
+ result.width += 2*((result.width/2)+1);
return result;
}
@@ -94,7 +94,7 @@
{
get_component(src_buf, tmp_src_buf, i, width*height);
dft(tmp_src_buf, (fftw_complex *)tmp_dst_buf, width, height);
- set_component(tmp_dst_buf, dst_buf, i, (width+2)*height);
+ set_component(tmp_dst_buf, dst_buf, i, (2*((width/2)+1))*height);
}
gegl_buffer_set(output, NULL, babl_format ("RGBA double"), dst_buf, GEGL_AUTO_ROWSTRIDE);
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 Jun 6 09:06:39 2008
@@ -35,7 +35,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width -= 2;
+ result.width = 2*((result.width/2)-1);
return result;
}
@@ -46,7 +46,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width -= 2;
+ result.width = 2*((result.width/2)-1);
return result;
}
@@ -81,7 +81,7 @@
GeglBuffer *output,
const GeglRectangle *result)
{
- gint width = gegl_buffer_get_width(input)-2;
+ gint width = 2*(gegl_buffer_get_width(input)/2-1);
gint height = gegl_buffer_get_height(input);
gdouble *src_buf;
gdouble *dst_buf;
Modified: branches/branch_zhangjb/operations/frequency/preview-frequency.c
==============================================================================
--- branches/branch_zhangjb/operations/frequency/preview-frequency.c (original)
+++ branches/branch_zhangjb/operations/frequency/preview-frequency.c Fri Jun 6 09:06:39 2008
@@ -36,7 +36,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width -= 2;
+ result.width = 2*((result.width/2)-1);
return result;
}
@@ -47,7 +47,7 @@
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation, "input");
GeglRectangle result = *in_rect;
- result.width -= 2;
+ result.width = 2*((result.width/2)-1);
return result;
}
@@ -75,7 +75,7 @@
GeglBuffer *output,
const GeglRectangle *result)
{
- gint width = gegl_buffer_get_width(input)-2;
+ gint width = 2*(gegl_buffer_get_width(input)/2-1);
gint height = gegl_buffer_get_height(input);
gdouble *src_buf;
gdouble *dst_buf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]