1 // Copyright 2015 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_ 8 #define CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_ 9 10 #include <stdint.h> 11 12 #include <memory> 13 #include <vector> 14 15 #include "core/fxcodec/jbig2/JBig2_Image.h" 16 #include "core/fxcrt/span.h" 17 #include "core/fxcrt/unowned_ptr.h" 18 19 class CJBig2_ArithDecoder; 20 class CJBig2_BitStream; 21 class JBig2ArithCtx; 22 class PauseIndicatorIface; 23 24 class CJBig2_HTRDProc { 25 public: 26 CJBig2_HTRDProc(); 27 ~CJBig2_HTRDProc(); 28 29 std::unique_ptr<CJBig2_Image> DecodeArith( 30 CJBig2_ArithDecoder* pArithDecoder, 31 pdfium::span<JBig2ArithCtx> gbContexts, 32 PauseIndicatorIface* pPause); 33 34 std::unique_ptr<CJBig2_Image> DecodeMMR(CJBig2_BitStream* pStream); 35 36 public: 37 uint32_t HBW; 38 uint32_t HBH; 39 bool HMMR; 40 uint8_t HTEMPLATE; 41 uint32_t HNUMPATS; 42 UnownedPtr<const std::vector<std::unique_ptr<CJBig2_Image>>> HPATS; 43 bool HDEFPIXEL; 44 JBig2ComposeOp HCOMBOP; 45 bool HENABLESKIP; 46 uint32_t HGW; 47 uint32_t HGH; 48 int32_t HGX; 49 int32_t HGY; 50 uint16_t HRX; 51 uint16_t HRY; 52 uint8_t HPW; 53 uint8_t HPH; 54 55 private: 56 std::unique_ptr<CJBig2_Image> DecodeImage( 57 const std::vector<std::unique_ptr<CJBig2_Image>>& GSPLANES); 58 }; 59 60 #endif // CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_ 61