X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2Fio-libungif.c;h=bf97f743e11b5f009b1608090fa0bdcd98c8b467;hb=1481eca416a467e9952dbc5e4852afe66eaf1256;hp=b3e8960a39fc6b1d3adff9c3df675425df65774d;hpb=bf5edbdd5b56a0d2e239e96dd476c7a9a562506a;p=libucw.git diff --git a/images/io-libungif.c b/images/io-libungif.c index b3e8960a..bf97f743 100644 --- a/images/io-libungif.c +++ b/images/io-libungif.c @@ -9,13 +9,13 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/mempool.h" -#include "lib/fastbuf.h" -#include "images/images.h" -#include "images/error.h" -#include "images/color.h" -#include "images/io-main.h" +#include +#include +#include +#include +#include +#include +#include #include @@ -147,8 +147,8 @@ libungif_read_data(struct image_io *io) /* Prepare image */ struct image_io_read_data_internals rdi; - uns read_flags = io->flags; - uns cs = read_flags & IMAGE_COLOR_SPACE; + uint read_flags = io->flags; + uint cs = read_flags & IMAGE_COLOR_SPACE; if (cs != COLOR_SPACE_GRAYSCALE && cs != COLOR_SPACE_RGB) read_flags = (read_flags & ~IMAGE_COLOR_SPACE & IMAGE_CHANNELS_FORMAT) | COLOR_SPACE_RGB; if (unlikely(!image_io_read_data_prepare(&rdi, io, image->ImageDesc.Width, image->ImageDesc.Height, read_flags))) @@ -164,7 +164,7 @@ libungif_read_data(struct image_io *io) byte *img_end = rdi.image->pixels + rdi.image->image_size; /* Handle deinterlacing */ - uns dein_step, dein_next; + uint dein_step, dein_next; if (image->ImageDesc.Interlace) { DBG("Deinterlaced image"); @@ -179,7 +179,7 @@ libungif_read_data(struct image_io *io) case 1: { byte pal[256], *pal_pos = pal, *pal_end = pal + 256; - for (uns i = 0; i < (uns)color_map->ColorCount; i++, pal_pos++, palette++) + for (uint i = 0; i < (uint)color_map->ColorCount; i++, pal_pos++, palette++) *pal_pos = rgb_to_gray_func(palette->Red, palette->Green, palette->Blue); if (pal_pos != pal_end) bzero(pal_pos, pal_end - pal_pos); @@ -190,9 +190,9 @@ libungif_read_data(struct image_io *io) return 0; } # define DO_ROW_END do{ \ - walk_row_start += dein_step; \ - while (walk_row_start >= img_end) \ - { uns n = dein_next >> 1; walk_row_start = rdi.image->pixels + n, dein_step = dein_next; dein_next = n; } \ + walk_row_start += dein_step; \ + while (walk_row_start >= img_end) \ + { uint n = dein_next >> 1; walk_row_start = rdi.image->pixels + n, dein_step = dein_next; dein_next = n; } \ }while(0) # define IMAGE_WALK_PREFIX(x) walk_##x # define IMAGE_WALK_INLINE @@ -202,13 +202,13 @@ libungif_read_data(struct image_io *io) # define IMAGE_WALK_ROW_STEP 0 # define IMAGE_WALK_DO_STEP do{ *walk_pos = pal[*pixels++]; }while(0) # define IMAGE_WALK_DO_ROW_END DO_ROW_END -# include "images/image-walk.h" +# include break; } case 2: { byte pal[256 * 2], *pal_pos = pal, *pal_end = pal + 256 * 2; - for (uns i = 0; i < (uns)color_map->ColorCount; i++, pal_pos += 2, palette++) + for (uint i = 0; i < (uint)color_map->ColorCount; i++, pal_pos += 2, palette++) { pal_pos[0] = rgb_to_gray_func(palette->Red, palette->Green, palette->Blue); pal_pos[1] = 255; @@ -225,13 +225,13 @@ libungif_read_data(struct image_io *io) # define IMAGE_WALK_ROW_STEP 0 # define IMAGE_WALK_DO_STEP do{ *(u16 *)walk_pos = ((u16 *)pal)[*pixels++]; }while(0) # define IMAGE_WALK_DO_ROW_END DO_ROW_END -# include "images/image-walk.h" +# include break; } case 3: { byte pal[256 * 4], *pal_pos = pal, *pal_end = pal + 256 * 4; - for (uns i = 0; i < (uns)color_map->ColorCount; i++, pal_pos += 4, palette++) + for (uint i = 0; i < (uint)color_map->ColorCount; i++, pal_pos += 4, palette++) { pal_pos[0] = palette->Red; pal_pos[1] = palette->Green; @@ -253,13 +253,13 @@ libungif_read_data(struct image_io *io) # define IMAGE_WALK_ROW_STEP 0 # define IMAGE_WALK_DO_STEP do{ byte *p = pal + 4 * (*pixels++); walk_pos[0] = p[0]; walk_pos[1] = p[1]; walk_pos[2] = p[2]; }while(0) # define IMAGE_WALK_DO_ROW_END DO_ROW_END -# include "images/image-walk.h" +# include break; } case 4: { byte pal[256 * 4], *pal_pos = pal, *pal_end = pal + 256 * 4; - for (uns i = 0; i < (uns)color_map->ColorCount; i++, pal_pos += 4, palette++) + for (uint i = 0; i < (uint)color_map->ColorCount; i++, pal_pos += 4, palette++) { pal_pos[0] = palette->Red; pal_pos[1] = palette->Green; @@ -278,7 +278,7 @@ libungif_read_data(struct image_io *io) # define IMAGE_WALK_ROW_STEP 0 # define IMAGE_WALK_DO_STEP do{ *(u32 *)walk_pos = ((u32 *)pal)[*pixels++]; }while(0) # define IMAGE_WALK_DO_ROW_END DO_ROW_END -# include "images/image-walk.h" +# include break; } default: