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, generate has been updated via 631e1ca332e1b3bfccd1ebc4d83fa407eba13d51 (commit) from 4c68110cd82c373fe1d0c19ca01362edb452a0ad (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/631e1ca332e1b3bfccd1ebc4d83fa407eba13...
commit 631e1ca332e1b3bfccd1ebc4d83fa407eba13d51 Author: Cyril Hrubis metan@ucw.cz Date: Sat Oct 1 22:11:44 2011 +0200
Cleaned up the point pixel template.
diff --git a/libs/filters/GP_Brightness.gen.c.t b/libs/filters/GP_Brightness.gen.c.t index 8262dc1..1ba6fb9 100644 --- a/libs/filters/GP_Brightness.gen.c.t +++ b/libs/filters/GP_Brightness.gen.c.t @@ -5,9 +5,8 @@ Brightness filters -- Increments all color channels by a fixed value. %% endblock
%% block body -#include <GP_Context.h> -#include <GP_Pixel.h> -#include <GP_GetPutPixel.h> + +{{ filter_include() }}
%% call(ps) filter_per_pixel_size('Brightness', 'int32_t inc') pix = pix + inc; @@ -19,6 +18,6 @@ pix = pix + inc; {{ filter_clamp_val(chan[0], chan[2]) }} %% endcall
-{{ filter_functions('Brightness', 'int32_t inc', 'inc') }} +{{ filter_functions('Brightness', 'int32_t inc', 'inc', "inc=%i") }}
%% endblock body diff --git a/libs/filters/GP_Contrast.gen.c.t b/libs/filters/GP_Contrast.gen.c.t index 5a78363..3398d1a 100644 --- a/libs/filters/GP_Contrast.gen.c.t +++ b/libs/filters/GP_Contrast.gen.c.t @@ -5,9 +5,8 @@ Contrast filters -- Multiply all color channels by a fixed value. %% endblock
%% block body -#include <GP_Context.h> -#include <GP_Pixel.h> -#include <GP_GetPutPixel.h> + +{{ filter_include() }}
%% call(ps) filter_per_pixel_size('Contrast', 'float mul') pix = 1.00 * pix * mul; @@ -19,6 +18,6 @@ pix = 1.00 * pix * mul; {{ filter_clamp_val(chan[0], chan[2]) }} %% endcall
-{{ filter_functions('Contrast', 'float mul', 'mul') }} +{{ filter_functions('Contrast', 'float mul', 'mul', "mul=%2.3f") }}
%% endblock body diff --git a/libs/filters/GP_Invert.gen.c.t b/libs/filters/GP_Invert.gen.c.t index f641fcf..1c11b30 100644 --- a/libs/filters/GP_Invert.gen.c.t +++ b/libs/filters/GP_Invert.gen.c.t @@ -5,9 +5,8 @@ Invert filters -- Invert image %% endblock
%% block body -#include <GP_Context.h> -#include <GP_Pixel.h> -#include <GP_GetPutPixel.h> + +{{ filter_include() }}
%% call(ps) filter_per_pixel_size('Invert') pix = {{ 2 ** ps.size - 1 }} - pix; diff --git a/pylib/templates/filter.point.c.t b/pylib/templates/filter.point.c.t index 93461d9..271418c 100644 --- a/pylib/templates/filter.point.c.t +++ b/pylib/templates/filter.point.c.t @@ -1,9 +1,12 @@ %% extends "base.c.t"
-%% macro maybe_opts(opts) -%% if opts -,{{ opts }} -%% endif +{% macro maybe_opts(opts) %}{% if opts %}, {{ opts }}{% endif %}{% endmacro %} + +%% macro filter_include() +#include <GP_Context.h> +#include <GP_Pixel.h> +#include <GP_GetPutPixel.h> +#include <GP_Debug.h> %% endmacro
/* @@ -54,6 +57,7 @@ void GP_Filter{{ name }}_{{ pt.name }}(const GP_Context *src, GP_Context *res{{ GP_PutPixel_Raw_{{ pt.pixelsize.suffix }}(res, x, y, pix); } } + %% endif %% endfor %% endmacro @@ -72,9 +76,11 @@ void GP_Filter{{ name }}_{{ pt.name }}(const GP_Context *src, GP_Context *res{{ /* * Switch per pixel sizes or pixel types. */ -%% macro filter_functions(name, opts="", params="") +%% macro filter_functions(name, opts="", params="", fmt="") void GP_Filter{{ name }}_Raw(const GP_Context *src, GP_Context *res{{ maybe_opts(opts) }}) { + GP_DEBUG(1, "Running filter {{ name }} {{ fmt }}"{{ maybe_opts(params) }}); + switch (src->pixel_type) { %% for pt in pixeltypes case GP_PIXEL_{{ pt.name }}:
-----------------------------------------------------------------------
Summary of changes: libs/filters/GP_Brightness.gen.c.t | 7 +++---- libs/filters/GP_Contrast.gen.c.t | 7 +++---- libs/filters/GP_Invert.gen.c.t | 5 ++--- pylib/templates/filter.point.c.t | 16 +++++++++++----- 4 files changed, 19 insertions(+), 16 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.