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_CONTEXT_H_ | 7 #ifndef _JBIG2_CONTEXT_H_ |
8 #define _JBIG2_CONTEXT_H_ | 8 #define _JBIG2_CONTEXT_H_ |
9 | 9 |
10 #include <list> | 10 #include <list> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "JBig2_Module.h" | 13 #include "JBig2_Module.h" |
14 #include "JBig2_List.h" | 14 #include "JBig2_List.h" |
15 #include "JBig2_Segment.h" | 15 #include "JBig2_Segment.h" |
16 #include "JBig2_Page.h" | 16 #include "JBig2_Page.h" |
17 #include "JBig2_GeneralDecoder.h" | 17 #include "JBig2_GeneralDecoder.h" |
18 #include "../../../include/fxcodec/fx_codec_def.h" | 18 #include "../../../include/fxcodec/fx_codec_def.h" |
19 | 19 |
20 typedef std::pair<uint8_t*, CJBig2_SymbolDict*> CJBig2_CachePair; | 20 typedef std::pair<uint8_t*, CJBig2_SymbolDict*> CJBig2_CachePair; |
21 typedef enum { | 21 typedef enum { |
22 JBIG2_OUT_OF_PAGE = 0, | 22 JBIG2_OUT_OF_PAGE = 0, |
23 JBIG2_IN_PAGE, | 23 JBIG2_IN_PAGE, |
24 } JBig2State; | 24 } JBig2State; |
25 #define JBIG2_SUCCESS 0 | 25 #define JBIG2_SUCCESS 0 |
26 #define JBIG2_FAILED -1 | 26 #define JBIG2_FAILED -1 |
27 #define JBIG2_ERROR_TOO_SHORT -2 | 27 #define JBIG2_ERROR_TOO_SHORT -2 |
28 #define JBIG2_ERROR_FETAL» » -3 | 28 #define JBIG2_ERROR_FATAL» » -3 |
29 #define JBIG2_END_OF_PAGE 2 | 29 #define JBIG2_END_OF_PAGE 2 |
30 #define JBIG2_END_OF_FILE 3 | 30 #define JBIG2_END_OF_FILE 3 |
31 #define JBIG2_ERROR_FILE_FORMAT -4 | 31 #define JBIG2_ERROR_FILE_FORMAT -4 |
32 #define JBIG2_ERROR_STREAM_TYPE -5 | 32 #define JBIG2_ERROR_STREAM_TYPE -5 |
33 #define JBIG2_ERROR_LIMIT -6 | 33 #define JBIG2_ERROR_LIMIT -6 |
34 #define JBIG2_FILE_STREAM 0 | 34 #define JBIG2_FILE_STREAM 0 |
35 #define JBIG2_SQUENTIAL_STREAM 1 | 35 #define JBIG2_SQUENTIAL_STREAM 1 |
36 #define JBIG2_RANDOM_STREAM 2 | 36 #define JBIG2_RANDOM_STREAM 2 |
37 #define JBIG2_EMBED_STREAM 3 | 37 #define JBIG2_EMBED_STREAM 3 |
38 #define JBIG2_MIN_SEGMENT_SIZE 11 | 38 #define JBIG2_MIN_SEGMENT_SIZE 11 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 FX_BOOL m_bFirstPage; | 132 FX_BOOL m_bFirstPage; |
133 CJBig2_ArithDecoder *m_pArithDecoder; | 133 CJBig2_ArithDecoder *m_pArithDecoder; |
134 CJBig2_GRDProc *m_pGRD; | 134 CJBig2_GRDProc *m_pGRD; |
135 JBig2ArithCtx *m_gbContext; | 135 JBig2ArithCtx *m_gbContext; |
136 CJBig2_Segment *m_pSegment; | 136 CJBig2_Segment *m_pSegment; |
137 FX_DWORD m_dwOffset; | 137 FX_DWORD m_dwOffset; |
138 JBig2RegionInfo m_ri; | 138 JBig2RegionInfo m_ri; |
139 std::list<CJBig2_CachePair>* m_pSymbolDictCache; | 139 std::list<CJBig2_CachePair>* m_pSymbolDictCache; |
140 }; | 140 }; |
141 #endif | 141 #endif |
OLD | NEW |