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

version» Context lines:

pike.git/src/modules/Image/dct.c:76:    INT32 x,y,u,v;    double xsz2,ysz2,enh,xp,yp,dx,dy;    double *costbl;    rgb_group *pix;       if (!THIS->img)    Pike_error("Called Image.Image object is not initialized\n");      #ifdef DCT_DEBUG    fprintf(stderr,"%lu bytes, %lu bytes\n", -  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))); +  (unsigned long)(sizeof(rgbd_group)*THIS->xsize*THIS->ysize), +  (unsigned long)(sizeof(rgb_group)*THIS->xsize*THIS->ysize+1));   #endif       area=xalloc(sizeof(rgbd_group)*THIS->xsize*THIS->ysize+1);       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:185:    for (u=0; u<THIS->xsize; u++)    costbl[u]=cos( (2*xp+1)*u*pi/xsz2 );       for (v=0; v<THIS->ysize; v++)    {    z0=cos( (2*yp+1)*v*pi/ysz2 )*(v?1:c0)/4.0;    for (u=0; u<THIS->xsize; u++)    {    double z;    z = (u?1:c0) * costbl[u] * z0; -  sum.r += DO_NOT_WARN((float)(val->r*z)); -  sum.g += DO_NOT_WARN((float)(val->g*z)); -  sum.b += DO_NOT_WARN((float)(val->b*z)); +  sum.r += (float)(val->r*z); +  sum.g += (float)(val->g*z); +  sum.b += (float)(val->b*z);    val++;    }    }    sum.r *= (float)enh;    sum.g *= (float)enh;    sum.b *= (float)enh;    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++;