gegl r2363 - in trunk: . gegl gegl/operation operations/common operations/core
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2363 - in trunk: . gegl gegl/operation operations/common operations/core
- Date: Sun, 1 Jun 2008 13:28:26 +0000 (UTC)
Author: ok
Date: Sun Jun 1 13:28:26 2008
New Revision: 2363
URL: http://svn.gnome.org/viewvc/gegl?rev=2363&view=rev
Log:
* gegl/gegl-plugin.h: incremented ABI version.
* gegl/operation/gegl-operation-point-filter.[ch]: added roi as an
argument for the point filter process() function.
Modified the process() vfuncs for the following operations accordingly:
* operations/common/brightness-contrast.c:
* operations/common/color-temperature.c:
* operations/common/contrast-curve.c:
* operations/common/grey.c:
* operations/common/invert.c:
* operations/common/levels.c:
* operations/common/svg-huerotate.c:
* operations/common/svg-luminancetoalpha.c:
* operations/common/svg-matrix.c:
* operations/common/svg-saturate.c:
* operations/common/value-invert.c:
* operations/common/whitebalance.c:
* operations/core/convert-format.c:
Modified:
trunk/ChangeLog
trunk/gegl/gegl-plugin.h
trunk/gegl/operation/gegl-operation-point-filter.c
trunk/gegl/operation/gegl-operation-point-filter.h
trunk/operations/common/brightness-contrast.c
trunk/operations/common/color-temperature.c
trunk/operations/common/contrast-curve.c
trunk/operations/common/grey.c
trunk/operations/common/invert.c
trunk/operations/common/levels.c
trunk/operations/common/svg-huerotate.c
trunk/operations/common/svg-luminancetoalpha.c
trunk/operations/common/svg-matrix.c
trunk/operations/common/svg-saturate.c
trunk/operations/common/value-invert.c
trunk/operations/common/whitebalance.c
trunk/operations/core/convert-format.c
Modified: trunk/gegl/gegl-plugin.h
==============================================================================
--- trunk/gegl/gegl-plugin.h (original)
+++ trunk/gegl/gegl-plugin.h Sun Jun 1 13:28:26 2008
@@ -57,7 +57,7 @@
* should be extended so a range of abi versions are accepted.
*/
-#define GEGL_MODULE_ABI_VERSION 0x0008
+#define GEGL_MODULE_ABI_VERSION 0x0009
struct _GeglModuleInfo
{
@@ -149,6 +149,7 @@
#include <operation/gegl-operation-source.h>
#include <operation/gegl-operation-sink.h>
#include <operation/gegl-operation-meta.h>
+#include <operation/gegl-operation-temporal-filter.h>
#else
Modified: trunk/gegl/operation/gegl-operation-point-filter.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-point-filter.c (original)
+++ trunk/gegl/operation/gegl-operation-point-filter.c Sun Jun 1 13:28:26 2008
@@ -124,8 +124,10 @@
while ( (a = gegl_buffer_scan_iterator_next (&read)) &&
(b = gegl_buffer_scan_iterator_next (&write)))
{
- g_assert (read.width == write.width);
- point_filter_class->process (operation, read.data, write.data, write.width);
+ GeglRectangle roi;
+ gegl_buffer_scan_iterator_get_rectangle (&write, &roi);
+ g_assert (read.length == write.length);
+ point_filter_class->process (operation, read.data, write.data, write.length, &roi);
}
}
else if (in_format == input->format &&
@@ -135,9 +137,11 @@
while ( (a = gegl_buffer_scan_iterator_next (&read)) &&
(b = gegl_buffer_scan_iterator_next (&write)))
{
- g_assert (read.width == write.width);
- point_filter_class->process (operation, read.data, out_buf, read.width);
- babl_process (outfish, out_buf, write.data, write.width);
+ GeglRectangle roi;
+ gegl_buffer_scan_iterator_get_rectangle (&write, &roi);
+ g_assert (read.length == write.length);
+ point_filter_class->process (operation, read.data, out_buf, read.length, &roi);
+ babl_process (outfish, out_buf, write.data, write.length);
}
}
else if (in_format != input->format &&
@@ -147,25 +151,29 @@
while ( (a = gegl_buffer_scan_iterator_next (&read)) &&
(b = gegl_buffer_scan_iterator_next (&write)))
{
- if (read.width < 0)
+ GeglRectangle roi;
+ gegl_buffer_scan_iterator_get_rectangle (&write, &roi);
+ if (read.length < 0)
continue;
- g_assert (read.width == write.width);
- babl_process (infish, read.data, in_buf, read.width);
- point_filter_class->process (operation, in_buf, write.data, read.width);
+ g_assert (read.length == write.length);
+ babl_process (infish, read.data, in_buf, read.length);
+ point_filter_class->process (operation, in_buf, write.data, read.length, &roi);
}
}
else if (in_format != input->format &&
out_format != output->format)
{
+ GeglRectangle roi;
+ gegl_buffer_scan_iterator_get_rectangle (&write, &roi);
in_buf = gegl_malloc (input_bpp * read.max_size);
out_buf = gegl_malloc (output_bpp * write.max_size);
while ( (a = gegl_buffer_scan_iterator_next (&read)) &&
(b = gegl_buffer_scan_iterator_next (&write)))
{
- g_assert (read.width == write.width);
- babl_process (infish, read.data, in_buf, read.width);
- point_filter_class->process (operation, in_buf, out_buf, read.width);
- babl_process (outfish, out_buf, write.data, write.width);
+ g_assert (read.length == write.length);
+ babl_process (infish, read.data, in_buf, read.length);
+ point_filter_class->process (operation, in_buf, out_buf, read.length, &roi);
+ babl_process (outfish, out_buf, write.data, write.length);
}
}
@@ -227,7 +235,7 @@
operation,
in_buf,
out_buf,
- result->width * skip);
+ result->width * skip, &roi);
gegl_buffer_set (output, &roi, out_format, out_buf, GEGL_AUTO_ROWSTRIDE);
}
Modified: trunk/gegl/operation/gegl-operation-point-filter.h
==============================================================================
--- trunk/gegl/operation/gegl-operation-point-filter.h (original)
+++ trunk/gegl/operation/gegl-operation-point-filter.h Sun Jun 1 13:28:26 2008
@@ -41,10 +41,11 @@
{
GeglOperationFilterClass parent_class;
- gboolean (* process) (GeglOperation *self, /* for parameters */
- void *in_buf, /* input buffer */
- void *out_buf, /* output buffer */
- glong samples); /* number of samples */
+ gboolean (* process) (GeglOperation *self, /* for parameters */
+ void *in_buf, /* input buffer */
+ void *out_buf, /* output buffer */
+ glong samples, /* number of samples */
+ GeglRectangle *roi); /* can be used if position is of importance*/
};
GType gegl_operation_point_filter_get_type (void) G_GNUC_CONST;
Modified: trunk/operations/common/brightness-contrast.c
==============================================================================
--- trunk/operations/common/brightness-contrast.c (original)
+++ trunk/operations/common/brightness-contrast.c Sun Jun 1 13:28:26 2008
@@ -75,7 +75,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong n_pixels)
+ glong n_pixels,
+ GeglRectangle *roi)
{
/* Retrieve a pointer to GeglChantO structure which contains all the
* chanted properties
@@ -118,7 +119,8 @@
process_simd (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong samples)
+ glong samples,
+ GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
g4float *in = in_buf;
Modified: trunk/operations/common/color-temperature.c
==============================================================================
--- trunk/operations/common/color-temperature.c (original)
+++ trunk/operations/common/color-temperature.c Sun Jun 1 13:28:26 2008
@@ -80,7 +80,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong n_pixels)
+ glong n_pixels,
+ GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *in_pixel;
Modified: trunk/operations/common/contrast-curve.c
==============================================================================
--- trunk/operations/common/contrast-curve.c (original)
+++ trunk/operations/common/contrast-curve.c Sun Jun 1 13:28:26 2008
@@ -40,7 +40,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong samples)
+ glong samples,
+ GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gint num_sampling_points;
Modified: trunk/operations/common/grey.c
==============================================================================
--- trunk/operations/common/grey.c (original)
+++ trunk/operations/common/grey.c Sun Jun 1 13:28:26 2008
@@ -38,7 +38,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong samples)
+ glong samples,
+ GeglRectangle *roi)
{
return TRUE;
}
Modified: trunk/operations/common/invert.c
==============================================================================
--- trunk/operations/common/invert.c (original)
+++ trunk/operations/common/invert.c Sun Jun 1 13:28:26 2008
@@ -31,7 +31,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong samples)
+ glong samples,
+ GeglRectangle *roi)
{
glong i;
gfloat *in = in_buf;
@@ -59,7 +60,8 @@
process_simd (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong samples)
+ glong samples,
+ GeglRectangle *roi)
{
g4float *in = in_buf;
g4float *out = out_buf;
Modified: trunk/operations/common/levels.c
==============================================================================
--- trunk/operations/common/levels.c (original)
+++ trunk/operations/common/levels.c Sun Jun 1 13:28:26 2008
@@ -41,7 +41,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong n_pixels)
+ glong n_pixels,
+ GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *pixel;
Modified: trunk/operations/common/svg-huerotate.c
==============================================================================
--- trunk/operations/common/svg-huerotate.c (original)
+++ trunk/operations/common/svg-huerotate.c Sun Jun 1 13:28:26 2008
@@ -46,7 +46,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong n_pixels)
+ glong n_pixels,
+ GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *in = in_buf;
Modified: trunk/operations/common/svg-luminancetoalpha.c
==============================================================================
--- trunk/operations/common/svg-luminancetoalpha.c (original)
+++ trunk/operations/common/svg-luminancetoalpha.c Sun Jun 1 13:28:26 2008
@@ -45,7 +45,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong n_pixels)
+ glong n_pixels,
+ GeglRectangle *roi)
{
gfloat *in = in_buf;
gfloat *out = out_buf;
Modified: trunk/operations/common/svg-matrix.c
==============================================================================
--- trunk/operations/common/svg-matrix.c (original)
+++ trunk/operations/common/svg-matrix.c Sun Jun 1 13:28:26 2008
@@ -45,7 +45,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong n_pixels)
+ glong n_pixels,
+ GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *in = in_buf;
Modified: trunk/operations/common/svg-saturate.c
==============================================================================
--- trunk/operations/common/svg-saturate.c (original)
+++ trunk/operations/common/svg-saturate.c Sun Jun 1 13:28:26 2008
@@ -46,7 +46,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong n_pixels)
+ glong n_pixels,
+ GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *in = in_buf;
Modified: trunk/operations/common/value-invert.c
==============================================================================
--- trunk/operations/common/value-invert.c (original)
+++ trunk/operations/common/value-invert.c Sun Jun 1 13:28:26 2008
@@ -45,7 +45,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong samples)
+ glong samples,
+ GeglRectangle *roi)
{
glong j;
gfloat *src = in_buf;
Modified: trunk/operations/common/whitebalance.c
==============================================================================
--- trunk/operations/common/whitebalance.c (original)
+++ trunk/operations/common/whitebalance.c Sun Jun 1 13:28:26 2008
@@ -45,7 +45,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong n_pixels)
+ glong n_pixels,
+ GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *in_pixel;
Modified: trunk/operations/core/convert-format.c
==============================================================================
--- trunk/operations/core/convert-format.c (original)
+++ trunk/operations/core/convert-format.c Sun Jun 1 13:28:26 2008
@@ -48,7 +48,8 @@
process (GeglOperation *op,
void *in_buf,
void *out_buf,
- glong samples)
+ glong samples,
+ GeglRectangle *roi)
{
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]