Lines 5788-5817
void CLASS lin_interpolate()
Link Here
|
5788 |
*/ |
5788 |
*/ |
5789 |
void CLASS vng_interpolate() |
5789 |
void CLASS vng_interpolate() |
5790 |
{ |
5790 |
{ |
5791 |
static const signed char *cp, terms[] = { |
5791 |
struct interpolate_terms { |
5792 |
-2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01, |
5792 |
signed char y1, x1, y2, x2, weight; |
5793 |
-2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01, |
5793 |
unsigned char grads; |
5794 |
-2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03, |
5794 |
}; |
5795 |
-2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06, |
5795 |
static const interpolate_terms terms[] = { |
5796 |
-2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04, |
5796 |
{-2,-2,+0,-1,0,0x01}, {-2,-2,+0,+0,1,0x01}, {-2,-1,-1,+0,0,0x01}, |
5797 |
-1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, |
5797 |
{-2,-1,+0,-1,0,0x02}, {-2,-1,+0,+0,0,0x03}, {-2,-1,+0,+1,1,0x01}, |
5798 |
-1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, |
5798 |
{-2,+0,+0,-1,0,0x06}, {-2,+0,+0,+0,1,0x02}, {-2,+0,+0,+1,0,0x03}, |
5799 |
-1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11, |
5799 |
{-2,+1,-1,+0,0,0x04}, {-2,+1,+0,-1,1,0x04}, {-2,+1,+0,+0,0,0x06}, |
5800 |
-1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11, |
5800 |
{-2,+1,+0,+1,0,0x02}, {-2,+2,+0,+0,1,0x04}, {-2,+2,+0,+1,0,0x04}, |
5801 |
-1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22, |
5801 |
{-1,-2,-1,+0,0,0x80}, {-1,-2,+0,-1,0,0x01}, {-1,-2,+1,-1,0,0x01}, |
5802 |
-1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44, |
5802 |
{-1,-2,+1,+0,1,0x01}, {-1,-1,-1,+1,0,0x88}, {-1,-1,+1,-2,0,0x40}, |
5803 |
-1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10, |
5803 |
{-1,-1,+1,-1,0,0x22}, {-1,-1,+1,+0,0,0x33}, {-1,-1,+1,+1,1,0x11}, |
5804 |
-1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04, |
5804 |
{-1,+0,-1,+2,0,0x08}, {-1,+0,+0,-1,0,0x44}, {-1,+0,+0,+1,0,0x11}, |
5805 |
+0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, |
5805 |
{-1,+0,+1,-2,1,0x40}, {-1,+0,+1,-1,0,0x66}, {-1,+0,+1,+0,1,0x22}, |
5806 |
+0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20, |
5806 |
{-1,+0,+1,+1,0,0x33}, {-1,+0,+1,+2,1,0x10}, {-1,+1,+1,-1,1,0x44}, |
5807 |
+0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08, |
5807 |
{-1,+1,+1,+0,0,0x66}, {-1,+1,+1,+1,0,0x22}, {-1,+1,+1,+2,0,0x10}, |
5808 |
+0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20, |
5808 |
{-1,+2,+0,+1,0,0x04}, {-1,+2,+1,+0,1,0x04}, {-1,+2,+1,+1,0,0x04}, |
5809 |
+0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44, |
5809 |
{+0,-2,+0,+0,1,0x80}, {+0,-1,+0,+1,1,0x88}, {+0,-1,+1,-2,0,0x40}, |
5810 |
+0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60, |
5810 |
{+0,-1,+1,+0,0,0x11}, {+0,-1,+2,-2,0,0x40}, {+0,-1,+2,-1,0,0x20}, |
5811 |
+0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, |
5811 |
{+0,-1,+2,+0,0,0x30}, {+0,-1,+2,+1,1,0x10}, {+0,+0,+0,+2,1,0x08}, |
5812 |
+1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, |
5812 |
{+0,+0,+2,-2,1,0x40}, {+0,+0,+2,-1,0,0x60}, {+0,+0,+2,+0,1,0x20}, |
5813 |
+1,+0,+2,+1,0,0x10 |
5813 |
{+0,+0,+2,+1,0,0x30}, {+0,+0,+2,+2,1,0x10}, {+0,+1,+1,+0,0,0x44}, |
5814 |
}, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; |
5814 |
{+0,+1,+1,+2,0,0x10}, {+0,+1,+2,-1,1,0x40}, {+0,+1,+2,+0,0,0x60}, |
|
|
5815 |
{+0,+1,+2,+1,0,0x20}, {+0,+1,+2,+2,0,0x10}, {+1,-2,+1,+0,0,0x80}, |
5816 |
{+1,-1,+1,+1,0,0x88}, {+1,+0,+1,+2,0,0x08}, {+1,+0,+2,-1,0,0x40}, |
5817 |
{+1,+0,+2,+1,0,0x10} |
5818 |
}; |
5819 |
const interpolate_terms *cpt; |
5820 |
signed char *cp; |
5821 |
signed char chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; |
5815 |
ushort (*brow[5])[4], *pix; |
5822 |
ushort (*brow[5])[4], *pix; |
5816 |
int prow=8, pcol=2, *ip, *code[16][16], gval[8], gmin, gmax, sum[4]; |
5823 |
int prow=8, pcol=2, *ip, *code[16][16], gval[8], gmin, gmax, sum[4]; |
5817 |
int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag; |
5824 |
int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag; |
Lines 5829-5839
void CLASS vng_interpolate()
Link Here
|
5829 |
for (row=0; row < prow; row++) /* Precalculate for VNG */ |
5836 |
for (row=0; row < prow; row++) /* Precalculate for VNG */ |
5830 |
for (col=0; col < pcol; col++) { |
5837 |
for (col=0; col < pcol; col++) { |
5831 |
code[row][col] = ip; |
5838 |
code[row][col] = ip; |
5832 |
for (cp=terms, t=0; t < 64; t++) { |
5839 |
for (cpt=&terms[0], t=0; t < 64, cpt = &terms[t]; t++) { |
5833 |
y1 = *cp++; x1 = *cp++; |
5840 |
y1 = cpt->y1; x1 = cpt->x1; |
5834 |
y2 = *cp++; x2 = *cp++; |
5841 |
y2 = cpt->y2; x2 = cpt->x2; |
5835 |
weight = *cp++; |
5842 |
weight = cpt->weight; |
5836 |
grads = *cp++; |
5843 |
grads = cpt->grads; |
5837 |
color = fcol(row+y1,col+x1); |
5844 |
color = fcol(row+y1,col+x1); |
5838 |
if (fcol(row+y2,col+x2) != color) continue; |
5845 |
if (fcol(row+y2,col+x2) != color) continue; |
5839 |
diag = (fcol(row,col+1) == color && fcol(row+1,col) == color) ? 2:1; |
5846 |
diag = (fcol(row,col+1) == color && fcol(row+1,col) == color) ? 2:1; |
Lines 16289-16295
void CLASS tiff_head (struct tiff_hdr *th, int full)
Link Here
|
16289 |
strncpy (th->desc, desc, 512); |
16296 |
strncpy (th->desc, desc, 512); |
16290 |
strncpy (th->make, make, 64); |
16297 |
strncpy (th->make, make, 64); |
16291 |
strncpy (th->model, model, 64); |
16298 |
strncpy (th->model, model, 64); |
16292 |
strcpy (th->soft, "dcraw v"DCRAW_VERSION); |
16299 |
strcpy (th->soft, "dcraw v" DCRAW_VERSION); |
16293 |
t = localtime (×tamp); |
16300 |
t = localtime (×tamp); |
16294 |
sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", |
16301 |
sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", |
16295 |
t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); |
16302 |
t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); |