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 090ff9d7d97bdde4cb8daac440294a7460319f2d (commit) from 079d90a0e58cde797f3816a793a7cdb05d18d2bc (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/090ff9d7d97bdde4cb8daac440294a7460319...
commit 090ff9d7d97bdde4cb8daac440294a7460319f2d Author: Cyril Hrubis metan@ucw.cz Date: Sun Jul 1 21:59:03 2012 +0200
filters: GP_Linear.c: Further speedups.
Don't use uint8_t temporary array which fairly slows down the computation, use array of int values instead.
diff --git a/libs/filters/GP_Linear.c b/libs/filters/GP_Linear.c index b6e5983..ca5c38a 100644 --- a/libs/filters/GP_Linear.c +++ b/libs/filters/GP_Linear.c @@ -53,7 +53,7 @@ int GP_FilterHLinearConvolution_Raw(const GP_Context *src,
/* Do horizontal linear convolution */ for (y = 0; y < (GP_Coord)h_src; y++) { - uint8_t R[size], G[size], B[size]; + int R[size], G[size], B[size]; int yi = GP_MIN(y_src + y, (int)src->h - 1);
/* Fetch the whole row */ @@ -107,7 +107,11 @@ int GP_FilterHLinearConvolution_Raw(const GP_Context *src, r /= ikern_div; g /= ikern_div; b /= ikern_div; - + + R[x] = r; + G[x] = g; + B[x] = b; + /* and clamp just to be extra sure */ r = GP_CLAMP(r, 0, 255); g = GP_CLAMP(g, 0, 255); @@ -116,7 +120,7 @@ int GP_FilterHLinearConvolution_Raw(const GP_Context *src, GP_PutPixel_Raw_24BPP(dst, x_dst + x, y_dst + y, GP_Pixel_CREATE_RGB888(r, g, b)); } - + if (GP_ProgressCallbackReport(callback, y, dst->h, dst->w)) return 1; } @@ -148,7 +152,7 @@ int GP_FilterVLinearConvolution_Raw(const GP_Context *src,
/* Do vertical linear convolution */ for (x = 0; x < (GP_Coord)w_src; x++) { - uint8_t R[size], G[size], B[size]; + int R[size], G[size], B[size]; int xi = GP_MIN(x_src + x, (int)src->w - 1); /* Fetch the whole row */
-----------------------------------------------------------------------
Summary of changes: libs/filters/GP_Linear.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 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.