From bb4ba2586d4cfe9302278a427ee4cf7a89aef53b Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 8 Oct 2023 17:45:23 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4736 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/cameratopam/camera.c | 87 +++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) (limited to 'converter/other/cameratopam/camera.c') diff --git a/converter/other/cameratopam/camera.c b/converter/other/cameratopam/camera.c index 4610462c..62b58ad5 100644 --- a/converter/other/cameratopam/camera.c +++ b/converter/other/cameratopam/camera.c @@ -56,7 +56,6 @@ merror (const void *ptr, const char *where) - static void adobeCopyPixel(Image const image, unsigned int const row, @@ -87,6 +86,8 @@ adobeCopyPixel(Image const image, --(*rp); } + + void adobe_dng_load_raw_lj(Image const image) { @@ -187,6 +188,8 @@ nikon_compressed_load_raw(Image const image) { free (curve); } + + void nikon_load_raw(Image const image) { @@ -213,6 +216,8 @@ nikon_load_raw(Image const image) { } } + + /* Figure out if a NEF file is compressed. These fancy heuristics are only needed for the D100, thanks to a bug in some cameras @@ -235,6 +240,8 @@ nikon_is_compressed() return 0; } + + /* Returns 1 for a Coolpix 990, 0 for a Coolpix 995. */ @@ -254,6 +261,8 @@ nikon_e990() return 0; } + + /* Returns 1 for a Coolpix 2100, 0 for anything else. */ @@ -273,6 +282,8 @@ nikon_e2100() return 1; } + + /* Separates a Pentax Optio 33WR from a Nikon E3700. */ @@ -289,6 +300,8 @@ pentax_optio33() return sum[0] < sum[1]*4; } + + /* Separates a Minolta DiMAGE Z2 from a Nikon E4300. */ @@ -305,6 +318,8 @@ minolta_z2() return 0; } + + void nikon_e2100_load_raw(Image const image) { @@ -333,6 +348,8 @@ nikon_e2100_load_raw(Image const image) { } } + + void nikon_e950_load_raw(Image const image) { @@ -349,6 +366,8 @@ nikon_e950_load_raw(Image const image) { maximum = 0x3dd; } + + /* The Fuji Super CCD is just a Bayer grid rotated 45 degrees. */ @@ -368,6 +387,8 @@ fuji_s2_load_raw(Image const image) { } } + + void fuji_s3_load_raw(Image const image) { unsigned short pixel[4352]; @@ -384,6 +405,8 @@ fuji_s3_load_raw(Image const image) { } } + + static void fuji_common_load_raw(Image const image, unsigned int const ncol, @@ -444,6 +467,8 @@ fuji_f700_load_raw(Image const image) { } } + + void rollei_load_raw(Image const image) { unsigned char pixel[10]; @@ -470,6 +495,8 @@ rollei_load_raw(Image const image) { maximum = 0x3ff; } + + void phase_one_load_raw(Image const image) { int row, col, a, b; @@ -496,6 +523,8 @@ phase_one_load_raw(Image const image) { free (pixel); } + + void ixpress_load_raw(Image const image) { unsigned short pixel[4090]; @@ -510,6 +539,8 @@ ixpress_load_raw(Image const image) { } } + + void leaf_load_raw(Image const image) { unsigned short *pixel; @@ -526,6 +557,8 @@ leaf_load_raw(Image const image) { free (pixel); } + + /* For this function only, raw_width is in bytes, not pixels! */ @@ -542,6 +575,8 @@ packed_12_load_raw(Image const image) { } } + + void unpacked_load_raw(Image const image) { unsigned short *pixel; @@ -557,6 +592,8 @@ unpacked_load_raw(Image const image) { free (pixel); } + + void olympus_e300_load_raw(Image const image) { unsigned char *data, *dp; @@ -580,6 +617,8 @@ olympus_e300_load_raw(Image const image) { free (data); } + + void olympus_cseries_load_raw(Image const image) { int irow, row, col; @@ -595,6 +634,8 @@ olympus_cseries_load_raw(Image const image) { } } + + void eight_bit_load_raw(Image const image) { unsigned char *pixel; @@ -611,6 +652,8 @@ eight_bit_load_raw(Image const image) { maximum = 0xff; } + + void casio_qv5700_load_raw(Image const image) { unsigned char data[3232], *dp; @@ -631,6 +674,8 @@ casio_qv5700_load_raw(Image const image) { maximum = 0x3fc; } + + void nucore_load_raw(Image const image) { unsigned short *pixel; @@ -647,6 +692,8 @@ nucore_load_raw(Image const image) { free (pixel); } + + static int radc_token (int tree) { int t; @@ -688,6 +735,8 @@ static int radc_token (int tree) return dindex->leaf; } + + #define FORYX for (y=1; y < 3; y++) for (x=col+1; x >= col; x--) #define PREDICTOR (c ? (buf[c][y-1][x] + buf[c][y][x+1]) / 2 \ @@ -770,6 +819,8 @@ kodak_radc_load_raw(Image const image) { maximum = 0x1fff; /* wild guess */ } + + #undef FORYX #undef PREDICTOR @@ -791,6 +842,8 @@ fill_input_buffer (j_decompress_ptr cinfo) return TRUE; } + + void kodak_jpeg_load_raw(Image const image) { @@ -830,6 +883,8 @@ kodak_jpeg_load_raw(Image const image) maximum = 0xff << 1; } + + #endif void @@ -849,6 +904,8 @@ kodak_dc120_load_raw(Image const image) maximum = 0xff; } + + void kodak_dc20_coeff (float const juice) { @@ -868,6 +925,8 @@ kodak_dc20_coeff (float const juice) use_coeff = 1; } + + void kodak_easy_load_raw(Image const image) { @@ -896,6 +955,8 @@ kodak_easy_load_raw(Image const image) maximum = curve[0xff]; } + + void kodak_compressed_load_raw(Image const image) { @@ -960,6 +1021,8 @@ kodak_compressed_load_raw(Image const image) } } + + void kodak_yuv_load_raw(Image const image) { @@ -1019,6 +1082,8 @@ kodak_yuv_load_raw(Image const image) maximum = 0xe74; } + + static void sony_decrypt (unsigned *data, int len, int start, int key) { static uint32_t pad[128]; @@ -1053,6 +1118,8 @@ static void sony_decrypt (unsigned *data, int len, int start, int key) } } + + void sony_load_raw(Image const image) { @@ -1091,6 +1158,8 @@ sony_load_raw(Image const image) maximum = 0x3ff0; } + + void parse_minolta(FILE * const ifp) { @@ -1124,6 +1193,8 @@ parse_minolta(FILE * const ifp) data_offset = offset; } + + /* CIFF block 0x1030 contains an 8x8 white sample. Load this into white[][] for use in scale_colors(). @@ -1151,6 +1222,8 @@ static void ciff_block_1030() } } + + /* Parse a CIFF file, better known as Canon CRW format. */ @@ -1266,6 +1339,8 @@ common: camera_red = -1; /* Use my auto WB for this photo */ } + + void parse_rollei(FILE * const ifp) { @@ -1333,6 +1408,8 @@ parse_mos(FILE * const ifp, } } + + void nikon_e950_coeff() { @@ -1504,6 +1581,8 @@ get_timestamp(FILE * const ifp) timestamp = ts; } + + static void parse_exif(FILE * const ifp, int base) { @@ -1529,6 +1608,8 @@ parse_exif(FILE * const ifp, int base) } } + + static int parse_tiff_ifd(FILE * const ifp, int base, int level) { @@ -1725,6 +1806,8 @@ guess_cfa_pc: return done; } + + void parse_tiff(FILE * const ifp, int base) { @@ -1797,3 +1880,5 @@ parse_external_jpeg(const char * const ifname) free (jname); } + + -- cgit 1.4.1