comparison mupdf-source/thirdparty/jbig2dec/jbig2_text.h @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 /* Copyright (C) 2001-2023 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., 39 Mesa Street, Suite 108A, San Francisco,
13 CA 94129, USA, for further information.
14 */
15
16 /*
17 jbig2dec
18 */
19
20 #ifndef _JBIG2_TEXT_H
21 #define _JBIG2_TEXT_H
22
23 /**
24 * Headers for Text region handling
25 **/
26
27 typedef enum {
28 JBIG2_CORNER_BOTTOMLEFT = 0,
29 JBIG2_CORNER_TOPLEFT = 1,
30 JBIG2_CORNER_BOTTOMRIGHT = 2,
31 JBIG2_CORNER_TOPRIGHT = 3
32 } Jbig2RefCorner;
33
34 typedef struct {
35 bool SBHUFF;
36 bool SBREFINE;
37 bool SBDEFPIXEL;
38 Jbig2ComposeOp SBCOMBOP;
39 bool TRANSPOSED;
40 Jbig2RefCorner REFCORNER;
41 int SBDSOFFSET;
42 /* int SBW; */
43 /* int SBH; */
44 uint32_t SBNUMINSTANCES;
45 int LOGSBSTRIPS;
46 int SBSTRIPS;
47 /* int SBNUMSYMS; */
48 /* SBSYMCODES */
49 /* SBSYMCODELEN */
50 /* SBSYMS */
51 Jbig2HuffmanTable *SBHUFFFS;
52 Jbig2HuffmanTable *SBHUFFDS;
53 Jbig2HuffmanTable *SBHUFFDT;
54 Jbig2HuffmanTable *SBHUFFRDW;
55 Jbig2HuffmanTable *SBHUFFRDH;
56 Jbig2HuffmanTable *SBHUFFRDX;
57 Jbig2HuffmanTable *SBHUFFRDY;
58 Jbig2HuffmanTable *SBHUFFRSIZE;
59 Jbig2ArithIntCtx *IADT;
60 Jbig2ArithIntCtx *IAFS;
61 Jbig2ArithIntCtx *IADS;
62 Jbig2ArithIntCtx *IAIT;
63 Jbig2ArithIaidCtx *IAID;
64 Jbig2ArithIntCtx *IARI;
65 Jbig2ArithIntCtx *IARDW;
66 Jbig2ArithIntCtx *IARDH;
67 Jbig2ArithIntCtx *IARDX;
68 Jbig2ArithIntCtx *IARDY;
69 bool SBRTEMPLATE;
70 int8_t sbrat[4];
71 } Jbig2TextRegionParams;
72
73 int
74 jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
75 const Jbig2TextRegionParams *params,
76 const Jbig2SymbolDict *const *dicts, const uint32_t n_dicts,
77 Jbig2Image *image, const byte *data, const size_t size, Jbig2ArithCx *GR_stats, Jbig2ArithState *as, Jbig2WordStream *ws);
78
79 int jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data);
80
81 #endif /* _JBIG2_TEXT_H */