Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 9
10 #include "../../../include/fxcodec/fx_codec_def.h" 10 #include "../../../include/fxcodec/fx_codec_def.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 FXCODEC_STATUS decode_Arith_Template3_opt3(CJBig2_Image *pImage, CJBig2_Arit hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); 69 FXCODEC_STATUS decode_Arith_Template3_opt3(CJBig2_Image *pImage, CJBig2_Arit hDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause);
70 FXCODEC_STATUS decode_Arith_Template3_unopt(CJBig2_Image * pImage, CJBig2_Ar ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); 70 FXCODEC_STATUS decode_Arith_Template3_unopt(CJBig2_Image * pImage, CJBig2_Ar ithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause);
71 FX_DWORD m_loopIndex; 71 FX_DWORD m_loopIndex;
72 uint8_t * m_pLine; 72 uint8_t * m_pLine;
73 IFX_Pause* m_pPause; 73 IFX_Pause* m_pPause;
74 FXCODEC_STATUS m_ProssiveStatus; 74 FXCODEC_STATUS m_ProssiveStatus;
75 CJBig2_Image** m_pImage; 75 CJBig2_Image** m_pImage;
76 CJBig2_ArithDecoder *m_pArithDecoder; 76 CJBig2_ArithDecoder *m_pArithDecoder;
77 JBig2ArithCtx *m_gbContext; 77 JBig2ArithCtx *m_gbContext;
78 FX_WORD m_DecodeType; 78 FX_WORD m_DecodeType;
79 FX_BOOL LTP; 79 bool LTP;
80 FX_RECT m_ReplaceRect; 80 FX_RECT m_ReplaceRect;
81 private: 81 private:
82 82
83 CJBig2_Image *decode_Arith_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext); 83 CJBig2_Image *decode_Arith_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext);
84 84
85 CJBig2_Image *decode_Arith_Template0_opt2(CJBig2_ArithDecoder *pArithDecoder , JBig2ArithCtx *gbContext); 85 CJBig2_Image *decode_Arith_Template0_opt2(CJBig2_ArithDecoder *pArithDecoder , JBig2ArithCtx *gbContext);
86 86
87 CJBig2_Image *decode_Arith_Template0_opt3(CJBig2_ArithDecoder *pArithDecoder , JBig2ArithCtx *gbContext); 87 CJBig2_Image *decode_Arith_Template0_opt3(CJBig2_ArithDecoder *pArithDecoder , JBig2ArithCtx *gbContext);
88 88
89 CJBig2_Image *decode_Arith_Template0_unopt(CJBig2_ArithDecoder *pArithDecode r, JBig2ArithCtx *gbContext); 89 CJBig2_Image *decode_Arith_Template0_unopt(CJBig2_ArithDecoder *pArithDecode r, JBig2ArithCtx *gbContext);
(...skipping 15 matching lines...) Expand all
105 CJBig2_Image *decode_Arith_Template2_unopt(CJBig2_ArithDecoder *pArithDecode r, JBig2ArithCtx *gbContext); 105 CJBig2_Image *decode_Arith_Template2_unopt(CJBig2_ArithDecoder *pArithDecode r, JBig2ArithCtx *gbContext);
106 106
107 CJBig2_Image *decode_Arith_Template3_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext); 107 CJBig2_Image *decode_Arith_Template3_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext);
108 108
109 CJBig2_Image *decode_Arith_Template3_opt2(CJBig2_ArithDecoder *pArithDecoder , JBig2ArithCtx *gbContext); 109 CJBig2_Image *decode_Arith_Template3_opt2(CJBig2_ArithDecoder *pArithDecoder , JBig2ArithCtx *gbContext);
110 110
111 CJBig2_Image *decode_Arith_Template3_opt3(CJBig2_ArithDecoder *pArithDecoder , JBig2ArithCtx *gbContext); 111 CJBig2_Image *decode_Arith_Template3_opt3(CJBig2_ArithDecoder *pArithDecoder , JBig2ArithCtx *gbContext);
112 112
113 CJBig2_Image *decode_Arith_Template3_unopt(CJBig2_ArithDecoder *pArithDecode r, JBig2ArithCtx *gbContext); 113 CJBig2_Image *decode_Arith_Template3_unopt(CJBig2_ArithDecoder *pArithDecode r, JBig2ArithCtx *gbContext);
114 public: 114 public:
115 FX_BOOL MMR; 115 bool MMR;
116 FX_DWORD GBW; 116 FX_DWORD GBW;
117 FX_DWORD GBH; 117 FX_DWORD GBH;
118 uint8_t GBTEMPLATE; 118 uint8_t GBTEMPLATE;
119 FX_BOOL TPGDON; 119 bool TPGDON;
120 FX_BOOL USESKIP; 120 bool USESKIP;
121 CJBig2_Image * SKIP; 121 CJBig2_Image * SKIP;
122 signed char GBAT[8]; 122 signed char GBAT[8];
123 }; 123 };
124 class CJBig2_GRRDProc : public CJBig2_Object 124 class CJBig2_GRRDProc : public CJBig2_Object
125 { 125 {
126 public: 126 public:
127 127
128 CJBig2_Image *decode(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grCo ntext); 128 CJBig2_Image *decode(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grCo ntext);
129 129
130 CJBig2_Image *decode_Template0_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi g2ArithCtx *grContext); 130 CJBig2_Image *decode_Template0_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi g2ArithCtx *grContext);
131 131
132 CJBig2_Image *decode_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2 ArithCtx *grContext); 132 CJBig2_Image *decode_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2 ArithCtx *grContext);
133 133
134 CJBig2_Image *decode_Template1_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi g2ArithCtx *grContext); 134 CJBig2_Image *decode_Template1_unopt(CJBig2_ArithDecoder *pArithDecoder, JBi g2ArithCtx *grContext);
135 135
136 CJBig2_Image *decode_Template1_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2 ArithCtx *grContext); 136 CJBig2_Image *decode_Template1_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2 ArithCtx *grContext);
137 137
138 CJBig2_Image *decode_V1(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *g rContext); 138 CJBig2_Image *decode_V1(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *g rContext);
139 public: 139 public:
140 FX_DWORD GRW; 140 FX_DWORD GRW;
141 FX_DWORD GRH; 141 FX_DWORD GRH;
142 FX_BOOL GRTEMPLATE; 142 bool GRTEMPLATE;
143 CJBig2_Image *GRREFERENCE; 143 CJBig2_Image *GRREFERENCE;
144 int32_t GRREFERENCEDX; 144 int32_t GRREFERENCEDX;
145 int32_t GRREFERENCEDY; 145 int32_t GRREFERENCEDY;
146 FX_BOOL TPGRON; 146 bool TPGRON;
147 signed char GRAT[4]; 147 signed char GRAT[4];
148 }; 148 };
149 typedef struct { 149 typedef struct {
150 CJBig2_ArithIntDecoder *IADT, 150 CJBig2_ArithIntDecoder *IADT,
151 *IAFS, 151 *IAFS,
152 *IADS, 152 *IADS,
153 *IAIT, 153 *IAIT,
154 *IARI, 154 *IARI,
155 *IARDW, 155 *IARDW,
156 *IARDH, 156 *IARDH,
157 *IARDX, 157 *IARDX,
158 *IARDY; 158 *IARDY;
159 CJBig2_ArithIaidDecoder *IAID; 159 CJBig2_ArithIaidDecoder *IAID;
160 } JBig2IntDecoderState; 160 } JBig2IntDecoderState;
161 class CJBig2_TRDProc : public CJBig2_Object 161 class CJBig2_TRDProc : public CJBig2_Object
162 { 162 {
163 public: 163 public:
164 164
165 CJBig2_Image *decode_Huffman(CJBig2_BitStream *pStream, JBig2ArithCtx *grCon text); 165 CJBig2_Image *decode_Huffman(CJBig2_BitStream *pStream, JBig2ArithCtx *grCon text);
166 166
167 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grContext, 167 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grContext,
168 JBig2IntDecoderState *pIDS = NULL); 168 JBig2IntDecoderState *pIDS = NULL);
169 public: 169 public:
170 FX_BOOL SBHUFF; 170 bool SBHUFF;
171 FX_BOOL SBREFINE; 171 bool SBREFINE;
172 FX_DWORD SBW; 172 FX_DWORD SBW;
173 FX_DWORD SBH; 173 FX_DWORD SBH;
174 FX_DWORD SBNUMINSTANCES; 174 FX_DWORD SBNUMINSTANCES;
175 FX_DWORD SBSTRIPS; 175 FX_DWORD SBSTRIPS;
176 FX_DWORD SBNUMSYMS; 176 FX_DWORD SBNUMSYMS;
177 177
178 JBig2HuffmanCode *SBSYMCODES; 178 JBig2HuffmanCode *SBSYMCODES;
179 uint8_t SBSYMCODELEN; 179 uint8_t SBSYMCODELEN;
180 180
181 CJBig2_Image **SBSYMS; 181 CJBig2_Image **SBSYMS;
182 FX_BOOL SBDEFPIXEL; 182 bool SBDEFPIXEL;
183 183
184 JBig2ComposeOp SBCOMBOP; 184 JBig2ComposeOp SBCOMBOP;
185 FX_BOOL TRANSPOSED; 185 bool TRANSPOSED;
186 186
187 JBig2Corner REFCORNER; 187 JBig2Corner REFCORNER;
188 signed char SBDSOFFSET; 188 signed char SBDSOFFSET;
189 CJBig2_HuffmanTable *SBHUFFFS, 189 CJBig2_HuffmanTable *SBHUFFFS,
190 *SBHUFFDS, 190 *SBHUFFDS,
191 *SBHUFFDT, 191 *SBHUFFDT,
192 *SBHUFFRDW, 192 *SBHUFFRDW,
193 *SBHUFFRDH, 193 *SBHUFFRDH,
194 *SBHUFFRDX, 194 *SBHUFFRDX,
195 *SBHUFFRDY, 195 *SBHUFFRDY,
196 *SBHUFFRSIZE; 196 *SBHUFFRSIZE;
197 FX_BOOL SBRTEMPLATE; 197 bool SBRTEMPLATE;
198 signed char SBRAT[4]; 198 signed char SBRAT[4];
199 }; 199 };
200 class CJBig2_SDDProc : public CJBig2_Object 200 class CJBig2_SDDProc : public CJBig2_Object
201 { 201 {
202 public: 202 public:
203 203
204 CJBig2_SymbolDict *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2Ari thCtx *gbContext, JBig2ArithCtx *grContext); 204 CJBig2_SymbolDict *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2Ari thCtx *gbContext, JBig2ArithCtx *grContext);
205 205
206 CJBig2_SymbolDict *decode_Huffman(CJBig2_BitStream *pStream, JBig2ArithCtx * gbContext, JBig2ArithCtx *grContext, IFX_Pause* pPause); 206 CJBig2_SymbolDict *decode_Huffman(CJBig2_BitStream *pStream, JBig2ArithCtx * gbContext, JBig2ArithCtx *grContext, IFX_Pause* pPause);
207 public: 207 public:
208 FX_BOOL SDHUFF; 208 bool SDHUFF;
209 FX_BOOL SDREFAGG; 209 bool SDREFAGG;
210 FX_DWORD SDNUMINSYMS; 210 FX_DWORD SDNUMINSYMS;
211 CJBig2_Image ** SDINSYMS; 211 CJBig2_Image ** SDINSYMS;
212 FX_DWORD SDNUMNEWSYMS; 212 FX_DWORD SDNUMNEWSYMS;
213 FX_DWORD SDNUMEXSYMS; 213 FX_DWORD SDNUMEXSYMS;
214 CJBig2_HuffmanTable *SDHUFFDH, 214 CJBig2_HuffmanTable *SDHUFFDH,
215 *SDHUFFDW, 215 *SDHUFFDW,
216 *SDHUFFBMSIZE, 216 *SDHUFFBMSIZE,
217 *SDHUFFAGGINST; 217 *SDHUFFAGGINST;
218 uint8_t SDTEMPLATE; 218 uint8_t SDTEMPLATE;
219 signed char SDAT[8]; 219 signed char SDAT[8];
220 FX_BOOL SDRTEMPLATE; 220 bool SDRTEMPLATE;
221 signed char SDRAT[4]; 221 signed char SDRAT[4];
222 }; 222 };
223 class CJBig2_HTRDProc : public CJBig2_Object 223 class CJBig2_HTRDProc : public CJBig2_Object
224 { 224 {
225 public: 225 public:
226 226
227 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause); 227 CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause);
228 228
229 CJBig2_Image *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause); 229 CJBig2_Image *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause);
230 public: 230 public:
231 FX_DWORD HBW, 231 FX_DWORD HBW,
232 HBH; 232 HBH;
233 FX_BOOL HMMR; 233 bool HMMR;
234 uint8_t HTEMPLATE; 234 uint8_t HTEMPLATE;
235 FX_DWORD HNUMPATS; 235 FX_DWORD HNUMPATS;
236 CJBig2_Image **HPATS; 236 CJBig2_Image **HPATS;
237 FX_BOOL HDEFPIXEL; 237 bool HDEFPIXEL;
238 JBig2ComposeOp HCOMBOP; 238 JBig2ComposeOp HCOMBOP;
239 FX_BOOL HENABLESKIP; 239 bool HENABLESKIP;
240 FX_DWORD HGW, 240 FX_DWORD HGW,
241 HGH; 241 HGH;
242 int32_t HGX, 242 int32_t HGX,
243 HGY; 243 HGY;
244 FX_WORD HRX, 244 FX_WORD HRX,
245 HRY; 245 HRY;
246 uint8_t HPW, 246 uint8_t HPW,
247 HPH; 247 HPH;
248 }; 248 };
249 class CJBig2_PDDProc : public CJBig2_Object 249 class CJBig2_PDDProc : public CJBig2_Object
250 { 250 {
251 public: 251 public:
252 252
253 CJBig2_PatternDict *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2Ar ithCtx *gbContext, IFX_Pause* pPause); 253 CJBig2_PatternDict *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2Ar ithCtx *gbContext, IFX_Pause* pPause);
254 254
255 CJBig2_PatternDict *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause) ; 255 CJBig2_PatternDict *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause) ;
256 public: 256 public:
257 FX_BOOL HDMMR; 257 bool HDMMR;
258 uint8_t HDPW, 258 uint8_t HDPW,
259 HDPH; 259 HDPH;
260 FX_DWORD GRAYMAX; 260 FX_DWORD GRAYMAX;
261 uint8_t HDTEMPLATE; 261 uint8_t HDTEMPLATE;
262 }; 262 };
263 class CJBig2_GSIDProc : public CJBig2_Object 263 class CJBig2_GSIDProc : public CJBig2_Object
264 { 264 {
265 public: 265 public:
266 266
267 FX_DWORD *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gb Context, IFX_Pause* pPause); 267 FX_DWORD *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gb Context, IFX_Pause* pPause);
268 268
269 FX_DWORD *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause); 269 FX_DWORD *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause);
270 public: 270 public:
271 FX_BOOL GSMMR; 271 bool GSMMR;
272 FX_BOOL GSUSESKIP; 272 bool GSUSESKIP;
273 uint8_t GSBPP; 273 uint8_t GSBPP;
274 FX_DWORD GSW, 274 FX_DWORD GSW,
275 GSH; 275 GSH;
276 uint8_t GSTEMPLATE; 276 uint8_t GSTEMPLATE;
277 CJBig2_Image *GSKIP; 277 CJBig2_Image *GSKIP;
278 }; 278 };
279 #endif 279 #endif
OLDNEW
« no previous file with comments | « core/src/fxcodec/jbig2/JBig2_Context.cpp ('k') | core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698