Hello community,

here is the log from the commit of package libkdcraw for openSUSE:Factory 
checked in at 2013-07-22 17:19:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkdcraw (Old)
 and      /work/SRC/openSUSE:Factory/.libkdcraw.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libkdcraw"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libkdcraw/libkdcraw.changes      2013-07-04 
18:02:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libkdcraw.new/libkdcraw.changes 2013-07-22 
17:19:32.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Jul 15 08:14:06 UTC 2013 - cgiboude...@gmx.com
+
+- Update to 4.10.95
+ * KDE 4.11 RC 1 release
+ * See http://www.kde.org/announcements/announce-4.11-rc1.php
+
+-------------------------------------------------------------------

Old:
----
  libkdcraw-4.10.90.tar.xz

New:
----
  libkdcraw-4.10.95.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libkdcraw.spec ++++++
--- /var/tmp/diff_new_pack.BWhGUF/_old  2013-07-22 17:19:32.000000000 +0200
+++ /var/tmp/diff_new_pack.BWhGUF/_new  2013-07-22 17:19:32.000000000 +0200
@@ -19,7 +19,7 @@
 %define _so 22
 
 Name:           libkdcraw
-Version:        4.10.90
+Version:        4.10.95
 Release:        0
 Summary:        Shared library interface around dcraw
 License:        LGPL-2.0+ and GPL-2.0+ and GPL-3.0+

++++++ libkdcraw-4.10.90.tar.xz -> libkdcraw-4.10.95.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkdcraw-4.10.90/libraw/Changelog.txt 
new/libkdcraw-4.10.95/libraw/Changelog.txt
--- old/libkdcraw-4.10.90/libraw/Changelog.txt  2013-06-10 20:53:21.000000000 
+0200
+++ new/libkdcraw-4.10.95/libraw/Changelog.txt  2013-07-10 01:14:34.000000000 
+0200
@@ -1,3 +1,11 @@
+2013-07-04 Alex Tutubalin <l...@lexa.ru>
+  * New camera/format support:
+     OmniVision OV5647 (Raspberry Pi)
+     Nikon D5200
+     Panasonic DMC-GF6
+  * Fixed decoding error for some Canon sRAW files.
+  * LibRaw 0.15.3
+
 2013-05-26 Alex Tutubalin <l...@lexa.ru>
   * Fixed possible double-free() on error recovery on damaged full-color
     (Foveon, sRAW) files.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkdcraw-4.10.90/libraw/demosaic-pack-GPL2/dcraw_foveon.c 
new/libkdcraw-4.10.95/libraw/demosaic-pack-GPL2/dcraw_foveon.c
--- old/libkdcraw-4.10.90/libraw/demosaic-pack-GPL2/dcraw_foveon.c      
2013-05-28 21:27:54.000000000 +0200
+++ new/libkdcraw-4.10.95/libraw/demosaic-pack-GPL2/dcraw_foveon.c      
2013-07-10 01:14:34.000000000 +0200
@@ -214,7 +214,7 @@
 void CLASS foveon_dp_load_raw()
 {
   unsigned c, roff[4], row, col, diff;
-  ushort huff[258], vpred[2][2], hpred[2];
+  ushort huff[512], vpred[2][2], hpred[2];
 
   fseek (ifp, 8, SEEK_CUR);
   foveon_huff (huff);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkdcraw-4.10.90/libraw/internal/dcraw_common.cpp 
new/libkdcraw-4.10.95/libraw/internal/dcraw_common.cpp
--- old/libkdcraw-4.10.90/libraw/internal/dcraw_common.cpp      2013-06-10 
20:53:21.000000000 +0200
+++ new/libkdcraw-4.10.95/libraw/internal/dcraw_common.cpp      2013-07-10 
01:14:34.000000000 +0200
@@ -630,19 +630,6 @@
   return diff;
 }
 
-int CLASS ljpeg_diff_pef (LibRaw_bit_buffer& bits, LibRaw_byte_buffer* 
buf,ushort *huff)
-{
-  int len, diff;
-
-  len = bits._gethuff(buf,*huff,huff+1,zero_after_ff);
-  if (len == 16 && (!dng_version || dng_version >= 0x1010000))
-    return -32768;
-  diff = bits._getbits(buf,len,zero_after_ff);
-  if ((diff & (1 << (len-1))) == 0)
-    diff -= (1 << len) - 1;
-  return diff;
-}
-
 ushort * CLASS ljpeg_row_new (int jrow, struct jhead *jh, LibRaw_bit_buffer& 
bits,LibRaw_byte_buffer* bytes)
 {
   int col, c, diff, pred, spred=0;
@@ -1124,30 +1111,15 @@
       huff[++i] = bit[1][c] << 8 | c;
   huff[0] = 12;
   fseek (ifp, data_offset, SEEK_SET);
-#ifdef LIBRAW_LIBRARY_BUILD
-  if(!data_size)
-      throw LIBRAW_EXCEPTION_IO_BADFILE;
-  LibRaw_byte_buffer *buf = ifp->make_byte_buffer(data_size);
-  LibRaw_bit_buffer bits;
-  bits.reset();
-#else
   getbits(-1);
-#endif
   for (row=0; row < raw_height; row++)
     for (col=0; col < raw_width; col++) {
-#ifdef LIBRAW_LIBRARY_BUILD
-      diff = ljpeg_diff_pef(bits,buf,huff);
-#else
       diff = ljpeg_diff (huff);
-#endif
       if (col < 2) hpred[col] = vpred[row & 1][col] += diff;
       else        hpred[col & 1] += diff;
       RAW(row,col) = hpred[col & 1];
       if (hpred[col & 1] >> tiff_bps) derror();
     }
-#ifdef LIBRAW_LIBRARY_BUILD
-  delete buf;
-#endif
 }
 
 void CLASS nikon_load_raw()
@@ -1837,7 +1809,7 @@
   int rev, dwide, row, col, c;
 
   rev = 3 * (order == 0x4949);
-  dwide = raw_width * 5 / 4;
+  dwide = (raw_width * 5 +1) / 4;
   data = (uchar *) malloc (dwide*2);
   merror (data, "nokia_load_raw()");
   for (row=0; row < raw_height; row++) {
@@ -5272,7 +5244,6 @@
        strcpy (make, "Imacon");
        data_offset = ftell(ifp);
        ima_len = len;
-        printf("Data len: %d\n",ima_len);
        break;
       case 46279:
        if (!ima_len) break;
@@ -5849,8 +5820,8 @@
       thumb_length = len;
     }
     if (type == 0x1818) {
-      shutter = pow (2, (double)(-int_to_float((get4(),get4()))));
-      aperture = pow (2, (double)(int_to_float(get4())/2));
+      shutter = pow (2, -int_to_float((get4(),get4())));
+      aperture = pow (2, int_to_float(get4())/2);
     }
     if (type == 0x102a) {
       iso_speed = pow (2, (get4(),get2())/32.0 - 4) * 50;
@@ -6414,9 +6385,9 @@
        { 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } },
     { "Canon EOS 650D", 0, 0x354d,
        { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } },
-       { "Canon EOS 700D", 0, 0x354d,
+    { "Canon EOS 700D", 0, 0x354d,
        { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } },
-       { "Canon EOS REBEL T5i", 0, 0x354d,
+    { "Canon EOS REBEL T5i", 0, 0x354d,
        { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } },
     { "Canon EOS 1000D", 0, 0xe43,
        { 6771,-1139,-977,-7818,15123,2928,-1244,1437,7533 } },
@@ -6442,9 +6413,9 @@
        { 6847,-614,-1014,-4669,12737,2139,-1197,2488,6846 } },
     { "Canon EOS-1D", 0, 0xe20,
        { 6806,-179,-1020,-8097,16415,1687,-3267,4236,7690 } },
-       { "Canon EOS 100D", 0, 0x3cf0,
+    { "Canon EOS 100D", 0, 0x3cf0,
        { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } },
-       { "Canon EOS REBEL SL1", 0, 0x3cf0,
+    { "Canon EOS REBEL SL1", 0, 0x3cf0,
        { 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } },
     { "Canon EOS", 0, 0,
        { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } },
@@ -6606,17 +6577,17 @@
        { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } },
     { "FUJIFILM HS3", 0, 0,
        { 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } },
-       { "FUJIFILM HS50EXR", 0, 0,
+    { "FUJIFILM HS50EXR", 0, 0,
        { 12085,-4727,-953,-3257,11489,2002,-511,2046,4592 } },
-       { "FUJIFILM SL1000", 0, 0,
+    { "FUJIFILM SL1000", 0, 0,
        { 11705,-4262,-1107,-2282,10791,1709,-555,1713,4945 } },
-       { "FUJIFILM X100S", 0, 0,
+    { "FUJIFILM X100S", 0, 0,
        { 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 } },
     { "FUJIFILM X100", 0, 0,
        { 12161,-4457,-1069,-5034,12874,2400,-795,1724,6904 } },
     { "FUJIFILM X10", 0, 0,
        { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } },
-       { "FUJIFILM X20", 0, 0,
+    { "FUJIFILM X20", 0, 0,
        { 11768,-4971,-1133,-4904,12927,2183,-480,1723,4605 } },
     { "FUJIFILM XF1", 0, 0,
        { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } },
@@ -6756,6 +6727,8 @@
        { 7309,-1403,-519,-8474,16008,2622,-2433,2826,8064 } },
     { "NIKON D5100", 0, 0x3de6,
        { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } },
+    { "NIKON D5200", 0, 0,
+       { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } },
     { "NIKON D50", 0, 0,
        { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } },
     { "NIKON D600", 0, 0x3e07,
@@ -6768,7 +6741,7 @@
        { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } },
     { "NIKON D70", 0, 0,
        { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } },
-       { "NIKON D7100", 0, 0,
+    { "NIKON D7100", 0, 0,
        { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } },
     { "NIKON D800", 0, 0,
        { 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 } },
@@ -6802,9 +6775,9 @@
        { 8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354 } },
     { "NIKON E8800", 0, 0,
        { 7971,-2314,-913,-8451,15762,2894,-1442,1520,7610 } },
-       { "NIKON COOLPIX A", 0, 0,
+    { "NIKON COOLPIX A", 0, 0,
        { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } },
-       { "NIKON COOLPIX P330", 0, 0,
+    { "NIKON COOLPIX P330", 0, 0,
        { 10321,-3920,-931,-2750,11146,1824,-442,1545,5539 } },
     { "NIKON COOLPIX P6000", 0, 0,
        { 9698,-3367,-914,-4706,12584,2368,-837,968,5801 } },
@@ -6814,9 +6787,9 @@
        { 11053,-4269,-1024,-1976,10182,2088,-526,1263,4469 } },
     { "NIKON COOLPIX P7700", 200, 0,
        { 10321,-3920,-931,-2750,11146,1824,-442,1545,5539 } },
-       { "NIKON 1 J3", 0, 0,
+    { "NIKON 1 J3", 0, 0,
        { 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
-       { "NIKON 1 S1", 0, 0,
+    { "NIKON 1 S1", 0, 0,
        { 8994,-2667,-865,-4594,12324,2552,-699,1786,6260 } },
     { "NIKON 1 V2", 0, 0,
        { 6588,-1305,-693,-3277,10987,2634,-355,2016,5106 } },
@@ -6902,12 +6875,14 @@
        { 10915,-3677,-982,-5587,12986,2911,-1168,1968,6223 } },
     { "OLYMPUS SP570UZ", 0, 0,
        { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } },
-       { "OLYMPUS XZ-10", 0, 0,
+    { "OLYMPUS XZ-10", 0, 0,
        { 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } },
     { "OLYMPUS XZ-1", 0, 0,
        { 10901,-4095,-1074,-1141,9208,2293,-62,1417,5158 } },
     { "OLYMPUS XZ-2", 0, 0,
        { 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } },
+    { "OmniVision ov5647", 0, 0,       /* DJC */
+       { 12782,-4059,-379,-478,9066,1413,1340,1513,5176 } },
     { "PENTAX *ist DL2", 0, 0,
        { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } },
     { "PENTAX *ist DL", 0, 0,
@@ -6944,7 +6919,7 @@
        { 8713,-2833,-743,-4342,11900,2772,-722,1543,6247 } },
     { "PENTAX K-7", 0, 0,
        { 9142,-2947,-678,-8648,16967,1663,-2224,2898,8615 } },
-       { "PENTAX MX-1", 0, 0,
+    { "PENTAX MX-1", 0, 0,
        { 8804,-2523,-1238,-2423,11627,860,-682,1774,4753 } },
     { "PENTAX Q10", 0, 0,
        { 12995,-5593,-1107,-1879,10139,2027,-64,1233,4919 } },
@@ -7022,7 +6997,7 @@
        { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } },
     { "Panasonic DMC-G5", 143, 0xfff,
        { 7798,-2562,-740,-3879,11584,2613,-1055,2248,5434 } },
-       { "Panasonic DMC-G6", 143, 0xfff,
+    { "Panasonic DMC-G6", 143, 0xfff,
        { 8294,-2891,-651,-3869,11590,2595,-1183,2267,5352 } },
     { "Panasonic DMC-GF1", 15, 0xf92,
        { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } },
@@ -7032,6 +7007,8 @@
        { 9051,-2468,-1204,-5212,13276,2121,-1197,2510,6890 } },
     { "Panasonic DMC-GF5", 143, 0xfff,
        { 8228,-2945,-660,-3938,11792,2430,-1094,2278,5793 } },
+    { "Panasonic DMC-GF6", 143, 0,
+       { 8130,-2801,-946,-3520,11289,2552,-1314,2511,5791 } },
     { "Panasonic DMC-GH1", 15, 0xf92,
        { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } },
     { "Panasonic DMC-GH2", 15, 0xf95,
@@ -7112,7 +7089,7 @@
        { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } },
     { "SONY DSLR-A900", 128, 0,
        { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } },
-       { "SONY NEX-3N", 128, 0,                /* Adobe */
+    { "SONY NEX-3N", 128, 0,           /* Adobe */
        { 6129,-1545,   -418,-4930,12490,2743,-977,1693,6615 } },
     { "SONY NEX-3", 128, 0,            /* Adobe */
        { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } },
@@ -7138,7 +7115,7 @@
        { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } },
     { "SONY SLT-A57", 128, 0,
        { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } },
-       { "SONY SLT-A58", 128, 0,
+    { "SONY SLT-A58", 128, 0,
        { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } },
     { "SONY SLT-A65", 128, 0,
        { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } },
@@ -7505,7 +7482,20 @@
       }
   if (zero_fsize) fsize = 0;
   if (make[0] == 0) parse_smal (0, flen);
-  if (make[0] == 0) parse_jpeg (is_raw = 0);
+  if (make[0] == 0) {
+    parse_jpeg(0);
+    fseek(ifp,0,SEEK_END);
+    int sz = ftell(ifp);
+    if (!strncmp(model,"ov",2) && sz>=6404096 && !fseek (ifp, -6404096, 
SEEK_END) &&
+       fread (head, 1, 32, ifp) && !strcmp(head,"BRCMn")) {
+      strcpy (make, "OmniVision");
+      data_offset = ftell(ifp) + 0x8000-32;
+      width = raw_width;
+      raw_width = 2611;
+      load_raw = &CLASS nokia_load_raw;
+      filters = 0x16161616;
+    } else is_raw = 0;
+  }
 
   for (i=0; i < sizeof corp / sizeof *corp; i++)
     if (strstr (make, corp[i]))                /* Simplify company names */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkdcraw-4.10.90/libraw/internal/libraw_internal_funcs.h 
new/libkdcraw-4.10.95/libraw/internal/libraw_internal_funcs.h
--- old/libkdcraw-4.10.90/libraw/internal/libraw_internal_funcs.h       
2013-06-10 20:53:21.000000000 +0200
+++ new/libkdcraw-4.10.95/libraw/internal/libraw_internal_funcs.h       
2013-07-10 01:14:34.000000000 +0200
@@ -58,7 +58,6 @@
     void        ljpeg_end(struct jhead *jh);
     int         ljpeg_diff (ushort *huff); 
     int         ljpeg_diff_new (LibRaw_bit_buffer& bits, LibRaw_byte_buffer* 
buf,ushort *huff);
-    int         ljpeg_diff_pef (LibRaw_bit_buffer& bits, LibRaw_byte_buffer* 
buf,ushort *huff);
     ushort *    ljpeg_row (int jrow, struct jhead *jh);
     ushort *    ljpeg_row_new (int jrow, struct jhead *jh, LibRaw_bit_buffer& 
bits,LibRaw_byte_buffer* bytes);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkdcraw-4.10.90/libraw/libraw/libraw_version.h 
new/libkdcraw-4.10.95/libraw/libraw/libraw_version.h
--- old/libkdcraw-4.10.90/libraw/libraw/libraw_version.h        2013-06-10 
20:53:21.000000000 +0200
+++ new/libkdcraw-4.10.95/libraw/libraw/libraw_version.h        2013-07-10 
01:14:34.000000000 +0200
@@ -25,7 +25,7 @@
 
 #define LIBRAW_MAJOR_VERSION  0
 #define LIBRAW_MINOR_VERSION  15
-#define LIBRAW_PATCH_VERSION  2
+#define LIBRAW_PATCH_VERSION  3
 #define LIBRAW_VERSION_TAIL   Release
 
 #define LIBRAW_SHLIB_CURRENT   9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkdcraw-4.10.90/libraw/src/libraw_cxx.cpp 
new/libkdcraw-4.10.95/libraw/src/libraw_cxx.cpp
--- old/libkdcraw-4.10.90/libraw/src/libraw_cxx.cpp     2013-06-10 
20:53:21.000000000 +0200
+++ new/libkdcraw-4.10.95/libraw/src/libraw_cxx.cpp     2013-07-10 
01:14:34.000000000 +0200
@@ -925,16 +925,6 @@
             S.height += S.height & 1;
             S.width  += S.width  & 1;
         }
-       libraw_decoder_info_t dinfo;
-       get_decoder_info(&dinfo);
-       if(dinfo.decoder_flags & LIBRAW_DECODER_LEGACY)
-       {
-               // Adjust sizes according to image buffer size
-               S.raw_width = S.width;
-               S.left_margin = 0;
-               S.raw_height = S.height;
-               S.top_margin = 0;
-       }
 
     IO.shrink = P1.filters && (O.half_size ||
        ((O.threshold || O.aber[0] != 1 || O.aber[2] != 1) ));
@@ -1010,200 +1000,205 @@
 
 int LibRaw::unpack(void)
 {
-    CHECK_ORDER_HIGH(LIBRAW_PROGRESS_LOAD_RAW);
-    CHECK_ORDER_LOW(LIBRAW_PROGRESS_IDENTIFY);
-    try {
+  CHECK_ORDER_HIGH(LIBRAW_PROGRESS_LOAD_RAW);
+  CHECK_ORDER_LOW(LIBRAW_PROGRESS_IDENTIFY);
+  try {
 
-               if(!libraw_internal_data.internal_data.input)
-                       return LIBRAW_INPUT_CLOSED;
+    if(!libraw_internal_data.internal_data.input)
+      return LIBRAW_INPUT_CLOSED;
 
-        RUN_CALLBACK(LIBRAW_PROGRESS_LOAD_RAW,0,2);
-        if (O.shot_select >= P1.raw_count)
-            return LIBRAW_REQUEST_FOR_NONEXISTENT_IMAGE;
+    RUN_CALLBACK(LIBRAW_PROGRESS_LOAD_RAW,0,2);
+    if (O.shot_select >= P1.raw_count)
+      return LIBRAW_REQUEST_FOR_NONEXISTENT_IMAGE;
         
-        if(!load_raw)
-            return LIBRAW_UNSPECIFIED_ERROR;
+    if(!load_raw)
+      return LIBRAW_UNSPECIFIED_ERROR;
         
-        if (O.use_camera_matrix && C.cmatrix[0][0] > 0.25) 
-            {
-                memcpy (C.rgb_cam, C.cmatrix, sizeof (C.cmatrix));
-                IO.raw_color = 0;
-            }
-        // already allocated ?
-        if(imgdata.image)
-            {
-                free(imgdata.image);
-                imgdata.image = 0;
-            }
-        if(imgdata.rawdata.raw_alloc)
-          {
-            free(imgdata.rawdata.raw_alloc);
-            imgdata.rawdata.raw_alloc = 0;
-          }
-        if (libraw_internal_data.unpacker_data.meta_length) 
-            {
-                libraw_internal_data.internal_data.meta_data = 
-                    (char *) malloc 
(libraw_internal_data.unpacker_data.meta_length);
-                merror (libraw_internal_data.internal_data.meta_data, 
"LibRaw::unpack()");
-            }
+    if (O.use_camera_matrix && C.cmatrix[0][0] > 0.25) 
+      {
+        memcpy (C.rgb_cam, C.cmatrix, sizeof (C.cmatrix));
+        IO.raw_color = 0;
+      }
+    // already allocated ?
+    if(imgdata.image)
+      {
+        free(imgdata.image);
+        imgdata.image = 0;
+      }
+    if(imgdata.rawdata.raw_alloc)
+      {
+        free(imgdata.rawdata.raw_alloc);
+        imgdata.rawdata.raw_alloc = 0;
+      }
+    if (libraw_internal_data.unpacker_data.meta_length) 
+      {
+        libraw_internal_data.internal_data.meta_data = 
+          (char *) malloc (libraw_internal_data.unpacker_data.meta_length);
+        merror (libraw_internal_data.internal_data.meta_data, 
"LibRaw::unpack()");
+      }
 
-        libraw_decoder_info_t decoder_info;
-        get_decoder_info(&decoder_info);
+    libraw_decoder_info_t decoder_info;
+    get_decoder_info(&decoder_info);
 
-        int save_iwidth = S.iwidth, save_iheight = S.iheight, save_shrink = 
IO.shrink;
+    int save_iwidth = S.iwidth, save_iheight = S.iheight, save_shrink = 
IO.shrink;
 
-        int rwidth = S.raw_width, rheight = S.raw_height;
-        if( !IO.fuji_width)
-            {
-                // adjust non-Fuji allocation
-                if(rwidth < S.width + S.left_margin)
-                    rwidth = S.width + S.left_margin;
-                if(rheight < S.height + S.top_margin)
-                    rheight = S.height + S.top_margin;
-            }
-        S.raw_pitch = S.raw_width*2;
-        imgdata.rawdata.raw_image = 0;
-        imgdata.rawdata.color4_image = 0;
-       imgdata.rawdata.color3_image = 0;
+    int rwidth = S.raw_width, rheight = S.raw_height;
+    if( !IO.fuji_width)
+      {
+        // adjust non-Fuji allocation
+        if(rwidth < S.width + S.left_margin)
+          rwidth = S.width + S.left_margin;
+        if(rheight < S.height + S.top_margin)
+          rheight = S.height + S.top_margin;
+      }
+    S.raw_pitch = S.raw_width*2;
+    imgdata.rawdata.raw_image = 0;
+    imgdata.rawdata.color4_image = 0;
+    imgdata.rawdata.color3_image = 0;
 #ifdef USE_RAWSPEED
-        // RawSpeed Supported, 
-        if(O.use_rawspeed && (decoder_info.decoder_flags & 
LIBRAW_DECODER_TRYRAWSPEED) && _rawspeed_camerameta)
+    // RawSpeed Supported, 
+    if(O.use_rawspeed && (decoder_info.decoder_flags & 
LIBRAW_DECODER_TRYRAWSPEED) && _rawspeed_camerameta)
+      {
+        INT64 spos = ID.input->tell();
+        try 
           {
-            INT64 spos = ID.input->tell();
-            try 
-              {
-                //                printf("Using rawspeed\n");
-                ID.input->seek(0,SEEK_SET);
-                INT64 _rawspeed_buffer_sz = ID.input->size()+32;
-                void *_rawspeed_buffer = malloc(_rawspeed_buffer_sz);
-                if(!_rawspeed_buffer) throw LIBRAW_EXCEPTION_ALLOC;
-                ID.input->read(_rawspeed_buffer,_rawspeed_buffer_sz,1);
-                FileMap map((uchar8*)_rawspeed_buffer,_rawspeed_buffer_sz);
-                RawParser t(&map);
-                RawDecoder *d = 0;
-                CameraMetaDataLR *meta = 
static_cast<CameraMetaDataLR*>(_rawspeed_camerameta);
-                d = t.getDecoder();
-                try {
-                  d->checkSupport(meta);
-                }
-                catch (const RawDecoderException& e)
-                  {
-                    imgdata.process_warnings |= 
LIBRAW_WARN_RAWSPEED_UNSUPPORTED;
-                    throw e;
-                  }
-                d->decodeRaw();
-                d->decodeMetaData(meta);
-                RawImage r = d->mRaw;
-                if (r->isCFA) {
-                  // Save pointer to decoder
-                  _rawspeed_decoder = static_cast<void*>(d);
-                  imgdata.rawdata.raw_image = (ushort*) 
r->getDataUncropped(0,0);
-                  S.raw_pitch = r->pitch;
-                  fix_after_rawspeed(r->blackLevel);
-                } else if(r->getCpp()==4) {
-                  _rawspeed_decoder = static_cast<void*>(d);
-                  imgdata.rawdata.color4_image = (ushort(*)[4]) 
r->getDataUncropped(0,0);
-                  S.raw_pitch = r->pitch;
-                  C.maximum = r->whitePoint;
-                  fix_after_rawspeed(r->blackLevel);
-                } else if(r->getCpp() == 3)
-                  {
-                    _rawspeed_decoder = static_cast<void*>(d);
-                    imgdata.rawdata.color3_image = (ushort(*)[3]) 
r->getDataUncropped(0,0);
-                    S.raw_pitch = r->pitch;
-                    C.maximum = r->whitePoint;
-                    fix_after_rawspeed(r->blackLevel);
-                  }
-                else
-                  {
-                    delete d;
-                  }
-                free(_rawspeed_buffer);
-              imgdata.process_warnings |= LIBRAW_WARN_RAWSPEED_PROCESSED;
-              } catch (...) {
-              imgdata.process_warnings |= LIBRAW_WARN_RAWSPEED_PROBLEM;
-              // no other actions: if raw_image is not set we'll try usual 
load_raw call
+            //                printf("Using rawspeed\n");
+            ID.input->seek(0,SEEK_SET);
+            INT64 _rawspeed_buffer_sz = ID.input->size()+32;
+            void *_rawspeed_buffer = malloc(_rawspeed_buffer_sz);
+            if(!_rawspeed_buffer) throw LIBRAW_EXCEPTION_ALLOC;
+            ID.input->read(_rawspeed_buffer,_rawspeed_buffer_sz,1);
+            FileMap map((uchar8*)_rawspeed_buffer,_rawspeed_buffer_sz);
+            RawParser t(&map);
+            RawDecoder *d = 0;
+            CameraMetaDataLR *meta = 
static_cast<CameraMetaDataLR*>(_rawspeed_camerameta);
+            d = t.getDecoder();
+            try {
+              d->checkSupport(meta);
             }
-            ID.input->seek(spos,SEEK_SET);
-          }
-#endif
-        if(!imgdata.rawdata.raw_image && !imgdata.rawdata.color4_image && 
!imgdata.rawdata.color3_image) // RawSpeed failed!
-          {
-            // Not allocated on RawSpeed call, try call LibRaw
-            if(decoder_info.decoder_flags &  LIBRAW_DECODER_FLATFIELD)
+            catch (const RawDecoderException& e)
               {
-                imgdata.rawdata.raw_alloc = 
malloc(rwidth*(rheight+7)*sizeof(imgdata.rawdata.raw_image[0]));
-                imgdata.rawdata.raw_image = (ushort*) 
imgdata.rawdata.raw_alloc;
+                imgdata.process_warnings |= LIBRAW_WARN_RAWSPEED_UNSUPPORTED;
+                throw e;
               }
-            else if (decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY)
+            d->decodeRaw();
+            d->decodeMetaData(meta);
+            RawImage r = d->mRaw;
+            if (r->isCFA) {
+              // Save pointer to decoder
+              _rawspeed_decoder = static_cast<void*>(d);
+              imgdata.rawdata.raw_image = (ushort*) r->getDataUncropped(0,0);
+              S.raw_pitch = r->pitch;
+              fix_after_rawspeed(r->blackLevel);
+            } else if(r->getCpp()==4) {
+              _rawspeed_decoder = static_cast<void*>(d);
+              imgdata.rawdata.color4_image = (ushort(*)[4]) 
r->getDataUncropped(0,0);
+              S.raw_pitch = r->pitch;
+              C.maximum = r->whitePoint;
+              fix_after_rawspeed(r->blackLevel);
+            } else if(r->getCpp() == 3)
               {
-                // sRAW and Foveon only, so extra buffer size is just 1/4
-                // Legacy converters does not supports half mode!
-                S.iwidth = S.width;
-                S.iheight= S.height;
-                IO.shrink = 0;
-                               S.raw_pitch = S.width*8;
-                // allocate image as temporary buffer, size 
-                imgdata.rawdata.raw_alloc = 0;
-                imgdata.image = (ushort (*)[4]) 
calloc(S.iwidth*S.iheight,sizeof(*imgdata.image));
+                _rawspeed_decoder = static_cast<void*>(d);
+                imgdata.rawdata.color3_image = (ushort(*)[3]) 
r->getDataUncropped(0,0);
+                S.raw_pitch = r->pitch;
+                C.maximum = r->whitePoint;
+                fix_after_rawspeed(r->blackLevel);
               }
-            ID.input->seek(libraw_internal_data.unpacker_data.data_offset, 
SEEK_SET);
+            else
+              {
+                delete d;
+              }
+            free(_rawspeed_buffer);
+            imgdata.process_warnings |= LIBRAW_WARN_RAWSPEED_PROCESSED;
+          } catch (...) {
+          imgdata.process_warnings |= LIBRAW_WARN_RAWSPEED_PROBLEM;
+          // no other actions: if raw_image is not set we'll try usual 
load_raw call
+        }
+        ID.input->seek(spos,SEEK_SET);
+      }
+#endif
+    if(!imgdata.rawdata.raw_image && !imgdata.rawdata.color4_image && 
!imgdata.rawdata.color3_image) // RawSpeed failed!
+      {
+        // Not allocated on RawSpeed call, try call LibRaw
+        if(decoder_info.decoder_flags &  LIBRAW_DECODER_FLATFIELD)
+          {
+            imgdata.rawdata.raw_alloc = 
malloc(rwidth*(rheight+7)*sizeof(imgdata.rawdata.raw_image[0]));
+            imgdata.rawdata.raw_image = (ushort*) imgdata.rawdata.raw_alloc;
+          }
+        else if (decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY)
+          {
+            // sRAW and Foveon only, so extra buffer size is just 1/4
+            // Legacy converters does not supports half mode!
+            S.iwidth = S.width;
+            S.iheight= S.height;
+            IO.shrink = 0;
+            S.raw_pitch = S.width*8;
+            // allocate image as temporary buffer, size 
+            imgdata.rawdata.raw_alloc = 0;
+            imgdata.image = (ushort (*)[4]) 
calloc(S.iwidth*S.iheight,sizeof(*imgdata.image));
+          }
+        ID.input->seek(libraw_internal_data.unpacker_data.data_offset, 
SEEK_SET);
 
-                       unsigned m_save = C.maximum;
-                       if(load_raw == &LibRaw::unpacked_load_raw && 
!strcasecmp(imgdata.idata.make,"Nikon"))
-                               C.maximum=65535;
-            (this->*load_raw)();
-                       if(load_raw == &LibRaw::unpacked_load_raw && 
!strcasecmp(imgdata.idata.make,"Nikon"))
-                               C.maximum = m_save;
-                       if (decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY)
-                       {
-                               // successfully decoded legacy image, attach 
image to raw_alloc
-                               imgdata.rawdata.raw_alloc = imgdata.image;
-                               imgdata.image = 0; 
-                       }
+        unsigned m_save = C.maximum;
+        if(load_raw == &LibRaw::unpacked_load_raw && 
!strcasecmp(imgdata.idata.make,"Nikon"))
+          C.maximum=65535;
+        (this->*load_raw)();
+        if(load_raw == &LibRaw::unpacked_load_raw && 
!strcasecmp(imgdata.idata.make,"Nikon"))
+          C.maximum = m_save;
+        if (decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY)
+          {
+            // successfully decoded legacy image, attach image to raw_alloc
+            imgdata.rawdata.raw_alloc = imgdata.image;
+            imgdata.image = 0; 
+            // Adjust sizes according to image buffer size
+            S.raw_width = S.width;
+            S.left_margin = 0;
+            S.raw_height = S.height;
+            S.top_margin = 0;
           }
+      }
 
-        if(imgdata.rawdata.raw_image)
-          crop_masked_pixels(); // calculate black levels
+    if(imgdata.rawdata.raw_image)
+      crop_masked_pixels(); // calculate black levels
 
-        // recover saved
-        if( (decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) && 
!imgdata.rawdata.color4_image)
-            {
-                imgdata.image = 0; 
-                imgdata.rawdata.color4_image = (ushort (*)[4]) 
imgdata.rawdata.raw_alloc;
-            }
+    // recover saved
+    if( (decoder_info.decoder_flags & LIBRAW_DECODER_LEGACY) && 
!imgdata.rawdata.color4_image)
+      {
+        imgdata.image = 0; 
+        imgdata.rawdata.color4_image = (ushort (*)[4]) 
imgdata.rawdata.raw_alloc;
+      }
 
-        // recover image sizes
-        S.iwidth = save_iwidth;
-        S.iheight = save_iheight;
-        IO.shrink = save_shrink;
-
-        // adjust black to possible maximum
-        unsigned int i = C.cblack[3];
-        unsigned int c;
-        for(c=0;c<3;c++)
-            if (i > C.cblack[c]) i = C.cblack[c];
-        for (c=0;c<4;c++)
-            C.cblack[c] -= i;
-        C.black += i;
-
-        // Save color,sizes and internal data into raw_image fields
-        memmove(&imgdata.rawdata.color,&imgdata.color,sizeof(imgdata.color));
-        memmove(&imgdata.rawdata.sizes,&imgdata.sizes,sizeof(imgdata.sizes));
-        memmove(&imgdata.rawdata.iparams,&imgdata.idata,sizeof(imgdata.idata));
-        
memmove(&imgdata.rawdata.ioparams,&libraw_internal_data.internal_output_params,sizeof(libraw_internal_data.internal_output_params));
+    // recover image sizes
+    S.iwidth = save_iwidth;
+    S.iheight = save_iheight;
+    IO.shrink = save_shrink;
+
+    // adjust black to possible maximum
+    unsigned int i = C.cblack[3];
+    unsigned int c;
+    for(c=0;c<3;c++)
+      if (i > C.cblack[c]) i = C.cblack[c];
+    for (c=0;c<4;c++)
+      C.cblack[c] -= i;
+    C.black += i;
 
-        SET_PROC_FLAG(LIBRAW_PROGRESS_LOAD_RAW);
-        RUN_CALLBACK(LIBRAW_PROGRESS_LOAD_RAW,1,2);
+    // Save color,sizes and internal data into raw_image fields
+    memmove(&imgdata.rawdata.color,&imgdata.color,sizeof(imgdata.color));
+    memmove(&imgdata.rawdata.sizes,&imgdata.sizes,sizeof(imgdata.sizes));
+    memmove(&imgdata.rawdata.iparams,&imgdata.idata,sizeof(imgdata.idata));
+    
memmove(&imgdata.rawdata.ioparams,&libraw_internal_data.internal_output_params,sizeof(libraw_internal_data.internal_output_params));
+
+    SET_PROC_FLAG(LIBRAW_PROGRESS_LOAD_RAW);
+    RUN_CALLBACK(LIBRAW_PROGRESS_LOAD_RAW,1,2);
         
-        return 0;
-    }
-    catch ( LibRaw_exceptions err) {
-        EXCEPTION_HANDLER(err);
-    }
-    catch (std::exception ee) {
-        EXCEPTION_HANDLER(LIBRAW_EXCEPTION_IO_CORRUPT);
-    }
+    return 0;
+  }
+  catch ( LibRaw_exceptions err) {
+    EXCEPTION_HANDLER(err);
+  }
+  catch (std::exception ee) {
+    EXCEPTION_HANDLER(LIBRAW_EXCEPTION_IO_CORRUPT);
+  }
 }
 
 void LibRaw::free_image(void)
@@ -3036,6 +3031,7 @@
 "Nikon D3200",
 "Nikon D5000",
 "Nikon D5100",
+"Nikon D5200",
 "Nikon D7000",
 "Nikon D800",
 "Nikon D800E",
@@ -3073,6 +3069,7 @@
 "Nikon Coolpix S6 (\"DIAG RAW\" hack)",
 "Nokia N95",
 "Nokia X2",
+"OmniVision OV5647",
 "Olympus C3030Z",
 "Olympus C5050Z",
 "Olympus C5060WZ",
@@ -3140,6 +3137,7 @@
 "Panasonic DMC-GF2",
 "Panasonic DMC-GF3",
 "Panasonic DMC-GF5",
+"Panasonic DMC-GF6",
 "Panasonic DMC-GH1",
 "Panasonic DMC-GH2",
 "Panasonic DMC-GH3",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkdcraw-4.10.90/libraw/src/libraw_datastream.cpp 
new/libkdcraw-4.10.95/libraw/src/libraw_datastream.cpp
--- old/libkdcraw-4.10.90/libraw/src/libraw_datastream.cpp      2013-06-10 
20:53:21.000000000 +0200
+++ new/libkdcraw-4.10.95/libraw/src/libraw_datastream.cpp      2013-07-10 
01:14:34.000000000 +0200
@@ -174,7 +174,7 @@
         case SEEK_END: dir = std::ios_base::end; break;
         default: dir = std::ios_base::beg;
         }
-    return (int)f->pubseekoff((long)o, dir);
+    return (int)f->pubseekoff((long)o, dir)<0?-1:0;
 }
 
 INT64 LibRaw_file_datastream::tell()     

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to