X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=pdf2swf%2Fxpdf%2FJBIG2Stream.h;fp=pdf2swf%2Fxpdf%2FJBIG2Stream.h;h=0000000000000000000000000000000000000000;hp=44e09db2891a3d51ed04e52adc887103b2bde02f;hb=5a005ef586b9000810156a961b9622c903dce988;hpb=c26ca847941ca0acfc9f3b4bdc519d904ba09a39 diff --git a/pdf2swf/xpdf/JBIG2Stream.h b/pdf2swf/xpdf/JBIG2Stream.h deleted file mode 100644 index 44e09db..0000000 --- a/pdf2swf/xpdf/JBIG2Stream.h +++ /dev/null @@ -1,143 +0,0 @@ -//======================================================================== -// -// JBIG2Stream.h -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef JBIG2STREAM_H -#define JBIG2STREAM_H - -#include - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "gtypes.h" -#include "Object.h" -#include "Stream.h" - -class GList; -class JBIG2Segment; -class JBIG2Bitmap; -class JArithmeticDecoder; -class JArithmeticDecoderStats; -class JBIG2HuffmanDecoder; -struct JBIG2HuffmanTable; -class JBIG2MMRDecoder; - -//------------------------------------------------------------------------ - -class JBIG2Stream: public FilterStream { -public: - - JBIG2Stream(Stream *strA, Object *globalsStream); - virtual ~JBIG2Stream(); - virtual StreamKind getKind() { return strJBIG2; } - virtual void reset(); - virtual int getChar(); - virtual int lookChar(); - virtual GString *getPSFilter(int psLevel, char *indent); - virtual GBool isBinary(GBool last = gTrue); - -private: - - void readSegments(); - GBool readSymbolDictSeg(Guint segNum, Guint length, - Guint *refSegs, Guint nRefSegs); - void readTextRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, Guint nRefSegs); - JBIG2Bitmap *readTextRegion(GBool huff, GBool refine, - int w, int h, - Guint numInstances, - Guint logStrips, - int numSyms, - JBIG2HuffmanTable *symCodeTab, - Guint symCodeLen, - JBIG2Bitmap **syms, - Guint defPixel, Guint combOp, - Guint transposed, Guint refCorner, - int sOffset, - JBIG2HuffmanTable *huffFSTable, - JBIG2HuffmanTable *huffDSTable, - JBIG2HuffmanTable *huffDTTable, - JBIG2HuffmanTable *huffRDWTable, - JBIG2HuffmanTable *huffRDHTable, - JBIG2HuffmanTable *huffRDXTable, - JBIG2HuffmanTable *huffRDYTable, - JBIG2HuffmanTable *huffRSizeTable, - Guint templ, - int *atx, int *aty); - void readPatternDictSeg(Guint segNum, Guint length); - void readHalftoneRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, Guint nRefSegs); - void readGenericRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length); - JBIG2Bitmap *readGenericBitmap(GBool mmr, int w, int h, - int templ, GBool tpgdOn, - GBool useSkip, JBIG2Bitmap *skip, - int *atx, int *aty, - int mmrDataLength); - void readGenericRefinementRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, - Guint nRefSegs); - JBIG2Bitmap *readGenericRefinementRegion(int w, int h, - int templ, GBool tpgrOn, - JBIG2Bitmap *refBitmap, - int refDX, int refDY, - int *atx, int *aty); - void readPageInfoSeg(Guint length); - void readEndOfStripeSeg(Guint length); - void readProfilesSeg(Guint length); - void readCodeTableSeg(Guint segNum, Guint length); - void readExtensionSeg(Guint length); - JBIG2Segment *findSegment(Guint segNum); - void discardSegment(Guint segNum); - void resetGenericStats(Guint templ, - JArithmeticDecoderStats *prevStats); - void resetRefinementStats(Guint templ, - JArithmeticDecoderStats *prevStats); - void resetIntStats(int symCodeLen); - GBool readUByte(Guint *x); - GBool readByte(int *x); - GBool readUWord(Guint *x); - GBool readULong(Guint *x); - GBool readLong(int *x); - - Guint pageW, pageH, curPageH; - Guint pageDefPixel; - JBIG2Bitmap *pageBitmap; - Guint defCombOp; - GList *segments; // [JBIG2Segment] - GList *globalSegments; // [JBIG2Segment] - Stream *curStr; - Guchar *dataPtr; - Guchar *dataEnd; - - JArithmeticDecoder *arithDecoder; - JArithmeticDecoderStats *genericRegionStats; - JArithmeticDecoderStats *refinementRegionStats; - JArithmeticDecoderStats *iadhStats; - JArithmeticDecoderStats *iadwStats; - JArithmeticDecoderStats *iaexStats; - JArithmeticDecoderStats *iaaiStats; - JArithmeticDecoderStats *iadtStats; - JArithmeticDecoderStats *iaitStats; - JArithmeticDecoderStats *iafsStats; - JArithmeticDecoderStats *iadsStats; - JArithmeticDecoderStats *iardxStats; - JArithmeticDecoderStats *iardyStats; - JArithmeticDecoderStats *iardwStats; - JArithmeticDecoderStats *iardhStats; - JArithmeticDecoderStats *iariStats; - JArithmeticDecoderStats *iaidStats; - JBIG2HuffmanDecoder *huffDecoder; - JBIG2MMRDecoder *mmrDecoder; -}; - -#endif