Update of /cvsroot/ufraw/ufraw In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31277
Modified Files: ufraw_ufraw.c Log Message: Fix auto-wb for 4-colors cameras. Index: ufraw_ufraw.c =================================================================== RCS file: /cvsroot/ufraw/ufraw/ufraw_ufraw.c,v retrieving revision 1.251 retrieving revision 1.252 diff -u -d -r1.251 -r1.252 --- ufraw_ufraw.c 30 Mar 2010 04:49:08 -0000 1.251 +++ ufraw_ufraw.c 30 Mar 2010 22:51:02 -0000 1.252 @@ -1209,7 +1209,7 @@ /* The speedup trick is to keep the non-constant (or ugly constant) * divider out of the pixel iteration. If you really have to then * use double division (can be much faster, apparently). */ - for (i = 0; i < 3; ++i) + for (i = 0; i < uf->colors; ++i) mul[i] = (guint64)0x10000 * 0x10000 / uf->developer->rgbWB[i]; size = img->height * img->width; #ifdef _OPENMP @@ -1219,7 +1219,7 @@ #endif for (i = 0; i < size; ++i) { p16 = (guint16 *)&img->buffer[i * img->depth]; - for (c = 0; c < 3; ++c) { + for (c = 0; c < uf->colors; ++c) { px = p16[c] * (guint64)mul[c] / 0x10000; if (px > 0xffff) px = 0xffff; ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ ufraw-cvs mailing list ufraw-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ufraw-cvs