gegl r2397 - in trunk: . gegl/operation operations/common
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2397 - in trunk: . gegl/operation operations/common
- Date: Mon, 9 Jun 2008 10:40:57 +0000 (UTC)
Author: neo
Date: Mon Jun 9 10:40:57 2008
New Revision: 2397
URL: http://svn.gnome.org/viewvc/gegl?rev=2397&view=rev
Log:
2008-06-09 Sven Neumann <sven gimp org>
* gegl/operation/gegl-operation-point-render.h: added 'const' to
the GeglRectangle* roi argument in process().
* operations/common/brightness-contrast.c
* operations/common/checkerboard.c
* operations/common/color-temperature.c
* operations/common/color.c
* operations/common/contrast-curve.c
* operations/common/grey.c
* operations/common/invert.c
* operations/common/levels.c
* operations/common/noise.c
* operations/common/svg-huerotate.c
* operations/common/svg-luminancetoalpha.c
* operations/common/svg-saturate.c
* operations/common/value-invert.c
* operations/common/whitebalance.c: const-ified the roi argument.
Modified:
trunk/ChangeLog
trunk/gegl/operation/gegl-operation-point-render.h
trunk/operations/common/brightness-contrast.c
trunk/operations/common/checkerboard.c
trunk/operations/common/color-temperature.c
trunk/operations/common/color.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/noise.c
trunk/operations/common/svg-huerotate.c
trunk/operations/common/svg-luminancetoalpha.c
trunk/operations/common/svg-saturate.c
trunk/operations/common/value-invert.c
trunk/operations/common/whitebalance.c
Modified: trunk/gegl/operation/gegl-operation-point-render.h
==============================================================================
--- trunk/gegl/operation/gegl-operation-point-render.h (original)
+++ trunk/gegl/operation/gegl-operation-point-render.h Mon Jun 9 10:40:57 2008
@@ -41,10 +41,10 @@
{
GeglOperationSourceClass parent_class;
- gboolean (* process) (GeglOperation *self, /* for parameters */
- void *out_buf, /* output buffer */
- glong samples, /* number of samples */
- GeglRectangle *roi); /* can be used if position is of importance*/
+ gboolean (* process) (GeglOperation *self, /* for parameters */
+ void *out_buf, /* output buffer */
+ glong samples, /* number of samples */
+ const GeglRectangle *roi); /* can be used if position is of importance*/
};
GType gegl_operation_point_render_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 Mon Jun 9 10:40:57 2008
@@ -72,11 +72,11 @@
* buffers with a pixel count.
*/
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
/* Retrieve a pointer to GeglChantO structure which contains all the
* chanted properties
@@ -116,22 +116,22 @@
*/
static gboolean
-process_simd (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong samples,
- GeglRectangle *roi)
+process_simd (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
- g4float *in = in_buf;
- g4float *out = out_buf;
+ GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
+ g4float *in = in_buf;
+ g4float *out = out_buf;
/* add 0.5 to brightness here to make the logic in the innerloop tighter
*/
g4float brightness = g4float_all(o->brightness + 0.5);
g4float contrast = g4float_all(o->contrast);
g4float half = g4float_half;
-
+
while (samples--)
{
*out = (*in - half) * contrast + brightness;
Modified: trunk/operations/common/checkerboard.c
==============================================================================
--- trunk/operations/common/checkerboard.c (original)
+++ trunk/operations/common/checkerboard.c Mon Jun 9 10:40:57 2008
@@ -52,10 +52,10 @@
}
static gboolean
-process (GeglOperation *operation,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *operation,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
gfloat *out_pixel = out_buf;
Modified: trunk/operations/common/color-temperature.c
==============================================================================
--- trunk/operations/common/color-temperature.c (original)
+++ trunk/operations/common/color-temperature.c Mon Jun 9 10:40:57 2008
@@ -28,13 +28,13 @@
#include "gegl-chant.h"
-#define LOWEST_TEMPERATURE 1000
+#define LOWEST_TEMPERATURE 1000
#define HIGHEST_TEMPERATURE 12000
-gfloat rgb_r55[][12];
+static const gfloat rgb_r55[][12];
static void
-convert_k_to_rgb (gfloat temperature,
+convert_k_to_rgb (gfloat temperature,
gfloat *rgb)
{
gfloat nomin, denom;
@@ -56,13 +56,13 @@
nomin = rgb_r55[channel][0];
for (deg = 1; deg < 6; deg++)
nomin = nomin * temperature + rgb_r55[channel][deg];
-
+
denom = rgb_r55[channel][6];
for (deg = 1; deg < 6; deg++)
denom = denom * temperature + rgb_r55[channel][6 + deg];
-
- rgb[channel] = nomin / denom;
- }
+
+ rgb[channel] = nomin / denom;
+ }
}
@@ -77,11 +77,11 @@
* in our requested pixel format
*/
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *in_pixel;
@@ -96,13 +96,13 @@
original_temp = o->original_temp;
intended_temp = o->intended_temp;
-
+
convert_k_to_rgb (original_temp, original_temp_rgb);
convert_k_to_rgb (intended_temp, intended_temp_rgb);
-
- coefs[0] = original_temp_rgb[0] / intended_temp_rgb[0];
- coefs[1] = original_temp_rgb[1] / intended_temp_rgb[1];
- coefs[2] = original_temp_rgb[2] / intended_temp_rgb[2];
+
+ coefs[0] = original_temp_rgb[0] / intended_temp_rgb[0];
+ coefs[1] = original_temp_rgb[1] / intended_temp_rgb[1];
+ coefs[2] = original_temp_rgb[2] / intended_temp_rgb[2];
for (i = 0; i < n_pixels; i++)
{
@@ -136,15 +136,15 @@
"Allows changing the color temperature of an image.";
}
-/* Coefficients of rational functions of degree 5 fitted per color channel to
- * the linear RGB coordinates of the range 1000K-12000K of the Planckian locus
+/* Coefficients of rational functions of degree 5 fitted per color channel to
+ * the linear RGB coordinates of the range 1000K-12000K of the Planckian locus
* with the 20K step. Original CIE-xy data from
*
* http://www.aim-dtp.net/aim/technology/cie_xyz/k2xy.txt
*
* converted to the linear RGB space assuming the ITU-R BT.709-5/sRGB primaries
*/
-gfloat rgb_r55[][12] = {{
+static const gfloat rgb_r55[][12] = {{
6.9389923563552169e-01, 2.7719388100974670e+03,
2.0999316761104289e+07,-4.8889434162208414e+09,
-1.1899785506796783e+07,-4.7418427686099203e+04,
Modified: trunk/operations/common/color.c
==============================================================================
--- trunk/operations/common/color.c (original)
+++ trunk/operations/common/color.c Mon Jun 9 10:40:57 2008
@@ -40,10 +40,10 @@
}
static gboolean
-process (GeglOperation *operation,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *operation,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
gfloat *out_pixel = out_buf;
Modified: trunk/operations/common/contrast-curve.c
==============================================================================
--- trunk/operations/common/contrast-curve.c (original)
+++ trunk/operations/common/contrast-curve.c Mon Jun 9 10:40:57 2008
@@ -37,11 +37,11 @@
}
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong samples,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong samples,
+ const 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 Mon Jun 9 10:40:57 2008
@@ -35,11 +35,11 @@
}
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong samples,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
{
return TRUE;
}
Modified: trunk/operations/common/invert.c
==============================================================================
--- trunk/operations/common/invert.c (original)
+++ trunk/operations/common/invert.c Mon Jun 9 10:40:57 2008
@@ -28,11 +28,11 @@
#include "gegl-chant.h"
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong samples,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
{
glong i;
gfloat *in = in_buf;
@@ -57,11 +57,11 @@
#ifdef HAS_G4FLOAT
static gboolean
-process_simd (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong samples,
- GeglRectangle *roi)
+process_simd (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong samples,
+ const 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 Mon Jun 9 10:40:57 2008
@@ -38,11 +38,11 @@
* in our requested pixel format
*/
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *pixel;
Modified: trunk/operations/common/noise.c
==============================================================================
--- trunk/operations/common/noise.c (original)
+++ trunk/operations/common/noise.c Mon Jun 9 10:40:57 2008
@@ -46,10 +46,10 @@
}
static gboolean
-process (GeglOperation *operation,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *operation,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
gfloat *out_pixel = out_buf;
Modified: trunk/operations/common/svg-huerotate.c
==============================================================================
--- trunk/operations/common/svg-huerotate.c (original)
+++ trunk/operations/common/svg-huerotate.c Mon Jun 9 10:40:57 2008
@@ -43,14 +43,14 @@
}
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
- gfloat *in = in_buf;
+ GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
+ gfloat *in = in_buf;
gfloat *out = out_buf;
gfloat *m;
Modified: trunk/operations/common/svg-luminancetoalpha.c
==============================================================================
--- trunk/operations/common/svg-luminancetoalpha.c (original)
+++ trunk/operations/common/svg-luminancetoalpha.c Mon Jun 9 10:40:57 2008
@@ -42,11 +42,11 @@
}
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
gfloat *in = in_buf;
gfloat *out = out_buf;
Modified: trunk/operations/common/svg-saturate.c
==============================================================================
--- trunk/operations/common/svg-saturate.c (original)
+++ trunk/operations/common/svg-saturate.c Mon Jun 9 10:40:57 2008
@@ -43,11 +43,11 @@
}
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong n_pixels,
+ const 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 Mon Jun 9 10:40:57 2008
@@ -42,11 +42,11 @@
#include "gegl-chant.h"
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong samples,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong samples,
+ const 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 Mon Jun 9 10:40:57 2008
@@ -42,11 +42,11 @@
* in our requested pixel format
*/
static gboolean
-process (GeglOperation *op,
- void *in_buf,
- void *out_buf,
- glong n_pixels,
- GeglRectangle *roi)
+process (GeglOperation *op,
+ void *in_buf,
+ void *out_buf,
+ glong n_pixels,
+ const GeglRectangle *roi)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
gfloat *in_pixel;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]