pike.git / src / post_modules / GTK2 / source / encode_truecolor.c

version» Context lines:

pike.git/src/post_modules/GTK2/source/encode_truecolor.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id$ +    */      static const unsigned char swap_bits[256] =   { 0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,    240,8,136,72,200,40,168,104,232,24,152,88,216,56,184,    120,248,4,132,68,196,36,164,100,228,20,148,84,212,52,    180,116,244,12,140,76,204,44,172,108,236,28,156,92,220,    60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,    210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,    90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,
pike.git/src/post_modules/GTK2/source/encode_truecolor.c:34:    *(d++) = s->b;    *(d++) = s->g;    *(d++) = (s++)->r;    }   }      static void encode_truecolor_24_rgb( rgb_group *s,    unsigned char *d,    int q, int w )   { -  MEMCPY(d,(unsigned char *)s,q); +  memcpy(d,s,q);   }      static void encode_truecolor_24_rgb_al32_swapped( rgb_group *s,    unsigned char *d,    int q, int w )   {    int l;    while(q)    {    l=w;
pike.git/src/post_modules/GTK2/source/encode_truecolor.c:65:      static void encode_truecolor_24_rgb_al32( rgb_group *s,    unsigned char *d,    int q, int w )   {    int l;    while(q)    {    for(l=0; l<(q/w)/3; l++)    { -  MEMCPY(d,(unsigned char *)s,w*3); +  memcpy(d,s,w*3);    d += (w*3+3)&~3; -  +  q--;    }    }   }         #define encode_truecolor_24_bgr encode_truecolor_24_rgb_swapped   #define encode_truecolor_24_bgr_swapped encode_truecolor_24_rgb   #define encode_truecolor_24_bgr_al32 encode_truecolor_24_rgb_al32_swapped   #define encode_truecolor_24_bgr_al32_swapped encode_truecolor_24_rgb_al32   
pike.git/src/post_modules/GTK2/source/encode_truecolor.c:285:    blinemod>>=3;       bit=0;    y = img->ysize;    while (y--)    {    int bp;    x=img->xsize;    while (x--)    { -  register unsigned long b = -  ((((s->r&rfmask)>>rzshift)<<rfshift)| +  unsigned long b = +  ((unsigned long)((((s->r&rfmask)>>rzshift)<<rfshift)|    (((s->g&gfmask)>>gzshift)<<gfshift)| -  (((s->b&bfmask)>>bzshift)<<bfshift))<<bpshift; +  (((s->b&bfmask)>>bzshift)<<bfshift)))<<bpshift;    bp = bpp;    while (bp>8-bit)    {    if(bit)    *d|=(unsigned char)(b>>(24+bit));    else    *d=(unsigned char)(b>>24);    b<<=8-bit;    bp-=8-bit;    bit=0;