hvirtual/cinelerra/dcraw.c File Reference

#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <jpeglib.h>
#include <unistd.h>
#include <utime.h>
#include <netinet/in.h>

Include dependency graph for dcraw.c:

Go to the source code of this file.

Data Structures

struct  decode
struct  jhead

Defines

#define _GNU_SOURCE
#define _USE_MATH_DEFINES
#define NO_LCMS
#define LONG_BIT   (8 * sizeof (long))
#define ushort   UshORt
#define camera_red   cam_mul[0]
#define camera_blue   cam_mul[2]
#define CLASS
#define FORC3   for (c=0; c < 3; c++)
#define FORC4   for (c=0; c < 4; c++)
#define FORCC   for (c=0; c < colors; c++)
#define SQR(x)   ((x)*(x))
#define ABS(x)   (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31))
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define LIM(x, min, max)   MAX(min,MIN(x,max))
#define ULIM(x, y, z)   ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y))
#define CLIP(x)   LIM(x,0,clip_max)
#define SWAP(a, b)   { a ^= b; a ^= (b ^= a); }
#define FC(row, col)   (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)
#define BAYER(row, col)   image[((row) >> shrink)*iwidth + ((col) >> shrink)][FC(row,col)]
#define memmem   my_memmem
#define sget4(s)   sget4((uchar *)s)
#define getrat()   getreal(10)
#define FORYX   for (y=1; y < 3; y++) for (x=col+1; x >= col; x--)
#define PREDICTOR
#define HOLE(row)   ((holes >> (((row) - raw_height) & 7)) & 1)
#define image   ((short (*)[4]) image)
#define LAST(x, y)   last[(i+x)%3][(c+y)%3]
#define TS   256

Typedefs

typedef long long INT64
typedef unsigned long long UINT64
typedef unsigned char uchar
typedef unsigned short ushort

Functions

void write_ppm (FILE *)
void(*)(*) write_fun (FILE *)
void(*)(*) thumb_load_raw ()
char * my_memmem (char *haystack, size_t haystacklen, char *needle, size_t needlelen)
void CLASS merror (void *ptr, char *where)
ushort CLASS sget2 (uchar *s)
ushort CLASS get2 ()
int CLASS sget4 (uchar *s)
int CLASS get4 ()
int CLASS getint (int type)
float CLASS int_to_float (int i)
double CLASS getreal (int type)
void CLASS read_shorts (ushort *pixel, int count)
void CLASS canon_600_fixed_wb (int temp)
int CLASS canon_600_color (int ratio[2], int mar)
void CLASS canon_600_auto_wb ()
void CLASS canon_600_coeff ()
void CLASS canon_600_load_raw ()
void CLASS canon_a5_load_raw ()
unsigned CLASS getbits (int nbits)
void CLASS init_decoder ()
uchar *CLASS make_decoder (const uchar *source, int level)
void CLASS crw_init_tables (unsigned table)
int CLASS canon_has_lowbits ()
void CLASS canon_compressed_load_raw ()
int CLASS ljpeg_start (struct jhead *jh, int info_only)
int CLASS ljpeg_diff (struct decode *dindex)
void CLASS ljpeg_row (int jrow, struct jhead *jh)
void CLASS lossless_jpeg_load_raw ()
void CLASS adobe_copy_pixel (int row, int col, ushort **rp)
void CLASS adobe_dng_load_raw_lj ()
void CLASS adobe_dng_load_raw_nc ()
void CLASS nikon_compressed_load_raw ()
void CLASS nikon_load_raw ()
int CLASS nikon_is_compressed ()
int CLASS nikon_e995 ()
int CLASS nikon_e2100 ()
int CLASS nikon_3700 ()
int CLASS minolta_z2 ()
void CLASS nikon_e900_load_raw ()
void CLASS nikon_e2100_load_raw ()
void CLASS fuji_load_raw ()
void CLASS jpeg_thumb (FILE *tfp)
void CLASS ppm_thumb (FILE *tfp)
void CLASS layer_thumb (FILE *tfp)
void CLASS rollei_thumb (FILE *tfp)
void CLASS rollei_load_raw ()
int CLASS bayer (unsigned row, unsigned col)
void CLASS phase_one_correct ()
void CLASS phase_one_load_raw ()
unsigned CLASS ph1_bits (int nbits)
void CLASS phase_one_load_raw_c ()
void CLASS hdr_load_raw ()
void CLASS packed_12_load_raw ()
void CLASS unpacked_load_raw ()
void CLASS olympus_e300_load_raw ()
void CLASS olympus_cseries_load_raw ()
void CLASS minolta_rd175_load_raw ()
void CLASS eight_bit_load_raw ()
void CLASS casio_qv5700_load_raw ()
void CLASS nucore_load_raw ()
const int *CLASS make_decoder_int (const int *source, int level)
int CLASS radc_token (int tree)
void CLASS kodak_radc_load_raw ()
 fill_input_buffer (j_decompress_ptr cinfo)
void CLASS kodak_jpeg_load_raw ()
void CLASS kodak_dc120_load_raw ()
void CLASS kodak_easy_load_raw ()
int CLASS kodak_65000_decode (short *out, int bsize)
void CLASS kodak_65000_load_raw ()
void CLASS kodak_ycbcr_load_raw ()
void CLASS kodak_rgb_load_raw ()
void CLASS kodak_thumb_load_raw ()
void CLASS sony_decrypt (unsigned *data, int len, int start, int key)
void CLASS sony_load_raw ()
void CLASS smal_decode_segment (unsigned seg[2][2], int holes)
void CLASS smal_v6_load_raw ()
int CLASS median4 (int *p)
void CLASS fill_holes (int holes)
void CLASS smal_v9_load_raw ()
void CLASS foveon_decoder (unsigned size, unsigned code)
void CLASS foveon_thumb (FILE *tfp)
void CLASS foveon_load_camf ()
void CLASS foveon_load_raw ()
char *CLASS foveon_camf_param (char *block, char *param)
void *CLASS foveon_camf_matrix (int dim[3], char *name)
int CLASS foveon_fixed (void *ptr, int size, char *name)
float CLASS foveon_avg (short *pix, int range[2], float cfilt)
short *CLASS foveon_make_curve (double max, double mul, double filt)
void CLASS foveon_make_curves (short **curvep, float dq[3], float div[3], float filt)
int CLASS foveon_apply_curve (short *curve, int i)
void CLASS foveon_interpolate ()
void CLASS bad_pixels ()
void CLASS pseudoinverse (double(*in)[3], double(*out)[3], int size)
void CLASS cam_xyz_coeff (double cam_xyz[4][3])
void CLASS scale_colors ()
void CLASS border_interpolate (int border)
void CLASS lin_interpolate ()
void CLASS vng_interpolate ()
void CLASS cam_to_cielab (ushort cam[4], float lab[3])
void CLASS ahd_interpolate ()
void CLASS bilateral_filter ()
void CLASS tiff_get (unsigned base, unsigned *tag, unsigned *type, unsigned *len, unsigned *save)
void CLASS parse_olympus_note (int base)
void CLASS parse_makernote (int base)
void CLASS get_timestamp (int reversed)
void CLASS parse_exif (int base)
void CLASS parse_mos (int offset)
int CLASS parse_tiff_ifd (int base, int level)
void CLASS parse_tiff (int base)
void CLASS parse_minolta ()
void CLASS parse_external_jpeg ()
void CLASS ciff_block_1030 ()
void CLASS parse_ciff (int offset, int length)
void CLASS parse_rollei ()
void CLASS parse_phase_one (int base)
void CLASS parse_fuji (int offset)
int CLASS parse_jpeg (int offset)
void CLASS parse_riff ()
void CLASS parse_smal (int offset, int fsize)
char *CLASS foveon_gets (int offset, char *str, int len)
void CLASS parse_foveon ()
void CLASS adobe_coeff (char *make, char *model)
void CLASS simple_coeff (int index)
short CLASS guess_byte_order (int words)
void CLASS identify ()
void CLASS convert_to_rgb ()
void CLASS fuji_rotate ()
int CLASS flip_index (int row, int col)
void CLASS flip_image ()
void CLASS write_ppm16 (FILE *ofp)
void CLASS write_cinelerra (FILE *ofp)
void CLASS write_psd (FILE *ofp)
int CLASS dcraw_main (int argc, char **argv)

Variables

char dcraw_info [1024]
float ** dcraw_data
int dcraw_alpha
float dcraw_matrix [9]
FILE * ifp
short order
char * ifname
char make [64]
char model [72]
char model2 [64]
char * meta_data
char cdesc [5]
float flash_used
float canon_ev
float iso_speed
float shutter
float aperture
float focal_len
time_t timestamp
unsigned shot_order
unsigned kodak_cbpp
unsigned filters
int profile_offset
int profile_length
int thumb_offset
int thumb_length
int thumb_width
int thumb_height
int thumb_misc
int data_offset
int strip_offset
int curve_offset
int meta_offset
int meta_length
int tiff_nifds
int tiff_flip
int tiff_bps
int tiff_compress
int raw_height
int raw_width
int top_margin
int left_margin
int height
int width
int fuji_width
int colors
int tiff_samples
int black
int maximum
int clip_max
int raw_color
int use_gamma
int iheight
int iwidth
int shrink
int flip
int xmag
int ymag
int zero_after_ff
int is_raw
int dng_version
int is_foveon
ushort(* image )[4]
ushortwhite [8][8]
ushortcurve [0x1000]
ushortcr2_slice [3]
float bright = 1
float red_scale = 1
float blue_scale = 1
float sigma_d = 0
float sigma_r = 0
int four_color_rgb = 0
int document_mode = 0
int clip_color = 1
int verbose = 0
int use_auto_wb = 0
int use_camera_wb = 0
int output_color = 1
int fuji_layout
int fuji_secondary
int use_secondary = 0
float cam_mul [4]
float pre_mul [4]
float rgb_cam [3][4]
const double xyz_rgb [3][3]
const float d65_white [3] = { 0.950456, 1, 1.088754 }
int histogram [4][0x2000]
void(* write_thumb )(FILE *)
void(* load_raw )()
jmp_buf failure
struct decode first_decode [2048]
struct decodesecond_decode [2048]
struct decodefree_decode [2048]
struct {
   int   width
   int   height
   int   bps
   int   comp
   int   phint
   int   offset
   int   flip
   int   samples
   int   bytes
tiff_ifd [10]


Define Documentation

#define _GNU_SOURCE

Definition at line 26 of file dcraw.c.

#define _USE_MATH_DEFINES

Definition at line 27 of file dcraw.c.

#define ABS (  )     (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31))

#define BAYER ( row,
col   )     image[((row) >> shrink)*iwidth + ((col) >> shrink)][FC(row,col)]

#define camera_blue   cam_mul[2]

Definition at line 127 of file dcraw.c.

Referenced by identify(), parse_ciff(), parse_makernote(), and scale_colors().

#define camera_red   cam_mul[0]

Definition at line 126 of file dcraw.c.

Referenced by identify(), parse_ciff(), parse_makernote(), and scale_colors().

#define CLASS

Definition at line 143 of file dcraw.c.

#define CLIP (  )     LIM(x,0,clip_max)

Definition at line 155 of file dcraw.c.

Referenced by adx_decode(), ahd_interpolate(), BlockRebuild(), MainSession::boundaries(), cam_to_cielab(), convert_to_rgb(), deInterlaceFF(), deInterlaceInterpolateCubic(), deInterlaceL5(), MaskUnit::draw_line_clamped(), ChromaKeyConfig::get_color(), SetChannelsTextBox::handle_event(), SetSampleRateTextBox::handle_event(), BurnMain::HSItoRGB(), HSV::hsv_to_yuv(), mpeg3audio_ac3_tofloat(), mpeg3video_addblock(), DVBTune::open_tuner(), CompressorEffect::process_buffer(), GammaUnit::process_package(), VideoScopeUnit::render_data(), scale_colors(), transfer_RGB_FLOAT_to_ARGB8888(), transfer_RGB_FLOAT_to_BGR565(), transfer_RGB_FLOAT_to_BGR888(), transfer_RGB_FLOAT_to_BGR8888(), transfer_RGB_FLOAT_to_RGB565(), transfer_RGB_FLOAT_to_RGB8(), transfer_RGB_FLOAT_to_RGB888(), transfer_RGB_FLOAT_to_RGBA8888(), transfer_RGB_FLOAT_to_UYVA8888(), transfer_RGB_FLOAT_to_VYU888(), transfer_RGB_FLOAT_to_YUV101010(), transfer_RGB_FLOAT_to_YUV161616(), transfer_RGB_FLOAT_to_YUV420P_YUV422P(), transfer_RGB_FLOAT_to_YUV422(), transfer_RGB_FLOAT_to_YUV444P(), transfer_RGB_FLOAT_to_YUV888(), transfer_RGB_FLOAT_to_YUVA16161616(), transfer_RGB_FLOAT_to_YUVA8888(), transfer_RGBA_FLOAT_to_ARGB8888(), transfer_RGBA_FLOAT_to_BGR565(), transfer_RGBA_FLOAT_to_BGR888(), transfer_RGBA_FLOAT_to_BGR8888(), transfer_RGBA_FLOAT_to_RGB565(), transfer_RGBA_FLOAT_to_RGB8(), transfer_RGBA_FLOAT_to_RGB888(), transfer_RGBA_FLOAT_to_RGBA8888(), transfer_RGBA_FLOAT_to_YUV101010(), transfer_RGBA_FLOAT_to_YUV161616(), transfer_RGBA_FLOAT_to_YUV420P_YUV422P(), transfer_RGBA_FLOAT_to_YUV422(), transfer_RGBA_FLOAT_to_YUV444P(), transfer_RGBA_FLOAT_to_YUV888(), transfer_RGBA_FLOAT_to_YUVA16161616(), transfer_RGBA_FLOAT_to_YUVA8888(), CWindowEyedropGUI::update(), vng_interpolate(), FileMPEG::write_samples(), and MWindow::zoom_sample().

#define FC ( row,
col   )     (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)

#define FORC3   for (c=0; c < 3; c++)

#define FORC4   for (c=0; c < 4; c++)

#define FORCC   for (c=0; c < colors; c++)

#define FORYX   for (y=1; y < 3; y++) for (x=col+1; x >= col; x--)

Definition at line 1591 of file dcraw.c.

Referenced by kodak_radc_load_raw().

 
#define getrat (  )     getreal(10)

Definition at line 283 of file dcraw.c.

Referenced by parse_exif(), parse_makernote(), and parse_tiff_ifd().

#define HOLE ( row   )     ((holes >> (((row) - raw_height) & 7)) & 1)

Definition at line 1927 of file dcraw.c.

Referenced by fill_holes(), and smal_decode_segment().

#define image   ((short (*)[4]) image)

Definition at line 2307 of file dcraw.c.

#define LAST ( x,
 )     last[(i+x)%3][(c+y)%3]

#define LIM ( x,
min,
max   )     MAX(min,MIN(x,max))

Definition at line 153 of file dcraw.c.

Referenced by kodak_ycbcr_load_raw().

#define LONG_BIT   (8 * sizeof (long))

Definition at line 78 of file dcraw.c.

Referenced by ciff_block_1030().

#define MAX ( a,
b   )     ((a) > (b) ? (a) : (b))

Definition at line 152 of file dcraw.c.

Referenced by ahd_interpolate(), ATH_dB(), BlockDequantH263(), BlockQuantH263(), Preferences::boundaries(), MainSession::boundaries(), LocalSession::boundaries(), calculate_convolution_matrix(), BC_Toggle::calculate_extents(), GWindowGUI::calculate_extents(), Mode3::calculate_w(), Mode2::calculate_w(), Mode1::calculate_w(), MasterLayer::calculate_w(), MenuEffectPrompt::calculate_w(), CodeMB(), InterpolatePixelsWindow::create_objects(), BC_FileBox::create_objects(), RecordPrefs::create_objects(), RecordMonitorGUI::create_objects(), RecordGUI::create_objects(), PlaybackPrefs::create_objects(), CWindowCropGUI::create_objects(), ConfirmScan::create_objects(), AssetEditWindow::create_objects(), HistogramSlider::cursor_motion_event(), BC_ListBox::cursor_motion_event(), TrackCanvas::cursor_motion_event(), dct_error(), divide_index(), do_a_deblock_C(), ResourceThread::do_audio(), doHorizDefFilter_C(), doVertDefFilter(), BC_WindowBase::draw_9segment(), ResourcePixmap::draw_audio_source(), TrackCanvas::draw_floatline(), IndexFile::draw_index(), TrackCanvas::draw_plugins(), BC_ListBox::draw_rectangle(), MTimeBar::draw_time(), ResourcePixmap::draw_title(), find_pmvs(), MWindow::fit_autos(), BC_MenuPopup::get_dimensions(), IntAutos::get_extents(), FloatAutos::get_extents(), RenderProfile::get_h(), LoadMode::get_h(), BitsPopup::get_h(), Record::get_in_length(), PackageDispatcher::get_package(), PackagingEngineDefault::get_package_single_farm(), Canvas::get_transfers(), CaptureLengthTumbler::handle_down_event(), LoopVideoFrames::handle_event(), LoopAudioSamples::handle_event(), GammaColorPicker::handle_event(), NewOutputH::handle_event(), NewOutputW::handle_event(), horizX1Filter(), PluginAClientLAD::init_plugin(), mpeg3_append_frame(), mpeg3_append_samples(), mpeg3_append_subtitle(), mpeg3_append_subtitle_offset(), mpeg3_get_time(), FileAVI::open_avifile_in(), BC_Theme::overlay(), Theme::overlay(), pp_postprocess(), ZoomBlurMain::process_buffer(), TimeAvgMain::process_buffer(), LinearBlurMain::process_buffer(), SelTempAvgMain::process_buffer(), ChromaKeyUnit::process_chromakey(), WhirlUnit::process_package(), WaveUnit::process_package(), UnsharpUnit::process_package(), AffineUnit::process_package(), InterpolatePixelsUnit::process_package(), MaskUnit::process_package(), MotionBlurMain::process_realtime(), psycho_3_spl(), psycho_4(), psycho_4_init(), readcmdline(), BC_ListBox::rectangle_scroll_event(), VideoScopeUnit::render_data(), PackageRenderer::render_package(), TrackCanvas::repeat_event(), RecordVideo::run(), RecordAudio::run(), RotateScan::scan_frame(), BRenderThread::start(), BC_DisplayInfo::test_window(), HistogramWindow::update_canvas(), TimeBar::update_cursor(), TrackCanvas::update_drag_floatauto(), VTrack::vertical_span(), ATrack::vertical_span(), vertX1Filter(), EXROStream::write(), MWindow::zoom_in_t(), and MWindow::zoom_in_y().

#define memmem   my_memmem

Definition at line 211 of file dcraw.c.

Referenced by identify().

#define MIN ( a,
b   )     ((a) < (b) ? (a) : (b))

Definition at line 151 of file dcraw.c.

Referenced by ahd_interpolate(), ATH_dB(), BlockDequantH263(), BlockQuantH263(), BC_WidgetGrid::calculate_maxs(), VideoScopeWindow::calculate_sizes(), CodeMB(), VFrame::copy_from(), HistogramSlider::cursor_motion_event(), BC_ListBox::cursor_motion_event(), dering(), divide_index(), do_a_deblock_C(), ResourceThread::do_audio(), Playback3D::do_mask_sync(), doHorizDefFilter_C(), doVertDefFilter(), BC_WindowBase::draw_9segment(), ResourcePixmap::draw_audio_source(), TrackCanvas::draw_highlight_insertion(), TrackCanvas::draw_highlight_rectangle(), IndexFile::draw_index(), TrackCanvas::draw_plugins(), BC_WindowBase::draw_polygon(), BC_ListBox::draw_rectangle(), encode(), Track::equivalent_output(), Edits::equivalent_output(), Edit::equivalent_output(), Autos::equivalent_output(), MWindow::expand_t(), MWindow::expand_y(), find_pmvs(), MWindow::fit_autos(), MWindow::fit_selection(), CrossfadeFFT::fix_window_size(), VDeviceV4L::frame_to_vframe(), IntAutos::get_extents(), FloatAutos::get_extents(), FloatAutos::get_fade_automation(), PackagingEngineDefault::get_package_single_farm(), MaskAutos::get_points(), ColorBalanceWhite::handle_event(), DownSampleServer::init_packages(), DiffKeyEngine::init_packages(), TranslateEngine::init_packages(), MaskEngine::init_packages(), VRender::insert_timecode(), MaskAuto::interpolate_from(), kodak_65000_load_raw(), kodak_rgb_load_raw(), kodak_ycbcr_load_raw(), mpeg3audio_ac3_exp_unpack_ch(), mpeg3io_read_buffer(), VDeviceV4L::next_frame(), BC_Theme::overlay(), Theme::overlay(), OverlayFrame::overlay(), LoopAudio::process_buffer(), LiveVideo::process_buffer(), LinearBlurMain::process_buffer(), ChromaKeyUnit::process_chromakey(), UnsharpUnit::process_package(), AffineUnit::process_package(), InterpolatePixelsUnit::process_package(), MaskUnit::process_package(), putbits(), DelayVideo::reconfigure(), DelayAudio::reconfigure(), BC_ListBox::rectangle_scroll_event(), Spectrogram::render_gui(), PackageRenderer::render_package(), VirtualANode::render_pan(), Resample_float::resample_chunk(), Resample::resample_chunk(), MotionScan::scan_frame(), BRenderThread::start(), BC_DisplayInfo::test_window(), Tracks::total_length_framealigned(), Asset::total_length_framealigned(), TranslateUnit::translation_array_f(), TranslateUnit::translation_array_i(), TrackCanvas::update_drag_floatauto(), VDeviceV4L::v4l1_start_capture(), FileMPEG::write_samples(), and FileDV::write_samples().

#define NO_LCMS

Definition at line 45 of file dcraw.c.

Referenced by dcraw_main().

#define PREDICTOR

Value:

(c ? (buf[c][y-1][x] + buf[c][y][x+1]) / 2 \
: (buf[c][y-1][x+1] + 2*buf[c][y-1][x] + buf[c][y][x+1]) / 4)

Definition at line 1593 of file dcraw.c.

Referenced by kodak_radc_load_raw().

#define sget4 ( s   )     sget4((uchar *)s)

Definition at line 243 of file dcraw.c.

Referenced by foveon_camf_matrix(), foveon_camf_param(), and get4().

#define SQR (  )     ((x)*(x))

Definition at line 149 of file dcraw.c.

#define SWAP ( a,
b   )     { a ^= b; a ^= (b ^= a); }

Definition at line 156 of file dcraw.c.

Referenced by dcraw_main(), dct_quantize_altivec(), and flip_image().

#define TS   256

Definition at line 3250 of file dcraw.c.

Referenced by ahd_interpolate().

#define ULIM ( x,
y,
 )     ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y))

Definition at line 154 of file dcraw.c.

Referenced by ahd_interpolate().

#define ushort   UshORt


Typedef Documentation

typedef long long INT64

Definition at line 68 of file dcraw.c.

typedef unsigned char uchar

Definition at line 82 of file dcraw.c.

typedef unsigned long long UINT64

Definition at line 69 of file dcraw.c.

typedef unsigned short ushort

Definition at line 83 of file dcraw.c.


Function Documentation

void CLASS adobe_coeff ( char *  make,
char *  model 
)

Definition at line 4671 of file dcraw.c.

References black, and cam_xyz_coeff().

Referenced by identify().

Here is the call graph for this function:

void CLASS adobe_copy_pixel ( int  row,
int  col,
ushort **  rp 
)

void CLASS adobe_dng_load_raw_lj (  ) 

Definition at line 869 of file dcraw.c.

References adobe_copy_pixel(), jhead::clrs, colors, filters, fseek(), ftell(), fuji_secondary, get4(), jhead::high, ifp, ljpeg_row(), ljpeg_start(), raw_height, raw_width, jhead::row, ushort, and jhead::wide.

Referenced by identify().

Here is the call graph for this function:

void CLASS adobe_dng_load_raw_nc (  ) 

Definition at line 903 of file dcraw.c.

References adobe_copy_pixel(), getbits(), merror(), raw_height, raw_width, read_shorts(), jhead::row, tiff_bps, tiff_samples, and ushort.

Referenced by identify().

Here is the call graph for this function:

void CLASS ahd_interpolate (  ) 

Definition at line 3252 of file dcraw.c.

References ABS, border_interpolate(), cam_to_cielab(), CLIP, FC, FORC3, fprintf, height, MAX, merror(), MIN, SQR, TS, ULIM, ushort, verbose, and width.

Referenced by dcraw_main().

Here is the call graph for this function:

void CLASS bad_pixels (  ) 

Definition at line 2713 of file dcraw.c.

References BAYER, c, FC, fclose(), fgets(), filters, fopen(), fp, fprintf, fputc(), height, line, NULL, r, strchr, timestamp, verbose, and width.

Referenced by dcraw_main().

Here is the call graph for this function:

int CLASS bayer ( unsigned  row,
unsigned  col 
)

Definition at line 1225 of file dcraw.c.

References BAYER, height, and width.

Referenced by parse_mos(), and phase_one_correct().

void CLASS bilateral_filter (  ) 

Definition at line 3362 of file dcraw.c.

References cam_to_cielab(), FORCC, fprintf, height, merror(), sigma_d, sigma_r, SQR, verbose, width, and window.

Referenced by dcraw_main().

Here is the call graph for this function:

void CLASS border_interpolate ( int  border  ) 

Definition at line 3011 of file dcraw.c.

References BAYER, FC, FORCC, height, and width.

Referenced by ahd_interpolate(), and lin_interpolate().

void CLASS cam_to_cielab ( ushort  cam[4],
float  lab[3] 
)

Definition at line 3219 of file dcraw.c.

References CLIP, d65_white, maximum, NULL, r, rgb_cam, and xyz_rgb.

Referenced by ahd_interpolate(), bilateral_filter(), and dcraw_main().

void CLASS cam_xyz_coeff ( double  cam_xyz[4][3]  ) 

Definition at line 2797 of file dcraw.c.

References colors, inverse, pre_mul, pseudoinverse(), raw_color, rgb_cam, and xyz_rgb.

Referenced by adobe_coeff(), and parse_tiff_ifd().

Here is the call graph for this function:

void CLASS canon_600_auto_wb (  ) 

Definition at line 342 of file dcraw.c.

References BAYER, canon_600_color(), canon_ev, FC, flash_used, height, pre_mul, and width.

Referenced by canon_600_load_raw().

Here is the call graph for this function:

void CLASS canon_600_coeff (  ) 

Definition at line 384 of file dcraw.c.

References c, flash_used, FORCC, pre_mul, raw_color, rgb_cam, and t.

Referenced by canon_600_load_raw().

int CLASS canon_600_color ( int  ratio[2],
int  mar 
)

Definition at line 313 of file dcraw.c.

References flash_used.

Referenced by canon_600_auto_wb().

void CLASS canon_600_fixed_wb ( int  temp  ) 

Definition at line 292 of file dcraw.c.

References pre_mul.

Referenced by canon_600_load_raw().

void CLASS canon_600_load_raw (  ) 

Definition at line 408 of file dcraw.c.

References BAYER, black, canon_600_auto_wb(), canon_600_coeff(), canon_600_fixed_wb(), fread(), height, ifp, maximum, ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS canon_a5_load_raw (  ) 

Definition at line 450 of file dcraw.c.

References BAYER, black, fread(), height, ifp, maximum, raw_width, ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS canon_compressed_load_raw (  ) 

int CLASS canon_has_lowbits (  ) 

Definition at line 630 of file dcraw.c.

References fread(), fseek(), and ifp.

Referenced by canon_compressed_load_raw().

Here is the call graph for this function:

void CLASS casio_qv5700_load_raw (  ) 

Definition at line 1497 of file dcraw.c.

References BAYER, fread(), height, ifp, maximum, jhead::row, ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS ciff_block_1030 (  ) 

Definition at line 4227 of file dcraw.c.

References get2(), get4(), LONG_BIT, ushort, and white.

Referenced by parse_ciff().

Here is the call graph for this function:

void CLASS convert_to_rgb (  ) 

void CLASS crw_init_tables ( unsigned  table  ) 

Definition at line 560 of file dcraw.c.

References init_decoder(), and make_decoder().

Referenced by canon_compressed_load_raw().

Here is the call graph for this function:

int CLASS dcraw_main ( int  argc,
char **  argv 
)

void CLASS eight_bit_load_raw (  ) 

Definition at line 1481 of file dcraw.c.

References BAYER, fread(), height, ifp, maximum, merror(), raw_width, jhead::row, and width.

Referenced by identify(), and parse_tiff().

Here is the call graph for this function:

void CLASS fill_holes ( int  holes  ) 

Definition at line 2022 of file dcraw.c.

References BAYER, height, HOLE, median4(), and width.

Referenced by smal_v9_load_raw().

Here is the call graph for this function:

fill_input_buffer ( j_decompress_ptr  cinfo  ) 

Definition at line 1668 of file dcraw.c.

References fread(), ifp, and TRUE.

Referenced by kodak_jpeg_load_raw().

Here is the call graph for this function:

void CLASS flip_image (  ) 

Definition at line 6066 of file dcraw.c.

References flip, flip_index(), fprintf, height, merror(), src, SWAP, ushort, verbose, width, xmag, and ymag.

Referenced by dcraw_main().

Here is the call graph for this function:

int CLASS flip_index ( int  row,
int  col 
)

Definition at line 6058 of file dcraw.c.

References flip, height, and width.

Referenced by flip_image().

int CLASS foveon_apply_curve ( short *  curve,
int  i 
)

Definition at line 2301 of file dcraw.c.

Referenced by foveon_interpolate().

float CLASS foveon_avg ( short *  pix,
int  range[2],
float  cfilt 
)

Definition at line 2259 of file dcraw.c.

References min.

Referenced by foveon_interpolate().

void* CLASS foveon_camf_matrix ( int  dim[3],
char *  name 
)

Definition at line 2214 of file dcraw.c.

References fprintf, ifname, merror(), meta_data, meta_length, NULL, and sget4.

Referenced by foveon_fixed(), and foveon_interpolate().

Here is the call graph for this function:

char* CLASS foveon_camf_param ( char *  block,
char *  param 
)

Definition at line 2192 of file dcraw.c.

References meta_data, meta_length, NULL, and sget4.

Referenced by foveon_interpolate().

void CLASS foveon_decoder ( unsigned  size,
unsigned  code 
)

Definition at line 2070 of file dcraw.c.

References decode::branch, first_decode, fprintf, get4(), ifname, init_decoder(), and decode::leaf.

Referenced by foveon_load_raw(), and foveon_thumb().

Here is the call graph for this function:

int CLASS foveon_fixed ( void *  ptr,
int  size,
char *  name 
)

Definition at line 2247 of file dcraw.c.

References foveon_camf_matrix(), and memcpy.

Referenced by foveon_interpolate().

Here is the call graph for this function:

char* CLASS foveon_gets ( int  offset,
char *  str,
int  len 
)

Definition at line 4574 of file dcraw.c.

References fseek(), get2(), and ifp.

Referenced by parse_foveon().

Here is the call graph for this function:

void CLASS foveon_interpolate (  ) 

void CLASS foveon_load_camf (  ) 

Definition at line 2140 of file dcraw.c.

References fread(), fseek(), get4(), ifp, meta_data, meta_length, and meta_offset.

Referenced by foveon_load_raw().

Here is the call graph for this function:

void CLASS foveon_load_raw (  ) 

Definition at line 2154 of file dcraw.c.

References decode::branch, c, clip_max, document_mode, fgetc(), first_decode, FORC3, foveon_decoder(), foveon_load_camf(), get4(), height, ifp, decode::leaf, pred(), read_shorts(), ushort, and width.

Referenced by identify().

Here is the call graph for this function:

short* CLASS foveon_make_curve ( double  max,
double  mul,
double  filt 
)

Definition at line 2272 of file dcraw.c.

References curve, M_PI, and merror().

Referenced by foveon_interpolate(), and foveon_make_curves().

Here is the call graph for this function:

void CLASS foveon_make_curves ( short **  curvep,
float  dq[3],
float  div[3],
float  filt 
)

Definition at line 2291 of file dcraw.c.

References c, FORC3, and foveon_make_curve().

Referenced by foveon_interpolate().

Here is the call graph for this function:

void CLASS foveon_thumb ( FILE *  tfp  ) 

Definition at line 2101 of file dcraw.c.

References decode::branch, buf, c, fgetc(), first_decode, FORC3, foveon_decoder(), fprintf, fputc(), fread(), fwrite(), get4(), ifp, decode::leaf, merror(), pred(), thumb_height, and thumb_width.

Referenced by parse_foveon().

Here is the call graph for this function:

void CLASS fuji_load_raw (  ) 

Definition at line 1126 of file dcraw.c.

References BAYER, c, fuji_layout, fuji_width, merror(), r, raw_height, raw_width, read_shorts(), jhead::row, and ushort.

Referenced by identify().

Here is the call graph for this function:

void CLASS fuji_rotate (  ) 

Definition at line 6020 of file dcraw.c.

References fprintf, fuji_width, height, merror(), r, shrink, step, ushort, verbose, and width.

Referenced by dcraw_main().

Here is the call graph for this function:

ushort CLASS get2 (  ) 

int CLASS get4 (  ) 

void CLASS get_timestamp ( int  reversed  ) 

Definition at line 3653 of file dcraw.c.

References fgetc(), fread(), ifp, and timestamp.

Referenced by get_pack_header(), get_program_pes_packet(), identify(), parse_exif(), and parse_tiff_ifd().

Here is the call graph for this function:

unsigned CLASS getbits ( int  nbits  ) 

int CLASS getint ( int  type  ) 

Definition at line 252 of file dcraw.c.

References get2(), and get4().

Referenced by parse_tiff_ifd().

Here is the call graph for this function:

double CLASS getreal ( int  type  ) 

Definition at line 264 of file dcraw.c.

References fgetc(), fprintf, get2(), get4(), ifname, ifp, and int_to_float().

Referenced by parse_tiff_ifd().

Here is the call graph for this function:

short CLASS guess_byte_order ( int  words  ) 

Definition at line 4954 of file dcraw.c.

References fread(), ifp, and t.

Referenced by identify().

Here is the call graph for this function:

void CLASS hdr_load_raw (  ) 

Definition at line 1365 of file dcraw.c.

References c, FORC3, height, merror(), r, raw_width, read_shorts(), jhead::row, ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS identify (  ) 

Definition at line 4977 of file dcraw.c.

References adobe_coeff(), adobe_dng_load_raw_lj(), adobe_dng_load_raw_nc(), aperture, black, cam_mul, camera_blue, camera_red, canon_600_load_raw(), canon_a5_load_raw(), canon_compressed_load_raw(), casio_qv5700_load_raw(), cdesc, cr2_slice, curve, data_offset, dcraw_info, dng_version, eight_bit_load_raw(), fgetc(), filters, flip, focal_len, FORC3, FORC4, foveon_load_raw(), fprintf, fread(), fseek(), ftell(), fuji_layout, fuji_load_raw(), fuji_secondary, fuji_width, get2(), get4(), get_timestamp(), guess_byte_order(), hdr_load_raw(), height, jhead::high, ifname, ifp, is_foveon, is_raw, iso_speed, jpeg_thumb(), kodak_cbpp, kodak_dc120_load_raw(), kodak_easy_load_raw(), kodak_jpeg_load_raw(), kodak_radc_load_raw(), left_margin, ljpeg_start(), load_raw, lossless_jpeg_load_raw(), make, maximum, memcmp, memmem, meta_length, minolta_rd175_load_raw(), minolta_z2(), model, model2, nikon_3700(), nikon_compressed_load_raw(), nikon_e2100(), nikon_e2100_load_raw(), nikon_e900_load_raw(), nikon_e995(), nikon_is_compressed(), nikon_load_raw(), nucore_load_raw(), NULL, olympus_cseries_load_raw(), olympus_e300_load_raw(), order, packed_12_load_raw(), parse_ciff(), parse_external_jpeg(), parse_foveon(), parse_fuji(), parse_jpeg(), parse_minolta(), parse_mos(), parse_phase_one(), parse_riff(), parse_rollei(), parse_smal(), parse_tiff(), pre_mul, profile_length, raw_color, raw_height, raw_width, rgb_cam, rollei_load_raw(), shot_order, shutter, simple_coeff(), sony_load_raw(), thumb_height, thumb_length, thumb_load_raw(), thumb_offset, thumb_width, tiff_bps, tiff_compress, tiff_flip, tiff_samples, timestamp, top_margin, unpacked_load_raw(), use_gamma, use_secondary, white, jhead::wide, width, write_thumb, xmag, ymag, and zero_after_ff.

Referenced by dcraw_main().

void CLASS init_decoder (  ) 

float CLASS int_to_float ( int  i  ) 

Definition at line 257 of file dcraw.c.

Referenced by getreal(), parse_ciff(), and parse_phase_one().

void CLASS jpeg_thumb ( FILE *  tfp  ) 

Definition at line 1149 of file dcraw.c.

References fread(), fwrite(), ifp, merror(), and thumb_length.

Referenced by dcraw_main(), and identify().

Here is the call graph for this function:

int CLASS kodak_65000_decode ( short *  out,
int  bsize 
)

Definition at line 1764 of file dcraw.c.

References bits, c, fgetc(), fseek(), ftell(), ifp, read_shorts(), and ushort.

Referenced by kodak_65000_load_raw(), kodak_rgb_load_raw(), and kodak_ycbcr_load_raw().

Here is the call graph for this function:

void CLASS kodak_65000_load_raw (  ) 

Definition at line 1810 of file dcraw.c.

References BAYER, buf, curve, height, kodak_65000_decode(), MIN, pred(), and width.

Referenced by parse_tiff().

Here is the call graph for this function:

void CLASS kodak_dc120_load_raw (  ) 

Definition at line 1721 of file dcraw.c.

References BAYER, fread(), height, ifp, maximum, shift(), ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS kodak_easy_load_raw (  ) 

Definition at line 1737 of file dcraw.c.

References BAYER, black, curve, fread(), height, ifp, left_margin, maximum, merror(), model, raw_width, ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS kodak_jpeg_load_raw (  ) 

Definition at line 1680 of file dcraw.c.

References BAYER, buf, fill_input_buffer(), fprintf, height, ifname, ifp, maximum, TRUE, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS kodak_radc_load_raw (  ) 

Definition at line 1596 of file dcraw.c.

References BAYER, buf, c, FORC3, FORYX, getbits(), height, init_decoder(), maximum, memcpy, PREDICTOR, r, radc_token(), s, step, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS kodak_rgb_load_raw (  ) 

Definition at line 1852 of file dcraw.c.

References buf, c, FORC3, height, kodak_65000_decode(), MIN, ushort, and width.

Referenced by parse_tiff().

Here is the call graph for this function:

void CLASS kodak_thumb_load_raw (  ) 

Definition at line 1868 of file dcraw.c.

References colors, height, maximum, read_shorts(), thumb_misc, and width.

Referenced by parse_tiff().

Here is the call graph for this function:

void CLASS kodak_ycbcr_load_raw (  ) 

Definition at line 1825 of file dcraw.c.

References buf, c, cb, curve, FORC3, height, kodak_65000_decode(), LIM, MIN, ushort, and width.

Referenced by dcraw_main(), and parse_tiff().

Here is the call graph for this function:

void CLASS layer_thumb ( FILE *  tfp  ) 

Definition at line 1169 of file dcraw.c.

References c, colors, FORCC, fprintf, fread(), ifp, merror(), putc(), thumb_height, thumb_length, thumb_misc, and thumb_width.

Referenced by parse_tiff().

Here is the call graph for this function:

void CLASS lin_interpolate (  ) 

Definition at line 3031 of file dcraw.c.

References border_interpolate(), FC, FORCC, fprintf, height, shift(), ushort, verbose, and width.

Referenced by dcraw_main(), and vng_interpolate().

Here is the call graph for this function:

int CLASS ljpeg_diff ( struct decode dindex  ) 

Definition at line 771 of file dcraw.c.

References decode::branch, dng_version, getbits(), and decode::leaf.

Referenced by ljpeg_row(), and nikon_compressed_load_raw().

Here is the call graph for this function:

void CLASS ljpeg_row ( int  jrow,
struct jhead jh 
)

Definition at line 786 of file dcraw.c.

References jhead::bits, c, jhead::clrs, FORC4, get2(), getbits(), jhead::huff, ljpeg_diff(), jhead::restart, jhead::row, ushort, jhead::vpred, and jhead::wide.

Referenced by adobe_dng_load_raw_lj(), and lossless_jpeg_load_raw().

Here is the call graph for this function:

int CLASS ljpeg_start ( struct jhead jh,
int  info_only 
)

void CLASS lossless_jpeg_load_raw (  ) 

Definition at line 804 of file dcraw.c.

References BAYER, jhead::bits, black, jhead::clrs, cr2_slice, curve, height, jhead::high, left_margin, ljpeg_row(), ljpeg_start(), make, min, raw_width, jhead::row, top_margin, jhead::wide, and width.

Referenced by identify(), and parse_tiff().

Here is the call graph for this function:

uchar* CLASS make_decoder ( const uchar source,
int  level 
)

Definition at line 534 of file dcraw.c.

References decode::branch, first_decode, fprintf, ifname, and decode::leaf.

Referenced by crw_init_tables(), ljpeg_start(), and nikon_compressed_load_raw().

const int* CLASS make_decoder_int ( const int *  source,
int  level 
)

Definition at line 1533 of file dcraw.c.

References decode::branch, and decode::leaf.

Referenced by radc_token().

int CLASS median4 ( int *  p  ) 

Definition at line 2009 of file dcraw.c.

References min.

Referenced by fill_holes().

void CLASS merror ( void *  ptr,
char *  where 
)

void CLASS minolta_rd175_load_raw (  ) 

Definition at line 1453 of file dcraw.c.

References BAYER, fread(), ifp, maximum, and jhead::row.

Referenced by identify().

Here is the call graph for this function:

int CLASS minolta_z2 (  ) 

Definition at line 1067 of file dcraw.c.

References fread(), fseek(), and ifp.

Referenced by identify().

Here is the call graph for this function:

char* my_memmem ( char *  haystack,
size_t  haystacklen,
char *  needle,
size_t  needlelen 
)

Definition at line 202 of file dcraw.c.

References c, memcmp, and NULL.

int CLASS nikon_3700 (  ) 

Definition at line 1051 of file dcraw.c.

References fread(), fseek(), and ifp.

Referenced by identify().

Here is the call graph for this function:

void CLASS nikon_compressed_load_raw (  ) 

Definition at line 924 of file dcraw.c.

References BAYER, curve, curve_offset, data_offset, first_decode, fseek(), get2(), getbits(), height, ifp, init_decoder(), left_margin, ljpeg_diff(), make_decoder(), merror(), raw_width, read_shorts(), jhead::row, ushort, jhead::vpred, and width.

Referenced by identify().

Here is the call graph for this function:

int CLASS nikon_e2100 (  ) 

Definition at line 1031 of file dcraw.c.

References fread(), fseek(), ifp, and t.

Referenced by identify().

Here is the call graph for this function:

void CLASS nikon_e2100_load_raw (  ) 

Definition at line 1096 of file dcraw.c.

References BAYER, fread(), fseek(), ftell(), height, ifp, jhead::row, ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS nikon_e900_load_raw (  ) 

Definition at line 1080 of file dcraw.c.

References BAYER, fseek(), getbits(), height, ifp, offset, raw_width, jhead::row, and width.

Referenced by identify().

Here is the call graph for this function:

int CLASS nikon_e995 (  ) 

Definition at line 1013 of file dcraw.c.

References fgetc(), fseek(), and ifp.

Referenced by identify().

Here is the call graph for this function:

int CLASS nikon_is_compressed (  ) 

Definition at line 994 of file dcraw.c.

References data_offset, fread(), fseek(), ifp, model, and tiff_compress.

Referenced by identify().

Here is the call graph for this function:

void CLASS nikon_load_raw (  ) 

Definition at line 964 of file dcraw.c.

References BAYER, data_offset, fseek(), ftell(), getbits(), height, ifp, left_margin, make, model, raw_width, jhead::row, tiff_compress, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS nucore_load_raw (  ) 

Definition at line 1517 of file dcraw.c.

References BAYER, height, merror(), read_shorts(), jhead::row, ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS olympus_cseries_load_raw (  ) 

Definition at line 1438 of file dcraw.c.

References BAYER, data_offset, fseek(), getbits(), height, ifp, jhead::row, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS olympus_e300_load_raw (  ) 

Definition at line 1410 of file dcraw.c.

References BAYER, black, fread(), height, ifp, merror(), raw_width, jhead::row, ushort, and width.

Referenced by identify().

Here is the call graph for this function:

void CLASS packed_12_load_raw (  ) 

Definition at line 1382 of file dcraw.c.

References BAYER, getbits(), height, raw_width, jhead::row, and width.

Referenced by identify(), parse_tiff(), and parse_tiff_ifd().

Here is the call graph for this function:

void CLASS parse_ciff ( int  offset,
int  length 
)

void CLASS parse_exif ( int  base  ) 

Definition at line 3674 of file dcraw.c.

References aperture, focal_len, fseek(), get2(), get4(), get_timestamp(), getrat, ifp, iso_speed, make, parse_makernote(), raw_height, raw_width, shutter, and tiff_get().

Referenced by parse_tiff_ifd().

Here is the call graph for this function:

void CLASS parse_external_jpeg (  ) 

Definition at line 4179 of file dcraw.c.

References fclose(), fopen(), fprintf, ifname, ifp, is_raw, memcpy, merror(), parse_tiff(), strrchr, thumb_offset, timestamp, and verbose.

Referenced by identify().

Here is the call graph for this function:

void CLASS parse_foveon (  ) 

void CLASS parse_fuji ( int  offset  ) 

Definition at line 4469 of file dcraw.c.

References cam_mul, fgetc(), FORC4, fseek(), ftell(), fuji_layout, get2(), get4(), height, ifp, raw_height, raw_width, and width.

Referenced by identify().

Here is the call graph for this function: