X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2Fcolor.c;h=041f90b36c4670a43e3cd1b63fff2828b395d349;hb=91c499892f07ad6494351a1c1985a0d3e2600a25;hp=011abb28421ed50902e58a441989e09aac48b47e;hpb=fa3b0ac9da062a0404cd5349a61adb9202719adf;p=libucw.git diff --git a/images/color.c b/images/color.c index 011abb28..041f90b3 100644 --- a/images/color.c +++ b/images/color.c @@ -154,7 +154,7 @@ color_put(struct image_context *ctx, struct color *color, byte *dest, uns dest_s struct image_conv_options image_conv_defaults = { .flags = IMAGE_CONV_COPY_ALPHA | IMAGE_CONV_FILL_ALPHA | IMAGE_CONV_APPLY_ALPHA, .background = { .color_space = COLOR_SPACE_GRAYSCALE } }; - + /* Grayscale <-> RGB */ #define IMAGE_WALK_PREFIX(x) walk_##x @@ -348,7 +348,7 @@ image_conv_color_space(struct image_context *ctx UNUSED, struct image *dest, str case COLOR_SPACE_CMYK: switch (src->flags & IMAGE_CHANNELS_FORMAT) { - case COLOR_SPACE_RGB: + case COLOR_SPACE_RGB: if (dest->pixel_size == 4) { image_conv_rgb_n_to_cmyk_4(dest, src); @@ -1256,18 +1256,19 @@ main(void) byte *a = xmalloc(3 * CNT), *b = xmalloc(3 * CNT); for (uns i = 0; i < 3 * CNT; i++) a[i] = random_max(256); - init_timer(); + timestamp_t timer; + init_timer(&timer); for (uns i = 0; i < TESTS; i++) memcpy(b, a, CNT * 3); - DBG("memcpy time=%d", (uns)get_timer()); - init_timer(); + DBG("memcpy time=%d", get_timer(&timer)); + init_timer(&timer); for (uns i = 0; i < TESTS; i++) srgb_to_luv_pixels(b, a, CNT); - DBG("direct time=%d", (uns)get_timer()); - init_timer(); + DBG("direct time=%d", get_timer(&timer)); + init_timer(&timer); for (uns i = 0; i < TESTS; i++) color_conv_pixels(b, a, CNT, srgb_to_luv_grid); - DBG("grid time=%d", (uns)get_timer()); + DBG("grid time=%d", get_timer(&timer)); #endif return 0; }