|
|
|
@ -273,7 +273,7 @@ void CLASS canon_600_load_raw()
|
|
|
|
|
{
|
|
|
|
|
black += pixel[col];
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = pixel[col];
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -346,7 +346,7 @@ void CLASS canon_a5_load_raw()
|
|
|
|
|
buf = (vbits += 16, (buf << 16) + *dp++);
|
|
|
|
|
pixel = buf >> vbits & 0x3ff;
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row+top_margin,col+left_margin);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row+top_margin,col+left_margin);
|
|
|
|
|
if(dfp) *dfp = pixel;
|
|
|
|
|
#endif
|
|
|
|
|
if ((unsigned) row < height && (unsigned) col < width)
|
|
|
|
@ -619,7 +619,7 @@ void CLASS canon_compressed_load_raw()
|
|
|
|
|
#endif
|
|
|
|
|
for (col=0; col < raw_width; col++) {
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row+r,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row+r,col);
|
|
|
|
|
if(dfp) *dfp = pixel[r*raw_width+col];
|
|
|
|
|
if (irow >= height) continue; // skip for top/bottom rows
|
|
|
|
|
#endif
|
|
|
|
@ -771,7 +771,7 @@ void CLASS lossless_jpeg_load_raw()
|
|
|
|
|
if (raw_width == 3984 && (col -= 2) < 0)
|
|
|
|
|
col += (row--,raw_width);
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = val;
|
|
|
|
|
#endif
|
|
|
|
|
if ((unsigned) (row-top_margin) < height) {
|
|
|
|
@ -880,7 +880,7 @@ void CLASS adobe_copy_pixel (int row, int col, ushort **rp)
|
|
|
|
|
BAYER(r,c) = val;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row+top_margin,col+left_margin);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row+top_margin,col+left_margin);
|
|
|
|
|
if(dfp) *dfp = val;
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
@ -987,7 +987,7 @@ void CLASS pentax_k10_load_raw()
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = hpred[col & 1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1081,7 +1081,7 @@ void CLASS nikon_compressed_load_raw()
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = xval;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
@ -1251,7 +1251,7 @@ void CLASS fuji_load_raw()
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = pixel[col];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1330,7 +1330,7 @@ void CLASS rollei_load_raw()
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(todo[i] / raw_width,todo[i] % raw_width);
|
|
|
|
|
ushort *dfp = get_masked_pointer(todo[i] / raw_width,todo[i] % raw_width);
|
|
|
|
|
if(dfp) *dfp = (todo[i+1] & 0x3ff);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
@ -1553,7 +1553,7 @@ void CLASS phase_one_load_raw()
|
|
|
|
|
}
|
|
|
|
|
for (col=0; col < raw_width; col++)
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp)
|
|
|
|
|
*dfp = pixel[col];
|
|
|
|
|
else
|
|
|
|
@ -1608,9 +1608,9 @@ void CLASS phase_one_load_raw_c()
|
|
|
|
|
{
|
|
|
|
|
read_shorts ((ushort *) t_black[0], raw_height*2);
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
imgdata.tqmasked_pixels.ph1_black = (ushort (*)[2])calloc(raw_height*2,sizeof(ushort));
|
|
|
|
|
merror (imgdata.tqmasked_pixels.ph1_black, "phase_one_load_raw_c()");
|
|
|
|
|
memmove(imgdata.tqmasked_pixels.ph1_black,(ushort *) t_black[0],raw_height*2*sizeof(ushort));
|
|
|
|
|
imgdata.masked_pixels.ph1_black = (ushort (*)[2])calloc(raw_height*2,sizeof(ushort));
|
|
|
|
|
merror (imgdata.masked_pixels.ph1_black, "phase_one_load_raw_c()");
|
|
|
|
|
memmove(imgdata.masked_pixels.ph1_black,(ushort *) t_black[0],raw_height*2*sizeof(ushort));
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
for (i=0; i < 256; i++)
|
|
|
|
@ -1662,7 +1662,7 @@ void CLASS phase_one_load_raw_c()
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(i>0 && dfp) *dfp = i;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1675,7 +1675,7 @@ void CLASS phase_one_load_raw_c()
|
|
|
|
|
- ph1.t_black + t_black[row][(col+left_margin) >= ph1.split_col];
|
|
|
|
|
if (i > 0)
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = i;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1719,7 +1719,7 @@ void CLASS hasselblad_load_raw()
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row+top_margin,col+left_margin);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row+top_margin,col+left_margin);
|
|
|
|
|
if(dfp) *dfp = pred[i];
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
@ -1833,7 +1833,7 @@ void CLASS packed_12_load_raw()
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = bitbuf << (52-vbits) >> 52;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
@ -1871,7 +1871,7 @@ void CLASS unpacked_load_raw()
|
|
|
|
|
//fseek (ifp, 2*(raw_width - width), SEEK_CUR);
|
|
|
|
|
for (col=0; col < raw_width; col++)
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp)
|
|
|
|
|
*dfp = pixel[col];
|
|
|
|
|
else
|
|
|
|
@ -1904,7 +1904,7 @@ void CLASS nokia_load_raw()
|
|
|
|
|
int col;
|
|
|
|
|
for(col=0;col<width;col++)
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp)
|
|
|
|
|
*dfp = pixel[col];
|
|
|
|
|
}
|
|
|
|
@ -1969,7 +1969,7 @@ void CLASS panasonic_load_raw()
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
if(col>=width)
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp)*dfp = pred[col & 1];
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
@ -2008,7 +2008,7 @@ void CLASS olympus_e300_load_raw()
|
|
|
|
|
#else
|
|
|
|
|
for (col=0; col < raw_width; col++)
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp)
|
|
|
|
|
*dfp = (pixel[col] & 0xfff);
|
|
|
|
|
else
|
|
|
|
@ -2445,14 +2445,14 @@ void CLASS eight_bit_load_raw()
|
|
|
|
|
BAYER(row,col-left_margin) = val;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = val;
|
|
|
|
|
lblack += val;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else // top/bottom margins
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = val;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2547,7 +2547,7 @@ void CLASS kodak_262_load_raw()
|
|
|
|
|
black += val;
|
|
|
|
|
#else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = val;
|
|
|
|
|
black += val;
|
|
|
|
|
}
|
|
|
|
@ -2741,12 +2741,12 @@ void CLASS sony_load_raw()
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
for (col=0; col < left_margin; col++)
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = ntohs(pixel[col]);
|
|
|
|
|
}
|
|
|
|
|
for (col=left_margin+width; col < raw_width; col++)
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = ntohs(pixel[col]);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
@ -2782,7 +2782,7 @@ void CLASS sony_arw_load_raw()
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row,col);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row,col);
|
|
|
|
|
if(dfp) *dfp = sum;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
@ -2903,7 +2903,7 @@ void CLASS smal_decode_segment (unsigned seg[2][2], int holes)
|
|
|
|
|
#ifdef LIBRAW_LIBRARY_BUILD
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ushort *dfp = get_tqmasked_pointer(row+top_margin,col+left_margin);
|
|
|
|
|
ushort *dfp = get_masked_pointer(row+top_margin,col+left_margin);
|
|
|
|
|
if(dfp) *dfp = pred[pix &1];
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|