Paste Code
Paste Blends
Paste Images
/* code copied from UFRaw (which originates from dcraw) */
static void
hat_transform (wdsint * temp, wdsint * base, int st, int size, int sc)
{
int i;
for (i = 0; i < sc; i++)
temp[i] = 2 * base[st * i] + base[st * (sc - i)] + base[st * (i + sc)];
for (; i + sc < size; i++)
temp[i] = 2 * base[st * i] + base[st * (i - sc)] + base[st * (i + sc)];
for (; i < size; i++)
temp[i] = 2 * base[st * i] + base[st * (i - sc)]
+ base[st * (2 * size - 2 - (i + sc))];
}
  1. /* code copied from UFRaw (which originates from dcraw) */
  2. static void
  3. hat_transform (wdsint * temp, wdsint * base, int st, int size, int sc)
  4. {
  5.   int i;
  6.   for (i = 0; i < sc; i++)
  7.     temp[i] = 2 * base[st * i] + base[st * (sc - i)] + base[st * (i + sc)];
  8.   for (; i + sc < size; i++)
  9.     temp[i] = 2 * base[st * i] + base[st * (i - sc)] + base[st * (i + sc)];
  10.   for (; i < size; i++)
  11.     temp[i] = 2 * base[st * i] + base[st * (i - sc)]
  12.       + base[st * (2 * size - 2 - (i + sc))];
  13. }
go to heaven