Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
8436 maxcodehac 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 Generic and Generic Refinement region handling
18
 **/
19
 
20
/* 6.4 Table 2 */
21
typedef struct {
22
  bool MMR;
23
  /* GBW */
24
  /* GBH */
25
  int GBTEMPLATE;
26
  bool TPGDON;
27
  bool USESKIP;
28
  /* SKIP */
29
  int8_t gbat[8];
30
} Jbig2GenericRegionParams;
31
 
32
/* return the appropriate context size for the given template */
33
int
34
jbig2_generic_stats_size(Jbig2Ctx *ctx, int template);
35
 
36
int
37
jbig2_decode_generic_region(Jbig2Ctx *ctx,
38
			    Jbig2Segment *segment,
39
			    const Jbig2GenericRegionParams *params,
40
			    Jbig2ArithState *as,
41
			    Jbig2Image *image,
42
			    Jbig2ArithCx *GB_stats);
43
 
44
 
45
/* 6.3 Table 6 */
46
typedef struct {
47
  /* GRW */
48
  /* GRH */
49
  bool GRTEMPLATE;
50
  Jbig2Image *reference;
51
  int32_t DX, DY;
52
  bool TPGRON;
53
  int8_t grat[4];
54
} Jbig2RefinementRegionParams;
55
 
56
int
57
jbig2_decode_refinement_region(Jbig2Ctx *ctx,
58
                            Jbig2Segment *segment,
59
                            const Jbig2RefinementRegionParams *params,
60
                            Jbig2ArithState *as,
61
                            Jbig2Image *image,
62
                            Jbig2ArithCx *GB_stats);