Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 327179 | Differences between
and this patch

Collapse All | Expand All

(-)configure.in (-6 / +7 lines)
Lines 1-8 Link Here
1
dnl Process this file with autoconf to produce a configure script.
1
dnl Process this file with autoconf to produce a configure script.
2
2
3
AC_INIT(README)
3
AC_INIT([refocus],[0.9.0])
4
4
AC_CONFIG_SRCDIR(README)
5
AM_INIT_AUTOMAKE(refocus, 0.9.0)
5
AM_INIT_AUTOMAKE
6
6
7
AC_PROG_CC
7
AC_PROG_CC
8
AC_CHECK_PROG(GCC3, gcc3, gcc3)
8
AC_CHECK_PROG(GCC3, gcc3, gcc3)
Lines 12-18 Link Here
12
   AC_MSG_RESULT([using $CC as compiler])
12
   AC_MSG_RESULT([using $CC as compiler])
13
fi
13
fi
14
14
15
AC_STDC_HEADERS
15
AC_HEADER_STDC([])
16
AC_PROG_RANLIB
16
AC_PROG_RANLIB
17
17
18
# Check if the user has ATLAS installed in ./lib-atlas
18
# Check if the user has ATLAS installed in ./lib-atlas
Lines 36-42 Link Here
36
AC_SUBST(LAPACK_INCLUDE_DIR)
36
AC_SUBST(LAPACK_INCLUDE_DIR)
37
AM_CONDITIONAL(HAVE_ATLAS, test x${have_atlas} = xyes)
37
AM_CONDITIONAL(HAVE_ATLAS, test x${have_atlas} = xyes)
38
38
39
AM_PATH_GIMP(1.2.0)
39
AM_PATH_GIMP_2_0(2.0.0)
40
AM_PATH_GTK_2_0(2.0.0)
40
AM_PATH_GTK_2_0(2.0.0)
41
AM_PATH_GLIB_2_0(2.0.0)
41
AM_PATH_GLIB_2_0(2.0.0)
42
42
Lines 106-110 Link Here
106
#Check if erf is defined in the mathlibrary
106
#Check if erf is defined in the mathlibrary
107
AC_CHECK_LIB(m, erf, AC_DEFINE(HAVE_ERF))
107
AC_CHECK_LIB(m, erf, AC_DEFINE(HAVE_ERF))
108
108
109
AC_OUTPUT([Makefile src/Makefile lib/Makefile doc/Makefile gtk-doc/Makefile ])
109
AC_CONFIG_FILES([Makefile src/Makefile lib/Makefile doc/Makefile gtk-doc/Makefile ])
110
AC_OUTPUT
110
111
(-)lib/Makefile.am (-1 / +1 lines)
Lines 1-4 Link Here
1
CFLAGS=-fomit-frame-pointer -O3 -funroll-all-loops
1
AM_CFLAGS=-fomit-frame-pointer -O3 -funroll-all-loops
2
2
3
3
4
noinst_LIBRARIES = liblapack.a libatlas.a libcblas.a
4
noinst_LIBRARIES = liblapack.a libatlas.a libcblas.a
(-)src/Makefile.am (-1 / +1 lines)
Lines 11-17 Link Here
11
EXTRA_DIST = dummy-plugin.c
11
EXTRA_DIST = dummy-plugin.c
12
12
13
refocus_SOURCES = refocus.c conv.c gimppreview.c prevman.c util.c matrix.c tilebuf.c bdclosure.c fwlapack.c
13
refocus_SOURCES = refocus.c conv.c gimppreview.c prevman.c util.c matrix.c tilebuf.c bdclosure.c fwlapack.c
14
refocus_LDADD = @GTK_LIBS@ -lgimp ${ldadd_atlas}
14
refocus_LDADD = @GIMP_LIBS@ ${ldadd_atlas}
15
refocus_DEPENDENCIES=@LAPACK_LIB_DIR@/liblapack.a
15
refocus_DEPENDENCIES=@LAPACK_LIB_DIR@/liblapack.a
16
16
17
test_matrix_SOURCES = matrix.c test-matrix.c fwlapack.c
17
test_matrix_SOURCES = matrix.c test-matrix.c fwlapack.c
(-)src/gimppreview.c (-1 / +1 lines)
Lines 344-350 Link Here
344
344
345
  /* Save the drawable info. */
345
  /* Save the drawable info. */
346
  preview->drawable = drawable;
346
  preview->drawable = drawable;
347
  preview->drawable_has_alpha = gimp_drawable_has_alpha (drawable->id);
347
  preview->drawable_has_alpha = gimp_drawable_has_alpha (drawable->drawable_id);
348
348
349
  /* Calculate our preview size. */
349
  /* Calculate our preview size. */
350
  if (preview_size == PREVIEW_FIXED_SIZE)
350
  if (preview_size == PREVIEW_FIXED_SIZE)
(-)src/prevman.c (-3 / +3 lines)
Lines 52-58 Link Here
52
  tile_source->width = drawable->width;
52
  tile_source->width = drawable->width;
53
  tile_source->height = drawable->height;
53
  tile_source->height = drawable->height;
54
  tile_source->bpp = drawable->bpp;
54
  tile_source->bpp = drawable->bpp;
55
  tile_source->has_alpha = gimp_drawable_has_alpha (drawable->id);
55
  tile_source->has_alpha = gimp_drawable_has_alpha (drawable->drawable_id);
56
  tile_source->un.drw.drawable = drawable;
56
  tile_source->un.drw.drawable = drawable;
57
  gimp_pixel_rgn_init (&tile_source->un.drw.pixel_rgn, drawable, x, y, width,
57
  gimp_pixel_rgn_init (&tile_source->un.drw.pixel_rgn, drawable, x, y, width,
58
                       height, FALSE, FALSE);
58
                       height, FALSE, FALSE);
Lines 144-150 Link Here
144
  tile_sink->width = drawable->width;
144
  tile_sink->width = drawable->width;
145
  tile_sink->height = drawable->height;
145
  tile_sink->height = drawable->height;
146
  tile_sink->bpp = drawable->bpp;
146
  tile_sink->bpp = drawable->bpp;
147
  tile_sink->has_alpha = gimp_drawable_has_alpha (drawable->id);
147
  tile_sink->has_alpha = gimp_drawable_has_alpha (drawable->drawable_id);
148
  gimp_pixel_rgn_init (&tile_sink->un.drw.pixel_rgn, drawable, x, y, width,
148
  gimp_pixel_rgn_init (&tile_sink->un.drw.pixel_rgn, drawable, x, y, width,
149
                       height, TRUE, TRUE);
149
                       height, TRUE, TRUE);
150
}
150
}
Lines 159-165 Link Here
159
  tile_sink->width = width;
159
  tile_sink->width = width;
160
  tile_sink->height = height;
160
  tile_sink->height = height;
161
  tile_sink->bpp = drawable->bpp;
161
  tile_sink->bpp = drawable->bpp;
162
  tile_sink->has_alpha = gimp_drawable_has_alpha (drawable->id);
162
  tile_sink->has_alpha = gimp_drawable_has_alpha (drawable->drawable_id);
163
  tile_sink->un.prv.data = g_new (guchar,
163
  tile_sink->un.prv.data = g_new (guchar,
164
                                  tile_sink->width * tile_sink->height *
164
                                  tile_sink->width * tile_sink->height *
165
                                  tile_sink->bpp);
165
                                  tile_sink->bpp);
(-)src/refocus.c (-12 / +11 lines)
Lines 45-53 Link Here
45
45
46
/* Declare local functions. */
46
/* Declare local functions. */
47
static void query (void);
47
static void query (void);
48
static void run (char *name,
48
static void run (const gchar *name,
49
                 gint nparams,
49
                 gint nparams,
50
                 GimpParam * param,
50
                 const GimpParam * param,
51
                 gint * nreturn_vals, GimpParam ** return_vals);
51
                 gint * nreturn_vals, GimpParam ** return_vals);
52
static gint dialog ();
52
static gint dialog ();
53
static void doit (void);
53
static void doit (void);
Lines 111-117 Link Here
111
    {GIMP_PDB_FLOAT, "noise", "Noise to Signal ratio"},
111
    {GIMP_PDB_FLOAT, "noise", "Noise to Signal ratio"},
112
  };
112
  };
113
  static GimpParamDef *return_vals = NULL;
113
  static GimpParamDef *return_vals = NULL;
114
  static gint nargs = (gint) (sizeof (args) / sizeof (args[0]));
115
  static gint nreturn_vals = 0;
114
  static gint nreturn_vals = 0;
116
115
117
  gimp_install_procedure ("plug_in_refocus",
116
  gimp_install_procedure ("plug_in_refocus",
Lines 123-137 Link Here
123
                          "<Image>/Filters/Enhance/Refocus ...",
122
                          "<Image>/Filters/Enhance/Refocus ...",
124
                          "RGB*, GRAY*",
123
                          "RGB*, GRAY*",
125
                          GIMP_PLUGIN,
124
                          GIMP_PLUGIN,
126
                          nargs, nreturn_vals, args, return_vals);
125
                          G_N_ELEMENTS(args), nreturn_vals, args, return_vals);
127
}
126
}
128
127
129
static void
128
static void
130
run (char *name, gint n_params, GimpParam * param,
129
run (const gchar *name, gint n_params, const GimpParam * param,
131
     gint * nreturn_vals, GimpParam ** return_vals)
130
     gint * nreturn_vals, GimpParam ** return_vals)
132
{
131
{
133
  static GimpParam values[1];
132
  static GimpParam values[1];
134
  GimpRunModeType run_mode;
133
  GimpRunMode run_mode;
135
  GimpPDBStatusType status = GIMP_PDB_SUCCESS;
134
  GimpPDBStatusType status = GIMP_PDB_SUCCESS;
136
135
137
  (void) name;                  /* Shut up warnings about unused parameters. */
136
  (void) name;                  /* Shut up warnings about unused parameters. */
Lines 186-193 Link Here
186
    {
185
    {
187
186
188
      /*  Make sure that the drawable is gray or RGB color  */
187
      /*  Make sure that the drawable is gray or RGB color  */
189
      if (gimp_drawable_is_rgb (drawable->id) ||
188
      if (gimp_drawable_is_rgb (drawable->drawable_id) ||
190
          gimp_drawable_is_gray (drawable->id))
189
          gimp_drawable_is_gray (drawable->drawable_id))
191
        {
190
        {
192
          doit ();
191
          doit ();
193
192
Lines 411-417 Link Here
411
          event_is_current =
410
          event_is_current =
412
            gimp_preview_draw_unscaled_row (GIMP_PREVIEW (my_widgets.preview),
411
            gimp_preview_draw_unscaled_row (GIMP_PREVIEW (my_widgets.preview),
413
                                            event->event_id,
412
                                            event->event_id,
414
                                            gimp_drawable_type (drawable->id),
413
                                            gimp_drawable_type (drawable->drawable_id),
415
                                            row, buf);
414
                                            row, buf);
416
        };
415
        };
417
      g_free (buf);
416
      g_free (buf);
Lines 608-614 Link Here
608
  gimp_progress_init ("Computing matrix");
607
  gimp_progress_init ("Computing matrix");
609
  update_matrix ();
608
  update_matrix ();
610
  gimp_progress_init ("Applying convolution");
609
  gimp_progress_init ("Applying convolution");
611
  gimp_drawable_mask_bounds (drawable->id, &sx1, &sy1, &sx2, &sy2);
610
  gimp_drawable_mask_bounds (drawable->drawable_id, &sx1, &sy1, &sx2, &sy2);
612
  width = sx2 - sx1;
611
  width = sx2 - sx1;
613
  height = sy2 - sy1;
612
  height = sy2 - sy1;
614
  tile_source_init_from_drawable (&source, drawable, sx1, sy1, width, height);
613
  tile_source_init_from_drawable (&source, drawable, sx1, sy1, width, height);
Lines 618-624 Link Here
618
                  matrix, 2 * my_config.mat_width + 1,
617
                  matrix, 2 * my_config.mat_width + 1,
619
                  &update_progress_closure);
618
                  &update_progress_closure);
620
  gimp_drawable_flush (drawable);
619
  gimp_drawable_flush (drawable);
621
  gimp_drawable_merge_shadow (drawable->id, TRUE);
620
  gimp_drawable_merge_shadow (drawable->drawable_id, TRUE);
622
  gimp_drawable_update (drawable->id, sx1, sy1, width, height);
621
  gimp_drawable_update (drawable->drawable_id, sx1, sy1, width, height);
623
  g_free (matrix);
622
  g_free (matrix);
624
}
623
}
(-)src/tilebuf.c (-5 / +14 lines)
Lines 140-146 Link Here
140
140
141
        for (x = x_lo - 1; x >= buf->real_x; x--)
141
        for (x = x_lo - 1; x >= buf->real_x; x--)
142
          {
142
          {
143
            copy_col (buf, 2 * x_lo - x, y_start, y_end - y_start, x);
143
            gint sx = 2 * x_lo - x;
144
            copy_col (buf,
145
                      sx<=buf->real_x+buf->real_width-1?sx:buf->real_x+buf->real_width-1,
146
                      y_start, y_end - y_start, x);
144
          };
147
          };
145
      }
148
      }
146
      break;
149
      break;
Lines 171-177 Link Here
171
174
172
        for (x = x_hi; x < buf->real_x + buf->real_width; x++)
175
        for (x = x_hi; x < buf->real_x + buf->real_width; x++)
173
          {
176
          {
174
            copy_col (buf, 2 * (x_hi - 1) - x, y_start, y_end - y_start, x);
177
            gint sx = 2 * (x_hi - 1) - x;
178
            copy_col (buf, sx>=buf->real_x?sx:buf->real_x,
179
                      y_start, y_end - y_start, x);
175
          };
180
          };
176
      }
181
      }
177
      break;
182
      break;
Lines 200-206 Link Here
200
205
201
        for (y = y_lo - 1; y >= buf->real_y; y--)
206
        for (y = y_lo - 1; y >= buf->real_y; y--)
202
          {
207
          {
203
            copy_row (buf, buf->real_x, 2 * y_lo - y, buf->real_width, y);
208
            gint sy = 2 * y_lo - y;
209
            copy_row (buf, buf->real_x,
210
                      sy<=buf->real_y+buf->real_height-1?sy:buf->real_y+buf->real_height-1,
211
                      buf->real_width, y);
204
          };
212
          };
205
      }
213
      }
206
      break;
214
      break;
Lines 230-237 Link Here
230
238
231
        for (y = y_hi; y < buf->real_y + buf->real_height; y++)
239
        for (y = y_hi; y < buf->real_y + buf->real_height; y++)
232
          {
240
          {
233
            copy_row (buf, buf->real_x, 2 * (y_hi - 1) - y, buf->real_width,
241
            gint sy = 2 * (y_hi - 1) - y;
234
                      y);
242
            copy_row (buf, buf->real_x, sy>=buf->real_y?sy:buf->real_y,
243
                      buf->real_width, y);
235
          };
244
          };
236
      }
245
      }
237
      break;
246
      break;
238
	  	 
247
	  	 

Return to bug 327179