7#ifndef CORE_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_
8#define CORE_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_
14#include "core/fxcodec/jbig2/JBig2_ArithDecoder.h"
25 void AddImage(std::unique_ptr<CJBig2_Image> image) {
26 m_SDEXSYMS.push_back(std::move(image));
36 m_gbContext = std::move(gbContext);
39 m_grContext = std::move(grContext);
43 std::vector<JBig2ArithCtx> m_gbContext;
44 std::vector<JBig2ArithCtx> m_grContext;
45 std::vector<std::unique_ptr<CJBig2_Image>> m_SDEXSYMS;
static const size_t kSymbolDictCacheMaxSize
#define JBIG2_MIN_SEGMENT_SIZE
constexpr uint32_t kJBig2MaxNewSymbols
constexpr int32_t kJBig2MaxReferredSegmentCount
constexpr uint32_t kJBig2MaxExportSymbols
constexpr int32_t kJBig2OOB
constexpr int32_t kJBig2MaxImageSize
constexpr uint32_t kJBig2MaxPatternIndex
@ JBIG2_HUFFMAN_TABLE_POINTER
@ JBIG2_SYMBOL_DICT_POINTER
@ JBIG2_PATTERN_DICT_POINTER
@ JBIG2_SEGMENT_DATA_UNPARSED
@ JBIG2_SEGMENT_PARSE_COMPLETE
@ JBIG2_SEGMENT_HEADER_UNPARSED
static std::unique_ptr< CJBig2_Context > Create(pdfium::span< const uint8_t > pGlobalSpan, uint64_t global_key, pdfium::span< const uint8_t > pSrcSpan, uint64_t src_key, std::list< CJBig2_CachePair > *pSymbolDictCache)
static bool HuffmanAssignCode(JBig2HuffmanCode *SBSYMCODES, uint32_t NTEMP)
bool GetFirstPage(pdfium::span< uint8_t > pBuf, int32_t width, int32_t height, int32_t stride, PauseIndicatorIface *pPause)
bool Continue(PauseIndicatorIface *pPause)
FXCODEC_STATUS GetProcessingStatus() const
CJBig2_HuffmanTable(size_t idx)
static constexpr size_t kNumHuffmanTables
const std::vector< int > & GetRANGELEN() const
const std::vector< JBig2HuffmanCode > & GetCODES() const
CJBig2_HuffmanTable(CJBig2_BitStream *pStream)
const std::vector< int > & GetRANGELOW() const
CJBig2_Image(int32_t w, int32_t h, int32_t stride, pdfium::span< uint8_t > pBuf)
bool ComposeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op)
void SetPixel(int32_t x, int32_t y, int v)
std::unique_ptr< CJBig2_Image > SubImage(int32_t x, int32_t y, int32_t w, int32_t h)
CJBig2_Image(int32_t w, int32_t h)
uint8_t * GetLine(int32_t y) const
void CopyLine(int32_t hTo, int32_t hFrom)
CJBig2_Image(const CJBig2_Image &other)
bool ComposeToWithRect(CJBig2_Image *pDst, int32_t x, int32_t y, const FX_RECT &rtSrc, JBig2ComposeOp op)
static bool IsValidImageSize(int32_t w, int32_t h)
int GetPixel(int32_t x, int32_t y) const
bool ComposeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
uint8_t * GetLineUnsafe(int32_t y) const
void Expand(int32_t h, bool v)
bool ComposeFromWithRect(int32_t x, int32_t y, CJBig2_Image *pSrc, const FX_RECT &rtSrc, JBig2ComposeOp op)
CJBig2_PatternDict(uint32_t dict_size)
std::vector< std::unique_ptr< CJBig2_Image > > HDPATS
std::vector< uint32_t > m_Referred_to_segment_numbers
std::unique_ptr< CJBig2_SymbolDict > m_SymbolDict
std::unique_ptr< CJBig2_HuffmanTable > m_HuffmanTable
JBig2_SegmentState m_State
std::unique_ptr< CJBig2_PatternDict > m_PatternDict
JBig2_ResultType m_nResultType
uint8_t deferred_non_retain
uint8_t page_association_size
uint32_t m_dwHeader_Length
int32_t m_nReferred_to_segment_count
uint32_t m_dwPage_association
std::unique_ptr< CJBig2_Image > m_Image
const std::vector< JBig2ArithCtx > & GrContext() const
void SetGbContext(std::vector< JBig2ArithCtx > gbContext)
std::unique_ptr< CJBig2_SymbolDict > DeepCopy() const
const std::vector< JBig2ArithCtx > & GbContext() const
void AddImage(std::unique_ptr< CJBig2_Image > image)
void SetGrContext(std::vector< JBig2ArithCtx > grContext)
CJBig2_Image * GetImage(size_t index) const
virtual bool NeedToPauseNow()=0
uint16_t m_wMaxStripeSize
bool m_bDefaultPixelValue