mirror of https://github.com/GNOME/gimp.git
app/gegl/gimpoperationcolorize.c move some calculations and assignments
2008-01-17 Michael Natterer <mitch@gimp.org> * app/gegl/gimpoperationcolorize.c * app/gegl/gimpoperationhuesaturation.c (process): move some calculations and assignments out of the inner loop. svn path=/trunk/; revision=24636
This commit is contained in:
parent
e824546886
commit
20830ecf46
|
@ -1,3 +1,9 @@
|
|||
2008-01-17 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gegl/gimpoperationcolorize.c
|
||||
* app/gegl/gimpoperationhuesaturation.c (process): move some
|
||||
calculations and assignments out of the inner loop.
|
||||
|
||||
2008-01-17 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpimagemaptool.c: create the operation in
|
||||
|
|
|
@ -169,11 +169,14 @@ gimp_operation_colorize_process (GeglOperation *operation,
|
|||
GimpOperationColorize *self = GIMP_OPERATION_COLORIZE (operation);
|
||||
gfloat *src = in_buf;
|
||||
gfloat *dest = out_buf;
|
||||
GimpHSL hsl;
|
||||
glong sample;
|
||||
|
||||
hsl.h = self->hue;
|
||||
hsl.s = self->saturation;
|
||||
|
||||
for (sample = 0; sample < samples; sample++)
|
||||
{
|
||||
GimpHSL hsl;
|
||||
GimpRGB rgb;
|
||||
gfloat lum = GIMP_RGB_LUMINANCE (src[RED_PIX],
|
||||
src[GREEN_PIX],
|
||||
|
@ -190,8 +193,6 @@ gimp_operation_colorize_process (GeglOperation *operation,
|
|||
lum = lum * (self->lightness + 1.0);
|
||||
}
|
||||
|
||||
hsl.h = self->hue;
|
||||
hsl.s = self->saturation;
|
||||
hsl.l = lum;
|
||||
|
||||
gimp_hsl_to_rgb (&hsl, &rgb);
|
||||
|
|
|
@ -266,9 +266,10 @@ gimp_operation_hue_saturation_process (GeglOperation *operation,
|
|||
void *out_buf,
|
||||
glong samples)
|
||||
{
|
||||
GimpOperationHueSaturation *self = GIMP_OPERATION_HUE_SATURATION (operation);
|
||||
gfloat *src = in_buf;
|
||||
gfloat *dest = out_buf;
|
||||
GimpOperationHueSaturation *self = GIMP_OPERATION_HUE_SATURATION (operation);
|
||||
gfloat *src = in_buf;
|
||||
gfloat *dest = out_buf;
|
||||
gfloat overlap = self->overlap / 2.0;
|
||||
glong sample;
|
||||
|
||||
for (sample = 0; sample < samples; sample++)
|
||||
|
@ -282,7 +283,6 @@ gimp_operation_hue_saturation_process (GeglOperation *operation,
|
|||
gboolean use_secondary_hue = FALSE;
|
||||
gfloat primary_intensity = 0.0;
|
||||
gfloat secondary_intensity = 0.0;
|
||||
gfloat overlap = self->overlap / 2.0;
|
||||
|
||||
rgb.r = src[RED_PIX];
|
||||
rgb.g = src[GREEN_PIX];
|
||||
|
|
Loading…
Reference in New Issue