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" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 FXCODEC_STATUS decode_MMR(); | 61 FXCODEC_STATUS decode_MMR(); |
62 FXCODEC_STATUS decode_Arith_Template0_opt3(CJBig2_Image*pImage, CJBig2_Arith
Decoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 62 FXCODEC_STATUS decode_Arith_Template0_opt3(CJBig2_Image*pImage, CJBig2_Arith
Decoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); |
63 FXCODEC_STATUS decode_Arith_Template0_unopt(CJBig2_Image *pImage, CJBig2_Ari
thDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 63 FXCODEC_STATUS decode_Arith_Template0_unopt(CJBig2_Image *pImage, CJBig2_Ari
thDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); |
64 FXCODEC_STATUS decode_Arith_Template1_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 64 FXCODEC_STATUS decode_Arith_Template1_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); |
65 FXCODEC_STATUS decode_Arith_Template1_unopt(CJBig2_Image * pImage, CJBig2_Ar
ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 65 FXCODEC_STATUS decode_Arith_Template1_unopt(CJBig2_Image * pImage, CJBig2_Ar
ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); |
66 FXCODEC_STATUS decode_Arith_Template2_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 66 FXCODEC_STATUS decode_Arith_Template2_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); |
67 FXCODEC_STATUS decode_Arith_Template2_unopt(CJBig2_Image * pImage, CJBig2_Ar
ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 67 FXCODEC_STATUS decode_Arith_Template2_unopt(CJBig2_Image * pImage, CJBig2_Ar
ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); |
68 FXCODEC_STATUS decode_Arith_Template3_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); | 68 FXCODEC_STATUS decode_Arith_Template3_opt3(CJBig2_Image *pImage, CJBig2_Arit
hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, 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_Template3_unopt(CJBig2_Image * pImage, CJBig2_Ar
ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); |
70 FX_DWORD m_loopIndex; | 70 FX_DWORD m_loopIndex; |
71 FX_BYTE *» m_pLine; | 71 uint8_t *» m_pLine; |
72 IFX_Pause* m_pPause; | 72 IFX_Pause* m_pPause; |
73 FXCODEC_STATUS m_ProssiveStatus; | 73 FXCODEC_STATUS m_ProssiveStatus; |
74 CJBig2_Image** m_pImage; | 74 CJBig2_Image** m_pImage; |
75 CJBig2_ArithDecoder *m_pArithDecoder; | 75 CJBig2_ArithDecoder *m_pArithDecoder; |
76 JBig2ArithCtx *m_gbContext; | 76 JBig2ArithCtx *m_gbContext; |
77 FX_WORD m_DecodeType; | 77 FX_WORD m_DecodeType; |
78 FX_BOOL LTP; | 78 FX_BOOL LTP; |
79 FX_RECT m_ReplaceRect; | 79 FX_RECT m_ReplaceRect; |
80 private: | 80 private: |
81 | 81 |
(...skipping 25 matching lines...) Expand all Loading... |
107 | 107 |
108 CJBig2_Image *decode_Arith_Template3_opt2(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 108 CJBig2_Image *decode_Arith_Template3_opt2(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); |
109 | 109 |
110 CJBig2_Image *decode_Arith_Template3_opt3(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); | 110 CJBig2_Image *decode_Arith_Template3_opt3(CJBig2_ArithDecoder *pArithDecoder
, JBig2ArithCtx *gbContext); |
111 | 111 |
112 CJBig2_Image *decode_Arith_Template3_unopt(CJBig2_ArithDecoder *pArithDecode
r, JBig2ArithCtx *gbContext); | 112 CJBig2_Image *decode_Arith_Template3_unopt(CJBig2_ArithDecoder *pArithDecode
r, JBig2ArithCtx *gbContext); |
113 public: | 113 public: |
114 FX_BOOL MMR; | 114 FX_BOOL MMR; |
115 FX_DWORD GBW; | 115 FX_DWORD GBW; |
116 FX_DWORD GBH; | 116 FX_DWORD GBH; |
117 FX_BYTE GBTEMPLATE; | 117 uint8_t GBTEMPLATE; |
118 FX_BOOL TPGDON; | 118 FX_BOOL TPGDON; |
119 FX_BOOL USESKIP; | 119 FX_BOOL USESKIP; |
120 CJBig2_Image * SKIP; | 120 CJBig2_Image * SKIP; |
121 signed char GBAT[8]; | 121 signed char GBAT[8]; |
122 }; | 122 }; |
123 class CJBig2_GRRDProc : public CJBig2_Object | 123 class CJBig2_GRRDProc : public CJBig2_Object |
124 { | 124 { |
125 public: | 125 public: |
126 | 126 |
127 CJBig2_Image *decode(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grCo
ntext); | 127 CJBig2_Image *decode(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grCo
ntext); |
128 | 128 |
129 CJBig2_Image *decode_Template0_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi
g2ArithCtx *grContext); | 129 CJBig2_Image *decode_Template0_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi
g2ArithCtx *grContext); |
130 | 130 |
131 CJBig2_Image *decode_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2
ArithCtx *grContext); | 131 CJBig2_Image *decode_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2
ArithCtx *grContext); |
132 | 132 |
133 CJBig2_Image *decode_Template1_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi
g2ArithCtx *grContext); | 133 CJBig2_Image *decode_Template1_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi
g2ArithCtx *grContext); |
134 | 134 |
135 CJBig2_Image *decode_Template1_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2
ArithCtx *grContext); | 135 CJBig2_Image *decode_Template1_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2
ArithCtx *grContext); |
136 | 136 |
137 CJBig2_Image *decode_V1(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *g
rContext); | 137 CJBig2_Image *decode_V1(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *g
rContext); |
138 public: | 138 public: |
139 FX_DWORD GRW; | 139 FX_DWORD GRW; |
140 FX_DWORD GRH; | 140 FX_DWORD GRH; |
141 FX_BOOL GRTEMPLATE; | 141 FX_BOOL GRTEMPLATE; |
142 CJBig2_Image *GRREFERENCE; | 142 CJBig2_Image *GRREFERENCE; |
143 FX_INT32 GRREFERENCEDX; | 143 int32_t GRREFERENCEDX; |
144 FX_INT32 GRREFERENCEDY; | 144 int32_t GRREFERENCEDY; |
145 FX_BOOL TPGRON; | 145 FX_BOOL TPGRON; |
146 signed char GRAT[4]; | 146 signed char GRAT[4]; |
147 }; | 147 }; |
148 typedef struct { | 148 typedef struct { |
149 CJBig2_ArithIntDecoder *IADT, | 149 CJBig2_ArithIntDecoder *IADT, |
150 *IAFS, | 150 *IAFS, |
151 *IADS, | 151 *IADS, |
152 *IAIT, | 152 *IAIT, |
153 *IARI, | 153 *IARI, |
154 *IARDW, | 154 *IARDW, |
(...skipping 13 matching lines...) Expand all Loading... |
168 public: | 168 public: |
169 FX_BOOL SBHUFF; | 169 FX_BOOL SBHUFF; |
170 FX_BOOL SBREFINE; | 170 FX_BOOL SBREFINE; |
171 FX_DWORD SBW; | 171 FX_DWORD SBW; |
172 FX_DWORD SBH; | 172 FX_DWORD SBH; |
173 FX_DWORD SBNUMINSTANCES; | 173 FX_DWORD SBNUMINSTANCES; |
174 FX_DWORD SBSTRIPS; | 174 FX_DWORD SBSTRIPS; |
175 FX_DWORD SBNUMSYMS; | 175 FX_DWORD SBNUMSYMS; |
176 | 176 |
177 JBig2HuffmanCode *SBSYMCODES; | 177 JBig2HuffmanCode *SBSYMCODES; |
178 FX_BYTE SBSYMCODELEN; | 178 uint8_t SBSYMCODELEN; |
179 | 179 |
180 CJBig2_Image **SBSYMS; | 180 CJBig2_Image **SBSYMS; |
181 FX_BOOL SBDEFPIXEL; | 181 FX_BOOL SBDEFPIXEL; |
182 | 182 |
183 JBig2ComposeOp SBCOMBOP; | 183 JBig2ComposeOp SBCOMBOP; |
184 FX_BOOL TRANSPOSED; | 184 FX_BOOL TRANSPOSED; |
185 | 185 |
186 JBig2Corner REFCORNER; | 186 JBig2Corner REFCORNER; |
187 signed char SBDSOFFSET; | 187 signed char SBDSOFFSET; |
188 CJBig2_HuffmanTable *SBHUFFFS, | 188 CJBig2_HuffmanTable *SBHUFFFS, |
(...skipping 18 matching lines...) Expand all Loading... |
207 FX_BOOL SDHUFF; | 207 FX_BOOL SDHUFF; |
208 FX_BOOL SDREFAGG; | 208 FX_BOOL SDREFAGG; |
209 FX_DWORD SDNUMINSYMS; | 209 FX_DWORD SDNUMINSYMS; |
210 CJBig2_Image ** SDINSYMS; | 210 CJBig2_Image ** SDINSYMS; |
211 FX_DWORD SDNUMNEWSYMS; | 211 FX_DWORD SDNUMNEWSYMS; |
212 FX_DWORD SDNUMEXSYMS; | 212 FX_DWORD SDNUMEXSYMS; |
213 CJBig2_HuffmanTable *SDHUFFDH, | 213 CJBig2_HuffmanTable *SDHUFFDH, |
214 *SDHUFFDW, | 214 *SDHUFFDW, |
215 *SDHUFFBMSIZE, | 215 *SDHUFFBMSIZE, |
216 *SDHUFFAGGINST; | 216 *SDHUFFAGGINST; |
217 FX_BYTE SDTEMPLATE; | 217 uint8_t SDTEMPLATE; |
218 signed char SDAT[8]; | 218 signed char SDAT[8]; |
219 FX_BOOL SDRTEMPLATE; | 219 FX_BOOL SDRTEMPLATE; |
220 signed char SDRAT[4]; | 220 signed char SDRAT[4]; |
221 }; | 221 }; |
222 class CJBig2_HTRDProc : public CJBig2_Object | 222 class CJBig2_HTRDProc : public CJBig2_Object |
223 { | 223 { |
224 public: | 224 public: |
225 | 225 |
226 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx
*gbContext, IFX_Pause* pPause); | 226 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx
*gbContext, IFX_Pause* pPause); |
227 | 227 |
228 CJBig2_Image *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause); | 228 CJBig2_Image *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause); |
229 public: | 229 public: |
230 FX_DWORD HBW, | 230 FX_DWORD HBW, |
231 HBH; | 231 HBH; |
232 FX_BOOL HMMR; | 232 FX_BOOL HMMR; |
233 FX_BYTE HTEMPLATE; | 233 uint8_t HTEMPLATE; |
234 FX_DWORD HNUMPATS; | 234 FX_DWORD HNUMPATS; |
235 CJBig2_Image **HPATS; | 235 CJBig2_Image **HPATS; |
236 FX_BOOL HDEFPIXEL; | 236 FX_BOOL HDEFPIXEL; |
237 JBig2ComposeOp HCOMBOP; | 237 JBig2ComposeOp HCOMBOP; |
238 FX_BOOL HENABLESKIP; | 238 FX_BOOL HENABLESKIP; |
239 FX_DWORD HGW, | 239 FX_DWORD HGW, |
240 HGH; | 240 HGH; |
241 FX_INT32 HGX, | 241 int32_t HGX, |
242 HGY; | 242 HGY; |
243 FX_WORD HRX, | 243 FX_WORD HRX, |
244 HRY; | 244 HRY; |
245 FX_BYTE HPW, | 245 uint8_t HPW, |
246 HPH; | 246 HPH; |
247 }; | 247 }; |
248 class CJBig2_PDDProc : public CJBig2_Object | 248 class CJBig2_PDDProc : public CJBig2_Object |
249 { | 249 { |
250 public: | 250 public: |
251 | 251 |
252 CJBig2_PatternDict *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2Ar
ithCtx *gbContext, IFX_Pause* pPause); | 252 CJBig2_PatternDict *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2Ar
ithCtx *gbContext, IFX_Pause* pPause); |
253 | 253 |
254 CJBig2_PatternDict *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause)
; | 254 CJBig2_PatternDict *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause)
; |
255 public: | 255 public: |
256 FX_BOOL HDMMR; | 256 FX_BOOL HDMMR; |
257 FX_BYTE HDPW, | 257 uint8_t HDPW, |
258 HDPH; | 258 HDPH; |
259 FX_DWORD GRAYMAX; | 259 FX_DWORD GRAYMAX; |
260 FX_BYTE HDTEMPLATE; | 260 uint8_t HDTEMPLATE; |
261 }; | 261 }; |
262 class CJBig2_GSIDProc : public CJBig2_Object | 262 class CJBig2_GSIDProc : public CJBig2_Object |
263 { | 263 { |
264 public: | 264 public: |
265 | 265 |
266 FX_DWORD *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gb
Context, IFX_Pause* pPause); | 266 FX_DWORD *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gb
Context, IFX_Pause* pPause); |
267 | 267 |
268 FX_DWORD *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause); | 268 FX_DWORD *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause); |
269 public: | 269 public: |
270 FX_BOOL GSMMR; | 270 FX_BOOL GSMMR; |
271 FX_BOOL GSUSESKIP; | 271 FX_BOOL GSUSESKIP; |
272 FX_BYTE GSBPP; | 272 uint8_t GSBPP; |
273 FX_DWORD GSW, | 273 FX_DWORD GSW, |
274 GSH; | 274 GSH; |
275 FX_BYTE GSTEMPLATE; | 275 uint8_t GSTEMPLATE; |
276 CJBig2_Image *GSKIP; | 276 CJBig2_Image *GSKIP; |
277 }; | 277 }; |
278 #endif | 278 #endif |
OLD | NEW |