~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/libkdcraw/libraw/libraw/libraw.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
DllDef    libraw_data_t       *libraw_init(unsigned int flags);
54
54
DllDef    int                 libraw_open_file(libraw_data_t*, const char *);
55
55
DllDef    int                 libraw_open_file_ex(libraw_data_t*, const char *, INT64 max_buff_sz);
 
56
#ifdef WIN32
 
57
DllDef    int                 libraw_open_wfile(libraw_data_t*, const wchar_t *);
 
58
DllDef    int                 libraw_open_wfile_ex(libraw_data_t*, const wchar_t *, INT64 max_buff_sz);
 
59
#endif
56
60
DllDef    int                 libraw_open_buffer(libraw_data_t*, void * buffer, size_t size);
57
61
DllDef    int                 libraw_unpack(libraw_data_t*);
58
62
DllDef    int                 libraw_unpack_thumb(libraw_data_t*);
76
80
 
77
81
    /* DCRAW compatibility */
78
82
DllDef    int                 libraw_adjust_sizes_info_only(libraw_data_t*);
79
 
DllDef    int                 libraw_dcraw_document_mode_processing(libraw_data_t*);
80
83
DllDef    int                 libraw_dcraw_ppm_tiff_writer(libraw_data_t* lr,const char *filename);
81
84
DllDef    int                 libraw_dcraw_thumb_writer(libraw_data_t* lr,const char *fname);
82
85
DllDef    int                 libraw_dcraw_process(libraw_data_t* lr);
97
100
    int verbose;
98
101
 
99
102
    LibRaw(unsigned int flags = LIBRAW_OPTIONS_NONE);
100
 
    
101
103
    libraw_output_params_t*     output_params_ptr() { return &imgdata.params;}
102
104
    int                         open_file(const char *fname, INT64 max_buffered_sz=LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE);
 
105
#ifdef WIN32
 
106
        int                         open_file(const wchar_t *fname, INT64 max_buffered_sz=LIBRAW_USE_STREAMS_DATASTREAM_MAXSIZE);
 
107
#endif
103
108
    int                         open_buffer(void *buffer, size_t size);
104
109
    int                         open_datastream(LibRaw_abstract_datastream *);
105
110
    int                         unpack(void);
108
113
    int                         adjust_sizes_info_only(void);
109
114
    void                        subtract_black();
110
115
    int                         raw2image();
111
 
    int                         raw2image_ex();
 
116
    int                         raw2image_ex(int do_subtract_black);
112
117
    void                        raw2image_start();
113
118
    void                        free_image();
114
119
    int                         adjust_maximum();
124
129
    static const char*          strprogress(enum LibRaw_progress);
125
130
    static const char*          strerror(int p);
126
131
    /* dcraw emulation */
127
 
    int                         dcraw_document_mode_processing();
128
132
    int                         dcraw_ppm_tiff_writer(const char *filename);
129
133
    int                         dcraw_thumb_writer(const char *fname);
130
134
    int                         dcraw_process(void);
131
135
    /* memory writers */
132
 
    libraw_processed_image_t*   dcraw_make_mem_image(int *errcode=NULL);  
133
 
    libraw_processed_image_t*   dcraw_make_mem_thumb(int *errcode=NULL);
 
136
    virtual libraw_processed_image_t*   dcraw_make_mem_image(int *errcode=NULL);  
 
137
    virtual libraw_processed_image_t*   dcraw_make_mem_thumb(int *errcode=NULL);
134
138
    static void                 dcraw_clear_mem(libraw_processed_image_t*);
135
139
    
136
140
    /* Additional calls for make_mem_image */
139
143
 
140
144
    /* free all internal data structures */
141
145
    void         recycle(); 
142
 
    ~LibRaw(void) { recycle(); delete tls; }
 
146
    virtual ~LibRaw(void); 
143
147
 
144
148
    int COLOR(int row, int col) { return libraw_internal_data.internal_output_params.fuji_width? FCF(row,col):FC(row,col);}
145
149
 
146
150
    int FC(int row,int col) { return (imgdata.idata.filters >> (((row << 1 & 14) | (col & 1)) << 1) & 3);}
147
 
    int         fc (int row, int col);
 
151
    int         fcol (int row, int col);
148
152
    
149
153
    const char *unpack_function_name();
150
154
    int get_decoder_info(libraw_decoder_info_t* d_info);
151
155
    libraw_internal_data_t * get_internal_data_pointer(){ return &libraw_internal_data; }
152
156
 
153
 
  private:
 
157
    /* Debanding filter */
 
158
    int                         wf_remove_banding();
 
159
 
 
160
  /* Phase one correction/subtractBL calls */
 
161
  void phase_one_subtract_black(ushort *src, ushort *dest);
 
162
  void        phase_one_correct();
 
163
  int set_rawspeed_camerafile(char *filename);
 
164
 
 
165
 
 
166
protected:
 
167
    void phase_one_allocate_tempbuffer();
 
168
    void phase_one_free_tempbuffer();
 
169
    virtual int  is_phaseone_compressed();
 
170
    /* Hotspots */
 
171
    virtual void copy_fuji_uncropped(unsigned short cblack[4], unsigned short *dmaxp);
 
172
    virtual void copy_bayer(unsigned short cblack[4], unsigned short *dmaxp);
 
173
    virtual void fuji_rotate();
 
174
    virtual void convert_to_rgb_loop(float out_cam[3][4]);
 
175
    virtual void lin_interpolate_loop(int code[16][16][32],int size);
 
176
    virtual void scale_colors_loop(float scale_mul[4]);
154
177
 
155
178
    int FCF(int row,int col) { 
156
179
        int rr,cc;
164
187
        return FC(rr,cc);
165
188
    }
166
189
 
 
190
    void adjust_bl();
167
191
    void*        malloc(size_t t);
168
192
    void*        calloc(size_t n,size_t t);
169
193
    void*        realloc(void *p, size_t s);
179
203
    libraw_callbacks_t callbacks;
180
204
 
181
205
    LibRaw_constants rgb_constants;
 
206
 
182
207
    void        (LibRaw:: *write_thumb)();
183
208
    void        (LibRaw:: *write_fun)();
184
209
    void        (LibRaw:: *load_raw)();
194
219
    void        write_ppm_tiff ();
195
220
    void        convert_to_rgb();
196
221
    void        remove_zeroes();
 
222
    void        crop_masked_pixels();
197
223
#ifndef NO_LCMS
198
224
    void        apply_profile(const char*,const char*);
199
225
#endif
231
257
    void        recover_highlights();
232
258
    void        green_matching();
233
259
 
234
 
    void        fuji_rotate();
235
260
    void        stretch();
236
261
 
237
262
    void        foveon_thumb ();
238
263
    void        jpeg_thumb_writer (FILE *tfp,char *thumb,int thumb_length);
239
264
    void        jpeg_thumb ();
240
265
    void        ppm_thumb ();
 
266
    void        ppm16_thumb();
241
267
    void        layer_thumb ();
242
268
    void        rollei_thumb ();
243
269
    void        kodak_thumb_load_raw();
248
274
    int         flip_index (int row, int col);
249
275
    void        gamma_curve (double pwr, double ts, int mode, int imax);
250
276
 
 
277
  /* RawSpeed data */
 
278
  void          *_rawspeed_camerameta;
 
279
  void      *_rawspeed_decoder;
 
280
  void          fix_after_rawspeed();
 
281
 
251
282
 
252
283
#ifdef LIBRAW_LIBRARY_BUILD 
253
284
#include "internal/libraw_internal_funcs.h"