Update of /cvsroot/ufraw/ufraw In directory vz-cvs-3.sog:/tmp/cvs-serv21505
Modified Files: dcraw_api.cc dcraw_indi.c Log Message: Update API for DCRaw 9.16. Index: dcraw_api.cc =================================================================== RCS file: /cvsroot/ufraw/ufraw/dcraw_api.cc,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- dcraw_api.cc 26 Jun 2012 16:45:35 -0000 1.83 +++ dcraw_api.cc 1 Jul 2012 06:15:13 -0000 1.84 @@ -35,7 +35,7 @@ #define FORC4 FORC(4) #define FORCC FORC(colors) extern "C" { - int fc_INDI(const unsigned filters, const int row, const int col); + int fcol_INDI(const unsigned filters, const int row, const int col); void wavelet_denoise_INDI(gushort(*image)[4], const int black, const int iheight, const int iwidth, const int height, const int width, const int colors, const int shrink, const float pre_mul[4], @@ -240,7 +240,7 @@ if (d->zero_is_bad) d->remove_zeroes(); d->bad_pixels(NULL); if (d->is_foveon) { - if (d->model[0] == 'D') { + if (d->load_raw == &DCRaw::foveon_dp_load_raw) { for (i = 0; i < d->height * d->width * 4; i++) if ((short) d->image[0][i] < 0) d->image[0][i] = 0; } else d->foveon_interpolate(); @@ -345,21 +345,21 @@ } /* - * fc_INDI() optimizing wrapper. - * fc_sequence() cooks up the filter color sequence for a row knowing that + * fcol_INDI() optimizing wrapper. + * fcol_sequence() cooks up the filter color sequence for a row knowing that * it doesn't have to store more than 16 values. The result can be indexed - * by the column using fc_color() and that part must of course be inlined + * by the column using fcol_color() and that part must of course be inlined * for maximum performance. The inner loop for image processing should * always try to index the column and not the row in order to reduce the * data cache footprint. */ - static unsigned fc_sequence(int filters, int row) + static unsigned fcol_sequence(int filters, int row) { unsigned sequence = 0; int c; for (c = 15; c >= 0; --c) - sequence = (sequence << 2) | fc_INDI(filters, row, c); + sequence = (sequence << 2) | fcol_INDI(filters, row, c); return sequence; } @@ -367,7 +367,7 @@ * Note: smart compilers will inline anyway in most cases: the "inline" * below is a comment reminding not to make it an external function. */ - static inline int fc_color(unsigned sequence, int col) + static inline int fcol_color(unsigned sequence, int col) { return (sequence >> ((col << 1) & 0x1f)) & 3; } @@ -419,7 +419,7 @@ for (ri = 0; ri < scale; ++ri) { ibase = hh->raw.image + ((row * scale + ri) / 2) * hh->raw.width; for (ci = 0; ci < scale; ++ci) { - cl = fc_color(fseq[ri], col * scale + ci); + cl = fcol_color(fseq[ri], col * scale + ci); sum[cl] += ibase[(col * scale + ci) / 2][cl]; ++count[cl]; } @@ -462,7 +462,7 @@ for (r = 0; r < h; ++r) { fseq = (unsigned*) g_malloc(scale * sizeof(unsigned)); for (ri = 0; ri < scale; ++ri) - fseq[ri] = fc_sequence(f4, r + ri); + fseq[ri] = fcol_sequence(f4, r + ri); for (c = 0; c < w; ++c) { pixp = f->image[r * w + c]; shrink_pixel(pixp, r, c, hh, fseq, scale); @@ -722,8 +722,8 @@ f4 = h->fourColorFilters; for (r = 0; r < h->height; r++) for (c = 0; c < h->width; c++) { - int cc = fc_INDI(f4, r, c); - f->image[r * f->width + c][fc_INDI(ff, r, c)] = + int cc = fcol_INDI(f4, r, c); + f->image[r * f->width + c][fcol_INDI(ff, r, c)] = h->raw.image[r / 2 * h->raw.width + c / 2][cc]; } int smoothPasses = 1; Index: dcraw_indi.c =================================================================== RCS file: /cvsroot/ufraw/ufraw/dcraw_indi.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- dcraw_indi.c 26 Jun 2012 16:45:35 -0000 1.99 +++ dcraw_indi.c 1 Jul 2012 06:15:13 -0000 1.100 @@ -69,7 +69,7 @@ #define BAYER(row,col) \ image[((row) >> shrink)*iwidth + ((col) >> shrink)][FC(row,col)] -int CLASS fc_INDI(const unsigned filters, const int row, const int col) +int CLASS fcol_INDI(const unsigned filters, const int row, const int col) { static const char filter[16][16] = { { 2, 1, 1, 3, 2, 3, 2, 0, 3, 2, 3, 0, 1, 2, 1, 0 }, @@ -276,11 +276,11 @@ for (y = row - 1; y != row + 2; y++) for (x = col - 1; x != col + 2; x++) if (y >= 0 && y < height && x >= 0 && x < width) { - f = fc_INDI(filters, y, x); + f = fcol_INDI(filters, y, x); sum[f] += image[y * width + x][f]; sum[f + 4]++; } - f = fc_INDI(filters, row, col); + f = fcol_INDI(filters, row, col); FORCC if (c != f && sum[c + 4]) image[row * width + col][c] = sum[c] / sum[c + 4]; } @@ -299,12 +299,12 @@ for (row = 0; row < size; row++) { for (col = 0; col < size; col++) { ip = code[row][col] + 1; - f = fc_INDI(filters, row, col); + f = fcol_INDI(filters, row, col); memset(sum, 0, sizeof sum); for (y = -1; y <= 1; y++) for (x = -1; x <= 1; x++) { shift = (y == 0) + (x == 0); - color = fc_INDI(filters, row + y, col + x); + color = fcol_INDI(filters, row + y, col + x); if (color == f) continue; *ip++ = (width * y + x) * 4 + color; *ip++ = shift; @@ -395,9 +395,9 @@ x2 = *cp++; weight = *cp++; grads = *cp++; - color = fc_INDI(filters, row + y1, col + x1); - if (fc_INDI(filters, row + y2, col + x2) != color) continue; - diag = (fc_INDI(filters, row, col + 1) == color && fc_INDI(filters, row + 1, col) == color) ? 2 : 1; + color = fcol_INDI(filters, row + y1, col + x1); + if (fcol_INDI(filters, row + y2, col + x2) != color) continue; + diag = (fcol_INDI(filters, row, col + 1) == color && fcol_INDI(filters, row + 1, col) == color) ? 2 : 1; if (abs(y1 - y2) == diag && abs(x1 - x2) == diag) continue; *ip++ = (y1 * width + x1) * 4 + color; *ip++ = (y2 * width + x2) * 4 + color; @@ -411,8 +411,8 @@ y = *cp++; x = *cp++; *ip++ = (y * width + x) * 4; - color = fc_INDI(filters, row, col); - if (fc_INDI(filters, row + y, col + x) != color && fc_INDI(filters, row + y * 2, col + x * 2) == color) + color = fcol_INDI(filters, row, col); + if (fcol_INDI(filters, row + y, col + x) != color && fcol_INDI(filters, row + y * 2, col + x * 2) == color) *ip++ = (y * width + x) * 8 + color; else *ip++ = 0; @@ -458,7 +458,7 @@ } thold = gmin + (gmax >> 1); memset(sum, 0, sizeof sum); - color = fc_INDI(filters, row, col); + color = fcol_INDI(filters, row, col); for (num = g = 0; g < 8; g++, ip += 2) { /* Average the neighbors */ if (gval[g] <= thold) { FORCC ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ ufraw-cvs mailing list ufraw-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ufraw-cvs