| 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_SEGMENT_H_ | 7 #ifndef _JBIG2_SEGMENT_H_ |
| 8 #define _JBIG2_SEGMENT_H_ | 8 #define _JBIG2_SEGMENT_H_ |
| 9 |
| 9 #include "JBig2_Define.h" | 10 #include "JBig2_Define.h" |
| 11 #include "JBig2_HuffmanTable.h" |
| 12 #include "JBig2_PatternDict.h" |
| 10 #include "JBig2_SymbolDict.h" | 13 #include "JBig2_SymbolDict.h" |
| 11 #include "JBig2_PatternDict.h" | 14 |
| 12 #include "JBig2_Module.h" | |
| 13 #include "JBig2_HuffmanTable.h" | |
| 14 #define JBIG2_GET_INT32(buf) \ | 15 #define JBIG2_GET_INT32(buf) \ |
| 15 (((buf)[0] << 24) | ((buf)[1] << 16) | ((buf)[2] << 8) | (buf)[3]) | 16 (((buf)[0] << 24) | ((buf)[1] << 16) | ((buf)[2] << 8) | (buf)[3]) |
| 16 #define JBIG2_GET_INT16(buf) (((buf)[0] << 8) | (buf)[1]) | 17 #define JBIG2_GET_INT16(buf) (((buf)[0] << 8) | (buf)[1]) |
| 17 typedef enum { | 18 typedef enum { |
| 18 JBIG2_SEGMENT_HEADER_UNPARSED, | 19 JBIG2_SEGMENT_HEADER_UNPARSED, |
| 19 JBIG2_SEGMENT_DATA_UNPARSED, | 20 JBIG2_SEGMENT_DATA_UNPARSED, |
| 20 JBIG2_SEGMENT_PARSE_COMPLETE, | 21 JBIG2_SEGMENT_PARSE_COMPLETE, |
| 21 JBIG2_SEGMENT_PAUSED, | 22 JBIG2_SEGMENT_PAUSED, |
| 22 JBIG2_SEGMENT_ERROR | 23 JBIG2_SEGMENT_ERROR |
| 23 } JBig2_SegmentState; | 24 } JBig2_SegmentState; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 42 uint8_t deferred_non_retain : 1; | 43 uint8_t deferred_non_retain : 1; |
| 43 } s; | 44 } s; |
| 44 uint8_t c; | 45 uint8_t c; |
| 45 } m_cFlags; | 46 } m_cFlags; |
| 46 int32_t m_nReferred_to_segment_count; | 47 int32_t m_nReferred_to_segment_count; |
| 47 FX_DWORD* m_pReferred_to_segment_numbers; | 48 FX_DWORD* m_pReferred_to_segment_numbers; |
| 48 FX_DWORD m_dwPage_association; | 49 FX_DWORD m_dwPage_association; |
| 49 FX_DWORD m_dwData_length; | 50 FX_DWORD m_dwData_length; |
| 50 | 51 |
| 51 FX_DWORD m_dwHeader_Length; | 52 FX_DWORD m_dwHeader_Length; |
| 52 uint8_t* m_pData; | 53 const uint8_t* m_pData; |
| 53 JBig2_SegmentState m_State; | 54 JBig2_SegmentState m_State; |
| 54 JBig2_ResultType m_nResultType; | 55 JBig2_ResultType m_nResultType; |
| 55 union { | 56 union { |
| 56 CJBig2_SymbolDict* sd; | 57 CJBig2_SymbolDict* sd; |
| 57 CJBig2_PatternDict* pd; | 58 CJBig2_PatternDict* pd; |
| 58 CJBig2_Image* im; | 59 CJBig2_Image* im; |
| 59 CJBig2_HuffmanTable* ht; | 60 CJBig2_HuffmanTable* ht; |
| 60 void* vd; | 61 void* vd; |
| 61 } m_Result; | 62 } m_Result; |
| 62 }; | 63 }; |
| 63 #endif | 64 #endif |
| OLD | NEW |