- add upstream patch 22287584fbfa4657098ee997957a6c4fc972a53b to
properly decompress CFA from certain cameras (BZ 624283)
This commit is contained in:
parent
3c1e8f0b8f
commit
c2cdb457eb
@ -0,0 +1,60 @@
|
||||
From 22287584fbfa4657098ee997957a6c4fc972a53b Mon Sep 17 00:00:00 2001
|
||||
From: Hubert Figuiere <hub@figuiere.net>
|
||||
Date: Sat, 19 Jun 2010 13:53:39 -0700
|
||||
Subject: [PATCH] - Properly decompress CFA from Canon 7D, 5DMkII, 500D, 1DMkIV (and any other
|
||||
whose JPEG stream had 4 components)
|
||||
|
||||
diff --git a/lib/ljpegdecompressor.cpp b/lib/ljpegdecompressor.cpp
|
||||
index b176853..704b346 100644
|
||||
--- a/lib/ljpegdecompressor.cpp
|
||||
+++ b/lib/ljpegdecompressor.cpp
|
||||
@@ -564,31 +564,16 @@ LJpegDecompressor::PmPutRow(MCU* RowBuf, int32_t numComp, int32_t numCol, int32_
|
||||
// TODO this might be wrong in 8 bits...
|
||||
// original code was using putc which *i think* was a problem for
|
||||
// 16bpp
|
||||
+ int32_t comp;
|
||||
int32_t col;
|
||||
uint16_t v;
|
||||
|
||||
- if (numComp==1) { /*pgm*/
|
||||
- for (col = 0; col < numCol; col++) {
|
||||
- v=RowBuf[col][0]<<Pt;
|
||||
+ for (col = 0; col < numCol; col++) {
|
||||
+ for (comp = 0; comp < numComp; comp++) {
|
||||
+ v = RowBuf[col][comp]<<Pt;
|
||||
m_output->append(v);
|
||||
}
|
||||
- } else if (numComp==2) { /*pgm*/
|
||||
- for (col = 0; col < numCol; col++) {
|
||||
- v=RowBuf[col][0]<<Pt;
|
||||
- m_output->append(v);
|
||||
- v=RowBuf[col][1]<<Pt;
|
||||
- m_output->append(v);
|
||||
- }
|
||||
- } else { /*ppm*/
|
||||
- for (col = 0; col < numCol; col++) {
|
||||
- v=RowBuf[col][0]<<Pt;
|
||||
- m_output->append(v);
|
||||
- v=RowBuf[col][1]<<Pt;
|
||||
- m_output->append(v);
|
||||
- v=RowBuf[col][2]<<Pt;
|
||||
- m_output->append(v);
|
||||
- }
|
||||
- }
|
||||
+ }
|
||||
// m_output->nextRow();
|
||||
}
|
||||
|
||||
@@ -1573,8 +1558,7 @@ RawData *LJpegDecompressor::decompress(RawData *bitmap)
|
||||
* @todo check that this is valid with DNG too.
|
||||
*/
|
||||
uint32_t width = dcInfo.imageWidth * dcInfo.numComponents;
|
||||
- bitmap->setDimensions(width,
|
||||
- dcInfo.imageHeight);
|
||||
+ bitmap->setDimensions(width, dcInfo.imageHeight);
|
||||
bitmap->setSlices(m_slices);
|
||||
DecoderStructInit(&dcInfo);
|
||||
HuffDecoderInit(&dcInfo);
|
||||
--
|
||||
1.7.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: Decode camera RAW files
|
||||
Name: libopenraw
|
||||
Version: 0.0.8
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: LGPLv3+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://libopenraw.freedesktop.org/wiki
|
||||
@ -9,6 +9,10 @@ Source0: http://libopenraw.freedesktop.org/download/%{name}-%{version}.tar.gz
|
||||
# upstream patch 1b15acdcfdc4664bc6c0be473cb6e096071a4e62 adds support
|
||||
# for certain PEF files and fixes a crash when opening such files
|
||||
Patch0: 0001-Support-partially-PEF-from-Pentax-K20D.patch
|
||||
# upstream patch 22287584fbfa4657098ee997957a6c4fc972a53b to
|
||||
# properly decompress CFA from certain cameras (patch slightly modified
|
||||
# to omit patching README)
|
||||
Patch1: 0001-Properly-decompress-CFA-from-Canon-7D-5DMkII-500D-1D.patch
|
||||
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
@ -73,6 +77,7 @@ digital cameras, in GTK+ applications.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1 -b CFA-decrompress-fix
|
||||
%patch0 -p1 -b pef-crash-fix
|
||||
|
||||
%build
|
||||
@ -146,6 +151,10 @@ fi
|
||||
%{_libdir}/gtk-2.0/2.10.0/loaders/%{name}_pixbuf.so
|
||||
|
||||
%changelog
|
||||
* Sun Oct 24 2010 Christian Krause <chkr@fedoraproject.org> - 0.0.8-3
|
||||
- add upstream patch 22287584fbfa4657098ee997957a6c4fc972a53b to
|
||||
properly decompress CFA from certain cameras (BZ 624283)
|
||||
|
||||
* Wed Sep 08 2010 Christian Krause <chkr@fedoraproject.org> - 0.0.8-2
|
||||
- add upstream patch 1b15acdcfdc4664bc6c0be473cb6e096071a4e62
|
||||
to support certain PEF files and to fix a crash when opening
|
||||
|
||||
Loading…
Reference in New Issue
Block a user