Remove the tq in front of these incorrectly TQt4-converted methods/data members:

tqrepaint[...]
tqinvalidate[...]
tqparent[...]
tqmask[...]
tqlayout[...]
tqalignment[...]


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/libkdcraw@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent d646e75cb7
commit 12231ef224

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

@ -62,7 +62,7 @@ DllDef int libraw_cameraCount();
DllDef void libraw_set_memerror_handler(libraw_data_t*, memory_callback cb, void *datap); DllDef void libraw_set_memerror_handler(libraw_data_t*, memory_callback cb, void *datap);
DllDef void libraw_set_dataerror_handler(libraw_data_t*,data_callback func,void *datap); DllDef void libraw_set_dataerror_handler(libraw_data_t*,data_callback func,void *datap);
DllDef void libraw_set_progress_handler(libraw_data_t*,progress_callback cb,void *datap); DllDef void libraw_set_progress_handler(libraw_data_t*,progress_callback cb,void *datap);
DllDef int libraw_add_tqmasked_borders_to_bitmap(libraw_data_t* lr); DllDef int libraw_add_masked_borders_to_bitmap(libraw_data_t* lr);
DllDef const char * libraw_unpack_function_name(libraw_data_t* lr); DllDef const char * libraw_unpack_function_name(libraw_data_t* lr);
DllDef int libraw_rotate_fuji_raw(libraw_data_t* lr); DllDef int libraw_rotate_fuji_raw(libraw_data_t* lr);
@ -124,7 +124,7 @@ class DllDef LibRaw
int FC(int row,int col) { return (imgdata.idata.filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3);} int FC(int row,int col) { return (imgdata.idata.filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3);}
int fc (int row, int col); int fc (int row, int col);
int add_tqmasked_borders_to_bitmap(); int add_masked_borders_to_bitmap();
const char *unpack_function_name(); const char *unpack_function_name();
int rotate_fuji_raw(); int rotate_fuji_raw();
@ -157,8 +157,8 @@ class DllDef LibRaw
// moved from implementation level to private: visibility // moved from implementation level to private: visibility
void init_tqmasked_ptrs(); void init_masked_ptrs();
ushort *get_tqmasked_pointer(int row, int col); ushort *get_masked_pointer(int row, int col);
int own_filtering_supported(){ return 0;} int own_filtering_supported(){ return 0;}
void identify(); void identify();

@ -140,8 +140,8 @@ typedef struct
double pixel_aspect; double pixel_aspect;
int flip; int flip;
// tqmasked border sizes // masked border sizes
ushort right_margin,bottom_margin; // right tqmasked width and bottom height, inited after idendify() ushort right_margin,bottom_margin; // right masked width and bottom height, inited after idendify()
} libraw_image_sizes_t; } libraw_image_sizes_t;
@ -264,7 +264,7 @@ typedef struct
ushort *bottom; // bottom size=(raw_height-height-top_margin)*width ushort *bottom; // bottom size=(raw_height-height-top_margin)*width
ushort *br; // bottom right size=(raw_height-height-top_margin)* ushort *br; // bottom right size=(raw_height-height-top_margin)*
ushort (*ph1_black)[2]; // Phase One black ushort (*ph1_black)[2]; // Phase One black
}libraw_tqmasked_t; }libraw_masked_t;
typedef struct typedef struct
{ {
@ -275,14 +275,14 @@ typedef struct
libraw_colordata_t color; libraw_colordata_t color;
libraw_imgother_t other; libraw_imgother_t other;
libraw_thumbnail_t thumbnail; libraw_thumbnail_t thumbnail;
libraw_tqmasked_t tqmasked_pixels; libraw_masked_t masked_pixels;
ushort (*image)[4] ; ushort (*image)[4] ;
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp shared(image) #pragma omp shared(image)
#endif #endif
libraw_output_params_t params; libraw_output_params_t params;
// pointer to LibRaw class for use in C calls // pointer to LibRaw class for use in C calls
void *tqparent_class; void *parent_class;
} libraw_data_t; } libraw_data_t;

@ -4,7 +4,7 @@
* Created: Fri Jan 02, 2009 * Created: Fri Jan 02, 2009
* *
* LibRaw sample * LibRaw sample
* Generates unprocessed raw image: with tqmasked pixels and without black subtraction * Generates unprocessed raw image: with masked pixels and without black subtraction
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -116,7 +116,7 @@ int main(int ac, char *av[])
if(verbose) if(verbose)
printf("Unpacked....\n"); printf("Unpacked....\n");
if( (ret = RawProcessor.add_tqmasked_borders_to_bitmap() ) != LIBRAW_SUCCESS) if( (ret = RawProcessor.add_masked_borders_to_bitmap() ) != LIBRAW_SUCCESS)
{ {
fprintf(stderr,"Cannot add tqmask data to bitmap %s\n",av[i]); fprintf(stderr,"Cannot add tqmask data to bitmap %s\n",av[i]);
} }

@ -27,78 +27,78 @@ extern "C"
const char* libraw_unpack_function_name(libraw_data_t* lr) const char* libraw_unpack_function_name(libraw_data_t* lr)
{ {
if(!lr) return "NULL parameter passed"; if(!lr) return "NULL parameter passed";
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->unpack_function_name(); return ip->unpack_function_name();
} }
int libraw_rotate_fuji_raw(libraw_data_t* lr) int libraw_rotate_fuji_raw(libraw_data_t* lr)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->rotate_fuji_raw(); return ip->rotate_fuji_raw();
} }
int libraw_add_tqmasked_borders_to_bitmap(libraw_data_t* lr) int libraw_add_masked_borders_to_bitmap(libraw_data_t* lr)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->add_tqmasked_borders_to_bitmap(); return ip->add_masked_borders_to_bitmap();
} }
int libraw_open_file(libraw_data_t* lr, const char *file) int libraw_open_file(libraw_data_t* lr, const char *file)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->open_file(file); return ip->open_file(file);
} }
int libraw_open_buffer(libraw_data_t* lr, void *buffer, size_t size) int libraw_open_buffer(libraw_data_t* lr, void *buffer, size_t size)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->open_buffer(buffer,size); return ip->open_buffer(buffer,size);
} }
int libraw_unpack(libraw_data_t* lr) int libraw_unpack(libraw_data_t* lr)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->unpack(); return ip->unpack();
} }
int libraw_unpack_thumb(libraw_data_t* lr) int libraw_unpack_thumb(libraw_data_t* lr)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->unpack_thumb(); return ip->unpack_thumb();
} }
void libraw_recycle(libraw_data_t* lr) void libraw_recycle(libraw_data_t* lr)
{ {
if(!lr) return; if(!lr) return;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
ip->recycle(); ip->recycle();
} }
void libraw_close(libraw_data_t* lr) void libraw_close(libraw_data_t* lr)
{ {
if(!lr) return; if(!lr) return;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
delete ip; delete ip;
} }
void libraw_set_memerror_handler(libraw_data_t* lr, memory_callback cb,void *data) void libraw_set_memerror_handler(libraw_data_t* lr, memory_callback cb,void *data)
{ {
if(!lr) return; if(!lr) return;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
ip->set_memerror_handler(cb,data); ip->set_memerror_handler(cb,data);
} }
void libraw_set_dataerror_handler(libraw_data_t* lr,data_callback func,void *data) void libraw_set_dataerror_handler(libraw_data_t* lr,data_callback func,void *data)
{ {
if(!lr) return; if(!lr) return;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
ip->set_dataerror_handler(func,data); ip->set_dataerror_handler(func,data);
} }
void libraw_set_progress_handler(libraw_data_t* lr, progress_callback cb,void *data) void libraw_set_progress_handler(libraw_data_t* lr, progress_callback cb,void *data)
{ {
if(!lr) return; if(!lr) return;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
ip->set_progress_handler(cb,data); ip->set_progress_handler(cb,data);
} }
@ -107,34 +107,34 @@ extern "C"
int libraw_adjust_sizes_info_only(libraw_data_t* lr) int libraw_adjust_sizes_info_only(libraw_data_t* lr)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->adjust_sizes_info_only(); return ip->adjust_sizes_info_only();
} }
int libraw_dcraw_document_mode_processing(libraw_data_t* lr) int libraw_dcraw_document_mode_processing(libraw_data_t* lr)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->dcraw_document_mode_processing(); return ip->dcraw_document_mode_processing();
} }
int libraw_dcraw_ppm_tiff_writer(libraw_data_t* lr,const char *filename) int libraw_dcraw_ppm_tiff_writer(libraw_data_t* lr,const char *filename)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->dcraw_ppm_tiff_writer(filename); return ip->dcraw_ppm_tiff_writer(filename);
} }
int libraw_dcraw_thumb_writer(libraw_data_t* lr,const char *fname) int libraw_dcraw_thumb_writer(libraw_data_t* lr,const char *fname)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->dcraw_thumb_writer(fname); return ip->dcraw_thumb_writer(fname);
} }
int libraw_dcraw_process(libraw_data_t* lr) int libraw_dcraw_process(libraw_data_t* lr)
{ {
if(!lr) return EINVAL; if(!lr) return EINVAL;
LibRaw *ip = (LibRaw*) lr->tqparent_class; LibRaw *ip = (LibRaw*) lr->parent_class;
return ip->dcraw_process(); return ip->dcraw_process();
} }

@ -53,7 +53,7 @@ extern "C"
case LIBRAW_UNSUPPORTED_THUMBNAIL: case LIBRAW_UNSUPPORTED_THUMBNAIL:
return "Unsupported thumbnail format"; return "Unsupported thumbnail format";
case LIBRAW_CANNOT_ADDMASK: case LIBRAW_CANNOT_ADDMASK:
return "Cannot add tqmasked pixels to resized image"; return "Cannot add masked pixels to resized image";
case LIBRAW_UNSUFFICIENT_MEMORY: case LIBRAW_UNSUFFICIENT_MEMORY:
return "Unsufficient memory"; return "Unsufficient memory";
case LIBRAW_DATA_ERROR: case LIBRAW_DATA_ERROR:
@ -85,7 +85,7 @@ const float LibRaw_constants::d65_white[3] = { 0.950456, 1, 1.088754 };
#define S imgdata.sizes #define S imgdata.sizes
#define O imgdata.params #define O imgdata.params
#define C imgdata.color #define C imgdata.color
#define M imgdata.tqmasked_pixels #define M imgdata.masked_pixels
#define T imgdata.thumbnail #define T imgdata.thumbnail
#define IO libraw_internal_data.internal_output_params #define IO libraw_internal_data.internal_output_params
#define ID libraw_internal_data.internal_data #define ID libraw_internal_data.internal_data
@ -162,7 +162,7 @@ LibRaw:: LibRaw(unsigned int flags)
imgdata.params.output_bps=8; imgdata.params.output_bps=8;
imgdata.params.use_fuji_rotate=1; imgdata.params.use_fuji_rotate=1;
imgdata.params.auto_bright_thr = 0.01; imgdata.params.auto_bright_thr = 0.01;
imgdata.tqparent_class = this; imgdata.parent_class = this;
imgdata.progress_flags = 0; imgdata.progress_flags = 0;
tls = new LibRaw_TLS; tls = new LibRaw_TLS;
tls->init(); tls->init();
@ -225,11 +225,11 @@ void LibRaw:: recycle()
FREE(libraw_internal_data.output_data.histogram); FREE(libraw_internal_data.output_data.histogram);
FREE(libraw_internal_data.output_data.oprof); FREE(libraw_internal_data.output_data.oprof);
FREE(imgdata.color.profile); FREE(imgdata.color.profile);
FREE(imgdata.tqmasked_pixels.buffer); FREE(imgdata.masked_pixels.buffer);
FREE(imgdata.tqmasked_pixels.ph1_black); FREE(imgdata.masked_pixels.ph1_black);
#undef FREE #undef FREE
#define ZERO(a) bzero(&a,sizeof(a)) #define ZERO(a) bzero(&a,sizeof(a))
ZERO(imgdata.tqmasked_pixels); ZERO(imgdata.masked_pixels);
ZERO(imgdata.sizes); ZERO(imgdata.sizes);
ZERO(libraw_internal_data.internal_output_params); ZERO(libraw_internal_data.internal_output_params);
#undef ZERO #undef ZERO
@ -316,7 +316,7 @@ void LibRaw:: merror (void *ptr, const char *where)
throw LIBRAW_EXCEPTION_ALLOC; throw LIBRAW_EXCEPTION_ALLOC;
} }
ushort * LibRaw::get_tqmasked_pointer(int row, int col) ushort * LibRaw::get_masked_pointer(int row, int col)
{ {
if(row<0 || col < 0) return NULL; if(row<0 || col < 0) return NULL;
if(!M.buffer) return NULL; if(!M.buffer) return NULL;
@ -391,7 +391,7 @@ ushort * LibRaw::get_tqmasked_pointer(int row, int col)
return NULL; return NULL;
} }
void LibRaw:: init_tqmasked_ptrs() void LibRaw:: init_masked_ptrs()
{ {
if(!M.buffer) return; if(!M.buffer) return;
@ -411,7 +411,7 @@ void LibRaw:: init_tqmasked_ptrs()
} }
int LibRaw::add_tqmasked_borders_to_bitmap() int LibRaw::add_masked_borders_to_bitmap()
{ {
CHECK_ORDER_HIGH(LIBRAW_PROGRESS_PRE_INTERPOLATE); CHECK_ORDER_HIGH(LIBRAW_PROGRESS_PRE_INTERPOLATE);
CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW); CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW);
@ -434,14 +434,14 @@ int LibRaw::add_tqmasked_borders_to_bitmap()
ushort (*newimage)[4]; ushort (*newimage)[4];
newimage = (ushort (*)[4]) calloc (S.raw_height*S.raw_width, sizeof (*newimage)); newimage = (ushort (*)[4]) calloc (S.raw_height*S.raw_width, sizeof (*newimage));
merror (newimage, "add_tqmasked_borders_to_bitmap()"); merror (newimage, "add_masked_borders_to_bitmap()");
int r,c; int r,c;
// top rows // top rows
for (r=0; r<S.top_margin;r++) for (r=0; r<S.top_margin;r++)
for(c=0;c<S.raw_width;c++) for(c=0;c<S.raw_width;c++)
{ {
ushort *p = get_tqmasked_pointer(r,c); ushort *p = get_masked_pointer(r,c);
if(p) if(p)
newimage[r*S.raw_width+c][FC(r,c)] = *p; newimage[r*S.raw_width+c][FC(r,c)] = *p;
} }
@ -451,7 +451,7 @@ int LibRaw::add_tqmasked_borders_to_bitmap()
int row = r-S.top_margin; int row = r-S.top_margin;
for(c=0;c<S.left_margin;c++) for(c=0;c<S.left_margin;c++)
{ {
ushort *p = get_tqmasked_pointer(r,c); ushort *p = get_masked_pointer(r,c);
if(p) if(p)
newimage[r*S.raw_width+c][FC(r,c)] = *p; newimage[r*S.raw_width+c][FC(r,c)] = *p;
} }
@ -462,7 +462,7 @@ int LibRaw::add_tqmasked_borders_to_bitmap()
} }
for(c=S.left_margin+S.iwidth;c<S.raw_width;c++) for(c=S.left_margin+S.iwidth;c<S.raw_width;c++)
{ {
ushort *p = get_tqmasked_pointer(r,c); ushort *p = get_masked_pointer(r,c);
if(p) if(p)
newimage[r*S.raw_width+c][FC(r,c)] = *p; newimage[r*S.raw_width+c][FC(r,c)] = *p;
} }
@ -471,7 +471,7 @@ int LibRaw::add_tqmasked_borders_to_bitmap()
for (r=S.top_margin+S.height; r<S.raw_height;r++) for (r=S.top_margin+S.height; r<S.raw_height;r++)
for(c=0;c<S.raw_width;c++) for(c=0;c<S.raw_width;c++)
{ {
ushort *p = get_tqmasked_pointer(r,c); ushort *p = get_masked_pointer(r,c);
if(p) if(p)
newimage[r*S.raw_width+c][FC(r,c)] = *p; newimage[r*S.raw_width+c][FC(r,c)] = *p;
} }
@ -656,9 +656,9 @@ int LibRaw::unpack(void)
{ {
unsigned sz = S.raw_height*(S.left_margin+S.right_margin) unsigned sz = S.raw_height*(S.left_margin+S.right_margin)
+ S.width*(S.top_margin+S.bottom_margin); + S.width*(S.top_margin+S.bottom_margin);
imgdata.tqmasked_pixels.buffer = (ushort*) calloc(sz, sizeof(ushort)); imgdata.masked_pixels.buffer = (ushort*) calloc(sz, sizeof(ushort));
merror (imgdata.tqmasked_pixels.buffer, "unpack()"); merror (imgdata.masked_pixels.buffer, "unpack()");
init_tqmasked_ptrs(); init_masked_ptrs();
} }
if (libraw_internal_data.unpacker_data.meta_length) if (libraw_internal_data.unpacker_data.meta_length)
{ {

Loading…
Cancel
Save