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 a19009feb951a42521104ff1d2657ce9fc77df99 (commit) from 0192d34fbb5325dc78143d0bb8438c6d2613aadd (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/a19009feb951a42521104ff1d2657ce9fc77d...
commit a19009feb951a42521104ff1d2657ce9fc77df99 Author: Cyril Hrubis metan@ucw.cz Date: Tue May 27 20:53:55 2014 +0200
filters: ResizeLinearLF: Further optimalization
Optimize the inner loop further.
This reshuffles the multiplication and divisions saving a few operations, which brings back the effectivity back as it was before the precision fixes.
Signed-off-by: Cyril Hrubis setan@ucw.cz
diff --git a/libs/filters/GP_ResizeLinear.gen.c.t b/libs/filters/GP_ResizeLinear.gen.c.t index d7b57a06..6a2b947d 100644 --- a/libs/filters/GP_ResizeLinear.gen.c.t +++ b/libs/filters/GP_ResizeLinear.gen.c.t @@ -50,20 +50,20 @@ for (x = 0; x < dst->w; x++) { /* Get first left pixel */ %% for c in pt.chanslist - uint32_t {{ c.name }}_tmp = {{ c.name }}[xmap[x]] * (MULT - xoff[x]) / DIV; + uint32_t {{ c.name }}_middle = 0; + uint32_t {{ c.name }}_first = {{ c.name }}[xmap[x]] * (MULT - xoff[x]); %% endfor /* Sum middle pixels */ for (j = xmap[x]+1; j < xmap[x+1]; j++) { %% for c in pt.chanslist - {{ c.name }}_tmp += {{ c.name }}[j] * MULT / DIV; + {{ c.name }}_middle += {{ c.name }}[j]; %% endfor } - /* Add last right pixel */ + /* Add it all together with last pixel on the right */ %% for c in pt.chanslist - {{ c.name }}_tmp += {{ c.name }}[xmap[x+1]] * xoff[x+1] / DIV; -%% endfor -%% for c in pt.chanslist - {{ c.name }}_res[x] += {{ c.name }}_tmp * {{ mult }} / DIV; + {{ c.name }}_res[x] += ({{ c.name }}_middle * (MULT / DIV) + + ({{ c.name }}[xmap[x+1]] * xoff[x+1] + + {{ c.name }}_first) / DIV) * {{ mult }} / DIV; %% endfor } %% endmacro
-----------------------------------------------------------------------
Summary of changes: libs/filters/GP_ResizeLinear.gen.c.t | 14 +++++++------- 1 files changed, 7 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.