OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _JBIG2_GENERAL_DECODER_H_ | 7 #ifndef _JBIG2_GENERAL_DECODER_H_ |
8 #define _JBIG2_GENERAL_DECODER_H_ | 8 #define _JBIG2_GENERAL_DECODER_H_ |
9 #include "../../../include/fxcodec/fx_codec_def.h" | 9 #include "../../../include/fxcodec/fx_codec_def.h" |
10 #include "../../../include/fxcrt/fx_basic.h" | 10 #include "../../../include/fxcrt/fx_basic.h" |
11 #include "JBig2_Define.h" | 11 #include "JBig2_Define.h" |
12 #include "JBig2_SymbolDict.h" | 12 #include "JBig2_SymbolDict.h" |
13 #include "JBig2_ArithDecoder.h" | 13 #include "JBig2_ArithDecoder.h" |
14 #include "JBig2_ArithIntDecoder.h" | 14 #include "JBig2_ArithIntDecoder.h" |
15 #include "../../../include/fxcrt/fx_coordinates.h" | 15 #include "../../../include/fxcrt/fx_coordinates.h" |
16 class CJBig2_HuffmanTable; | 16 class CJBig2_HuffmanTable; |
17 class CJBig2_Image; | 17 class CJBig2_Image; |
18 class CJBig2_PatternDict; | 18 class CJBig2_PatternDict; |
19 typedef enum { | 19 typedef enum { |
20 JBIG2_CORNER_BOTTOMLEFT = 0, | 20 JBIG2_CORNER_BOTTOMLEFT = 0, |
21 JBIG2_CORNER_TOPLEFT» = 1, | 21 JBIG2_CORNER_TOPLEFT = 1, |
22 JBIG2_CORNER_BOTTOMRIGHT = 2, | 22 JBIG2_CORNER_BOTTOMRIGHT = 2, |
23 JBIG2_CORNER_TOPRIGHT» = 3 | 23 JBIG2_CORNER_TOPRIGHT = 3 |
24 } JBig2Corner; | 24 } JBig2Corner; |
25 class CJBig2_GRDProc : public CJBig2_Object | 25 class CJBig2_GRDProc : public CJBig2_Object { |
26 { | 26 public: |
27 public: | 27 CJBig2_GRDProc() { |
28 CJBig2_GRDProc() | 28 m_loopIndex = 0; |
29 { | 29 m_pLine = NULL; |
30 m_loopIndex = 0; | 30 m_pPause = NULL; |
31 m_pLine = NULL; | 31 m_DecodeType = 0; |
32 m_pPause = NULL; | 32 LTP = 0; |
33 m_DecodeType = 0; | 33 m_ReplaceRect.left = 0; |
34 LTP = 0; | 34 m_ReplaceRect.bottom = 0; |
35 m_ReplaceRect.left = 0; | 35 m_ReplaceRect.top = 0; |
36 m_ReplaceRect.bottom = 0; | 36 m_ReplaceRect.right = 0; |
37 m_ReplaceRect.top = 0; | 37 } |
38 m_ReplaceRect.right = 0; | 38 |
39 } | 39 CJBig2_Image* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, |
40 | 40 JBig2ArithCtx* gbContext); |
41 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx
*gbContext); | 41 |
42 | 42 CJBig2_Image* decode_Arith_V2(CJBig2_ArithDecoder* pArithDecoder, |
43 CJBig2_Image *decode_Arith_V2(CJBig2_ArithDecoder *pArithDecoder, JBig2Arith
Ctx *gbContext); | 43 JBig2ArithCtx* gbContext); |
44 | 44 |
45 CJBig2_Image *decode_Arith_V1(CJBig2_ArithDecoder *pArithDecoder, JBig2Arith
Ctx *gbContext); | 45 CJBig2_Image* decode_Arith_V1(CJBig2_ArithDecoder* pArithDecoder, |
46 | 46 JBig2ArithCtx* gbContext); |
47 CJBig2_Image *decode_MMR(CJBig2_BitStream *pStream); | 47 |
48 FXCODEC_STATUS Start_decode_Arith(CJBig2_Image** pImage, CJBig2_ArithDecoder
*pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause = NULL); | 48 CJBig2_Image* decode_MMR(CJBig2_BitStream* pStream); |
49 FXCODEC_STATUS Start_decode_Arith_V2(CJBig2_Image** pImage, CJBig2_ArithDeco
der *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause = NULL); | 49 FXCODEC_STATUS Start_decode_Arith(CJBig2_Image** pImage, |
50 FXCODEC_STATUS Start_decode_Arith_V1(CJBig2_Image** pImage, CJBig2_ArithDeco
der *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause = NULL); | 50 CJBig2_ArithDecoder* pArithDecoder, |
51 FXCODEC_STATUS Start_decode_MMR(CJBig2_Image** pImage, CJBig2_BitStream *pSt
ream, IFX_Pause* pPause = NULL); | 51 JBig2ArithCtx* gbContext, |
52 FXCODEC_STATUS Continue_decode(IFX_Pause* pPause); | 52 IFX_Pause* pPause = NULL); |
53 FX_RECT GetReplaceRect() | 53 FXCODEC_STATUS Start_decode_Arith_V2(CJBig2_Image** pImage, |
54 { | 54 CJBig2_ArithDecoder* pArithDecoder, |
55 return m_ReplaceRect; | 55 JBig2ArithCtx* gbContext, |
56 }; | 56 IFX_Pause* pPause = NULL); |
57 private: | 57 FXCODEC_STATUS Start_decode_Arith_V1(CJBig2_Image** pImage, |
58 FXCODEC_STATUS decode_Arith(IFX_Pause* pPause); | 58 CJBig2_ArithDecoder* pArithDecoder, |
59 FXCODEC_STATUS decode_Arith_V2(IFX_Pause* pPause); | 59 JBig2ArithCtx* gbContext, |
60 FXCODEC_STATUS decode_Arith_V1(IFX_Pause* pPause); | 60 IFX_Pause* pPause = NULL); |
61 FXCODEC_STATUS decode_MMR(); | 61 FXCODEC_STATUS Start_decode_MMR(CJBig2_Image** pImage, |
62 FXCODEC_STATUS decode_Arith_Template0_opt3(CJBig2_Image*pImage, CJBig2_Arith
Decoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 62 CJBig2_BitStream* pStream, |
63 FXCODEC_STATUS decode_Arith_Template0_unopt(CJBig2_Image *pImage, CJBig2_Ari
thDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 63 IFX_Pause* pPause = NULL); |
64 FXCODEC_STATUS decode_Arith_Template1_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 64 FXCODEC_STATUS Continue_decode(IFX_Pause* pPause); |
65 FXCODEC_STATUS decode_Arith_Template1_unopt(CJBig2_Image * pImage, CJBig2_Ar
ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 65 FX_RECT GetReplaceRect() { return m_ReplaceRect; }; |
66 FXCODEC_STATUS decode_Arith_Template2_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 66 |
67 FXCODEC_STATUS decode_Arith_Template2_unopt(CJBig2_Image * pImage, CJBig2_Ar
ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 67 private: |
68 FXCODEC_STATUS decode_Arith_Template3_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 68 FXCODEC_STATUS decode_Arith(IFX_Pause* pPause); |
69 FXCODEC_STATUS decode_Arith_Template3_unopt(CJBig2_Image * pImage, CJBig2_Ar
ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 69 FXCODEC_STATUS decode_Arith_V2(IFX_Pause* pPause); |
70 FX_DWORD m_loopIndex; | 70 FXCODEC_STATUS decode_Arith_V1(IFX_Pause* pPause); |
71 FX_BYTE * m_pLine; | 71 FXCODEC_STATUS decode_MMR(); |
72 IFX_Pause* m_pPause; | 72 FXCODEC_STATUS decode_Arith_Template0_opt3(CJBig2_Image* pImage, |
73 FXCODEC_STATUS m_ProssiveStatus; | 73 CJBig2_ArithDecoder* pArithDecoder, |
74 CJBig2_Image** m_pImage; | 74 JBig2ArithCtx* gbContext, |
75 CJBig2_ArithDecoder *m_pArithDecoder; | 75 IFX_Pause* pPause); |
76 JBig2ArithCtx *m_gbContext; | 76 FXCODEC_STATUS decode_Arith_Template0_unopt( |
77 FX_WORD m_DecodeType; | 77 CJBig2_Image* pImage, |
78 FX_BOOL LTP; | 78 CJBig2_ArithDecoder* pArithDecoder, |
79 FX_RECT m_ReplaceRect; | 79 JBig2ArithCtx* gbContext, |
80 private: | 80 IFX_Pause* pPause); |
81 | 81 FXCODEC_STATUS decode_Arith_Template1_opt3(CJBig2_Image* pImage, |
82 CJBig2_Image *decode_Arith_Template0_opt(CJBig2_ArithDecoder *pArithDecoder,
JBig2ArithCtx *gbContext); | 82 CJBig2_ArithDecoder* pArithDecoder, |
83 | 83 JBig2ArithCtx* gbContext, |
84 CJBig2_Image *decode_Arith_Template0_opt2(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 84 IFX_Pause* pPause); |
85 | 85 FXCODEC_STATUS decode_Arith_Template1_unopt( |
86 CJBig2_Image *decode_Arith_Template0_opt3(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 86 CJBig2_Image* pImage, |
87 | 87 CJBig2_ArithDecoder* pArithDecoder, |
88 CJBig2_Image *decode_Arith_Template0_unopt(CJBig2_ArithDecoder *pArithDecode
r, JBig2ArithCtx *gbContext); | 88 JBig2ArithCtx* gbContext, |
89 | 89 IFX_Pause* pPause); |
90 CJBig2_Image *decode_Arith_Template1_opt(CJBig2_ArithDecoder *pArithDecoder,
JBig2ArithCtx *gbContext); | 90 FXCODEC_STATUS decode_Arith_Template2_opt3(CJBig2_Image* pImage, |
91 | 91 CJBig2_ArithDecoder* pArithDecoder, |
92 CJBig2_Image *decode_Arith_Template1_opt2(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 92 JBig2ArithCtx* gbContext, |
93 | 93 IFX_Pause* pPause); |
94 CJBig2_Image *decode_Arith_Template1_opt3(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 94 FXCODEC_STATUS decode_Arith_Template2_unopt( |
95 | 95 CJBig2_Image* pImage, |
96 CJBig2_Image *decode_Arith_Template1_unopt(CJBig2_ArithDecoder *pArithDecode
r, JBig2ArithCtx *gbContext); | 96 CJBig2_ArithDecoder* pArithDecoder, |
97 | 97 JBig2ArithCtx* gbContext, |
98 CJBig2_Image *decode_Arith_Template2_opt(CJBig2_ArithDecoder *pArithDecoder,
JBig2ArithCtx *gbContext); | 98 IFX_Pause* pPause); |
99 | 99 FXCODEC_STATUS decode_Arith_Template3_opt3(CJBig2_Image* pImage, |
100 CJBig2_Image *decode_Arith_Template2_opt2(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 100 CJBig2_ArithDecoder* pArithDecoder, |
101 | 101 JBig2ArithCtx* gbContext, |
102 CJBig2_Image *decode_Arith_Template2_opt3(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 102 IFX_Pause* pPause); |
103 | 103 FXCODEC_STATUS decode_Arith_Template3_unopt( |
104 CJBig2_Image *decode_Arith_Template2_unopt(CJBig2_ArithDecoder *pArithDecode
r, JBig2ArithCtx *gbContext); | 104 CJBig2_Image* pImage, |
105 | 105 CJBig2_ArithDecoder* pArithDecoder, |
106 CJBig2_Image *decode_Arith_Template3_opt(CJBig2_ArithDecoder *pArithDecoder,
JBig2ArithCtx *gbContext); | 106 JBig2ArithCtx* gbContext, |
107 | 107 IFX_Pause* pPause); |
108 CJBig2_Image *decode_Arith_Template3_opt2(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 108 FX_DWORD m_loopIndex; |
109 | 109 FX_BYTE* m_pLine; |
110 CJBig2_Image *decode_Arith_Template3_opt3(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 110 IFX_Pause* m_pPause; |
111 | 111 FXCODEC_STATUS m_ProssiveStatus; |
112 CJBig2_Image *decode_Arith_Template3_unopt(CJBig2_ArithDecoder *pArithDecode
r, JBig2ArithCtx *gbContext); | 112 CJBig2_Image** m_pImage; |
113 public: | 113 CJBig2_ArithDecoder* m_pArithDecoder; |
114 FX_BOOL MMR; | 114 JBig2ArithCtx* m_gbContext; |
115 FX_DWORD GBW; | 115 FX_WORD m_DecodeType; |
116 FX_DWORD GBH; | 116 FX_BOOL LTP; |
117 FX_BYTE GBTEMPLATE; | 117 FX_RECT m_ReplaceRect; |
118 FX_BOOL TPGDON; | 118 |
119 FX_BOOL USESKIP; | 119 private: |
120 CJBig2_Image * SKIP; | 120 CJBig2_Image* decode_Arith_Template0_opt(CJBig2_ArithDecoder* pArithDecoder, |
121 signed char GBAT[8]; | 121 JBig2ArithCtx* gbContext); |
122 }; | 122 |
123 class CJBig2_GRRDProc : public CJBig2_Object | 123 CJBig2_Image* decode_Arith_Template0_opt2(CJBig2_ArithDecoder* pArithDecoder, |
124 { | 124 JBig2ArithCtx* gbContext); |
125 public: | 125 |
126 | 126 CJBig2_Image* decode_Arith_Template0_opt3(CJBig2_ArithDecoder* pArithDecoder, |
127 CJBig2_Image *decode(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grCo
ntext); | 127 JBig2ArithCtx* gbContext); |
128 | 128 |
129 CJBig2_Image *decode_Template0_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi
g2ArithCtx *grContext); | 129 CJBig2_Image* decode_Arith_Template0_unopt(CJBig2_ArithDecoder* pArithDecoder, |
130 | 130 JBig2ArithCtx* gbContext); |
131 CJBig2_Image *decode_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2
ArithCtx *grContext); | 131 |
132 | 132 CJBig2_Image* decode_Arith_Template1_opt(CJBig2_ArithDecoder* pArithDecoder, |
133 CJBig2_Image *decode_Template1_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi
g2ArithCtx *grContext); | 133 JBig2ArithCtx* gbContext); |
134 | 134 |
135 CJBig2_Image *decode_Template1_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2
ArithCtx *grContext); | 135 CJBig2_Image* decode_Arith_Template1_opt2(CJBig2_ArithDecoder* pArithDecoder, |
136 | 136 JBig2ArithCtx* gbContext); |
137 CJBig2_Image *decode_V1(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *g
rContext); | 137 |
138 public: | 138 CJBig2_Image* decode_Arith_Template1_opt3(CJBig2_ArithDecoder* pArithDecoder, |
139 FX_DWORD GRW; | 139 JBig2ArithCtx* gbContext); |
140 FX_DWORD GRH; | 140 |
141 FX_BOOL GRTEMPLATE; | 141 CJBig2_Image* decode_Arith_Template1_unopt(CJBig2_ArithDecoder* pArithDecoder, |
142 CJBig2_Image *GRREFERENCE; | 142 JBig2ArithCtx* gbContext); |
143 FX_INT32 GRREFERENCEDX; | 143 |
144 FX_INT32 GRREFERENCEDY; | 144 CJBig2_Image* decode_Arith_Template2_opt(CJBig2_ArithDecoder* pArithDecoder, |
145 FX_BOOL TPGRON; | 145 JBig2ArithCtx* gbContext); |
146 signed char GRAT[4]; | 146 |
| 147 CJBig2_Image* decode_Arith_Template2_opt2(CJBig2_ArithDecoder* pArithDecoder, |
| 148 JBig2ArithCtx* gbContext); |
| 149 |
| 150 CJBig2_Image* decode_Arith_Template2_opt3(CJBig2_ArithDecoder* pArithDecoder, |
| 151 JBig2ArithCtx* gbContext); |
| 152 |
| 153 CJBig2_Image* decode_Arith_Template2_unopt(CJBig2_ArithDecoder* pArithDecoder, |
| 154 JBig2ArithCtx* gbContext); |
| 155 |
| 156 CJBig2_Image* decode_Arith_Template3_opt(CJBig2_ArithDecoder* pArithDecoder, |
| 157 JBig2ArithCtx* gbContext); |
| 158 |
| 159 CJBig2_Image* decode_Arith_Template3_opt2(CJBig2_ArithDecoder* pArithDecoder, |
| 160 JBig2ArithCtx* gbContext); |
| 161 |
| 162 CJBig2_Image* decode_Arith_Template3_opt3(CJBig2_ArithDecoder* pArithDecoder, |
| 163 JBig2ArithCtx* gbContext); |
| 164 |
| 165 CJBig2_Image* decode_Arith_Template3_unopt(CJBig2_ArithDecoder* pArithDecoder, |
| 166 JBig2ArithCtx* gbContext); |
| 167 |
| 168 public: |
| 169 FX_BOOL MMR; |
| 170 FX_DWORD GBW; |
| 171 FX_DWORD GBH; |
| 172 FX_BYTE GBTEMPLATE; |
| 173 FX_BOOL TPGDON; |
| 174 FX_BOOL USESKIP; |
| 175 CJBig2_Image* SKIP; |
| 176 signed char GBAT[8]; |
| 177 }; |
| 178 class CJBig2_GRRDProc : public CJBig2_Object { |
| 179 public: |
| 180 CJBig2_Image* decode(CJBig2_ArithDecoder* pArithDecoder, |
| 181 JBig2ArithCtx* grContext); |
| 182 |
| 183 CJBig2_Image* decode_Template0_unopt(CJBig2_ArithDecoder* pArithDecoder, |
| 184 JBig2ArithCtx* grContext); |
| 185 |
| 186 CJBig2_Image* decode_Template0_opt(CJBig2_ArithDecoder* pArithDecoder, |
| 187 JBig2ArithCtx* grContext); |
| 188 |
| 189 CJBig2_Image* decode_Template1_unopt(CJBig2_ArithDecoder* pArithDecoder, |
| 190 JBig2ArithCtx* grContext); |
| 191 |
| 192 CJBig2_Image* decode_Template1_opt(CJBig2_ArithDecoder* pArithDecoder, |
| 193 JBig2ArithCtx* grContext); |
| 194 |
| 195 CJBig2_Image* decode_V1(CJBig2_ArithDecoder* pArithDecoder, |
| 196 JBig2ArithCtx* grContext); |
| 197 |
| 198 public: |
| 199 FX_DWORD GRW; |
| 200 FX_DWORD GRH; |
| 201 FX_BOOL GRTEMPLATE; |
| 202 CJBig2_Image* GRREFERENCE; |
| 203 FX_INT32 GRREFERENCEDX; |
| 204 FX_INT32 GRREFERENCEDY; |
| 205 FX_BOOL TPGRON; |
| 206 signed char GRAT[4]; |
147 }; | 207 }; |
148 typedef struct { | 208 typedef struct { |
149 CJBig2_ArithIntDecoder *IADT, | 209 CJBig2_ArithIntDecoder* IADT, *IAFS, *IADS, *IAIT, *IARI, *IARDW, *IARDH, |
150 *IAFS, | 210 *IARDX, *IARDY; |
151 *IADS, | 211 CJBig2_ArithIaidDecoder* IAID; |
152 *IAIT, | |
153 *IARI, | |
154 *IARDW, | |
155 *IARDH, | |
156 *IARDX, | |
157 *IARDY; | |
158 CJBig2_ArithIaidDecoder *IAID; | |
159 } JBig2IntDecoderState; | 212 } JBig2IntDecoderState; |
160 class CJBig2_TRDProc : public CJBig2_Object | 213 class CJBig2_TRDProc : public CJBig2_Object { |
161 { | 214 public: |
162 public: | 215 CJBig2_Image* decode_Huffman(CJBig2_BitStream* pStream, |
163 | 216 JBig2ArithCtx* grContext); |
164 CJBig2_Image *decode_Huffman(CJBig2_BitStream *pStream, JBig2ArithCtx *grCon
text); | 217 |
165 | 218 CJBig2_Image* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, |
166 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx
*grContext, | 219 JBig2ArithCtx* grContext, |
167 JBig2IntDecoderState *pIDS = NULL); | 220 JBig2IntDecoderState* pIDS = NULL); |
168 public: | 221 |
169 FX_BOOL SBHUFF; | 222 public: |
170 FX_BOOL SBREFINE; | 223 FX_BOOL SBHUFF; |
171 FX_DWORD SBW; | 224 FX_BOOL SBREFINE; |
172 FX_DWORD SBH; | 225 FX_DWORD SBW; |
173 FX_DWORD SBNUMINSTANCES; | 226 FX_DWORD SBH; |
174 FX_DWORD SBSTRIPS; | 227 FX_DWORD SBNUMINSTANCES; |
175 FX_DWORD SBNUMSYMS; | 228 FX_DWORD SBSTRIPS; |
176 | 229 FX_DWORD SBNUMSYMS; |
177 JBig2HuffmanCode *SBSYMCODES; | 230 |
178 FX_BYTE SBSYMCODELEN; | 231 JBig2HuffmanCode* SBSYMCODES; |
179 | 232 FX_BYTE SBSYMCODELEN; |
180 CJBig2_Image **SBSYMS; | 233 |
181 FX_BOOL SBDEFPIXEL; | 234 CJBig2_Image** SBSYMS; |
182 | 235 FX_BOOL SBDEFPIXEL; |
183 JBig2ComposeOp SBCOMBOP; | 236 |
184 FX_BOOL TRANSPOSED; | 237 JBig2ComposeOp SBCOMBOP; |
185 | 238 FX_BOOL TRANSPOSED; |
186 JBig2Corner REFCORNER; | 239 |
187 signed char SBDSOFFSET; | 240 JBig2Corner REFCORNER; |
188 CJBig2_HuffmanTable *SBHUFFFS, | 241 signed char SBDSOFFSET; |
189 *SBHUFFDS, | 242 CJBig2_HuffmanTable* SBHUFFFS, *SBHUFFDS, *SBHUFFDT, *SBHUFFRDW, *SBHUFFRDH, |
190 *SBHUFFDT, | 243 *SBHUFFRDX, *SBHUFFRDY, *SBHUFFRSIZE; |
191 *SBHUFFRDW, | 244 FX_BOOL SBRTEMPLATE; |
192 *SBHUFFRDH, | 245 signed char SBRAT[4]; |
193 *SBHUFFRDX, | 246 }; |
194 *SBHUFFRDY, | 247 class CJBig2_SDDProc : public CJBig2_Object { |
195 *SBHUFFRSIZE; | 248 public: |
196 FX_BOOL SBRTEMPLATE; | 249 CJBig2_SymbolDict* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, |
197 signed char SBRAT[4]; | 250 JBig2ArithCtx* gbContext, |
198 }; | 251 JBig2ArithCtx* grContext); |
199 class CJBig2_SDDProc : public CJBig2_Object | 252 |
200 { | 253 CJBig2_SymbolDict* decode_Huffman(CJBig2_BitStream* pStream, |
201 public: | 254 JBig2ArithCtx* gbContext, |
202 | 255 JBig2ArithCtx* grContext, |
203 CJBig2_SymbolDict *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2Ari
thCtx *gbContext, JBig2ArithCtx *grContext); | 256 IFX_Pause* pPause); |
204 | 257 |
205 CJBig2_SymbolDict *decode_Huffman(CJBig2_BitStream *pStream, JBig2ArithCtx *
gbContext, JBig2ArithCtx *grContext, IFX_Pause* pPause); | 258 public: |
206 public: | 259 FX_BOOL SDHUFF; |
207 FX_BOOL SDHUFF; | 260 FX_BOOL SDREFAGG; |
208 FX_BOOL SDREFAGG; | 261 FX_DWORD SDNUMINSYMS; |
209 FX_DWORD SDNUMINSYMS; | 262 CJBig2_Image** SDINSYMS; |
210 CJBig2_Image ** SDINSYMS; | 263 FX_DWORD SDNUMNEWSYMS; |
211 FX_DWORD SDNUMNEWSYMS; | 264 FX_DWORD SDNUMEXSYMS; |
212 FX_DWORD SDNUMEXSYMS; | 265 CJBig2_HuffmanTable* SDHUFFDH, *SDHUFFDW, *SDHUFFBMSIZE, *SDHUFFAGGINST; |
213 CJBig2_HuffmanTable *SDHUFFDH, | 266 FX_BYTE SDTEMPLATE; |
214 *SDHUFFDW, | 267 signed char SDAT[8]; |
215 *SDHUFFBMSIZE, | 268 FX_BOOL SDRTEMPLATE; |
216 *SDHUFFAGGINST; | 269 signed char SDRAT[4]; |
217 FX_BYTE SDTEMPLATE; | 270 }; |
218 signed char SDAT[8]; | 271 class CJBig2_HTRDProc : public CJBig2_Object { |
219 FX_BOOL SDRTEMPLATE; | 272 public: |
220 signed char SDRAT[4]; | 273 CJBig2_Image* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, |
221 }; | 274 JBig2ArithCtx* gbContext, |
222 class CJBig2_HTRDProc : public CJBig2_Object | 275 IFX_Pause* pPause); |
223 { | 276 |
224 public: | 277 CJBig2_Image* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause); |
225 | 278 |
226 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx
*gbContext, IFX_Pause* pPause); | 279 public: |
227 | 280 FX_DWORD HBW, HBH; |
228 CJBig2_Image *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause); | 281 FX_BOOL HMMR; |
229 public: | 282 FX_BYTE HTEMPLATE; |
230 FX_DWORD HBW, | 283 FX_DWORD HNUMPATS; |
231 HBH; | 284 CJBig2_Image** HPATS; |
232 FX_BOOL HMMR; | 285 FX_BOOL HDEFPIXEL; |
233 FX_BYTE HTEMPLATE; | 286 JBig2ComposeOp HCOMBOP; |
234 FX_DWORD HNUMPATS; | 287 FX_BOOL HENABLESKIP; |
235 CJBig2_Image **HPATS; | 288 FX_DWORD HGW, HGH; |
236 FX_BOOL HDEFPIXEL; | 289 FX_INT32 HGX, HGY; |
237 JBig2ComposeOp HCOMBOP; | 290 FX_WORD HRX, HRY; |
238 FX_BOOL HENABLESKIP; | 291 FX_BYTE HPW, HPH; |
239 FX_DWORD HGW, | 292 }; |
240 HGH; | 293 class CJBig2_PDDProc : public CJBig2_Object { |
241 FX_INT32 HGX, | 294 public: |
242 HGY; | 295 CJBig2_PatternDict* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, |
243 FX_WORD HRX, | 296 JBig2ArithCtx* gbContext, |
244 HRY; | 297 IFX_Pause* pPause); |
245 FX_BYTE HPW, | 298 |
246 HPH; | 299 CJBig2_PatternDict* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause); |
247 }; | 300 |
248 class CJBig2_PDDProc : public CJBig2_Object | 301 public: |
249 { | 302 FX_BOOL HDMMR; |
250 public: | 303 FX_BYTE HDPW, HDPH; |
251 | 304 FX_DWORD GRAYMAX; |
252 CJBig2_PatternDict *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2Ar
ithCtx *gbContext, IFX_Pause* pPause); | 305 FX_BYTE HDTEMPLATE; |
253 | 306 }; |
254 CJBig2_PatternDict *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause)
; | 307 class CJBig2_GSIDProc : public CJBig2_Object { |
255 public: | 308 public: |
256 FX_BOOL HDMMR; | 309 FX_DWORD* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, |
257 FX_BYTE HDPW, | 310 JBig2ArithCtx* gbContext, |
258 HDPH; | 311 IFX_Pause* pPause); |
259 FX_DWORD GRAYMAX; | 312 |
260 FX_BYTE HDTEMPLATE; | 313 FX_DWORD* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause); |
261 }; | 314 |
262 class CJBig2_GSIDProc : public CJBig2_Object | 315 public: |
263 { | 316 FX_BOOL GSMMR; |
264 public: | 317 FX_BOOL GSUSESKIP; |
265 | 318 FX_BYTE GSBPP; |
266 FX_DWORD *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gb
Context, IFX_Pause* pPause); | 319 FX_DWORD GSW, GSH; |
267 | 320 FX_BYTE GSTEMPLATE; |
268 FX_DWORD *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause); | 321 CJBig2_Image* GSKIP; |
269 public: | |
270 FX_BOOL GSMMR; | |
271 FX_BOOL GSUSESKIP; | |
272 FX_BYTE GSBPP; | |
273 FX_DWORD GSW, | |
274 GSH; | |
275 FX_BYTE GSTEMPLATE; | |
276 CJBig2_Image *GSKIP; | |
277 }; | 322 }; |
278 #endif | 323 #endif |
OLD | NEW |