| 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> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 int32_t getFirstPage(uint8_t* pBuf, | 50 int32_t getFirstPage(uint8_t* pBuf, |
| 51 int32_t width, | 51 int32_t width, |
| 52 int32_t height, | 52 int32_t height, |
| 53 int32_t stride, | 53 int32_t stride, |
| 54 IFX_Pause* pPause); | 54 IFX_Pause* pPause); |
| 55 | 55 |
| 56 int32_t getFirstPage(CJBig2_Image** image, IFX_Pause* pPause); | 56 int32_t getFirstPage(CJBig2_Image** image, IFX_Pause* pPause); |
| 57 | 57 |
| 58 int32_t Continue(IFX_Pause* pPause); | 58 int32_t Continue(IFX_Pause* pPause); |
| 59 FXCODEC_STATUS GetProcessiveStatus() { return m_ProcessiveStatus; } | 59 FXCODEC_STATUS GetProcessingStatus() { return m_ProcessingStatus; } |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 enum JBig2State { | 62 enum JBig2State { |
| 63 JBIG2_OUT_OF_PAGE = 0, | 63 JBIG2_OUT_OF_PAGE = 0, |
| 64 JBIG2_IN_PAGE, | 64 JBIG2_IN_PAGE, |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 CJBig2_Context(const uint8_t* pGlobalData, | 67 CJBig2_Context(const uint8_t* pGlobalData, |
| 68 FX_DWORD dwGlobalLength, | 68 FX_DWORD dwGlobalLength, |
| 69 const uint8_t* pData, | 69 const uint8_t* pData, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 86 | 86 |
| 87 CJBig2_Segment* findSegmentByNumber(FX_DWORD dwNumber); | 87 CJBig2_Segment* findSegmentByNumber(FX_DWORD dwNumber); |
| 88 | 88 |
| 89 CJBig2_Segment* findReferredSegmentByTypeAndIndex(CJBig2_Segment* pSegment, | 89 CJBig2_Segment* findReferredSegmentByTypeAndIndex(CJBig2_Segment* pSegment, |
| 90 uint8_t cType, | 90 uint8_t cType, |
| 91 int32_t nIndex); | 91 int32_t nIndex); |
| 92 | 92 |
| 93 int32_t parseSegmentHeader(CJBig2_Segment* pSegment); | 93 int32_t parseSegmentHeader(CJBig2_Segment* pSegment); |
| 94 | 94 |
| 95 int32_t parseSegmentData(CJBig2_Segment* pSegment, IFX_Pause* pPause); | 95 int32_t parseSegmentData(CJBig2_Segment* pSegment, IFX_Pause* pPause); |
| 96 int32_t ProcessiveParseSegmentData(CJBig2_Segment* pSegment, | 96 int32_t ProcessingParseSegmentData(CJBig2_Segment* pSegment, |
| 97 IFX_Pause* pPause); | 97 IFX_Pause* pPause); |
| 98 | 98 |
| 99 int32_t parseSymbolDict(CJBig2_Segment* pSegment, IFX_Pause* pPause); | 99 int32_t parseSymbolDict(CJBig2_Segment* pSegment, IFX_Pause* pPause); |
| 100 | 100 |
| 101 int32_t parseTextRegion(CJBig2_Segment* pSegment); | 101 int32_t parseTextRegion(CJBig2_Segment* pSegment); |
| 102 | 102 |
| 103 int32_t parsePatternDict(CJBig2_Segment* pSegment, IFX_Pause* pPause); | 103 int32_t parsePatternDict(CJBig2_Segment* pSegment, IFX_Pause* pPause); |
| 104 | 104 |
| 105 int32_t parseHalftoneRegion(CJBig2_Segment* pSegment, IFX_Pause* pPause); | 105 int32_t parseHalftoneRegion(CJBig2_Segment* pSegment, IFX_Pause* pPause); |
| 106 | 106 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 124 int32_t m_nStreamType; | 124 int32_t m_nStreamType; |
| 125 CJBig2_BitStream* m_pStream; | 125 CJBig2_BitStream* m_pStream; |
| 126 int32_t m_nState; | 126 int32_t m_nState; |
| 127 CJBig2_List<CJBig2_Segment> m_SegmentList; | 127 CJBig2_List<CJBig2_Segment> m_SegmentList; |
| 128 CJBig2_List<JBig2PageInfo> m_PageInfoList; | 128 CJBig2_List<JBig2PageInfo> m_PageInfoList; |
| 129 CJBig2_Image* m_pPage; | 129 CJBig2_Image* m_pPage; |
| 130 FX_BOOL m_bBufSpecified; | 130 FX_BOOL m_bBufSpecified; |
| 131 size_t m_nSegmentDecoded; | 131 size_t m_nSegmentDecoded; |
| 132 IFX_Pause* m_pPause; | 132 IFX_Pause* m_pPause; |
| 133 int32_t m_PauseStep; | 133 int32_t m_PauseStep; |
| 134 FXCODEC_STATUS m_ProcessiveStatus; | 134 FXCODEC_STATUS m_ProcessingStatus; |
| 135 FX_BOOL m_bFirstPage; | 135 FX_BOOL m_bFirstPage; |
| 136 CJBig2_ArithDecoder* m_pArithDecoder; | 136 CJBig2_ArithDecoder* m_pArithDecoder; |
| 137 CJBig2_GRDProc* m_pGRD; | 137 CJBig2_GRDProc* m_pGRD; |
| 138 JBig2ArithCtx* m_gbContext; | 138 JBig2ArithCtx* m_gbContext; |
| 139 nonstd::unique_ptr<CJBig2_Segment> m_pSegment; | 139 nonstd::unique_ptr<CJBig2_Segment> m_pSegment; |
| 140 FX_DWORD m_dwOffset; | 140 FX_DWORD m_dwOffset; |
| 141 JBig2RegionInfo m_ri; | 141 JBig2RegionInfo m_ri; |
| 142 std::list<CJBig2_CachePair>* m_pSymbolDictCache; | 142 std::list<CJBig2_CachePair>* m_pSymbolDictCache; |
| 143 }; | 143 }; |
| 144 #endif | 144 #endif |
| OLD | NEW |