Commit 62b5ba22 authored by Albert Astals Cid's avatar Albert Astals Cid

Stream[cc|h] merges from xpdf 3.01

parent b9fab511
......@@ -7,6 +7,7 @@
* poppler/Page.cc:
* poppler/PSOutputDev.cc: Changes needed due to Annot changes
* poppler/Function.[cc|h]: Merge from xpdf 3.01
* poppler/Stream.[cc|h]: Merge from xpdf 3.01
2005-10-05 Kristian Høgsberg <krh@redhat.com>
......
This diff is collapsed.
......@@ -105,15 +105,14 @@ public:
// Is this an encoding filter?
virtual GBool isEncoder() { return gFalse; }
// Get image parameters which are defined by the stream contents.
virtual void getImageParams(int *bitsPerComponent,
StreamColorSpaceMode *csMode) {}
// Add filters to this stream according to the parameters in <dict>.
// Returns the new stream.
Stream *addFilters(Object *dict);
// Tell this stream to ignore any length limitation -- this only
// applies to BaseStream subclasses, and is used as a hack to work
// around broken PDF files with incorrect stream lengths.
virtual void ignoreLength() {}
private:
Stream *makeFilter(char *name, Stream *str, Object *params);
......@@ -172,7 +171,6 @@ public:
virtual void setPos(Guint pos, int dir = 0);
virtual BaseStream *getBaseStream() { return str->getBaseStream(); }
virtual Dict *getDict() { return str->getDict(); }
virtual void ignoreLength() { str->ignoreLength(); }
protected:
......@@ -274,7 +272,6 @@ public:
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
virtual int getPos() { return bufPos + (bufPtr - buf); }
virtual void setPos(Guint pos, int dir = 0);
virtual void ignoreLength() { limited = gFalse; }
virtual Guint getStart() { return start; }
virtual void moveStart(int delta);
......@@ -589,7 +586,7 @@ private:
GBool gotJFIFMarker; // set if APP0 JFIF marker was present
GBool gotAdobeMarker; // set if APP14 Adobe marker was present
int restartInterval; // restart interval, in MCUs
Guchar quantTables[4][64]; // quantization tables
Gushort quantTables[4][64]; // quantization tables
int numQuantTables; // number of quantization tables
DCTHuffTable dcHuffTables[4]; // DC Huffman tables
DCTHuffTable acHuffTables[4]; // AC Huffman tables
......@@ -614,7 +611,7 @@ private:
DCTHuffTable *acHuffTable,
int *prevDC, int data[64]);
void decodeImage();
void transformDataUnit(Guchar *quantTable,
void transformDataUnit(Gushort *quantTable,
int dataIn[64], Guchar dataOut[64]);
int readHuffSym(DCTHuffTable *table);
int readAmp(int size);
......@@ -700,6 +697,10 @@ private:
lengthDecode[flateMaxLitCodes-257];
static FlateDecode // distance decoding info
distDecode[flateMaxDistCodes];
static FlateHuffmanTab // fixed literal code table
fixedLitCodeTab;
static FlateHuffmanTab // fixed distance code table
fixedDistCodeTab;
void readSome();
GBool startBlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment