pike.git / src / modules / Image / dct.c

version» Context lines:

pike.git/src/modules/Image/dct.c:1: - /* $Id: dct.c,v 1.15 2000/07/28 07:12:44 hubbe Exp $ */ + /* $Id: dct.c,v 1.16 2000/08/10 16:48:59 grubba Exp $ */      /*   **! module Image   **! note - **! $Id: dct.c,v 1.15 2000/07/28 07:12:44 hubbe Exp $ + **! $Id: dct.c,v 1.16 2000/08/10 16:48:59 grubba Exp $   **! class Image   */      #include "global.h"      #include <math.h>   #include <ctype.h>      #include "stralloc.h"   #include "global.h"
pike.git/src/modules/Image/dct.c:77:    struct object *o;    struct image *img;    INT32 x,y,u,v;    double xsz2,ysz2,enh,xp,yp,dx,dy;    double *costbl;    rgb_group *pix;       if (!THIS->img) error("Called Image.Image object is not initialized\n");;       fprintf(stderr,"%lu bytes, %lu bytes\n", -  (unsigned long)(sizeof(rgbd_group)*THIS->xsize*THIS->ysize), -  (unsigned long)(sizeof(rgb_group)*THIS->xsize*THIS->ysize+1)); +  DO_NOT_WARN((unsigned long)(sizeof(rgbd_group)*THIS->xsize*THIS->ysize)), +  DO_NOT_WARN((unsigned long)(sizeof(rgb_group)*THIS->xsize*THIS->ysize+1)));       if (!(area=malloc(sizeof(rgbd_group)*THIS->xsize*THIS->ysize+1)))    resource_error(NULL,0,0,"memory",0,"Out of memory.\n");       if (!(costbl=malloc(sizeof(double)*THIS->xsize+1)))    {    free(area);    resource_error(NULL,0,0,"memory",0,"Out of memory.\n");    }   
pike.git/src/modules/Image/dct.c:186:    z = (u?1:c0) * costbl[u] * z0;    sum.r+=val->r*z;    sum.g+=val->g*z;    sum.b+=val->b*z;    val++;    }    }    sum.r*=enh;    sum.g*=enh;    sum.b*=enh; -  pix->r=testrange(((int)(sum.r+0.5))); -  pix->g=testrange(((int)(sum.g+0.5))); -  pix->b=testrange(((int)(sum.b+0.5))); +  pix->r=testrange((DOUBLE_TO_INT(sum.r+0.5))); +  pix->g=testrange((DOUBLE_TO_INT(sum.g+0.5))); +  pix->b=testrange((DOUBLE_TO_INT(sum.b+0.5)));    pix++;    }    fprintf(stderr,"."); fflush(stderr);    }       free(area);    free(costbl);       pop_n_elems(args);    push_object(o);   }