This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via ad60769920b2f3ba4ed23b13cd7973b018ebc711 (commit) via 4c93e21d96f1a5db43a59e9056b74f66af4d1eee (commit) via 8d014173c31dedbed6c91040b31bed2bd7646531 (commit) via 55e8a9a8309c993617c0feea8f56af1fe7052fe7 (commit) via ca48ae9efdb5a90e191557deb13065691c655801 (commit) via df181198735eec35d6b59418cdebf6a6ff957b2b (commit) from b6471296e04e26c765fb2c348a728e23fde1ddf0 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/ad60769920b2f3ba4ed23b13cd7973b018ebc...
commit ad60769920b2f3ba4ed23b13cd7973b018ebc711 Author: Cyril Hrubis metan@ucw.cz Date: Mon Mar 18 23:46:14 2013 +0100
doc: filters: Add gaussian noise documentation.
diff --git a/doc/Makefile b/doc/Makefile index aa2f80c..907bebd 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -50,6 +50,8 @@ $(PAGES): %.html: %.txt examples.html: examples.txt ../demos/c_simple/*.c ../demos/py_simple/*.py asciidoc.conf asciidoc $(ASCIIDOC_PARAMS) -a toc examples.txt
+filters.html: filter_additive_gaussian_noise.txt + # # Clean up generated images # diff --git a/doc/example_gaussian_noise.txt b/doc/example_gaussian_noise.txt new file mode 100644 index 0000000..1f023d8 --- /dev/null +++ b/doc/example_gaussian_noise.txt @@ -0,0 +1,7 @@ +Gaussian Additive Noise Filter Example +-------------------------------------- + +[source,c] +------------------------------------------------------------------ +include::../demos/c_simple/gaussian_noise.c[] +------------------------------------------------------------------ diff --git a/doc/filter_additive_gaussian_noise.txt b/doc/filter_additive_gaussian_noise.txt new file mode 100644 index 0000000..c64de38 --- /dev/null +++ b/doc/filter_additive_gaussian_noise.txt @@ -0,0 +1,66 @@ +Gaussian additive noise filter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[source,c] +------------------------------------------------------------------------------- +#include <GP_Filters.h> +/* or */ +#include <filters/GP_GaussianNoise.h> + +int GP_FilterGaussianNoiseAddEx(const GP_Context *src, + GP_Coord x_src, GP_Coord y_src, + GP_Size w_src, GP_Size h_src, + GP_Context *dst, + GP_Coord x_dst, GP_Coord y_dst, + float sigma, float mu, + GP_ProgressCallback *callback); + +GP_Context *GP_FilterGaussianNoiseAddExAlloc(const GP_Context *src, + GP_Coord x_src, GP_Coord y_src, + GP_Size w_src, GP_Size h_src, + float sigma, float mu, + GP_ProgressCallback *callback); + +static inline int GP_FilterGaussianNoiseAdd(const GP_Context *src, + GP_Context *dst, + float sigma, float mu, + GP_ProgressCallback *callback); + +static inline GP_Context * +GP_FilterGaussianNoiseAddAlloc(const GP_Context *src, + float sigma, float mu, + GP_ProgressCallback *callback); +------------------------------------------------------------------------------- + +Gaussian additive noise filter adds gaussian distributed noise to an image +with a defined sigma and mu. Both sigma and mu are from [0,1] interval. + +TIP: See the link:example_gaussian_noise.html[source code] used to generate + following images. + +.Original Image; Gaussian Additive Noise s=0.01, s=0.02, s=0.05, s=0.7, s=0.1, s=0.05 m=0.1, s=0.05 m=-0.1 +image:images/dither/lenna_small.png[ + "Original Image", + link="images/dither/lenna.png"] +image:images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png[ + "Additive Noise sigma = 0.01 mu = 0.0", + link="images/gaussian_noise/lenna_noise_s_0_01_m_0.png"] +image:images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png[ + "Additive Noise sigma = 0.02 mu = 0.0", + link="images/gaussian_noise/lenna_noise_s_0_02_m_0.png"] +image:images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png[ + "Additive Noise sigma = 0.05 mu = 0.0", + link="images/gaussian_noise/lenna_noise_s_0_05_m_0.png"] +image:images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png[ + "Additive Noise sigma = 0.07 mu = 0.0", + link="images/gaussian_noise/lenna_noise_s_0_07_m_0.png"] +image:images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png[ + "Additive Noise sigma = 0.1 mu = 0.0", + link="images/gaussian_noise/lenna_noise_s_0_1_m_0.png"] +image:images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png[ + "Additive Noise sigma = 0.1 mu = 0.1", + link="images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png"] +image:images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png[ + "Additive Noise sigma = 0.1 mu = -0.1", + link="images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png"] + diff --git a/doc/filters.txt b/doc/filters.txt index 7a3251c..c4f2049 100644 --- a/doc/filters.txt +++ b/doc/filters.txt @@ -253,6 +253,8 @@ GP_Context *GP_FilterInvert(const GP_Context *src, GP_Context *dst, Inverts the image, for each channel the result value is computed as "chan_max - val".
+include::filter_additive_gaussian_noise.txt[] + Arithmetic filters ~~~~~~~~~~~~~~~~~~
diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_01_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_01_m_0.png new file mode 100644 index 0000000..bc12a44 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_noise_s_0_01_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_02_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_02_m_0.png new file mode 100644 index 0000000..dbdd21a Binary files /dev/null and b/doc/images/gaussian_noise/lenna_noise_s_0_02_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png new file mode 100644 index 0000000..ae7fa9d Binary files /dev/null and b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0.png new file mode 100644 index 0000000..e62bfa1 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png new file mode 100644 index 0000000..61cc142 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_07_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_07_m_0.png new file mode 100644 index 0000000..bc33cbe Binary files /dev/null and b/doc/images/gaussian_noise/lenna_noise_s_0_07_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_noise_s_0_1_m_0.png b/doc/images/gaussian_noise/lenna_noise_s_0_1_m_0.png new file mode 100644 index 0000000..abbb1d3 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_noise_s_0_1_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png new file mode 100644 index 0000000..6ea5246 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png new file mode 100644 index 0000000..a1e89c1 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png new file mode 100644 index 0000000..55f5165 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png new file mode 100644 index 0000000..745431a Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png new file mode 100644 index 0000000..d70c7d6 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png new file mode 100644 index 0000000..cb773b6 Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png differ diff --git a/doc/images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png b/doc/images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png new file mode 100644 index 0000000..82ffaad Binary files /dev/null and b/doc/images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png differ
http://repo.or.cz/w/gfxprim.git/commit/4c93e21d96f1a5db43a59e9056b74f66af4d1...
commit 4c93e21d96f1a5db43a59e9056b74f66af4d1eee Author: Cyril Hrubis metan@ucw.cz Date: Mon Mar 18 23:38:56 2013 +0100
demos: c_simple: Add gaussian additive noise example.
diff --git a/demos/c_simple/Makefile b/demos/c_simple/Makefile index 3e741cc..547fdfd 100644 --- a/demos/c_simple/Makefile +++ b/demos/c_simple/Makefile @@ -19,7 +19,7 @@ APPS=backend_example loaders_example loaders filters_symmetry gfx_koch v4l2_show v4l2_grab convolution weighted_median shapetest koch input_example fileview linetest randomshapetest fonttest loaders_register blittest textaligntest abort sin_AA x11_windows- debug_handler + debug_handler gaussian_noise
ifeq ($(HAVE_LIBSDL),yes) APPS+=SDL_glue diff --git a/demos/c_simple/gaussian_noise.c b/demos/c_simple/gaussian_noise.c new file mode 100644 index 0000000..21425ce --- /dev/null +++ b/demos/c_simple/gaussian_noise.c @@ -0,0 +1,85 @@ +/***************************************************************************** + * This file is part of gfxprim library. * + * * + * Gfxprim is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * Gfxprim is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with gfxprim; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + * Copyright (C) 2009-2013 Cyril Hrubis metan@ucw.cz * + * * + *****************************************************************************/ + + /* + + Gaussian additive noise example. + + */ + +#include <stdio.h> +#include <unistd.h> +#include <string.h> +#include <errno.h> + +#include <GP.h> + +static void help(const char *app) +{ + printf("usage: %s -s float -m float input.img output.imgnn", app); + printf(" -s [0,1] sigma in pixelsn"); + printf(" -m [0,1] mu in pixelsn"); +} + +int main(int argc, char *argv[]) +{ + GP_Context *img; + float sigma = 0.1, mu = 0.1; + int opt; + + while ((opt = getopt(argc, argv, "s:m:")) != -1) { + switch (opt) { + case 's': + sigma = atof(optarg); + break; + case 'm': + mu = atof(optarg); + break; + default: + help(argv[0]); + return 1; + } + } + + if (argc - optind != 2) { + help(argv[0]); + return 1; + } + + img = GP_LoadImage(argv[optind], NULL); + + if (img == NULL) { + fprintf(stderr, "Failed to load image '%s': %sn", + argv[optind], strerror(errno)); + return 1; + } + + GP_Context *res = GP_FilterGaussianNoiseAddAlloc(img, sigma, mu, NULL); + + if (GP_SaveImage(res, argv[optind + 1], NULL)) { + fprintf(stderr, "Failed to save image '%s': %s", + argv[optind + 1], strerror(errno)); + return 1; + } + + return 0; +}
http://repo.or.cz/w/gfxprim.git/commit/8d014173c31dedbed6c91040b31bed2bd7646...
commit 8d014173c31dedbed6c91040b31bed2bd7646531 Author: Cyril Hrubis metan@ucw.cz Date: Mon Mar 18 22:34:45 2013 +0100
include: filters: Unify ifdefs fix some whitespaces.
diff --git a/include/filters/GP_Filters.h b/include/filters/GP_Filters.h index cd06035..f79c2d2 100644 --- a/include/filters/GP_Filters.h +++ b/include/filters/GP_Filters.h @@ -29,8 +29,8 @@
*/
-#ifndef GP_FILTERS_H -#define GP_FILTERS_H +#ifndef FILTERS_GP_FILTERS_H +#define FILTERS_GP_FILTERS_H
/* Filter per channel parameter passing interface */ #include "filters/GP_FilterParam.h" @@ -77,4 +77,4 @@ /* Gaussian noise filter */ #include "filters/GP_GaussianNoise.h"
-#endif /* GP_FILTERS_H */ +#endif /* FILTERS_GP_FILTERS_H */ diff --git a/include/filters/GP_GaussianNoise.h b/include/filters/GP_GaussianNoise.h index 9e9274e..135712b 100644 --- a/include/filters/GP_GaussianNoise.h +++ b/include/filters/GP_GaussianNoise.h @@ -30,8 +30,8 @@
*/
-#ifndef GP_FILTERS_GAUSSIAN_NOISE_H -#define GP_FILTERS_GAUSSIAN_NOISE_H +#ifndef FILTERS_GP_GAUSSIAN_NOISE_H +#define FILTERS_GP_GAUSSIAN_NOISE_H
#include "GP_Filter.h"
@@ -67,4 +67,4 @@ GP_FilterGaussianNoiseAddAlloc(const GP_Context *src, sigma, mu, callback); }
-#endif /* GP_FILTERS_GAUSSIAN_NOISE_H */ +#endif /* FILTERS_GP_GAUSSIAN_NOISE_H */ diff --git a/include/filters/GP_Median.h b/include/filters/GP_Median.h index 4a479cf..4755961 100644 --- a/include/filters/GP_Median.h +++ b/include/filters/GP_Median.h @@ -31,8 +31,8 @@
*/
-#ifndef GP_FILTERS_MEDIAN_H -#define GP_FILTERS_MEDIAN_H +#ifndef FILTERS_GP_MEDIAN_H +#define FILTERS_GP_MEDIAN_H
#include "GP_Filter.h"
@@ -67,4 +67,4 @@ static inline GP_Context *GP_FilterMedianAlloc(const GP_Context *src, xmed, ymed, callback); }
-#endif /* GP_FILTERS_MEDIAN_H */ +#endif /* FILTERS_GP_MEDIAN_H */ diff --git a/include/filters/GP_Sigma.h b/include/filters/GP_Sigma.h index a9e35e9..e7db9d0 100644 --- a/include/filters/GP_Sigma.h +++ b/include/filters/GP_Sigma.h @@ -37,32 +37,32 @@
*/
-#ifndef GP_FILTERS_SIGMA_H -#define GP_FILTERS_SIGMA_H +#ifndef FILTERS_GP_SIGMA_H +#define FILTERS_GP_SIGMA_H
#include "GP_Filter.h"
int GP_FilterSigmaEx(const GP_Context *src, - GP_Coord x_src, GP_Coord y_src, - GP_Size w_src, GP_Size h_src, - GP_Context *dst, - GP_Coord x_dst, GP_Coord y_dst, - int xrad, int yrad, - unsigned int min, float sigma, - GP_ProgressCallback *callback); + GP_Coord x_src, GP_Coord y_src, + GP_Size w_src, GP_Size h_src, + GP_Context *dst, + GP_Coord x_dst, GP_Coord y_dst, + int xrad, int yrad, + unsigned int min, float sigma, + GP_ProgressCallback *callback);
GP_Context *GP_FilterSigmaExAlloc(const GP_Context *src, - GP_Coord x_src, GP_Coord y_src, - GP_Size w_src, GP_Size h_src, - int xrad, int yrad, - unsigned int min, float sigma, - GP_ProgressCallback *callback); - -static inline int GP_FilterSigma(const GP_Context *src, - GP_Context *dst, + GP_Coord x_src, GP_Coord y_src, + GP_Size w_src, GP_Size h_src, int xrad, int yrad, unsigned int min, float sigma, - GP_ProgressCallback *callback) + GP_ProgressCallback *callback); + +static inline int GP_FilterSigma(const GP_Context *src, + GP_Context *dst, + int xrad, int yrad, + unsigned int min, float sigma, + GP_ProgressCallback *callback) { return GP_FilterSigmaEx(src, 0, 0, src->w, src->h, dst, 0, 0, xrad, yrad, min, sigma, callback); @@ -77,4 +77,4 @@ static inline GP_Context *GP_FilterSigmaAlloc(const GP_Context *src, xrad, yrad, min, sigma, callback); }
-#endif /* GP_FILTERS_SIGMA_H */ +#endif /* FILTERS_GP_SIGMA_H */ diff --git a/include/filters/GP_WeightedMedian.h b/include/filters/GP_WeightedMedian.h index 8219abd..82dd8e4 100644 --- a/include/filters/GP_WeightedMedian.h +++ b/include/filters/GP_WeightedMedian.h @@ -25,8 +25,8 @@
*/
-#ifndef GP_FILTERS_WEIGHTED_MEDIAN_H -#define GP_FILTERS_WEIGHTED_MEDIAN_H +#ifndef FILTERS_GP_WEIGHTED_MEDIAN_H +#define FILTERS_GP_WEIGHTED_MEDIAN_H
#include "GP_Filter.h"
@@ -67,4 +67,4 @@ static inline GP_Context *GP_FilterWeightedMedianAlloc(const GP_Context *src, weights, callback); }
-#endif /* GP_FILTERS_MEDIAN_H */ +#endif /* FILTERS_GP_WEIGHTED_MEDIAN_H */
http://repo.or.cz/w/gfxprim.git/commit/55e8a9a8309c993617c0feea8f56af1fe7052...
commit 55e8a9a8309c993617c0feea8f56af1fe7052fe7 Author: Cyril Hrubis metan@ucw.cz Date: Mon Mar 18 22:14:05 2013 +0100
filters: symmetry: Change _Alloc to Alloc.
diff --git a/demos/c_simple/filters_symmetry.c b/demos/c_simple/filters_symmetry.c index c1f5068..3f130a4 100644 --- a/demos/c_simple/filters_symmetry.c +++ b/demos/c_simple/filters_symmetry.c @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) }
/* Apply a symmetry filter */ - res = GP_FilterSymmetry_Alloc(src, sym, NULL); + res = GP_FilterSymmetryAlloc(src, sym, NULL);
/* Save Image */ if (GP_SaveImage(res, argv[optind+1], NULL)) { diff --git a/demos/grinder/grinder.c b/demos/grinder/grinder.c index 758804b..1f8eccb 100644 --- a/demos/grinder/grinder.c +++ b/demos/grinder/grinder.c @@ -227,13 +227,13 @@ static int rotate(GP_Context **c, const char *params)
switch (rot) { case 0: - res = GP_FilterRotate90_Alloc(*c, progress_callback); + res = GP_FilterRotate90Alloc(*c, progress_callback); break; case 1: - res = GP_FilterRotate180_Alloc(*c, progress_callback); + res = GP_FilterRotate180Alloc(*c, progress_callback); break; case 2: - res = GP_FilterRotate270_Alloc(*c, progress_callback); + res = GP_FilterRotate270Alloc(*c, progress_callback); break; } diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c index e7befb2..d4f305f 100644 --- a/demos/spiv/spiv.c +++ b/demos/spiv/spiv.c @@ -262,15 +262,15 @@ static void update_display(struct loader_params *params, GP_Context *img) break; case 90: callback.priv = "Rotating image (90)"; - img = GP_FilterRotate90_Alloc(img, &callback); + img = GP_FilterRotate90Alloc(img, &callback); break; case 180: callback.priv = "Rotating image (180)"; - img = GP_FilterRotate180_Alloc(img, &callback); + img = GP_FilterRotate180Alloc(img, &callback); break; case 270: callback.priv = "Rotating image (270)"; - img = GP_FilterRotate270_Alloc(img, &callback); + img = GP_FilterRotate270Alloc(img, &callback); break; } diff --git a/doc/filters.txt b/doc/filters.txt index adc5ce7..7a3251c 100644 --- a/doc/filters.txt +++ b/doc/filters.txt @@ -357,7 +357,7 @@ Rotation and Symmetry filters int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src, +GP_Context *GP_FilterMirrorHAlloc(const GP_Context *src, GP_ProgressCallback *callback); -------------------------------------------------------------------------------
@@ -377,7 +377,7 @@ as large as source. int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src, +GP_Context *GP_FilterMirrorVAlloc(const GP_Context *src, GP_ProgressCallback *callback); -------------------------------------------------------------------------------
@@ -397,7 +397,7 @@ as large as source. int GP_FilterRotate90(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src, +GP_Context *GP_FilterRotate90Alloc(const GP_Context *src, GP_ProgressCallback *callback); -------------------------------------------------------------------------------
@@ -417,7 +417,7 @@ fit rotated context (i.e. W and H are swapped). int GP_FilterRotate180(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src, +GP_Context *GP_FilterRotate180Alloc(const GP_Context *src, GP_ProgressCallback *callback); -------------------------------------------------------------------------------
@@ -437,7 +437,7 @@ as large as source. int GP_FilterRotate270(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src, +GP_Context *GP_FilterRotate270Alloc(const GP_Context *src, GP_ProgressCallback *callback); -------------------------------------------------------------------------------
diff --git a/include/filters/GP_Rotate.h b/include/filters/GP_Rotate.h index bafc37a..1da96c8 100644 --- a/include/filters/GP_Rotate.h +++ b/include/filters/GP_Rotate.h @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * * Boston, MA 02110-1301 USA * * * - * Copyright (C) 2009-2012 Cyril Hrubis metan@ucw.cz * + * Copyright (C) 2009-2013 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
@@ -62,8 +62,8 @@ int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst, * Returns pointer to newly allocated context, or NULL if malloc() has failed * or operation was aborted from withing a callback. */ -GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src, - GP_ProgressCallback *callback); +GP_Context *GP_FilterMirrorHAlloc(const GP_Context *src, + GP_ProgressCallback *callback);
/* * Mirror vertically @@ -95,8 +95,8 @@ int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst, * Returns pointer to newly allocated context, or NULL if malloc() has failed * or operation was aborted from withing a callback. */ -GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src, - GP_ProgressCallback *callback); +GP_Context *GP_FilterMirrorVAlloc(const GP_Context *src, + GP_ProgressCallback *callback);
/* * Rotate context by 90, 180 and 270. @@ -123,20 +123,20 @@ int GP_FilterRotate270_Raw(const GP_Context *src, GP_Context *dst, int GP_FilterRotate90(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src, - GP_ProgressCallback *callback); +GP_Context *GP_FilterRotate90Alloc(const GP_Context *src, + GP_ProgressCallback *callback);
int GP_FilterRotate180(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src, +GP_Context *GP_FilterRotate180Alloc(const GP_Context *src, GP_ProgressCallback *callback);
int GP_FilterRotate270(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src, - GP_ProgressCallback *callback); +GP_Context *GP_FilterRotate270Alloc(const GP_Context *src, + GP_ProgressCallback *callback);
/* * Calls a symmetry filter on bitmap. @@ -172,7 +172,7 @@ int GP_FilterSymmetry(const GP_Context *src, GP_Context *dst, GP_FilterSymmetries symmetry, GP_ProgressCallback *callback);
-GP_Context *GP_FilterSymmetry_Alloc(const GP_Context *src, +GP_Context *GP_FilterSymmetryAlloc(const GP_Context *src, GP_FilterSymmetries symmetry, GP_ProgressCallback *callback);
diff --git a/libs/filters/GP_Rotate.c b/libs/filters/GP_Rotate.c index 9e4690b..99fac5b 100644 --- a/libs/filters/GP_Rotate.c +++ b/libs/filters/GP_Rotate.c @@ -87,7 +87,7 @@ int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src, +GP_Context *GP_FilterMirrorHAlloc(const GP_Context *src, GP_ProgressCallback *callback) { GP_Context *res; @@ -121,7 +121,7 @@ int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src, +GP_Context *GP_FilterMirrorVAlloc(const GP_Context *src, GP_ProgressCallback *callback) { GP_Context *res; @@ -166,7 +166,7 @@ int GP_FilterRotate90(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src, +GP_Context *GP_FilterRotate90Alloc(const GP_Context *src, GP_ProgressCallback *callback) { GP_Context *res; @@ -201,7 +201,7 @@ int GP_FilterRotate180(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src, +GP_Context *GP_FilterRotate180Alloc(const GP_Context *src, GP_ProgressCallback *callback) { GP_Context *res; @@ -236,7 +236,7 @@ int GP_FilterRotate270(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src, +GP_Context *GP_FilterRotate270Alloc(const GP_Context *src, GP_ProgressCallback *callback) { GP_Context *res; @@ -277,21 +277,21 @@ int GP_FilterSymmetryByName(const char *symmetry) return -1; }
-GP_Context *GP_FilterSymmetry_Alloc(const GP_Context *src, +GP_Context *GP_FilterSymmetryAlloc(const GP_Context *src, GP_FilterSymmetries symmetry, GP_ProgressCallback *callback) { switch (symmetry) { case GP_ROTATE_90: - return GP_FilterRotate90_Alloc(src, callback); + return GP_FilterRotate90Alloc(src, callback); case GP_ROTATE_180: - return GP_FilterRotate180_Alloc(src, callback); + return GP_FilterRotate180Alloc(src, callback); case GP_ROTATE_270: - return GP_FilterRotate270_Alloc(src, callback); + return GP_FilterRotate270Alloc(src, callback); case GP_MIRROR_H: - return GP_FilterMirrorH_Alloc(src, callback); + return GP_FilterMirrorHAlloc(src, callback); case GP_MIRROR_V: - return GP_FilterMirrorV_Alloc(src, callback); + return GP_FilterMirrorVAlloc(src, callback); default: GP_DEBUG(1, "Invalid symmetry %i", (int) symmetry); return NULL; diff --git a/tests/filters/APICoverage.gen.c.t b/tests/filters/APICoverage.gen.c.t index fdffabe..b7d153f 100644 --- a/tests/filters/APICoverage.gen.c.t +++ b/tests/filters/APICoverage.gen.c.t @@ -40,23 +40,23 @@
%% set API_List = [['MirrorH', 'GP_Context:in', 'GP_Context:out', 'GP_ProgressCallback'], - ['MirrorH_Alloc', 'GP_Context:in', 'GP_ProgressCallback'], + ['MirrorHAlloc', 'GP_Context:in', 'GP_ProgressCallback'],
['MirrorV', 'GP_Context:in', 'GP_Context:out', 'GP_ProgressCallback'], - ['MirrorV_Alloc', 'GP_Context:in', 'GP_ProgressCallback'], + ['MirrorVAlloc', 'GP_Context:in', 'GP_ProgressCallback'],
['Rotate90', 'GP_Context:in', 'GP_Context:out', 'GP_ProgressCallback'], - ['Rotate90_Alloc', 'GP_Context:in', 'GP_ProgressCallback'], + ['Rotate90Alloc', 'GP_Context:in', 'GP_ProgressCallback'],
['Rotate180', 'GP_Context:in', 'GP_Context:out', 'GP_ProgressCallback'], - ['Rotate180_Alloc', 'GP_Context:in', 'GP_ProgressCallback'], + ['Rotate180Alloc', 'GP_Context:in', 'GP_ProgressCallback'],
['Rotate270', 'GP_Context:in', 'GP_Context:out', 'GP_ProgressCallback'], - ['Rotate270_Alloc', 'GP_Context:in', 'GP_ProgressCallback'], + ['Rotate270Alloc', 'GP_Context:in', 'GP_ProgressCallback'],
['Convolution', 'GP_Context:in', 'GP_Context:out', 'GP_FilterKernel2D:kernel', 'GP_ProgressCallback'],
http://repo.or.cz/w/gfxprim.git/commit/ca48ae9efdb5a90e191557deb13065691c655...
commit ca48ae9efdb5a90e191557deb13065691c655801 Author: Cyril Hrubis metan@ucw.cz Date: Mon Mar 18 21:32:36 2013 +0100
doc: Makefile: Add check for dvipng.
diff --git a/doc/Makefile b/doc/Makefile index 87ead82..aa2f80c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -37,7 +37,9 @@ toolcheck: @if [ ! -d "/usr/share/graphviz" ] ; then echo "ERROR: Could not find 'graphviz'" ; exit 127 ; fi @if [ -z `which latex 2>/dev/null` ] ; then - echo "ERROR: Could not find 'latex'" ; exit 127 ; fi + echo "error: could not find 'latex'" ; exit 127 ; fi + @if [ -z `which dvipng 2>/dev/null` ] ; then + echo "error: could not find 'dvipng'" ; exit 127 ; fi
# # Create page for each part of API description
http://repo.or.cz/w/gfxprim.git/commit/df181198735eec35d6b59418cdebf6a6ff957...
commit df181198735eec35d6b59418cdebf6a6ff957b2b Author: Cyril Hrubis metan@ucw.cz Date: Mon Mar 18 21:22:22 2013 +0100
filters: Rotate: Remove unused variable.
diff --git a/libs/filters/GP_Rotate.c b/libs/filters/GP_Rotate.c index a164886..9e4690b 100644 --- a/libs/filters/GP_Rotate.c +++ b/libs/filters/GP_Rotate.c @@ -47,8 +47,6 @@ int GP_FilterMirrorH_Raw(const GP_Context *src, GP_Context *dst, uint8_t *dl1 = GP_PIXEL_ADDR(dst, 0, y); uint8_t *dl2 = GP_PIXEL_ADDR(dst, 0, src->h - y - 1);
- int i; - memcpy(buf, sl1, bpr); memcpy(dl1, sl2, bpr); memcpy(dl2, buf, bpr);
-----------------------------------------------------------------------
Summary of changes: demos/c_simple/Makefile | 2 +- demos/c_simple/filters_symmetry.c | 2 +- demos/c_simple/{showimage.c => gaussian_noise.c} | 77 ++++++++++---------- demos/grinder/grinder.c | 6 +- demos/spiv/spiv.c | 6 +- doc/Makefile | 6 ++- ...registration.txt => example_gaussian_noise.txt} | 6 +- doc/filter_additive_gaussian_noise.txt | 66 +++++++++++++++++ doc/filters.txt | 12 ++-- .../gaussian_noise/lenna_noise_s_0_01_m_0.png | Bin 0 -> 437216 bytes .../gaussian_noise/lenna_noise_s_0_02_m_0.png | Bin 0 -> 499974 bytes .../gaussian_noise/lenna_noise_s_0_05_m_-0_1.png | Bin 0 -> 595580 bytes .../gaussian_noise/lenna_noise_s_0_05_m_0.png | Bin 0 -> 597207 bytes .../gaussian_noise/lenna_noise_s_0_05_m_0_1.png | Bin 0 -> 600729 bytes .../gaussian_noise/lenna_noise_s_0_07_m_0.png | Bin 0 -> 640843 bytes .../gaussian_noise/lenna_noise_s_0_1_m_0.png | Bin 0 -> 692490 bytes .../lenna_small_noise_s_0_01_m_0.png | Bin 0 -> 121712 bytes .../lenna_small_noise_s_0_02_m_0.png | Bin 0 -> 133915 bytes .../lenna_small_noise_s_0_05_m_-0_1.png | Bin 0 -> 152935 bytes .../lenna_small_noise_s_0_05_m_0.png | Bin 0 -> 153507 bytes .../lenna_small_noise_s_0_05_m_0_1.png | Bin 0 -> 154283 bytes .../lenna_small_noise_s_0_07_m_0.png | Bin 0 -> 162795 bytes .../gaussian_noise/lenna_small_noise_s_0_1_m_0.png | Bin 0 -> 174738 bytes include/filters/GP_Filters.h | 6 +- include/filters/GP_GaussianNoise.h | 6 +- include/filters/GP_Median.h | 6 +- include/filters/GP_Rotate.h | 22 +++--- include/filters/GP_Sigma.h | 38 +++++----- include/filters/GP_WeightedMedian.h | 6 +- libs/filters/GP_Rotate.c | 24 +++---- tests/filters/APICoverage.gen.c.t | 10 ++-- 31 files changed, 187 insertions(+), 114 deletions(-) copy demos/c_simple/{showimage.c => gaussian_noise.c} (66%) copy doc/{example_loader_registration.txt => example_gaussian_noise.txt} (54%) create mode 100644 doc/filter_additive_gaussian_noise.txt create mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_01_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_02_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_05_m_-0_1.png create mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_05_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_05_m_0_1.png create mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_07_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_noise_s_0_1_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_01_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_02_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_-0_1.png create mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_05_m_0_1.png create mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_07_m_0.png create mode 100644 doc/images/gaussian_noise/lenna_small_noise_s_0_1_m_0.png
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.