forked from pool/libopenraw
Accepting request 91492 from home:vuntz:branches:multimedia:libs
Update to 0.0.9 OBS-URL: https://build.opensuse.org/request/show/91492 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libopenraw?expand=0&rev=16
This commit is contained in:
parent
245bf4b713
commit
684a465b91
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f1994e3c93869bf66b40a0858b4cee78bb2e86df3c2f8085c39956d9a3a414b7
|
||||
size 425629
|
3
libopenraw-0.0.9.tar.bz2
Normal file
3
libopenraw-0.0.9.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:49fd1adf0a0228c7a17a79bf98d8d03664195feae1e50f4ddd1b20162626e18f
|
||||
size 478687
|
@ -1,245 +0,0 @@
|
||||
commit 1b15acdcfdc4664bc6c0be473cb6e096071a4e62
|
||||
Author: Hubert Figuiere <hub@figuiere.net>
|
||||
Date: Sat Mar 6 11:41:43 2010 -0800
|
||||
|
||||
- Support (partially) PEF from Pentax K20D.
|
||||
- Detect that ORF file are compressed if they are. (Closes #26618)
|
||||
- Skip compressed CFA when rendering the image. (Closes #25464)
|
||||
|
||||
diff --git a/README b/README
|
||||
index b4716ee..e373a22 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -114,9 +114,9 @@ Olympus ORF Y Y N Y Y Y
|
||||
E-10 B B T
|
||||
E-3 T T T
|
||||
E-300 T T B T T T
|
||||
- E-330 T T T
|
||||
+ E-330 T T N T
|
||||
E-400 T B T T
|
||||
- E-410 B T T T
|
||||
+ E-410 B T N T T
|
||||
E-500 T T T T
|
||||
E-510 B T T T
|
||||
SP-350
|
||||
@@ -143,6 +143,7 @@ Pentax PEF Y Y N Y Y Y
|
||||
K10D T T N T T T
|
||||
K100D T
|
||||
K100D Super T T N T
|
||||
+ K20D T T N T
|
||||
|
||||
Epson ERF Y Y Y Y Y Y
|
||||
Epson RD1 T T T T T T
|
||||
diff --git a/include/libopenraw/consts.h b/include/libopenraw/consts.h
|
||||
index c2d6bf4..de49034 100644
|
||||
--- a/include/libopenraw/consts.h
|
||||
+++ b/include/libopenraw/consts.h
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* libopenraw - consts.h
|
||||
*
|
||||
- * Copyright (C) 2005-2009 Hubert Figuiere
|
||||
* Copyright (c) 2008 Novell, Inc.
|
||||
+ * Copyright (C) 2005-2010 Hubert Figuiere
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
@@ -204,7 +204,8 @@ extern "C" {
|
||||
OR_TYPEID_PENTAX_IST_D,
|
||||
OR_TYPEID_PENTAX_IST_DL,
|
||||
OR_TYPEID_PENTAX_K100D_PEF,
|
||||
- OR_TYPEID_PENTAX_K100D_SUPER_PEF
|
||||
+ OR_TYPEID_PENTAX_K100D_SUPER_PEF,
|
||||
+ OR_TYPEID_PENTAX_K20D_PEF
|
||||
};
|
||||
|
||||
/** Epson type IDs */
|
||||
diff --git a/lib/orffile.cpp b/lib/orffile.cpp
|
||||
index c9f0181..28980f4 100644
|
||||
--- a/lib/orffile.cpp
|
||||
+++ b/lib/orffile.cpp
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* libopenraw - orffile.cpp
|
||||
*
|
||||
- * Copyright (C) 2006, 2008 Hubert Figuiere
|
||||
+ * Copyright (C) 2006, 2008, 2010 Hubert Figuiere
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
@@ -77,7 +77,7 @@ namespace OpenRaw {
|
||||
|
||||
IFDDir::Ref ORFFile::_locateCfaIfd()
|
||||
{
|
||||
- // in PEF the CFA IFD is the main IFD
|
||||
+ // in ORF the CFA IFD is the main IFD
|
||||
if(!m_mainIfd) {
|
||||
m_mainIfd = _locateMainIfd();
|
||||
}
|
||||
@@ -92,12 +92,37 @@ namespace OpenRaw {
|
||||
|
||||
|
||||
|
||||
- ::or_error ORFFile::_getRawData(RawData & data, uint32_t /*options*/)
|
||||
+ ::or_error ORFFile::_getRawData(RawData & data, uint32_t options)
|
||||
{
|
||||
+ ::or_error err;
|
||||
if(!m_cfaIfd) {
|
||||
m_cfaIfd = _locateCfaIfd();
|
||||
}
|
||||
- return _getRawDataFromDir(data, m_cfaIfd);
|
||||
+ err = _getRawDataFromDir(data, m_cfaIfd);
|
||||
+ if(err == OR_ERROR_NONE) {
|
||||
+ // ORF files seems to be marked as uncompressed even if they are.
|
||||
+ uint32_t x = data.x();
|
||||
+ uint32_t y = data.y();
|
||||
+ uint16_t compression = 0;
|
||||
+ if(data.size() < x * y * 2) {
|
||||
+ compression = 65535;
|
||||
+ data.setCompression(65535);
|
||||
+ data.setDataType(OR_DATA_TYPE_COMPRESSED_CFA);
|
||||
+ }
|
||||
+ else {
|
||||
+ compression = data.compression();
|
||||
+ }
|
||||
+ switch(compression) {
|
||||
+ case 65535:
|
||||
+ if((options & OR_OPTIONS_DONT_DECOMPRESS) == 0) {
|
||||
+ // TODO decompress
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ return err;
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/lib/peffile.cpp b/lib/peffile.cpp
|
||||
index d8849fb..cef6b27 100644
|
||||
--- a/lib/peffile.cpp
|
||||
+++ b/lib/peffile.cpp
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* libopenraw - peffile.cpp
|
||||
*
|
||||
- * Copyright (C) 2006-2008 Hubert Figuiere
|
||||
+ * Copyright (C) 2006-2008, 2010 Hubert Figuiere
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
@@ -48,6 +48,8 @@ namespace OpenRaw {
|
||||
OR_TYPEID_PENTAX_K100D_PEF) },
|
||||
{ "PENTAX K100D Super ", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_PENTAX,
|
||||
OR_TYPEID_PENTAX_K100D_PEF) },
|
||||
+ { "PENTAX K20D ", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_PENTAX,
|
||||
+ OR_TYPEID_PENTAX_K20D_PEF) },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
@@ -83,7 +85,7 @@ namespace OpenRaw {
|
||||
return m_container->setDirectory(0);
|
||||
}
|
||||
|
||||
- ::or_error PEFFile::_getRawData(RawData & data, uint32_t /*options*/)
|
||||
+ ::or_error PEFFile::_getRawData(RawData & data, uint32_t options)
|
||||
{
|
||||
::or_error err;
|
||||
if(!m_cfaIfd) {
|
||||
@@ -91,14 +93,12 @@ namespace OpenRaw {
|
||||
}
|
||||
err = _getRawDataFromDir(data, m_cfaIfd);
|
||||
if(err == OR_ERROR_NONE) {
|
||||
- uint16_t compression = 0;
|
||||
- m_cfaIfd->getValue(IFD::EXIF_TAG_COMPRESSION, compression);
|
||||
- switch(compression) {
|
||||
- case 1:
|
||||
- data.setDataType(OR_DATA_TYPE_CFA);
|
||||
- break;
|
||||
- case 65535:
|
||||
- // TODO decompress
|
||||
+ uint16_t compression = data.compression();
|
||||
+ switch(compression) {
|
||||
+ case 65535:
|
||||
+ if((options & OR_OPTIONS_DONT_DECOMPRESS) == 0) {
|
||||
+ // TODO decompress
|
||||
+ }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
diff --git a/lib/rawfile.cpp b/lib/rawfile.cpp
|
||||
index 6b0821b..c1c11cb 100644
|
||||
--- a/lib/rawfile.cpp
|
||||
+++ b/lib/rawfile.cpp
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* libopenraw - rawfile.cpp
|
||||
*
|
||||
- * Copyright (C) 2006-2008 Hubert Figuiere
|
||||
* Copyright (C) 2008 Novell, Inc.
|
||||
+ * Copyright (C) 2006-2008, 2010 Hubert Figuiere
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
@@ -379,8 +379,13 @@ const std::vector<uint32_t> & RawFile::listThumbnailSizes(void)
|
||||
::or_error RawFile::getRenderedImage(BitmapData & bitmapdata, uint32_t options)
|
||||
{
|
||||
RawData rawdata;
|
||||
+ Trace(DEBUG1) << "options are " << options << "\n";
|
||||
::or_error ret = getRawData(rawdata, options);
|
||||
if(ret == OR_ERROR_NONE) {
|
||||
+ if(rawdata.dataType() != OR_DATA_TYPE_CFA) {
|
||||
+ Trace(DEBUG1) << "wrong data type\n";
|
||||
+ return OR_ERROR_INVALID_FORMAT;
|
||||
+ }
|
||||
uint32_t x,y;
|
||||
or_cfa_pattern pattern;
|
||||
uint16_t *src;
|
||||
diff --git a/testsuite/testsuite.xml b/testsuite/testsuite.xml
|
||||
index 9f18dec..c5964b4 100644
|
||||
--- a/testsuite/testsuite.xml
|
||||
+++ b/testsuite/testsuite.xml
|
||||
@@ -346,6 +346,42 @@
|
||||
</results>
|
||||
</test>
|
||||
<test>
|
||||
+ <name>ORF-test E330</name>
|
||||
+ <file>/home/hub/samples/300mm_f5.6.ORF</file>
|
||||
+ <source>http://raw.fotosite.pl/download-Olympus_E-330_Sigma_135-400_f4.5-5.6/300mm_f5.6.ORF</source>
|
||||
+ <results>
|
||||
+ <rawType>ORF</rawType>
|
||||
+ <rawTypeId>458757</rawTypeId>
|
||||
+ <thumbNum>1</thumbNum>
|
||||
+ <thumbSizes>160</thumbSizes>
|
||||
+ <thumbFormats>JPEG</thumbFormats>
|
||||
+ <thumbDataSizes>11074</thumbDataSizes>
|
||||
+ <rawDataType>COMP_CFA</rawDataType>
|
||||
+ <rawDataSize>12857600</rawDataSize>
|
||||
+ <rawDataDimensions>3280 2450</rawDataDimensions>
|
||||
+ <rawCfaPattern>RGGB</rawCfaPattern>
|
||||
+ <rawMinValue>0</rawMinValue>
|
||||
+ <rawMaxValue>65535</rawMaxValue>
|
||||
+ <metaOrientation>1</metaOrientation>
|
||||
+ </results>
|
||||
+ </test>
|
||||
+ <test>
|
||||
+ <name>ORF-test E-410</name>
|
||||
+ <file>/home/hub/samples/p1013308.orf</file>
|
||||
+ <results>
|
||||
+ <rawType>ORF</rawType>
|
||||
+ <rawTypeId>458759</rawTypeId>
|
||||
+ <thumbNum>0</thumbNum>
|
||||
+ <rawDataType>COMP_CFA</rawDataType>
|
||||
+ <rawDataSize>8131436</rawDataSize>
|
||||
+ <rawDataDimensions>3720 2800</rawDataDimensions>
|
||||
+ <rawCfaPattern>RGGB</rawCfaPattern>
|
||||
+ <rawMinValue>0</rawMinValue>
|
||||
+ <rawMaxValue>65535</rawMaxValue>
|
||||
+ <metaOrientation>1</metaOrientation>
|
||||
+ </results>
|
||||
+ </test>
|
||||
+ <test>
|
||||
<name>MRW-test Dimage5</name>
|
||||
<file>/home/hub/samples/mrw/Dimage5/dimage5.mrw</file>
|
||||
<source>http://libopenraw.freedesktop.org/samples/mrw/dimage5.mrw</source>
|
@ -1,54 +0,0 @@
|
||||
Index: libopenraw-0.0.8/configure
|
||||
===================================================================
|
||||
--- libopenraw-0.0.8.orig/configure
|
||||
+++ libopenraw-0.0.8/configure
|
||||
@@ -17567,8 +17567,7 @@ cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_LIBGDKPIXBUF 1
|
||||
_ACEOF
|
||||
|
||||
- GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
|
||||
- GDK_PIXBUF_DIR="gtk-2.0/$GTK_VERSION/loaders"
|
||||
+ GDK_PIXBUF_DIR=`$PKG_CONFIG --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0`
|
||||
|
||||
HAVE_LIBGDKPIXBUF=yes
|
||||
fi
|
||||
Index: libopenraw-0.0.8/configure.in
|
||||
===================================================================
|
||||
--- libopenraw-0.0.8.orig/configure.in
|
||||
+++ libopenraw-0.0.8/configure.in
|
||||
@@ -135,8 +135,7 @@ if test x$enable_gnome = xyes ; then
|
||||
if test x$HAVE_LIBGLIB = xyes ; then
|
||||
PKG_CHECK_MODULES(LIBGDKPIXBUF, gdk-pixbuf-2.0 >= $LIBGDKPIXBUF_REQUIRED,
|
||||
[AC_DEFINE(HAVE_LIBGDKPIXBUF, 1, [Define to 1 to enable libgdkpixbuf support])
|
||||
- GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
|
||||
- GDK_PIXBUF_DIR="gtk-2.0/$GTK_VERSION/loaders"
|
||||
+ GDK_PIXBUF_DIR=`$PKG_CONFIG --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0`
|
||||
AC_SUBST(GDK_PIXBUF_DIR)
|
||||
HAVE_LIBGDKPIXBUF=yes],
|
||||
[HAVE_LIBGDKPIXBUF=no])
|
||||
Index: libopenraw-0.0.8/gnome/Makefile.am
|
||||
===================================================================
|
||||
--- libopenraw-0.0.8.orig/gnome/Makefile.am
|
||||
+++ libopenraw-0.0.8/gnome/Makefile.am
|
||||
@@ -16,7 +16,7 @@ pkgconfig_DATA = $(PKG_CONFIG_FILES)
|
||||
|
||||
lib_LTLIBRARIES = $(GNOME_TARGETS)
|
||||
|
||||
-loaderdir = $(libdir)/$(GDK_PIXBUF_DIR)
|
||||
+loaderdir = $(GDK_PIXBUF_DIR)
|
||||
loader_LTLIBRARIES = $(GDK_PIXBUF_PLUGIN)
|
||||
|
||||
libopenrawgnome_la_LDFLAGS = \
|
||||
Index: libopenraw-0.0.8/gnome/Makefile.in
|
||||
===================================================================
|
||||
--- libopenraw-0.0.8.orig/gnome/Makefile.in
|
||||
+++ libopenraw-0.0.8/gnome/Makefile.in
|
||||
@@ -265,7 +265,7 @@ INCLUDES = -I$(top_srcdir)/include \
|
||||
|
||||
pkgconfig_DATA = $(PKG_CONFIG_FILES)
|
||||
lib_LTLIBRARIES = $(GNOME_TARGETS)
|
||||
-loaderdir = $(libdir)/$(GDK_PIXBUF_DIR)
|
||||
+loaderdir = $(GDK_PIXBUF_DIR)
|
||||
loader_LTLIBRARIES = $(GDK_PIXBUF_PLUGIN)
|
||||
libopenrawgnome_la_LDFLAGS = \
|
||||
-version-info @LIBOPENRAW_VERSION_INFO@
|
@ -535,7 +535,7 @@ Index: libopenraw-0.0.8/lib/orffile.cpp
|
||||
return err;
|
||||
}
|
||||
+
|
||||
+uint32_t ORFFile::_translateCompressionType(IFD::TiffCompress tiffCompression)
|
||||
+uint32_t OrfFile::_translateCompressionType(IFD::TiffCompress tiffCompression)
|
||||
+{
|
||||
+ if(tiffCompression == IFD::COMPRESS_CUSTOM) {
|
||||
+ return ORF_COMPRESSION;
|
||||
@ -544,15 +544,15 @@ Index: libopenraw-0.0.8/lib/orffile.cpp
|
||||
+}
|
||||
+
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Index: libopenraw-0.0.8/lib/orffile.h
|
||||
===================================================================
|
||||
--- libopenraw-0.0.8.orig/lib/orffile.h
|
||||
+++ libopenraw-0.0.8/lib/orffile.h
|
||||
@@ -43,11 +43,16 @@ namespace OpenRaw {
|
||||
ORFFile(IO::Stream *);
|
||||
virtual ~ORFFile();
|
||||
OrfFile(IO::Stream *);
|
||||
virtual ~OrfFile();
|
||||
|
||||
+ enum {
|
||||
+ ORF_COMPRESSION = 0x10000
|
||||
|
@ -1,3 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 15 10:43:48 UTC 2011 - vuntz@opensuse.org
|
||||
|
||||
- Update to version 0.0.9:
|
||||
+ New features:
|
||||
- New demo ppmload to create a ppm out of the demosaicized
|
||||
image.
|
||||
- Support (partially) PEF from Pentax K20D.
|
||||
- Support for Olympus ORF big-endian files and "RS" (12-bits).
|
||||
Added E-10, E-P1, E-620, SP350, SP500, SP510 and SP550.
|
||||
- Support for Canon G10, G11, 7D, 1DMarkIV, 5DMarkII, 500D,
|
||||
550D, 60D and 1000D.
|
||||
- Support for Canon 50D (fdo#30846).
|
||||
- Support for Nikon D3000.
|
||||
- Support for Sony A-550.
|
||||
- Support for Leica X1 DNG.
|
||||
- Support for Ricoh GRX DNG.
|
||||
+ Bug fixes:
|
||||
- API: or_rawfile_get_rendered_image() returns a
|
||||
ORBitmapDataRef with the correct dimensions.
|
||||
- Check for get_current_dir_name() (fdo#24088)
|
||||
- Don't crash when the files can't be written in the testsuite
|
||||
bootstrap.
|
||||
- Detect that ORF file are compressed if they are (fdo#26618).
|
||||
- Skip compressed CFA when rendering the image (fdo#25464).
|
||||
- Accept YCbCr when the compression is JPEG. The K10D DNG
|
||||
should now have the large size preview.
|
||||
- Install the GdkPixbuf in the right place (fdo#29208).
|
||||
+ Internal changes:
|
||||
- Rename debug.{h,cpp} to trace.{h,cpp}
|
||||
- Fixed the case on several class names.
|
||||
- Drop libopenraw-gdk-pixbuf-loaders-path.patch: fixed upstream.
|
||||
- Drop libopenraw-detect-compressed-otf.patch: fixed upstream.
|
||||
- Rebase libopenraw-orf-thumbnail.patch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 5 02:18:19 UTC 2011 - glin@suse.com
|
||||
|
||||
|
@ -20,16 +20,12 @@ Url: http://libopenraw.freedesktop.org/
|
||||
Summary: A library to decode digital camera RAW files
|
||||
|
||||
Name: libopenraw
|
||||
Version: 0.0.8
|
||||
Release: 13
|
||||
Version: 0.0.9
|
||||
Release: 1
|
||||
License: LGPLv2.1+
|
||||
Group: Development/Libraries/C and C++
|
||||
Source0: %name-%{version}.tar.bz2
|
||||
Source0: http://libopenraw.freedesktop.org/download/%{name}-%{version}.tar.bz2
|
||||
Source99: baselibs.conf
|
||||
# PATCH-FIX-UPSTREAM libopenraw-gdk-pixbuf-loaders-path.patch fdo29208 -- Install gdk-pixbuf module in the right directory, only works with gdk-pixbuf >= 2.21
|
||||
Patch0: libopenraw-gdk-pixbuf-loaders-path.patch
|
||||
# PATCH-FIX-UPSTREAM libopenraw-detect-compressed-otf.patch bnc561232 fdo26618 glin@suse.com -- Detect the compressed otf file to avoid potential segfault
|
||||
Patch1: libopenraw-detect-compressed-otf.patch
|
||||
# PATCH-FIX-UPSTREAM libopenraw-orf-thumbnail.patch bnc699678 glin@suse.com - Decompress otf files
|
||||
Patch2: libopenraw-orf-thumbnail.patch
|
||||
BuildRequires: gcc-c++
|
||||
@ -76,8 +72,6 @@ libopenraw is a library that aim at decoding digital camera RAW files.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user