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 60acd49d53dd05fdfe61c875d1d7d09ac62a018b (commit) via 52f483d206017a87e76ec9541539bf7d3beb7efb (commit) from 2bea36d5281f8683a1215177d6a162581de40521 (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/60acd49d53dd05fdfe61c875d1d7d09ac62a0...
commit 60acd49d53dd05fdfe61c875d1d7d09ac62a018b Author: Cyril Hrubis metan@ucw.cz Date: Mon May 21 00:51:53 2012 +0200
spiv: Add option to turn on dithering.
diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c index 2062015..931c3f0 100644 --- a/demos/spiv/spiv.c +++ b/demos/spiv/spiv.c @@ -49,6 +49,7 @@ static int abort_flag = 0; static int rotate = 0; static int show_progress = 0; static int resampling_method = GP_INTERP_LINEAR_LF_INT; +static int dithering = 0;
static int image_loader_callback(GP_ProgressCallback *self) { @@ -278,8 +279,19 @@ static void *image_loader(void *ptr) uint32_t cx = (context->w - ret->w)/2; uint32_t cy = (context->h - ret->h)/2;
+ GP_Context sub_display; + cpu_timer_start(&timer, "Blitting"); - GP_Blit_Raw(ret, 0, 0, ret->w, ret->h, context, cx, cy); + + if (dithering) { + callback.priv = "Dithering"; + GP_ContextSubContext(context, &sub_display, cx, cy, ret->w, ret->h); + // GP_FilterFloydSteinberg_from_RGB888(ret, &sub_display, 0, NULL); + GP_FilterHilbertPeano_from_RGB888(ret, &sub_display, NULL); + } else { + GP_Blit_Raw(ret, 0, 0, ret->w, ret->h, context, cx, cy); + } + cpu_timer_stop(&timer); GP_ContextFree(ret);
@@ -385,7 +397,7 @@ int main(int argc, char *argv[]) int opt, debug_level = 0; GP_PixelType emul_type = GP_PIXEL_UNKNOWN;
- while ((opt = getopt(argc, argv, "b:cd:e:Ii:Ps:r:")) != -1) { + while ((opt = getopt(argc, argv, "b:cd:e:fIi:Ps:r:")) != -1) { switch (opt) { case 'I': params.show_info = 1; @@ -396,6 +408,9 @@ int main(int argc, char *argv[]) case 'i': input_dev = optarg; break; + case 'f': + dithering = 1; + break; case 's': sleep_sec = atoi(optarg); break;
http://repo.or.cz/w/gfxprim.git/commit/52f483d206017a87e76ec9541539bf7d3beb7...
commit 52f483d206017a87e76ec9541539bf7d3beb7efb Author: Cyril Hrubis metan@ucw.cz Date: Mon May 21 00:45:56 2012 +0200
filters: Hilbert-Peano fix curve size calculation.
diff --git a/libs/filters/GP_HilbertPeanoDithering.gen.c.t b/libs/filters/GP_HilbertPeanoDithering.gen.c.t index a925c9c..78a9b53 100644 --- a/libs/filters/GP_HilbertPeanoDithering.gen.c.t +++ b/libs/filters/GP_HilbertPeanoDithering.gen.c.t @@ -21,6 +21,8 @@ static unsigned int count_bits(unsigned int n) i++; } while (n);
+ i--; + return (i + (s != (1U<<i))); }
-----------------------------------------------------------------------
Summary of changes: demos/spiv/spiv.c | 19 +++++++++++++++++-- libs/filters/GP_HilbertPeanoDithering.gen.c.t | 2 ++ 2 files changed, 19 insertions(+), 2 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.