From 23082456722bfbc1ac34d38a6f3f1babb1878f95 Mon Sep 17 00:00:00 2001 From: cgilles Date: Sat, 14 Mar 2009 09:29:44 +0000 Subject: [PATCH] update internal libraw to 0.7.0-beta5 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdegraphics@939203 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libs/libkdcraw/NEWS | 2 +- libs/libkdcraw/libraw/internal/dcraw_common.cpp | 62 ++++++++++++++-------- libs/libkdcraw/libraw/internal/dcraw_fileio.cpp | 10 ++-- libs/libkdcraw/libraw/internal/defines.h | 14 ++--- libs/libkdcraw/libraw/internal/foveon.cpp | 12 ++--- .../libraw/internal/libraw_internal_funcs.h | 1 + libs/libkdcraw/libraw/libraw/libraw_version.h | 2 +- 7 files changed, 62 insertions(+), 41 deletions(-) diff --git a/libs/libkdcraw/NEWS b/libs/libkdcraw/NEWS index a10434e1..42d20d21 100644 --- a/libs/libkdcraw/NEWS +++ b/libs/libkdcraw/NEWS @@ -1,6 +1,6 @@ 0.5.0 - Released with KDE 4.3.0 ------------------------------------------------------------------------ -- Updated to LibRaw 0.7.0-beta4. +- Updated to LibRaw 0.7.0-beta5. See http://www.libraw.org/download#changelog-beta for details. 0.4.0 - Released with KDE 4.2.0 diff --git a/libs/libkdcraw/libraw/internal/dcraw_common.cpp b/libs/libkdcraw/libraw/internal/dcraw_common.cpp index 33d88e66..41bf4f84 100644 --- a/libs/libkdcraw/libraw/internal/dcraw_common.cpp +++ b/libs/libkdcraw/libraw/internal/dcraw_common.cpp @@ -1,11 +1,11 @@ /* GENERATED FILE, DO NOT EDIT - Generated from dcraw/dcraw.c at Sun Mar 8 17:46:19 2009 + Generated from dcraw/dcraw.c at Fri Mar 13 22:27:06 2009 Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c) for copyright information. */ -#line 259 "dcraw/dcraw.c" +#line 260 "dcraw/dcraw.c" #define CLASS LibRaw:: #include "libraw/libraw_types.h" #define LIBRAW_LIBRARY_BUILD @@ -14,7 +14,7 @@ #include "internal/defines.h" #include "internal/var_defines.h" -#line 269 "dcraw/dcraw.c" +#line 270 "dcraw/dcraw.c" #ifndef __GLIBC__ char *my_memmem (char *haystack, size_t haystacklen, @@ -29,7 +29,7 @@ char *my_memmem (char *haystack, size_t haystacklen, #define memmem my_memmem #endif -#line 303 "dcraw/dcraw.c" +#line 304 "dcraw/dcraw.c" ushort CLASS sget2 (uchar *s) { @@ -104,7 +104,7 @@ void CLASS read_shorts (ushort *pixel, int count) if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) swab ((char*)pixel, (char*)pixel, count*2); } -#line 380 "dcraw/dcraw.c" +#line 381 "dcraw/dcraw.c" void CLASS canon_black (double dark[2]) { int c, diff, row, col; @@ -639,13 +639,13 @@ void CLASS canon_compressed_load_raw() canon_black (dark); } -#line 926 "dcraw/dcraw.c" +#line 927 "dcraw/dcraw.c" int CLASS ljpeg_start (struct jhead *jh, int info_only) { int c, tag, len; uchar data[0x10000], *dp; - init_decoder(); + if (!info_only) init_decoder(); memset (jh, 0, sizeof *jh); FORC(6) jh->huff[c] = free_decode; jh->restart = INT_MAX; @@ -952,17 +952,31 @@ void CLASS adobe_dng_load_raw_nc() free (pixel); } +void CLASS pentax_tree() +{ + ushort bit[2][13]; + struct decode *cur; + int c, i, j; + + init_decoder(); + FORC(13) bit[0][c] = get2(); + FORC(13) bit[1][c] = fgetc(ifp) & 15; + FORC(13) { + cur = first_decode; + for (i=0; i < bit[1][c]; i++) { + j = bit[0][c] >> (11-i) & 1; + if (!cur->branch[j]) cur->branch[j] = ++free_decode; + cur = cur->branch[j]; + } + cur->leaf = c; + } +} + void CLASS pentax_k10_load_raw() { - static const uchar pentax_tree[2][30] = - { { 0,2,3,1,1,1,1,1,1,2,0,0,0,0,0,0, 3,4,2,5,1,6,0,7,8,9,10,11,12 }, - { 0,2,3,1,1,1,1,1,1,2,0,0,0,0,0,0, 1,2,0,3,4,5,6,7,8,9,10,11,12 } }; int row, col, diff; ushort vpred[2][2] = {{0,0},{0,0}}, hpred[2]; - init_decoder(); - row = !strcmp(model,"K2000") || !strcmp(model,"K-m"); - make_decoder (pentax_tree[row], 0); getbits(-1); for (row=0; row < raw_height; row++) { @@ -1239,7 +1253,7 @@ void CLASS fuji_load_raw() free (pixel); #endif } -#line 1530 "dcraw/dcraw.c" +#line 1545 "dcraw/dcraw.c" void CLASS ppm_thumb (FILE *tfp) { char *thumb; @@ -1737,7 +1751,7 @@ void CLASS leaf_hdr_load_raw() } } -#line 2031 "dcraw/dcraw.c" +#line 2046 "dcraw/dcraw.c" void CLASS sinar_4shot_load_raw() { ushort *pixel; @@ -2965,7 +2979,7 @@ void CLASS smal_v9_load_raw() smal_decode_segment (seg+i, holes); if (holes) fill_holes (holes); } -#line 4132 "dcraw/dcraw.c" +#line 4147 "dcraw/dcraw.c" void CLASS pseudoinverse (double (*in)[3], double (*out)[3], int size) { @@ -4233,7 +4247,7 @@ void CLASS parse_thumb_note (int base, unsigned toff, unsigned tlen) } } -#line 5403 "dcraw/dcraw.c" +#line 5418 "dcraw/dcraw.c" void CLASS parse_makernote (int base, int uptag) { static const uchar xlat[2][256] = { @@ -4451,6 +4465,10 @@ void CLASS parse_makernote (int base, int uptag) black = (get2()+get2()+get2()+get2())/4; if (tag == 0x201 && len == 4) goto get2_rggb; + if (tag == 0x220 && len == 53) { + fseek (ifp, 14, SEEK_CUR); + pentax_tree(); + } if (tag == 0x401 && len == 4) { black = (get4()+get4()+get4()+get4())/4; } @@ -4761,7 +4779,7 @@ void CLASS parse_kodak_ifd (int base) } } -#line 5934 "dcraw/dcraw.c" +#line 5953 "dcraw/dcraw.c" int CLASS parse_tiff_ifd (int base) { unsigned entries, tag, type, len, plen=16, save; @@ -5923,7 +5941,7 @@ void CLASS parse_cine() data_offset = (INT64) get4() + 8; data_offset += (INT64) get4() << 32; } -#line 7199 "dcraw/dcraw.c" +#line 7218 "dcraw/dcraw.c" #ifdef LIBRAW_LIBRARY_BUILD void CLASS adobe_coeff (const char *p_make, const char *p_model) #else @@ -7581,6 +7599,8 @@ c603: colors = 1; filters = 0; } + if (!strcmp(model+4,"20X")) + strcpy (cdesc, "MYCY"); if (strstr(model,"DC25")) { strcpy (model, "DC25"); data_offset = 15424; @@ -7824,7 +7844,7 @@ notraw: RUN_CALLBACK(LIBRAW_PROGRESS_IDENTIFY,1,2); #endif } -#line 9191 "dcraw/dcraw.c" +#line 9212 "dcraw/dcraw.c" void CLASS convert_to_rgb() { int row, col, c, i, j, k; @@ -8080,7 +8100,7 @@ void CLASS gamma_lut (ushort lut[0x10000]) } -#line 9471 "dcraw/dcraw.c" +#line 9492 "dcraw/dcraw.c" void CLASS tiff_set (ushort *ntag, ushort tag, ushort type, int count, int val) { diff --git a/libs/libkdcraw/libraw/internal/dcraw_fileio.cpp b/libs/libkdcraw/libraw/internal/dcraw_fileio.cpp index 3e6d6430..df88597d 100644 --- a/libs/libkdcraw/libraw/internal/dcraw_fileio.cpp +++ b/libs/libkdcraw/libraw/internal/dcraw_fileio.cpp @@ -1,18 +1,18 @@ /* GENERATED FILE, DO NOT EDIT - Generated from dcraw/dcraw.c at Sun Mar 8 17:46:21 2009 + Generated from dcraw/dcraw.c at Fri Mar 13 22:27:08 2009 Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c) for copyright information. */ -#line 3981 "dcraw/dcraw.c" +#line 3996 "dcraw/dcraw.c" #define CLASS LibRaw:: #include "libraw/libraw_types.h" #define LIBRAW_LIBRARY_BUILD #include "libraw/libraw.h" #include "internal/defines.h" #include "internal/var_defines.h" -#line 3991 "dcraw/dcraw.c" +#line 4006 "dcraw/dcraw.c" /* Seach from the current directory up to the root looking for @@ -30,7 +30,7 @@ void CLASS bad_pixels (char *fname) #endif if (fname) fp = fopen (fname, "r"); -#line 4034 "dcraw/dcraw.c" +#line 4049 "dcraw/dcraw.c" if (!fp) { #ifdef LIBRAW_LIBRARY_BUILD @@ -126,7 +126,7 @@ void CLASS subtract (char *fname) RUN_CALLBACK(LIBRAW_PROGRESS_DARK_FRAME,1,2); #endif } -#line 9102 "dcraw/dcraw.c" +#line 9123 "dcraw/dcraw.c" #ifndef NO_LCMS void CLASS apply_profile (char *input, char *output) diff --git a/libs/libkdcraw/libraw/internal/defines.h b/libs/libkdcraw/libraw/internal/defines.h index e48af185..775ee012 100644 --- a/libs/libkdcraw/libraw/internal/defines.h +++ b/libs/libkdcraw/libraw/internal/defines.h @@ -1,14 +1,14 @@ /* GENERATED FILE, DO NOT EDIT - Generated from dcraw/dcraw.c at Sun Mar 8 17:46:19 2009 + Generated from dcraw/dcraw.c at Fri Mar 13 22:27:06 2009 Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c) for copyright information. */ -#line 27 "dcraw/dcraw.c" +#line 28 "dcraw/dcraw.c" #define NO_JPEG -#line 32 "dcraw/dcraw.c" -#define VERSION "8.92" +#line 33 "dcraw/dcraw.c" +#define VERSION "8.93" #define _GNU_SOURCE #define _USE_MATH_DEFINES @@ -43,7 +43,7 @@ #else #define _(String) (String) #endif -#line 75 "dcraw/dcraw.c" +#line 76 "dcraw/dcraw.c" #ifdef __CYGWIN__ #include #endif @@ -72,7 +72,7 @@ typedef unsigned long long UINT64; #ifndef LONG_BIT #define LONG_BIT (8 * sizeof (long)) #endif -#line 169 "dcraw/dcraw.c" +#line 170 "dcraw/dcraw.c" #define FORC(cnt) for (c=0; c < cnt; c++) #define FORC3 FORC(3) #define FORC4 FORC(4) @@ -126,7 +126,7 @@ typedef unsigned long long UINT64; 3 G R G R G R 3 B G B G B G 3 R G R G R G 3 G B G B G B */ -#line 227 "dcraw/dcraw.c" +#line 228 "dcraw/dcraw.c" #define BAYER(row,col) \ image[((row) >> shrink)*iwidth + ((col) >> shrink)][FC(row,col)] diff --git a/libs/libkdcraw/libraw/internal/foveon.cpp b/libs/libkdcraw/libraw/internal/foveon.cpp index e9368121..805add78 100644 --- a/libs/libkdcraw/libraw/internal/foveon.cpp +++ b/libs/libkdcraw/libraw/internal/foveon.cpp @@ -1,11 +1,11 @@ /* GENERATED FILE, DO NOT EDIT - Generated from dcraw/dcraw.c at Sun Mar 8 17:46:19 2009 + Generated from dcraw/dcraw.c at Fri Mar 13 22:27:06 2009 Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c) for copyright information. */ -#line 3260 "dcraw/dcraw.c" +#line 3275 "dcraw/dcraw.c" #define CLASS LibRaw:: #include "libraw/libraw_types.h" #define LIBRAW_IO_REDEFINED @@ -17,7 +17,7 @@ #define SRC_USES_CURVE #include "internal/var_defines.h" #define sget4(s) sget4((uchar *)s) -#line 3273 "dcraw/dcraw.c" +#line 3288 "dcraw/dcraw.c" /* RESTRICTED code starts here */ @@ -277,12 +277,12 @@ int CLASS foveon_apply_curve (short *curve, int i) return i < 0 ? -curve[1-i] : curve[1+i]; } -#line 3535 "dcraw/dcraw.c" +#line 3550 "dcraw/dcraw.c" #ifdef image #undef image #endif #define image ((short(*)[4]) imgdata.image) -#line 3542 "dcraw/dcraw.c" +#line 3557 "dcraw/dcraw.c" void CLASS foveon_interpolate() { @@ -719,7 +719,7 @@ void CLASS foveon_interpolate() #undef image /* RESTRICTED code ends here */ -#line 7098 "dcraw/dcraw.c" +#line 7117 "dcraw/dcraw.c" char * CLASS foveon_gets (int offset, char *str, int len) { int i; diff --git a/libs/libkdcraw/libraw/internal/libraw_internal_funcs.h b/libs/libkdcraw/libraw/internal/libraw_internal_funcs.h index 33d11ffb..03bd3e86 100644 --- a/libs/libkdcraw/libraw/internal/libraw_internal_funcs.h +++ b/libs/libkdcraw/libraw/internal/libraw_internal_funcs.h @@ -69,6 +69,7 @@ // Pentax void pentax_k10_load_raw(); + void pentax_tree(); // Nikon (and Minolta Z2) void nikon_compressed_load_raw(); diff --git a/libs/libkdcraw/libraw/libraw/libraw_version.h b/libs/libkdcraw/libraw/libraw/libraw_version.h index 36eb7475..df3cf9b6 100644 --- a/libs/libkdcraw/libraw/libraw/libraw_version.h +++ b/libs/libkdcraw/libraw/libraw/libraw_version.h @@ -27,7 +27,7 @@ #define LIBRAW_MAJOR_VERSION 0 #define LIBRAW_MINOR_VERSION 7 #define LIBRAW_PATCH_VERSION 0 -#define LIBRAW_VERSION_TAIL Beta4 +#define LIBRAW_VERSION_TAIL Beta5 #define _LIBRAW_VERSION_MAKE(a,b,c,d) #a"."#b"."#c"-"#d #define LIBRAW_VERSION_MAKE(a,b,c,d) _LIBRAW_VERSION_MAKE(a,b,c,d) -- 2.11.4.GIT