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 c12d40497d99bf25873566a9b848cd474319c7cd (commit) from 7ed201b00c522cc717ae55bc2e801cbceecccc8c (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/c12d40497d99bf25873566a9b848cd474319c...
commit c12d40497d99bf25873566a9b848cd474319c7cd Author: Cyril Hrubis metan@ucw.cz Date: Sun Mar 10 17:19:56 2013 +0100
libs: filters: Don't abort on unimplemented filter
The library now returns failure instead.
diff --git a/libs/filters/GP_Median.c b/libs/filters/GP_Median.c index e6dca7d..130ad92 100644 --- a/libs/filters/GP_Median.c +++ b/libs/filters/GP_Median.c @@ -16,10 +16,12 @@ * 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 * * * *****************************************************************************/
+#include <errno.h> + #include "core/GP_Context.h" #include "core/GP_GetPutPixel.h" #include "core/GP_TempAlloc.h" @@ -176,8 +178,10 @@ static int GP_FilterMedian_Raw(const GP_Context *src, int i, x, y; unsigned int trigger = ((2*xmed+1)*(2*ymed+1))/2;
- //TODO - GP_CHECK(src->pixel_type == GP_PIXEL_RGB888); + if (src->pixel_type != GP_PIXEL_RGB888) { + errno = ENOSYS; + return -1; + }
GP_DEBUG(1, "Median filter size %ux%u xmed=%u ymed=%u", w_src, h_src, 2 * xmed + 1, 2 * ymed + 1); diff --git a/libs/filters/GP_Sigma.c b/libs/filters/GP_Sigma.c index 2d1f6aa..d6d78c8 100644 --- a/libs/filters/GP_Sigma.c +++ b/libs/filters/GP_Sigma.c @@ -16,10 +16,12 @@ * 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 * * * *****************************************************************************/
+#include <errno.h> + #include "core/GP_Context.h" #include "core/GP_GetPutPixel.h" #include "core/GP_TempAlloc.h" @@ -44,7 +46,10 @@ static int GP_FilterSigma_Raw(const GP_Context *src, int x, y; unsigned int x1, y1; - GP_CHECK(src->pixel_type == GP_PIXEL_RGB888); + if (src->pixel_type != GP_PIXEL_RGB888) { + errno = ENOSYS; + return -1; + }
GP_DEBUG(1, "Sigma Mean filter size %ux%u xrad=%u yrad=%u sigma=%.2f", w_src, h_src, xrad, yrad, sigma); diff --git a/libs/filters/GP_WeightedMedian.c b/libs/filters/GP_WeightedMedian.c index a34193d..aac0c75 100644 --- a/libs/filters/GP_WeightedMedian.c +++ b/libs/filters/GP_WeightedMedian.c @@ -16,10 +16,12 @@ * 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 * * * *****************************************************************************/
+#include <errno.h> + #include "core/GP_Context.h" #include "core/GP_GetPutPixel.h" #include "core/GP_TempAlloc.h" @@ -86,7 +88,10 @@ static int GP_FilterWeightedMedian_Raw(const GP_Context *src, int x, y, sum = sum_weights(weights); unsigned int x1, y1;
- GP_CHECK(src->pixel_type == GP_PIXEL_RGB888); + if (src->pixel_type != GP_PIXEL_RGB888) { + errno = ENOSYS; + return -1; + }
GP_DEBUG(1, "Weighted Median filter size %ux%u xmed=%u ymed=%u sum=%u", w_src, h_src, weights->w, weights->h, sum);
-----------------------------------------------------------------------
Summary of changes: libs/filters/GP_Median.c | 10 +++++++--- libs/filters/GP_Sigma.c | 9 +++++++-- libs/filters/GP_WeightedMedian.c | 9 +++++++-- 3 files changed, 21 insertions(+), 7 deletions(-)
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.