[poppler] poppler/Stream.cc poppler/Stream.h
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat Feb 18 08:34:38 PST 2012
poppler/Stream.cc | 26 ++++++++++++++++++++------
poppler/Stream.h | 3 +++
2 files changed, 23 insertions(+), 6 deletions(-)
New commits:
commit 9b72ee4e4c8658b2f7cd542d601a5c3be621d3fc
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date: Sat Feb 18 17:34:12 2012 +0100
Make some of the unfilteredResets be really unfiltered
diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index 5ebd5af..d5f4e0c 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -23,6 +23,7 @@
// Copyright (C) 2010 Hib Eris <hib at hiberis.nl>
// Copyright (C) 2010 Tomas Hoger <thoger at redhat.com>
// Copyright (C) 2011 William Bader <williambader at hotmail.com>
+// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -1599,8 +1600,11 @@ CCITTFaxStream::~CCITTFaxStream() {
gfree(codingLine);
}
-void CCITTFaxStream::unfilteredReset () {
- str->reset();
+void CCITTFaxStream::ccittReset(GBool unfiltered) {
+ if (unfiltered)
+ str->unfilteredReset();
+ else
+ str->reset();
row = 0;
nextLine2D = encoding < 0;
@@ -1610,10 +1614,14 @@ void CCITTFaxStream::unfilteredReset () {
buf = EOF;
}
+void CCITTFaxStream::unfilteredReset() {
+ ccittReset(gTrue);
+}
+
void CCITTFaxStream::reset() {
int code1;
- unfilteredReset();
+ ccittReset(gFalse);
if (codingLine != NULL && refLine != NULL) {
eof = gFalse;
@@ -2333,8 +2341,11 @@ DCTStream::~DCTStream() {
delete str;
}
-void DCTStream::unfilteredReset() {
- str->reset();
+void DCTStream::dctReset(GBool unfiltered) {
+ if (unfiltered)
+ str->unfilteredReset()
+ else
+ str->reset();
progressive = interleaved = gFalse;
width = height = 0;
@@ -2347,11 +2358,14 @@ void DCTStream::unfilteredReset() {
restartInterval = 0;
}
+void DCTStream::unfilteredReset() {
+ dctReset(gTrue);
+}
void DCTStream::reset() {
int i, j;
- unfilteredReset();
+ dctReset(gFalse);
if (!readHeader()) {
y = height;
diff --git a/poppler/Stream.h b/poppler/Stream.h
index 3276940..33165aa 100644
--- a/poppler/Stream.h
+++ b/poppler/Stream.h
@@ -20,6 +20,7 @@
// Copyright (C) 2009 Stefan Thomas <thomas at eload24.com>
// Copyright (C) 2010 Hib Eris <hib at hiberis.nl>
// Copyright (C) 2011 William Bader <williambader at hotmail.com>
+// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -785,6 +786,7 @@ public:
private:
+ void ccittReset(GBool unfiltered);
int encoding; // 'K' parameter
GBool endOfLine; // 'EndOfLine' parameter
GBool byteAlign; // 'EncodedByteAlign' parameter
@@ -861,6 +863,7 @@ public:
private:
+ void dctReset(GBool unfiltered);
GBool progressive; // set if in progressive mode
GBool interleaved; // set if in interleaved mode
int width, height; // image size
More information about the poppler
mailing list