]> rtime.felk.cvut.cz Git - hornmich/skoda-qr-demo.git/blob - QRScanner/mobile/jni/thirdparty/jbig2dec/jbig2_symbol_dict.h
Add MuPDF native source codes
[hornmich/skoda-qr-demo.git] / QRScanner / mobile / jni / thirdparty / jbig2dec / jbig2_symbol_dict.h
1 /* Copyright (C) 2001-2012 Artifex Software, Inc.
2    All Rights Reserved.
3
4    This software is provided AS-IS with no warranty, either express or
5    implied.
6
7    This software is distributed under license and may not be copied,
8    modified or distributed except as expressly authorized under the terms
9    of the license contained in the file LICENSE in this distribution.
10
11    Refer to licensing information at http://www.artifex.com or contact
12    Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134, San Rafael,
13    CA  94903, U.S.A., +1(415)492-9861, for further information.
14 */
15
16 /*
17     jbig2dec
18 */
19
20
21 /* symbol dictionary header */
22
23 /* the results of decoding a symbol dictionary */
24 typedef struct {
25     uint32_t n_symbols;
26     Jbig2Image **glyphs;
27 } Jbig2SymbolDict;
28
29 /* decode a symbol dictionary segment and store the results */
30 int
31 jbig2_symbol_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment,
32                         const byte *segment_data);
33
34 /* get a particular glyph by index */
35 Jbig2Image *
36 jbig2_sd_glyph(Jbig2SymbolDict *dict, unsigned int id);
37
38 /* return a new empty symbol dict */
39 Jbig2SymbolDict *
40 jbig2_sd_new(Jbig2Ctx *ctx, int n_symbols);
41
42 /* release the memory associated with a symbol dict */
43 void
44 jbig2_sd_release(Jbig2Ctx *ctx, Jbig2SymbolDict *dict);
45
46 /* generate a new symbol dictionary by concatenating a list of
47    existing dictionaries */
48 Jbig2SymbolDict *
49 jbig2_sd_cat(Jbig2Ctx *ctx, int n_dicts,
50                         Jbig2SymbolDict **dicts);
51
52 /* count the number of dictionary segments referred
53    to by the given segment */
54 int
55 jbig2_sd_count_referred(Jbig2Ctx *ctx, Jbig2Segment *segment);
56
57 /* return an array of pointers to symbol dictionaries referred
58    to by a segment */
59 Jbig2SymbolDict **
60 jbig2_sd_list_referred(Jbig2Ctx *ctx, Jbig2Segment *segment);
61