Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /*
  2.     jbig2dec
  3.  
  4.     Copyright (C) 2002-2004 Artifex Software, Inc.
  5.  
  6.     This software is distributed under license and may not
  7.     be copied, modified or distributed except as expressly
  8.     authorized under the terms of the license contained in
  9.     the file LICENSE in this distribution.
  10.  
  11.     For further licensing information refer to http://artifex.com/ or
  12.     contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
  13.     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
  14. */
  15.  
  16. /**
  17.  * Headers for Text region handling
  18.  **/
  19.  
  20. typedef enum {
  21.     JBIG2_CORNER_BOTTOMLEFT = 0,
  22.     JBIG2_CORNER_TOPLEFT = 1,
  23.     JBIG2_CORNER_BOTTOMRIGHT = 2,
  24.     JBIG2_CORNER_TOPRIGHT = 3
  25. } Jbig2RefCorner;
  26.  
  27. typedef struct {
  28.     bool SBHUFF;
  29.     bool SBREFINE;
  30.     bool SBDEFPIXEL;
  31.     Jbig2ComposeOp SBCOMBOP;
  32.     bool TRANSPOSED;
  33.     Jbig2RefCorner REFCORNER;
  34.     int SBDSOFFSET;
  35.     /* int SBW; */
  36.     /* int SBH; */
  37.     uint32_t SBNUMINSTANCES;
  38.     int LOGSBSTRIPS;
  39.     int SBSTRIPS;
  40.     /* int SBNUMSYMS; */
  41.     /* SBSYMCODES */
  42.     /* SBSYMCODELEN */
  43.     /* SBSYMS */
  44.     Jbig2HuffmanTable *SBHUFFFS;
  45.     Jbig2HuffmanTable *SBHUFFDS;
  46.     Jbig2HuffmanTable *SBHUFFDT;
  47.     Jbig2HuffmanTable *SBHUFFRDW;
  48.     Jbig2HuffmanTable *SBHUFFRDH;
  49.     Jbig2HuffmanTable *SBHUFFRDX;
  50.     Jbig2HuffmanTable *SBHUFFRDY;
  51.     Jbig2HuffmanTable *SBHUFFRSIZE;
  52.     Jbig2ArithIntCtx *IADT;
  53.     Jbig2ArithIntCtx *IAFS;
  54.     Jbig2ArithIntCtx *IADS;
  55.     Jbig2ArithIntCtx *IAIT;
  56.     Jbig2ArithIaidCtx *IAID;
  57.     Jbig2ArithIntCtx *IARI;
  58.     Jbig2ArithIntCtx *IARDW;
  59.     Jbig2ArithIntCtx *IARDH;
  60.     Jbig2ArithIntCtx *IARDX;
  61.     Jbig2ArithIntCtx *IARDY;
  62.     bool SBRTEMPLATE;
  63.     int8_t sbrat[4];
  64. } Jbig2TextRegionParams;
  65.  
  66. int
  67. jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
  68.                              const Jbig2TextRegionParams *params,
  69.                              const Jbig2SymbolDict * const *dicts, const int n_dicts,
  70.                              Jbig2Image *image,
  71.                              const byte *data, const size_t size,
  72.                              Jbig2ArithCx *GR_stats,
  73.                              Jbig2ArithState *as, Jbig2WordStream *ws);
  74.