rev 454 - trunk

[email protected] Tue, 6 Feb 2007 00:10:58 -0800 (PST)
Newsgroups gmane.comp.printing.ghostscript.jbig2dec.cvs
Message-ID <[email protected]>
Author: giles
Date: 2007-02-06 00:10:58 -0800 (Tue, 06 Feb 2007)
New Revision: 454

Added:
   trunk/jbig2_text.h
Log:
Add a new header for declaring the public text region functions.


Added: trunk/jbig2_text.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/jbig2_text.h	2007-02-05 23:42:18 UTC (rev 453)
+++ trunk/jbig2_text.h	2007-02-06 08:10:58 UTC (rev 454)
@@ -0,0 +1,65 @@
+/*
+    jbig2dec
+   =20
+    Copyright (c) 2002-2006 artofcode LLC.
+   =20
+    This software is distributed under license and may not
+    be copied, modified or distributed except as expressly
+    authorized under the terms of the license contained in
+    the file LICENSE in this distribution.
+                                                                        =
       =20
+    For information on commercial licensing, go to
+    http://www.artifex.com/licensing/ or contact
+    Artifex Software, Inc.,  101 Lucas Valley Road #110,
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861.
+       =20
+    $Id: jbig2_priv.h 420 2005-07-27 23:55:54Z giles $
+   =20
+    text region header
+*/
+
+/* jbig2_symbol_dict.h must be included first */
+
+typedef enum {
+    JBIG2_CORNER_BOTTOMLEFT =3D 0,
+    JBIG2_CORNER_TOPLEFT =3D 1,
+    JBIG2_CORNER_BOTTOMRIGHT =3D 2,
+    JBIG2_CORNER_TOPRIGHT =3D 3
+} Jbig2RefCorner;
+
+typedef struct {
+    bool SBHUFF;
+    bool SBREFINE;
+    bool SBDEFPIXEL;
+    Jbig2ComposeOp SBCOMBOP;
+    bool TRANSPOSED;
+    Jbig2RefCorner REFCORNER;
+    int SBDSOFFSET;
+    /* SBW */
+    /* SBH */
+    uint32_t SBNUMINSTANCES;
+    int LOGSBSTRIPS;
+    int SBSTRIPS;
+    /* SBNUMSYMS */
+    /* SBSYMCODES */
+    /* SBSYMCODELEN */
+    /* SBSYMS */
+    Jbig2HuffmanTable *SBHUFFFS;
+    Jbig2HuffmanTable *SBHUFFDS;
+    Jbig2HuffmanTable *SBHUFFDT;
+    Jbig2HuffmanTable *SBHUFFRDW;
+    Jbig2HuffmanTable *SBHUFFRDH;
+    Jbig2HuffmanTable *SBHUFFRDX;
+    Jbig2HuffmanTable *SBHUFFRDY;
+    Jbig2HuffmanTable *SBHUFFRSIZE;
+    bool SBRTEMPLATE;
+    int8_t sbrat[4];
+} Jbig2TextRegionParams;
+
+int
+jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
+			     const Jbig2TextRegionParams *params,
+			     const Jbig2SymbolDict * const *dicts, const int n_dicts,
+			     Jbig2Image *image,
+			     const byte *data, const size_t size,
+			     Jbig2ArithCx *GR_stats);