-// CINELERRA
-char dcraw_info[1024];
-float **dcraw_data;
-int dcraw_alpha;
-float dcraw_matrix[9];
-
-// CINELERRA
-#define CLASS
-struct jhead;
-struct tiff_tag;
-struct tiff_hdr;
-
-#include "dcraw.h"
-
-// CINELERRA
-static FILE *ifp, *ofp;
-static short order;
-static const char *ifname;
-static char *meta_data, xtrans[6][6], xtrans_abs[6][6];
-static char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64];
-static float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len;
-static time_t timestamp;
-static off_t strip_offset, data_offset;
-static off_t thumb_offset, meta_offset, profile_offset;
-static unsigned shot_order, kodak_cbpp, exif_cfa, unique_id;
-static unsigned thumb_length, meta_length, profile_length;
-static unsigned thumb_misc, *oprof, fuji_layout;
-static unsigned tiff_nifds, tiff_samples, tiff_bps, tiff_compress;
-static unsigned black, maximum, mix_green, raw_color, zero_is_bad;
-static unsigned zero_after_ff, is_raw, dng_version, is_foveon, data_error;
-static unsigned tile_width, tile_length, gpsdata[32], load_flags;
-static unsigned flip, tiff_flip, filters, colors;
-static ushort raw_height, raw_width, height, width, top_margin, left_margin;
-static ushort shrink, iheight, iwidth, fuji_width, thumb_width, thumb_height;
-static ushort *raw_image, (*image)[4], cblack[4102];
-static ushort white[8][8], curve[0x10000], cr2_slice[3], sraw_mul[4];
-
-static unsigned shot_select=0, multi_out=0;
-static double pixel_aspect, aber[4]={1,1,1,1}, gamm[6]={ 0.45,4.5,0,0,0,0 };
-static float bright=1, user_mul[4]={0,0,0,0}, threshold=0;
-static int mask[8][4];
-static int half_size=0, four_color_rgb=0, document_mode=0, highlight=0;
-static int verbose=0, use_auto_wb=0, use_camera_wb=0, use_camera_matrix=1;
-static int output_color=1, output_bps=8, output_tiff=0, med_passes=0;
-static int no_auto_bright=0;
-static unsigned greybox[4] = { 0, 0, UINT_MAX, UINT_MAX };
-static float cam_mul[4], pre_mul[4], cmatrix[3][4], rgb_cam[3][4];
-static const double xyz_rgb[3][3] = { /* XYZ from RGB */
- { 0.412453, 0.357580, 0.180423 },
- { 0.212671, 0.715160, 0.072169 },
- { 0.019334, 0.119193, 0.950227 } };
-static const float d65_white[3] = { 0.950456, 1, 1.088754 };
-static int histogram[4][0x2000];
-static void (*write_thumb)(), (*write_fun)();
-static void (*load_raw)(), (*thumb_load_raw)();
-static jmp_buf failure;
-
-static struct decode {
- struct decode *branch[2];
- int leaf;
-} first_decode[2048], /* *second_decode, CINELERRA */ *free_decode;
-
-static struct tiff_ifd {
- int width, height, bps, comp, phint, offset, flip, samples, bytes;
- int tile_width, tile_length;
- float shutter;
-} tiff_ifd[10];
-
-static struct ph1 {
- int format, key_off, tag_21a;
- int black, split_col, black_col, split_row, black_row;
- float tag_210;
-} ph1;
-