[f-spot/rubenv-gsoc-2009: 85/86] Update to LibRaw 0.8.4.



commit 6ef40351471cbc728b43dc0481b9da9322e23d97
Author: Ruben Vermeersch <ruben savanne be>
Date:   Thu Dec 24 22:00:52 2009 +0100

    Update to LibRaw 0.8.4.
    
    This adds support for a ton of cameras, including the Canon EOS 7D and the
    Nikon D300s.
    
    Valgrinded, leak-free.

 lib/libfspotraw/LibRaw/Changelog.rus              |   11 ++++++
 lib/libfspotraw/LibRaw/Changelog.txt              |   11 ++++++
 lib/libfspotraw/LibRaw/dcraw/.gdbinit             |    2 +
 lib/libfspotraw/LibRaw/dcraw/dcraw.c              |   34 ++++++++++++++++----
 lib/libfspotraw/LibRaw/internal/dcraw_common.cpp  |   35 ++++++++++++++++++---
 lib/libfspotraw/LibRaw/internal/dcraw_fileio.cpp  |    2 +-
 lib/libfspotraw/LibRaw/internal/defines.h         |    4 +-
 lib/libfspotraw/LibRaw/internal/foveon.cpp        |    2 +-
 lib/libfspotraw/LibRaw/libraw/libraw_datastream.h |    8 ++--
 lib/libfspotraw/LibRaw/libraw/libraw_version.h    |    2 +-
 lib/libfspotraw/LibRaw/src/libraw_cxx.cpp         |    7 +++-
 lib/libfspotraw/Makefile.am                       |    2 +-
 12 files changed, 97 insertions(+), 23 deletions(-)
---
diff --git a/lib/libfspotraw/LibRaw/Changelog.rus b/lib/libfspotraw/LibRaw/Changelog.rus
index 3d8ba4e..61b502f 100644
--- a/lib/libfspotraw/LibRaw/Changelog.rus
+++ b/lib/libfspotraw/LibRaw/Changelog.rus
@@ -1,3 +1,14 @@
+2009-11-21 Alex Tutubalin <lexa lexa ru>
+           + Èñïðàâëåíà îøèáêà â îáðàáîòêå íåêîìïðåññèðîâàííûõ ôàéëîâ Phase One
+           * LibRaw 0.8.4
+
+2009-10-24 Alex Tutubalin <lexa lexa ru>
+           + Èìïîðòèðîâàíà dcraw 8.98/1.431:
+             * Íîâûå êàìåðû: Canon 7D, Panasonic GF1, Sony A850 è A380, Casio Z850,
+               Nikon D300s
+           + Èçìåíåíèÿ â çàãîëîâî÷íûõ ôàéëàõ äëÿ ïîäàâëåíèÿ ïðåäóïðåæäåíèé êîìïèëÿòîðà
+           * LibRaw 0.8.3
+
 2009-09-02 Alex Tutubalin <lexa lexa ru>
            + Èñïðàâëåíà îøèáêà â êîäå ðàñïàêîâêè Hasselblad .3FR
            * Èìïîðòèðîâàíà dcraw 8.97/1.428: èñïðàâëåíà îøèáêà îïðåäåëåíèÿ
diff --git a/lib/libfspotraw/LibRaw/Changelog.txt b/lib/libfspotraw/LibRaw/Changelog.txt
index 6a13125..4a7d1a6 100644
--- a/lib/libfspotraw/LibRaw/Changelog.txt
+++ b/lib/libfspotraw/LibRaw/Changelog.txt
@@ -1,3 +1,14 @@
+2009-11-21 Alex Tutubalin <lexa lexa ru>
+           + Fixed a bug in processing of uncompressed Phase One files
+           * LibRaw 0.8.4
+
+2009-10-24 Alex Tutubalin <lexa lexa ru>
+           + Imported dcraw 8.98/1.431:
+             * New Cameras: Canon 7D, Panasonic GF1, Sony A850 and A380,
+             Casio Z850, Nikon D300s
+           + changes in libraw_datastream.h to make compilers more happy
+           * LibRaw 0.8.3
+
 2009-09-02 Alex Tutubalin <lexa lexa ru>
            + Fixed bug in Hasselblad .3FR unpacking code
            * Imported dcraw 8.97/1.428: Nikon D3000 image width fix
diff --git a/lib/libfspotraw/LibRaw/dcraw/.gdbinit b/lib/libfspotraw/LibRaw/dcraw/.gdbinit
new file mode 100644
index 0000000..ac30bf5
--- /dev/null
+++ b/lib/libfspotraw/LibRaw/dcraw/.gdbinit
@@ -0,0 +1,2 @@
+set args -s 5 -v test.cine
+b main
diff --git a/lib/libfspotraw/LibRaw/dcraw/dcraw.c b/lib/libfspotraw/LibRaw/dcraw/dcraw.c
index c63a060..b422e70 100644
--- a/lib/libfspotraw/LibRaw/dcraw/dcraw.c
+++ b/lib/libfspotraw/LibRaw/dcraw/dcraw.c
@@ -19,11 +19,11 @@
    *If you have not modified dcraw.c in any way, a link to my
    homepage qualifies as "full source code".
 
-   $Revision: 1.428 $
-   $Date: 2009/08/31 15:23:49 $
+   $Revision: 1.431 $
+   $Date: 2009/09/22 16:06:07 $
  */
 
-#define VERSION "8.97"
+#define VERSION "8.98"
 
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
@@ -270,7 +270,7 @@ void CLASS derror()
     else
       fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp));
   }
-  data_error = 1;
+  data_error++;
 }
 
 ushort CLASS sget2 (uchar *s)
@@ -5993,6 +5993,8 @@ void CLASS adobe_coeff (const char *make, const char *model)
 	{ 4716,603,-830,-7798,15474,2480,-1496,1937,6651 } },
     { "Canon EOS 5D", 0, 0xe6c,
 	{ 6347,-479,-972,-8297,15954,2480,-1968,2131,7649 } },
+    { "Canon EOS 7D", 0, 0x3510,	/* DJC */
+	{ 7956,-1490,-850,-2896,10428,2469,-827,1800,5680 } },
     { "Canon EOS 10D", 0, 0xfa0,
 	{ 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } },
     { "Canon EOS 20Da", 0, 0,
@@ -6409,7 +6411,9 @@ void CLASS adobe_coeff (const char *make, const char *model)
 	{ 9082,-2907,-925,-6119,13377,3058,-1797,2641,5609 } },
     { "Panasonic DMC-G1", 15, 0xfff,
 	{ 8199,-2065,-1056,-8124,16156,2033,-2458,3022,7220 } },
-    { "Panasonic DMC-GH1", 15, 0xfff,
+    { "Panasonic DMC-GF1", 15, 0xf92,
+	{ 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } },
+    { "Panasonic DMC-GH1", 15, 0xf92,
 	{ 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } },
     { "Phase One H 20", 0, 0,		/* DJC */
 	{ 1313,1855,-109,-6715,15908,808,-327,1840,6020 } },
@@ -6445,10 +6449,12 @@ void CLASS adobe_coeff (const char *make, const char *model)
 	{ 9847,-3091,-929,-8485,16346,2225,-714,595,7103 } },
     { "SONY DSLR-A350", 0, 0xffc,
 	{ 6038,-1484,-578,-9146,16746,2513,-875,746,7217 } },
-    { "SONY DSLR-A380", 0, 0,	/* copied */
-	{ 6038,-1484,-578,-9146,16746,2513,-875,746,7217 } },
+    { "SONY DSLR-A380", 0, 0,
+	{ 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } },
     { "SONY DSLR-A700", 254, 0x1ffe,
 	{ 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } },
+    { "SONY DSLR-A850", 256, 0x1ffe,
+	{ 5209,-1072,-397,-8845,16121,2919,-1618,1802,8654 } },
     { "SONY DSLR-A900", 254, 0x1ffe,
 	{ 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }
   };
@@ -6607,6 +6613,7 @@ void CLASS identify()
     {  7753344, "CASIO",    "EX-Z55"          ,1 },
     {  7816704, "CASIO",    "EX-Z60"          ,1 },
     { 10843712, "CASIO",    "EX-Z75"          ,1 },
+    { 12310144, "CASIO",    "EX-Z850"         ,1 },
     {  7426656, "CASIO",    "EX-P505"         ,1 },
     {  9313536, "CASIO",    "EX-P600"         ,1 },
     { 10979200, "CASIO",    "EX-P700"         ,1 },
@@ -7064,6 +7071,11 @@ canon_a5:
     if (unique_id == 0x80000252)
       adobe_coeff ("Canon","EOS 500D");
     goto canon_cr2;
+  } else if (is_canon && raw_width == 1340) {
+    top_margin = 51;
+    left_margin = 158;
+    raw_width = width *= 4;
+    goto canon_cr2;
   } else if (is_canon && raw_width == 1448) {
     top_margin  = 51;
     left_margin = 158;
@@ -7294,6 +7306,8 @@ konica_400z:
       maximum = 0x3df;
       order = 0x4d4d;
     }
+  } else if (!strcmp(model,"*ist D")) {
+    data_error = -1;
   } else if (!strcmp(model,"*ist DS")) {
     height -= 2;
   } else if (!strcmp(model,"K20D")) {
@@ -7880,6 +7894,12 @@ ezshare:
     height = 2321;
     width  = 3089;
     raw_width = 4672;
+    maximum = 0xfff;
+  } else if (!strcmp(model,"EX-Z850")) {
+    height = 2468;
+    width  = 3279;
+    raw_width = 4928;
+    maximum = 0xfff;
   } else if (!strcmp(model,"EX-P505")) {
     height = 1928;
     width  = 2568;
diff --git a/lib/libfspotraw/LibRaw/internal/dcraw_common.cpp b/lib/libfspotraw/LibRaw/internal/dcraw_common.cpp
index 86900ef..c14a326 100644
--- a/lib/libfspotraw/LibRaw/internal/dcraw_common.cpp
+++ b/lib/libfspotraw/LibRaw/internal/dcraw_common.cpp
@@ -1,6 +1,6 @@
 /* 
    GENERATED FILE, DO NOT EDIT
-   Generated from dcraw/dcraw.c at Wed Sep  2 11:06:05 2009
+   Generated from dcraw/dcraw.c at Sat Nov 21 12:39:09 2009
    Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c)
    for copyright information.
 */
@@ -1484,7 +1484,7 @@ void CLASS phase_one_load_raw()
             if(dfp)
                 *dfp = pixel[col];
             else
-                BAYER(row,col-left_margin) = pixel[col];
+                BAYER(row-top_margin,col-left_margin) = pixel[col];
         }
   }
   free (pixel);
@@ -5832,6 +5832,8 @@ void CLASS adobe_coeff (const char *p_make, const char *p_model)
 	{ 4716,603,-830,-7798,15474,2480,-1496,1937,6651 } },
     { "Canon EOS 5D", 0, 0xe6c,
 	{ 6347,-479,-972,-8297,15954,2480,-1968,2131,7649 } },
+    { "Canon EOS 7D", 0, 0x3510,	/* DJC */
+	{ 7956,-1490,-850,-2896,10428,2469,-827,1800,5680 } },
     { "Canon EOS 10D", 0, 0xfa0,
 	{ 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } },
     { "Canon EOS 20Da", 0, 0,
@@ -6248,7 +6250,9 @@ void CLASS adobe_coeff (const char *p_make, const char *p_model)
 	{ 9082,-2907,-925,-6119,13377,3058,-1797,2641,5609 } },
     { "Panasonic DMC-G1", 15, 0xfff,
 	{ 8199,-2065,-1056,-8124,16156,2033,-2458,3022,7220 } },
-    { "Panasonic DMC-GH1", 15, 0xfff,
+    { "Panasonic DMC-GF1", 15, 0xf92,
+	{ 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } },
+    { "Panasonic DMC-GH1", 15, 0xf92,
 	{ 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } },
     { "Phase One H 20", 0, 0,		/* DJC */
 	{ 1313,1855,-109,-6715,15908,808,-327,1840,6020 } },
@@ -6284,10 +6288,12 @@ void CLASS adobe_coeff (const char *p_make, const char *p_model)
 	{ 9847,-3091,-929,-8485,16346,2225,-714,595,7103 } },
     { "SONY DSLR-A350", 0, 0xffc,
 	{ 6038,-1484,-578,-9146,16746,2513,-875,746,7217 } },
-    { "SONY DSLR-A380", 0, 0,	/* copied */
-	{ 6038,-1484,-578,-9146,16746,2513,-875,746,7217 } },
+    { "SONY DSLR-A380", 0, 0,
+	{ 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } },
     { "SONY DSLR-A700", 254, 0x1ffe,
 	{ 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } },
+    { "SONY DSLR-A850", 256, 0x1ffe,
+	{ 5209,-1072,-397,-8845,16121,2919,-1618,1802,8654 } },
     { "SONY DSLR-A900", 254, 0x1ffe,
 	{ 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }
   };
@@ -6453,6 +6459,7 @@ void CLASS identify()
     {  7753344, "CASIO",    "EX-Z55"          ,1 },
     {  7816704, "CASIO",    "EX-Z60"          ,1 },
     { 10843712, "CASIO",    "EX-Z75"          ,1 },
+    { 12310144, "CASIO",    "EX-Z850"         ,1 },
     {  7426656, "CASIO",    "EX-P505"         ,1 },
     {  9313536, "CASIO",    "EX-P600"         ,1 },
     { 10979200, "CASIO",    "EX-P700"         ,1 },
@@ -6926,6 +6933,11 @@ canon_a5:
     if (unique_id == 0x80000252)
       adobe_coeff ("Canon","EOS 500D");
     goto canon_cr2;
+  } else if (is_canon && raw_width == 1340) {
+    top_margin = 51;
+    left_margin = 158;
+    raw_width = width *= 4;
+    goto canon_cr2;
   } else if (is_canon && raw_width == 1448) {
     top_margin  = 51;
     left_margin = 158;
@@ -7162,6 +7174,8 @@ konica_400z:
       maximum = 0x3df;
       order = 0x4d4d;
     }
+  } else if (!strcmp(model,"*ist D")) {
+    data_error = -1;
   } else if (!strcmp(model,"*ist DS")) {
     height -= 2;
   } else if (!strcmp(model,"K20D")) {
@@ -7759,6 +7773,12 @@ ezshare:
     height = 2321;
     width  = 3089;
     raw_width = 4672;
+    maximum = 0xfff;
+  } else if (!strcmp(model,"EX-Z850")) {
+    height = 2468;
+    width  = 3279;
+    raw_width = 4928;
+    maximum = 0xfff;
   } else if (!strcmp(model,"EX-P505")) {
     height = 1928;
     width  = 2568;
@@ -7879,6 +7899,11 @@ void CLASS identify2(unsigned fsize)
     height = 2321;
     width  = 3089;
     raw_width = 4672;
+  } else if (!strcmp(model,"EX-Z850")) {
+    height = 2468;
+    width  = 3279;
+    raw_width = 4928;
+    maximum = 0xfff;
   } else if (!strcmp(model,"EX-P505")) {
     height = 1928;
     width  = 2568;
diff --git a/lib/libfspotraw/LibRaw/internal/dcraw_fileio.cpp b/lib/libfspotraw/LibRaw/internal/dcraw_fileio.cpp
index 9ad80a7..57482c6 100644
--- a/lib/libfspotraw/LibRaw/internal/dcraw_fileio.cpp
+++ b/lib/libfspotraw/LibRaw/internal/dcraw_fileio.cpp
@@ -1,6 +1,6 @@
 /* 
    GENERATED FILE, DO NOT EDIT
-   Generated from dcraw/dcraw.c at Wed Sep  2 11:06:07 2009
+   Generated from dcraw/dcraw.c at Sat Nov 21 12:39:10 2009
    Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c)
    for copyright information.
 */
diff --git a/lib/libfspotraw/LibRaw/internal/defines.h b/lib/libfspotraw/LibRaw/internal/defines.h
index cadc068..6fc6d01 100644
--- a/lib/libfspotraw/LibRaw/internal/defines.h
+++ b/lib/libfspotraw/LibRaw/internal/defines.h
@@ -1,12 +1,12 @@
 /* 
    GENERATED FILE, DO NOT EDIT
-   Generated from dcraw/dcraw.c at Wed Sep  2 11:06:05 2009
+   Generated from dcraw/dcraw.c at Sat Nov 21 12:39:09 2009
    Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c)
    for copyright information.
 */
 
 #define NO_JPEG
-#define VERSION "8.97"
+#define VERSION "8.98"
 
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
diff --git a/lib/libfspotraw/LibRaw/internal/foveon.cpp b/lib/libfspotraw/LibRaw/internal/foveon.cpp
index c795063..4d1a28e 100644
--- a/lib/libfspotraw/LibRaw/internal/foveon.cpp
+++ b/lib/libfspotraw/LibRaw/internal/foveon.cpp
@@ -1,6 +1,6 @@
 /* 
    GENERATED FILE, DO NOT EDIT
-   Generated from dcraw/dcraw.c at Wed Sep  2 11:06:05 2009
+   Generated from dcraw/dcraw.c at Sat Nov 21 12:39:09 2009
    Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c)
    for copyright information.
 */
diff --git a/lib/libfspotraw/LibRaw/libraw/libraw_datastream.h b/lib/libfspotraw/LibRaw/libraw/libraw_datastream.h
index 9175315..b2c3d0c 100644
--- a/lib/libfspotraw/LibRaw/libraw/libraw_datastream.h
+++ b/lib/libfspotraw/LibRaw/libraw/libraw_datastream.h
@@ -103,7 +103,7 @@ class LibRaw_file_datastream : public LibRaw_abstract_datastream
 #if __MSVCRT_VERSION__ >= 0x800
         return substream?substream->seek(o,whence):_fseeki64(f,o,whence);
 #else
-        return substream?substream->seek(o,whence):fseek(f,o,whence);
+        return substream?substream->seek(o,whence):fseek(f,(size_t)o,whence);
 #endif
 #else
         return substream?substream->seek(o,whence):fseeko(f,o,whence);
@@ -215,14 +215,14 @@ class LibRaw_buffer_datastream : public LibRaw_abstract_datastream
                         if(size_t(-o) >= streampos)
                             streampos = 0;
                         else
-                            streampos += o;
+                            streampos += (size_t)o;
                     }
                 else if (o>0)
                     {
                         if(o+streampos> streamsize)
                             streampos = streamsize;
                         else
-                            streampos += o;
+                            streampos += (size_t)o;
                     }
                 return 0;
             case SEEK_END:
@@ -231,7 +231,7 @@ class LibRaw_buffer_datastream : public LibRaw_abstract_datastream
                 else if ( size_t(-o) > streamsize)
                     streampos = 0;
                 else
-                    streampos = streamsize+o;
+                    streampos = streamsize+(size_t)o;
                 return 0;
             default:
                 return 0;
diff --git a/lib/libfspotraw/LibRaw/libraw/libraw_version.h b/lib/libfspotraw/LibRaw/libraw/libraw_version.h
index e2e3e6c..7395e88 100644
--- a/lib/libfspotraw/LibRaw/libraw/libraw_version.h
+++ b/lib/libfspotraw/LibRaw/libraw/libraw_version.h
@@ -26,7 +26,7 @@
 
 #define LIBRAW_MAJOR_VERSION  0
 #define LIBRAW_MINOR_VERSION  8
-#define LIBRAW_PATCH_VERSION  2
+#define LIBRAW_PATCH_VERSION  4
 #define LIBRAW_VERSION_TAIL   Release
 
 #define _LIBRAW_VERSION_MAKE(a,b,c,d) #a"."#b"."#c"-"#d
diff --git a/lib/libfspotraw/LibRaw/src/libraw_cxx.cpp b/lib/libfspotraw/LibRaw/src/libraw_cxx.cpp
index 14aa57a..a3b876c 100644
--- a/lib/libfspotraw/LibRaw/src/libraw_cxx.cpp
+++ b/lib/libfspotraw/LibRaw/src/libraw_cxx.cpp
@@ -136,7 +136,7 @@ void LibRaw::derror()
                     throw LIBRAW_EXCEPTION_IO_CORRUPT;
                 }
         }
-    libraw_internal_data.unpacker_data.data_error = 1;
+    libraw_internal_data.unpacker_data.data_error++;
 }
 
 #define ZERO(a) memset(&a,0,sizeof(a))
@@ -1637,6 +1637,7 @@ static const char  *static_camera_list[] =
 "Canon EOS D60",
 "Canon EOS 5D",
 "Canon EOS 5D Mark II",
+"Canon EOS 7D",
 "Canon EOS 10D",
 "Canon EOS 20D",
 "Canon EOS 30D",
@@ -1671,6 +1672,7 @@ static const char  *static_camera_list[] =
 "Casio EX-Z55",
 "Casio EX-Z60",
 "Casio EX-Z75",
+"Casio EX-Z850",
 "Casio Exlim Pro 505",
 "Casio Exlim Pro 600",
 "Casio Exlim Pro 700",
@@ -1805,6 +1807,7 @@ static const char  *static_camera_list[] =
 "Nikon D100",
 "Nikon D200",
 "Nikon D300",
+"Nikon D300s",
 "Nikon D700",
 "Nikon D3000",
 "Nikon D5000",
@@ -1929,7 +1932,9 @@ static const char  *static_camera_list[] =
 "Sony DSLR-A300",
 "Sony DSLR-A330",
 "Sony DSLR-A350",
+"Sony DSLR-A380",
 "Sony DSLR-A700",
+"Sony DSLR-A850",
 "Sony DSLR-A900",
 "Sony XCD-SX910CR",
 "STV680 VGA",
diff --git a/lib/libfspotraw/Makefile.am b/lib/libfspotraw/Makefile.am
index 71704e0..f413a13 100644
--- a/lib/libfspotraw/Makefile.am
+++ b/lib/libfspotraw/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.include
 
-LIBRAW = LibRaw-0.8.2
+LIBRAW = LibRaw-0.8.4
 INCLUDES = -I $(top_srcdir) -I $(srcdir)/LibRaw $(F_CFLAGS)
 
 fspotlibdir = $(libdir)/f-spot



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]