From 978b862ceb3bfae9ced791fb59ef203542d9d1863eb05723e32c72e93d0adc5b Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Fri, 9 Mar 2018 16:02:58 +0000 Subject: [PATCH] Accepting request 585017 from home:kbabioch:branches:graphics - Updated to version 0.18.8: * leaf_hdr_load_raw: check for image pointer for demosaiced raw * NOKIARAW parser: check image dimensions readed from file * quicktake_100_load_raw: check width/height limits - Dropped libraw-glibc-2.27.patch: No longer needed OBS-URL: https://build.opensuse.org/request/show/585017 OBS-URL: https://build.opensuse.org/package/show/graphics/libraw?expand=0&rev=111 --- LibRaw-0.18.7.tar.gz | 3 - LibRaw-0.18.8.tar.gz | 3 + libraw-glibc-2.27.patch | 331 ---------------------------------------- libraw.changes | 9 ++ libraw.spec | 4 +- 5 files changed, 13 insertions(+), 337 deletions(-) delete mode 100644 LibRaw-0.18.7.tar.gz create mode 100644 LibRaw-0.18.8.tar.gz delete mode 100644 libraw-glibc-2.27.patch diff --git a/LibRaw-0.18.7.tar.gz b/LibRaw-0.18.7.tar.gz deleted file mode 100644 index bb202fe..0000000 --- a/LibRaw-0.18.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87e347c261a8e87935d9a23afd750d27676b99f540e8552314d40db0ea315771 -size 1280935 diff --git a/LibRaw-0.18.8.tar.gz b/LibRaw-0.18.8.tar.gz new file mode 100644 index 0000000..72ada97 --- /dev/null +++ b/LibRaw-0.18.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56aca4fd97038923d57d2d17d90aa11d827f1f3d3f1d97e9f5a0d52ff87420e2 +size 1281773 diff --git a/libraw-glibc-2.27.patch b/libraw-glibc-2.27.patch deleted file mode 100644 index c97016a..0000000 --- a/libraw-glibc-2.27.patch +++ /dev/null @@ -1,331 +0,0 @@ -Index: LibRaw-0.18.7/internal/dcraw_common.cpp -=================================================================== ---- LibRaw-0.18.7.orig/internal/dcraw_common.cpp 2018-01-19 06:57:03.000000000 +0100 -+++ LibRaw-0.18.7/internal/dcraw_common.cpp 2018-02-09 18:59:34.620363754 +0100 -@@ -5849,7 +5849,7 @@ static float powf_lim(float a, float b, - { - return (b>limup || b < -limup)?0.f:powf(a,b); - } --static float powf64(float a, float b) -+static float my_powf64(float a, float b) - { - return powf_lim(a,b,64.f); - } -@@ -5873,7 +5873,7 @@ static float my_roundf(float x) { - static float _CanonConvertAperture(ushort in) - { - if ((in == (ushort)0xffe0) || (in == (ushort)0x7fff)) return 0.0f; -- return powf64(2.0, in/64.0); -+ return my_powf64(2.0, in/64.0); - } - - static float _CanonConvertEV (short in) -@@ -6336,21 +6336,21 @@ void CLASS processNikonLensData (uchar * - if (fabsf(imgdata.lens.makernotes.MinFocal) < 1.1f) - { - if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 2]) -- imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, (float)LensData[i + 2] / 24.0f); -+ imgdata.lens.makernotes.MinFocal = 5.0f * my_powf64(2.0f, (float)LensData[i + 2] / 24.0f); - if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 3]) -- imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, (float)LensData[i + 3] / 24.0f); -+ imgdata.lens.makernotes.MaxFocal = 5.0f * my_powf64(2.0f, (float)LensData[i + 3] / 24.0f); - if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 4]) -- imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, (float)LensData[i + 4] / 24.0f); -+ imgdata.lens.makernotes.MaxAp4MinFocal = my_powf64(2.0f, (float)LensData[i + 4] / 24.0f); - if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 5]) -- imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, (float)LensData[i + 5] / 24.0f); -+ imgdata.lens.makernotes.MaxAp4MaxFocal = my_powf64(2.0f, (float)LensData[i + 5] / 24.0f); - } - imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6]; - if (i != 2) - { - if ((LensData[i - 1]) && - (fabsf(imgdata.lens.makernotes.CurFocal) < 1.1f)) -- imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, (float)LensData[i - 1] / 24.0f); -- if (LensData[i + 7]) imgdata.lens.nikon.NikonEffectiveMaxAp = powf64(2.0f, (float)LensData[i + 7] / 24.0f); -+ imgdata.lens.makernotes.CurFocal = 5.0f * my_powf64(2.0f, (float)LensData[i - 1] / 24.0f); -+ if (LensData[i + 7]) imgdata.lens.nikon.NikonEffectiveMaxAp = my_powf64(2.0f, (float)LensData[i + 7] / 24.0f); - } - imgdata.lens.makernotes.LensID = - (unsigned long long) LensData[i] << 56 | -@@ -6827,13 +6827,13 @@ void CLASS PentaxLensInfo (unsigned id, - if (table_buf[iLensData+9] && - (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f)) - imgdata.lens.makernotes.CurFocal = -- 10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2); -+ 10*(table_buf[iLensData+9]>>2) * my_powf64(4, (table_buf[iLensData+9] & 0x03)-2); - if (table_buf[iLensData+10] & 0xf0) - imgdata.lens.makernotes.MaxAp4CurFocal = -- powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f); -+ my_powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f); - if (table_buf[iLensData+10] & 0x0f) - imgdata.lens.makernotes.MinAp4CurFocal = -- powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f); -+ my_powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f); - - if (iLensData != 12) - { -@@ -6854,14 +6854,14 @@ void CLASS PentaxLensInfo (unsigned id, - if ((table_buf[iLensData+14] > 1) && - (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f)) - imgdata.lens.makernotes.MaxAp4CurFocal = -- powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f); -+ my_powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f); - } - else if ((id != 0x12e76) && // K-5 - (table_buf[iLensData+15] > 1) && - (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f)) - { - imgdata.lens.makernotes.MaxAp4CurFocal = -- powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f); -+ my_powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f); - } - } - free(table_buf); -@@ -7349,11 +7349,11 @@ void CLASS process_Sony_0x9050 (uchar * - { - if (buf[0]) - imgdata.lens.makernotes.MaxAp4CurFocal = -- my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f; -+ my_roundf(my_powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f; - - if (buf[1]) - imgdata.lens.makernotes.MinAp4CurFocal = -- my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f; -+ my_roundf(my_powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f; - } - - if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens) -@@ -7363,7 +7363,7 @@ void CLASS process_Sony_0x9050 (uchar * - lid = SonySubstitution[buf[0x3d]] << 8 | - SonySubstitution[buf[0x3c]]; - imgdata.lens.makernotes.CurAp = -- powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f); -+ my_powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f); - } - if (buf[0x105] && - (imgdata.lens.makernotes.LensMount != LIBRAW_MOUNT_Canon_EF) && -@@ -7749,7 +7749,7 @@ void CLASS parse_makernote_0xc634(int ba - { - unsigned char cc; - fread(&cc, 1, 1, ifp); -- iso_speed = (int)(100.0 * powf64(2.0, (double)(cc) / 12.0 - 5.0)); -+ iso_speed = (int)(100.0 * my_powf64(2.0, (double)(cc) / 12.0 - 5.0)); - break; - } - } -@@ -7794,7 +7794,7 @@ void CLASS parse_makernote_0xc634(int ba - } - break; - case 0x1002: -- imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2); -+ imgdata.lens.makernotes.CurAp = my_powf64(2.0f, getreal(type)/2); - break; - case 0x20100102: - stmread(imgdata.shootinginfo.InternalBodySerial, len, ifp); -@@ -7821,10 +7821,10 @@ void CLASS parse_makernote_0xc634(int ba - stmread(imgdata.lens.makernotes.Lens,len, ifp); - break; - case 0x20100205: -- imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f); -+ imgdata.lens.makernotes.MaxAp4MinFocal = my_powf64(sqrt(2.0f), get2() / 256.0f); - break; - case 0x20100206: -- imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f); -+ imgdata.lens.makernotes.MaxAp4MaxFocal = my_powf64(sqrt(2.0f), get2() / 256.0f); - break; - case 0x20100207: - imgdata.lens.makernotes.MinFocal = (float)get2(); -@@ -7835,7 +7835,7 @@ void CLASS parse_makernote_0xc634(int ba - imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal; - break; - case 0x2010020a: -- imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f); -+ imgdata.lens.makernotes.MaxAp4CurFocal = my_powf64(sqrt(2.0f), get2() / 256.0f); - break; - case 0x20100301: - imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8; -@@ -8144,7 +8144,7 @@ void CLASS parse_makernote_0xc634(int ba - lid = (((ushort)table_buf[2])<<8) | - ((ushort)table_buf[3]); - imgdata.lens.makernotes.CurAp = -- powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f); -+ my_powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f); - } - break; - case 1536: -@@ -8675,7 +8675,7 @@ void CLASS parse_makernote (int base, in - } - break; - case 0x1002: -- imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2); -+ imgdata.lens.makernotes.CurAp = my_powf64(2.0f, getreal(type)/2); - break; - case 0x20401112: - imgdata.makernotes.olympus.OlympusCropID = get2(); -@@ -8709,10 +8709,10 @@ void CLASS parse_makernote (int base, in - stmread(imgdata.lens.makernotes.Lens, len, ifp); - break; - case 0x20100205: -- imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f); -+ imgdata.lens.makernotes.MaxAp4MinFocal = my_powf64(sqrt(2.0f), get2() / 256.0f); - break; - case 0x20100206: -- imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f); -+ imgdata.lens.makernotes.MaxAp4MaxFocal = my_powf64(sqrt(2.0f), get2() / 256.0f); - break; - case 0x20100207: - imgdata.lens.makernotes.MinFocal = (float)get2(); -@@ -8723,7 +8723,7 @@ void CLASS parse_makernote (int base, in - imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal; - break; - case 0x2010020a: -- imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f); -+ imgdata.lens.makernotes.MaxAp4CurFocal = my_powf64(sqrt(2.0f), get2() / 256.0f); - break; - case 0x20100301: - imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8; -@@ -9150,7 +9150,7 @@ void CLASS parse_makernote (int base, in - lid = (((ushort)table_buf[2])<<8) | - ((ushort)table_buf[3]); - imgdata.lens.makernotes.CurAp = -- powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f); -+ my_powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f); - } - break; - case 1536: -@@ -9248,19 +9248,19 @@ void CLASS parse_makernote (int base, in - { - unsigned char cc; - fread(&cc,1,1,ifp); -- iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0-5.0)); -+ iso_speed = int(100.0 * my_powf64(2.0f,float(cc)/12.0-5.0)); - } - if (tag == 4 && len > 26 && len < 35) { - if ((i=(get4(),get2())) != 0x7fff && (!iso_speed || iso_speed == 65535)) -- iso_speed = 50 * powf64(2.0, i/32.0 - 4); -+ iso_speed = 50 * my_powf64(2.0, i/32.0 - 4); - #ifdef LIBRAW_LIBRARY_BUILD - get4(); - #else - if ((i=(get2(),get2())) != 0x7fff && !aperture) -- aperture = powf64(2.0, i/64.0); -+ aperture = my_powf64(2.0, i/64.0); - #endif - if ((i=get2()) != 0xffff && !shutter) -- shutter = powf64(2.0, (short) i/-32.0); -+ shutter = my_powf64(2.0, (short) i/-32.0); - wbi = (get2(),get2()); - shot_order = (get2(),get2()); - } -@@ -9854,7 +9854,7 @@ void CLASS parse_exif (int base) - imgdata.lens.Lens[0] = 0; - break; - case 0x9205: -- imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f)); -+ imgdata.lens.EXIF_MaxAp = my_powf64(2.0f, (getreal(type) / 2.0f)); - break; - #endif - case 33434: tiff_ifd[tiff_nifds-1].t_shutter = -@@ -9869,11 +9869,11 @@ void CLASS parse_exif (int base) - case 36868: get_timestamp(0); break; - case 37377: if ((expo = -getreal(type)) < 128 && shutter == 0.) - tiff_ifd[tiff_nifds-1].t_shutter = -- shutter = powf64(2.0, expo); -+ shutter = my_powf64(2.0, expo); - break; - case 37378: // 0x9202 ApertureValue - if ((fabs(ape = getreal(type))<256.0) && (!aperture)) -- aperture = powf64(2.0, ape/2); -+ aperture = my_powf64(2.0, ape/2); - break; - case 37385: flash_used = getreal(type); break; - case 37386: focal_len = getreal(type); break; -@@ -10769,7 +10769,7 @@ int CLASS parse_tiff_ifd (int base) - imgdata.lens.Lens[0] = 0; - break; - case 0x9205: -- imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f)); -+ imgdata.lens.EXIF_MaxAp = my_powf64(2.0f, (getreal(type) / 2.0f)); - break; - // IB end - #endif -@@ -11804,22 +11804,22 @@ void CLASS parse_ciff (int offset, int l - thumb_length = len; - } - if (type == 0x1818) { -- shutter = powf64(2.0f, -int_to_float((get4(),get4()))); -- aperture = powf64(2.0f, int_to_float(get4())/2); -+ shutter = my_powf64(2.0f, -int_to_float((get4(),get4()))); -+ aperture = my_powf64(2.0f, int_to_float(get4())/2); - #ifdef LIBRAW_LIBRARY_BUILD - imgdata.lens.makernotes.CurAp = aperture; - #endif - } - if (type == 0x102a) { - // iso_speed = pow (2.0, (get4(),get2())/32.0 - 4) * 50; -- iso_speed = powf64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f; -+ iso_speed = my_powf64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f; - #ifdef LIBRAW_LIBRARY_BUILD - aperture = _CanonConvertAperture((get2(),get2())); - imgdata.lens.makernotes.CurAp = aperture; - #else -- aperture = powf64(2.0, (get2(),(short)get2())/64.0); -+ aperture = my_powf64(2.0, (get2(),(short)get2())/64.0); - #endif -- shutter = powf64(2.0,-((short)get2())/32.0); -+ shutter = my_powf64(2.0,-((short)get2())/32.0); - wbi = (get2(),get2()); - if (wbi > 17) wbi = 0; - fseek (ifp, 32, SEEK_CUR); -@@ -12024,8 +12024,8 @@ void CLASS parse_phase_one (int base) - setPhaseOneFeatures(unique_id); - break; - case 0x0401: -- if (type == 4) imgdata.lens.makernotes.CurAp = powf64(2.0f, (int_to_float(data)/2.0f)); -- else imgdata.lens.makernotes.CurAp = powf64(2.0f, (getreal(type)/2.0f)); -+ if (type == 4) imgdata.lens.makernotes.CurAp = my_powf64(2.0f, (int_to_float(data)/2.0f)); -+ else imgdata.lens.makernotes.CurAp = my_powf64(2.0f, (getreal(type)/2.0f)); - break; - case 0x0403: - if (type == 4) imgdata.lens.makernotes.CurFocal = int_to_float(data); -@@ -12039,16 +12039,16 @@ void CLASS parse_phase_one (int base) - break; - case 0x0414: - if (type == 4) { -- imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f)); -+ imgdata.lens.makernotes.MaxAp4CurFocal = my_powf64(2.0f, (int_to_float(data)/2.0f)); - } else { -- imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f)); -+ imgdata.lens.makernotes.MaxAp4CurFocal = my_powf64(2.0f, (getreal(type) / 2.0f)); - } - break; - case 0x0415: - if (type == 4) { -- imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f)); -+ imgdata.lens.makernotes.MinAp4CurFocal = my_powf64(2.0f, (int_to_float(data)/2.0f)); - } else { -- imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f)); -+ imgdata.lens.makernotes.MinAp4CurFocal = my_powf64(2.0f, (getreal(type) / 2.0f)); - } - break; - case 0x0416: -@@ -14237,15 +14237,15 @@ void CLASS identify() - case 18: iso_speed = 320; break; - case 19: iso_speed = 400; break; - } -- shutter = powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f; -+ shutter = my_powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f; - FORC4 cam_mul[c ^ (c >> 1)] = get4(); - fseek (ifp, 88, SEEK_SET); -- aperture = powf64(2.0f, ((float)get4())/16.0f); -+ aperture = my_powf64(2.0f, ((float)get4())/16.0f); - fseek (ifp, 112, SEEK_SET); - focal_len = get4(); - #ifdef LIBRAW_LIBRARY_BUILD - fseek (ifp, 104, SEEK_SET); -- imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, ((float)get4())/16.0f); -+ imgdata.lens.makernotes.MaxAp4CurFocal = my_powf64(2.0f, ((float)get4())/16.0f); - fseek (ifp, 124, SEEK_SET); - stmread(imgdata.lens.makernotes.Lens, 32, ifp); - imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Contax_N; diff --git a/libraw.changes b/libraw.changes index d9f8614..5714073 100644 --- a/libraw.changes +++ b/libraw.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Mar 9 12:41:28 UTC 2018 - kbabioch@suse.com + +- Updated to version 0.18.8: + * leaf_hdr_load_raw: check for image pointer for demosaiced raw + * NOKIARAW parser: check image dimensions readed from file + * quicktake_100_load_raw: check width/height limits +- Dropped libraw-glibc-2.27.patch: No longer needed + ------------------------------------------------------------------- Fri Feb 9 18:01:26 UTC 2018 - pgajdos@suse.com diff --git a/libraw.spec b/libraw.spec index 75a59cc..f4ad554 100644 --- a/libraw.spec +++ b/libraw.spec @@ -20,7 +20,7 @@ %define lver 16 %define lname libraw%{lver} Name: libraw -Version: 0.18.7 +Version: 0.18.8 Release: 0 Summary: Library for reading RAW files obtained from digital photo cameras License: CDDL-1.0 OR LGPL-2.1 @@ -28,7 +28,6 @@ Group: Development/Libraries/C and C++ Url: https://www.libraw.org/ #Git-Clone: git://github.com/LibRaw/LibRaw Source: https://www.libraw.org/data/%tar_name-%version.tar.gz -Patch0: libraw-glibc-2.27.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: libjasper-devel @@ -96,7 +95,6 @@ against LibRaw. LibRaw does not provide dynamic libraries. %prep %setup -qn %tar_name-%version -%patch0 -p1 %build export CXXFLAGS="%optflags -fPIC -DUSE_ZLIB"