summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2')
-rw-r--r--core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp2
-rw-r--r--core/fxcodec/jbig2/JBig2_ArithIntDecoder.h2
-rw-r--r--core/fxcodec/jbig2/JBig2_BitStream.cpp28
-rw-r--r--core/fxcodec/jbig2/JBig2_BitStream.h34
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.cpp36
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.h8
-rw-r--r--core/fxcodec/jbig2/JBig2_GrdProc.cpp104
-rw-r--r--core/fxcodec/jbig2/JBig2_GrdProc.h6
-rw-r--r--core/fxcodec/jbig2/JBig2_GrrdProc.cpp32
-rw-r--r--core/fxcodec/jbig2/JBig2_GrrdProc.h4
-rw-r--r--core/fxcodec/jbig2/JBig2_GsidProc.cpp22
-rw-r--r--core/fxcodec/jbig2/JBig2_GsidProc.h8
-rw-r--r--core/fxcodec/jbig2/JBig2_HtrdProc.cpp20
-rw-r--r--core/fxcodec/jbig2/JBig2_HtrdProc.h10
-rw-r--r--core/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp6
-rw-r--r--core/fxcodec/jbig2/JBig2_HuffmanTable.cpp12
-rw-r--r--core/fxcodec/jbig2/JBig2_HuffmanTable.h6
-rw-r--r--core/fxcodec/jbig2/JBig2_Image.cpp102
-rw-r--r--core/fxcodec/jbig2/JBig2_Page.h8
-rw-r--r--core/fxcodec/jbig2/JBig2_PatternDict.cpp2
-rw-r--r--core/fxcodec/jbig2/JBig2_PatternDict.h2
-rw-r--r--core/fxcodec/jbig2/JBig2_PddProc.cpp4
-rw-r--r--core/fxcodec/jbig2/JBig2_PddProc.h2
-rw-r--r--core/fxcodec/jbig2/JBig2_SddProc.cpp52
-rw-r--r--core/fxcodec/jbig2/JBig2_SddProc.h6
-rw-r--r--core/fxcodec/jbig2/JBig2_Segment.h14
-rw-r--r--core/fxcodec/jbig2/JBig2_TrdProc.cpp34
-rw-r--r--core/fxcodec/jbig2/JBig2_TrdProc.h10
28 files changed, 288 insertions, 288 deletions
diff --git a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
index 720b96ec36..6be90941d6 100644
--- a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
+++ b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
@@ -81,7 +81,7 @@ CJBig2_ArithIaidDecoder::CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA)
CJBig2_ArithIaidDecoder::~CJBig2_ArithIaidDecoder() {}
void CJBig2_ArithIaidDecoder::decode(CJBig2_ArithDecoder* pArithDecoder,
- FX_DWORD* nResult) {
+ uint32_t* nResult) {
int PREV = 1;
for (unsigned char i = 0; i < SBSYMCODELEN; ++i) {
JBig2ArithCtx* pCX = &m_IAID[PREV];
diff --git a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h
index 50327cc151..f1eb68d5df 100644
--- a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h
+++ b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h
@@ -30,7 +30,7 @@ class CJBig2_ArithIaidDecoder {
explicit CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA);
~CJBig2_ArithIaidDecoder();
- void decode(CJBig2_ArithDecoder* pArithDecoder, FX_DWORD* nResult);
+ void decode(CJBig2_ArithDecoder* pArithDecoder, uint32_t* nResult);
private:
std::vector<JBig2ArithCtx> m_IAID;
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.cpp b/core/fxcodec/jbig2/JBig2_BitStream.cpp
index 4ca4be16d4..ddf092dbc4 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.cpp
+++ b/core/fxcodec/jbig2/JBig2_BitStream.cpp
@@ -26,8 +26,8 @@ CJBig2_BitStream::CJBig2_BitStream(CPDF_StreamAcc* pSrcStream)
CJBig2_BitStream::~CJBig2_BitStream() {}
-int32_t CJBig2_BitStream::readNBits(FX_DWORD dwBits, FX_DWORD* dwResult) {
- FX_DWORD dwBitPos = getBitPos();
+int32_t CJBig2_BitStream::readNBits(uint32_t dwBits, uint32_t* dwResult) {
+ uint32_t dwBitPos = getBitPos();
if (dwBitPos > LengthInBits())
return -1;
@@ -45,8 +45,8 @@ int32_t CJBig2_BitStream::readNBits(FX_DWORD dwBits, FX_DWORD* dwResult) {
return 0;
}
-int32_t CJBig2_BitStream::readNBits(FX_DWORD dwBits, int32_t* nResult) {
- FX_DWORD dwBitPos = getBitPos();
+int32_t CJBig2_BitStream::readNBits(uint32_t dwBits, int32_t* nResult) {
+ uint32_t dwBitPos = getBitPos();
if (dwBitPos > LengthInBits())
return -1;
@@ -64,7 +64,7 @@ int32_t CJBig2_BitStream::readNBits(FX_DWORD dwBits, int32_t* nResult) {
return 0;
}
-int32_t CJBig2_BitStream::read1Bit(FX_DWORD* dwResult) {
+int32_t CJBig2_BitStream::read1Bit(uint32_t* dwResult) {
if (!IsInBound())
return -1;
@@ -91,7 +91,7 @@ int32_t CJBig2_BitStream::read1Byte(uint8_t* cResult) {
return 0;
}
-int32_t CJBig2_BitStream::readInteger(FX_DWORD* dwResult) {
+int32_t CJBig2_BitStream::readInteger(uint32_t* dwResult) {
if (m_dwByteIdx + 3 >= m_dwLength)
return -1;
@@ -134,19 +134,19 @@ uint8_t CJBig2_BitStream::getNextByte_arith() const {
return m_dwByteIdx + 1 < m_dwLength ? m_pBuf[m_dwByteIdx + 1] : 0xFF;
}
-FX_DWORD CJBig2_BitStream::getOffset() const {
+uint32_t CJBig2_BitStream::getOffset() const {
return m_dwByteIdx;
}
-void CJBig2_BitStream::setOffset(FX_DWORD dwOffset) {
+void CJBig2_BitStream::setOffset(uint32_t dwOffset) {
m_dwByteIdx = std::min(dwOffset, m_dwLength);
}
-FX_DWORD CJBig2_BitStream::getBitPos() const {
+uint32_t CJBig2_BitStream::getBitPos() const {
return (m_dwByteIdx << 3) + m_dwBitIdx;
}
-void CJBig2_BitStream::setBitPos(FX_DWORD dwBitPos) {
+void CJBig2_BitStream::setBitPos(uint32_t dwBitPos) {
m_dwByteIdx = dwBitPos >> 3;
m_dwBitIdx = dwBitPos & 7;
}
@@ -159,11 +159,11 @@ const uint8_t* CJBig2_BitStream::getPointer() const {
return m_pBuf + m_dwByteIdx;
}
-void CJBig2_BitStream::offset(FX_DWORD dwOffset) {
+void CJBig2_BitStream::offset(uint32_t dwOffset) {
m_dwByteIdx += dwOffset;
}
-FX_DWORD CJBig2_BitStream::getByteLeft() const {
+uint32_t CJBig2_BitStream::getByteLeft() const {
return m_dwLength - m_dwByteIdx;
}
@@ -180,10 +180,10 @@ bool CJBig2_BitStream::IsInBound() const {
return m_dwByteIdx < m_dwLength;
}
-FX_DWORD CJBig2_BitStream::LengthInBits() const {
+uint32_t CJBig2_BitStream::LengthInBits() const {
return m_dwLength << 3;
}
-FX_DWORD CJBig2_BitStream::getObjNum() const {
+uint32_t CJBig2_BitStream::getObjNum() const {
return m_dwObjNum;
}
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.h b/core/fxcodec/jbig2/JBig2_BitStream.h
index 45eb44c46a..191438fee7 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.h
+++ b/core/fxcodec/jbig2/JBig2_BitStream.h
@@ -17,39 +17,39 @@ class CJBig2_BitStream {
~CJBig2_BitStream();
// TODO(thestig): readFoo() should return bool.
- int32_t readNBits(FX_DWORD nBits, FX_DWORD* dwResult);
- int32_t readNBits(FX_DWORD nBits, int32_t* nResult);
- int32_t read1Bit(FX_DWORD* dwResult);
+ int32_t readNBits(uint32_t nBits, uint32_t* dwResult);
+ int32_t readNBits(uint32_t nBits, int32_t* nResult);
+ int32_t read1Bit(uint32_t* dwResult);
int32_t read1Bit(FX_BOOL* bResult);
int32_t read1Byte(uint8_t* cResult);
- int32_t readInteger(FX_DWORD* dwResult);
+ int32_t readInteger(uint32_t* dwResult);
int32_t readShortInteger(uint16_t* wResult);
void alignByte();
uint8_t getCurByte() const;
void incByteIdx();
uint8_t getCurByte_arith() const;
uint8_t getNextByte_arith() const;
- FX_DWORD getOffset() const;
- void setOffset(FX_DWORD dwOffset);
- FX_DWORD getBitPos() const;
- void setBitPos(FX_DWORD dwBitPos);
+ uint32_t getOffset() const;
+ void setOffset(uint32_t dwOffset);
+ uint32_t getBitPos() const;
+ void setBitPos(uint32_t dwBitPos);
const uint8_t* getBuf() const;
- FX_DWORD getLength() const { return m_dwLength; }
+ uint32_t getLength() const { return m_dwLength; }
const uint8_t* getPointer() const;
- void offset(FX_DWORD dwOffset);
- FX_DWORD getByteLeft() const;
- FX_DWORD getObjNum() const;
+ void offset(uint32_t dwOffset);
+ uint32_t getByteLeft() const;
+ uint32_t getObjNum() const;
private:
void AdvanceBit();
bool IsInBound() const;
- FX_DWORD LengthInBits() const;
+ uint32_t LengthInBits() const;
const uint8_t* m_pBuf;
- FX_DWORD m_dwLength;
- FX_DWORD m_dwByteIdx;
- FX_DWORD m_dwBitIdx;
- const FX_DWORD m_dwObjNum;
+ uint32_t m_dwLength;
+ uint32_t m_dwByteIdx;
+ uint32_t m_dwBitIdx;
+ const uint32_t m_dwObjNum;
CJBig2_BitStream(const CJBig2_BitStream&) = delete;
void operator=(const CJBig2_BitStream&) = delete;
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index da020a6a75..1c316a0dd2 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -230,7 +230,7 @@ int32_t CJBig2_Context::Continue(IFX_Pause* pPause) {
return nRet;
}
-CJBig2_Segment* CJBig2_Context::findSegmentByNumber(FX_DWORD dwNumber) {
+CJBig2_Segment* CJBig2_Context::findSegmentByNumber(uint32_t dwNumber) {
if (m_pGlobalContext) {
CJBig2_Segment* pSeg = m_pGlobalContext->findSegmentByNumber(dwNumber);
if (pSeg) {
@@ -267,11 +267,11 @@ int32_t CJBig2_Context::parseSegmentHeader(CJBig2_Segment* pSegment) {
return JBIG2_ERROR_TOO_SHORT;
}
- FX_DWORD dwTemp;
+ uint32_t dwTemp;
uint8_t cTemp = m_pStream->getCurByte();
if ((cTemp >> 5) == 7) {
if (m_pStream->readInteger(
- (FX_DWORD*)&pSegment->m_nReferred_to_segment_count) != 0) {
+ (uint32_t*)&pSegment->m_nReferred_to_segment_count) != 0) {
return JBIG2_ERROR_TOO_SHORT;
}
pSegment->m_nReferred_to_segment_count &= 0x1fffffff;
@@ -292,7 +292,7 @@ int32_t CJBig2_Context::parseSegmentHeader(CJBig2_Segment* pSegment) {
uint8_t cPSize = pSegment->m_cFlags.s.page_association_size ? 4 : 1;
if (pSegment->m_nReferred_to_segment_count) {
pSegment->m_pReferred_to_segment_numbers =
- FX_Alloc(FX_DWORD, pSegment->m_nReferred_to_segment_count);
+ FX_Alloc(uint32_t, pSegment->m_nReferred_to_segment_count);
for (int32_t i = 0; i < pSegment->m_nReferred_to_segment_count; ++i) {
switch (cSSize) {
case 1:
@@ -396,7 +396,7 @@ int32_t CJBig2_Context::ProcessingParseSegmentData(CJBig2_Segment* pSegment,
pPageInfo->m_bIsStriped = TRUE;
if (!m_bBufSpecified) {
- FX_DWORD height =
+ uint32_t height =
bMaxHeight ? pPageInfo->m_wMaxStripeSize : pPageInfo->m_dwHeight;
m_pPage.reset(new CJBig2_Image(pPageInfo->m_dwWidth, height));
}
@@ -449,8 +449,8 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
uint8_t cSDHUFFBMSIZE = (wFlags >> 6) & 0x0001;
uint8_t cSDHUFFAGGINST = (wFlags >> 7) & 0x0001;
if (pSymbolDictDecoder->SDHUFF == 0) {
- const FX_DWORD dwTemp = (pSymbolDictDecoder->SDTEMPLATE == 0) ? 8 : 2;
- for (FX_DWORD i = 0; i < dwTemp; ++i) {
+ const uint32_t dwTemp = (pSymbolDictDecoder->SDTEMPLATE == 0) ? 8 : 2;
+ for (uint32_t i = 0; i < dwTemp; ++i) {
if (m_pStream->read1Byte((uint8_t*)&pSymbolDictDecoder->SDAT[i]) != 0)
return JBIG2_ERROR_TOO_SHORT;
}
@@ -488,7 +488,7 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
std::unique_ptr<CJBig2_Image*, FxFreeDeleter> SDINSYMS;
if (pSymbolDictDecoder->SDNUMINSYMS != 0) {
SDINSYMS.reset(FX_Alloc(CJBig2_Image*, pSymbolDictDecoder->SDNUMINSYMS));
- FX_DWORD dwTemp = 0;
+ uint32_t dwTemp = 0;
for (int32_t i = 0; i < pSegment->m_nReferred_to_segment_count; ++i) {
CJBig2_Segment* pSeg =
findSegmentByNumber(pSegment->m_pReferred_to_segment_numbers[i]);
@@ -665,7 +665,7 @@ int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) {
pTRD->SBH = ri.height;
pTRD->SBHUFF = wFlags & 0x0001;
pTRD->SBREFINE = (wFlags >> 1) & 0x0001;
- FX_DWORD dwTemp = (wFlags >> 2) & 0x0003;
+ uint32_t dwTemp = (wFlags >> 2) & 0x0003;
pTRD->SBSTRIPS = 1 << dwTemp;
pTRD->REFCORNER = (JBig2Corner)((wFlags >> 4) & 0x0003);
pTRD->TRANSPOSED = (wFlags >> 6) & 0x0001;
@@ -751,7 +751,7 @@ int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) {
pTRD->SBSYMCODES = SBSYMCODES.get();
} else {
dwTemp = 0;
- while ((FX_DWORD)(1 << dwTemp) < pTRD->SBNUMSYMS) {
+ while ((uint32_t)(1 << dwTemp) < pTRD->SBNUMSYMS) {
++dwTemp;
}
pTRD->SBSYMCODELEN = (uint8_t)dwTemp;
@@ -999,8 +999,8 @@ int32_t CJBig2_Context::parseHalftoneRegion(CJBig2_Segment* pSegment,
m_pStream->read1Byte(&cFlags) != 0 ||
m_pStream->readInteger(&pHRD->HGW) != 0 ||
m_pStream->readInteger(&pHRD->HGH) != 0 ||
- m_pStream->readInteger((FX_DWORD*)&pHRD->HGX) != 0 ||
- m_pStream->readInteger((FX_DWORD*)&pHRD->HGY) != 0 ||
+ m_pStream->readInteger((uint32_t*)&pHRD->HGX) != 0 ||
+ m_pStream->readInteger((uint32_t*)&pHRD->HGY) != 0 ||
m_pStream->readShortInteger(&pHRD->HRX) != 0 ||
m_pStream->readShortInteger(&pHRD->HRY) != 0) {
return JBIG2_ERROR_TOO_SHORT;
@@ -1261,10 +1261,10 @@ int32_t CJBig2_Context::parseTable(CJBig2_Segment* pSegment) {
}
int32_t CJBig2_Context::parseRegionInfo(JBig2RegionInfo* pRI) {
- if (m_pStream->readInteger((FX_DWORD*)&pRI->width) != 0 ||
- m_pStream->readInteger((FX_DWORD*)&pRI->height) != 0 ||
- m_pStream->readInteger((FX_DWORD*)&pRI->x) != 0 ||
- m_pStream->readInteger((FX_DWORD*)&pRI->y) != 0 ||
+ if (m_pStream->readInteger((uint32_t*)&pRI->width) != 0 ||
+ m_pStream->readInteger((uint32_t*)&pRI->height) != 0 ||
+ m_pStream->readInteger((uint32_t*)&pRI->x) != 0 ||
+ m_pStream->readInteger((uint32_t*)&pRI->y) != 0 ||
m_pStream->read1Byte(&pRI->flags) != 0) {
return JBIG2_ERROR_TOO_SHORT;
}
@@ -1273,7 +1273,7 @@ int32_t CJBig2_Context::parseRegionInfo(JBig2RegionInfo* pRI) {
JBig2HuffmanCode* CJBig2_Context::decodeSymbolIDHuffmanTable(
CJBig2_BitStream* pStream,
- FX_DWORD SBNUMSYMS) {
+ uint32_t SBNUMSYMS) {
const size_t kRunCodesSize = 35;
int32_t runcodes[kRunCodesSize];
int32_t runcodes_len[kRunCodesSize];
@@ -1291,7 +1291,7 @@ JBig2HuffmanCode* CJBig2_Context::decodeSymbolIDHuffmanTable(
int32_t j;
int32_t nVal = 0;
int32_t nBits = 0;
- FX_DWORD nTemp;
+ uint32_t nTemp;
while (true) {
if (pStream->read1Bit(&nTemp) != 0)
return nullptr;
diff --git a/core/fxcodec/jbig2/JBig2_Context.h b/core/fxcodec/jbig2/JBig2_Context.h
index aff3b1bb38..4a32e61489 100644
--- a/core/fxcodec/jbig2/JBig2_Context.h
+++ b/core/fxcodec/jbig2/JBig2_Context.h
@@ -23,7 +23,7 @@ class CPDF_StreamAcc;
class IFX_Pause;
// Cache is keyed by the ObjNum of a stream and an index within the stream.
-using CJBig2_CacheKey = std::pair<FX_DWORD, FX_DWORD>;
+using CJBig2_CacheKey = std::pair<uint32_t, uint32_t>;
// NB: CJBig2_SymbolDict* is owned.
using CJBig2_CachePair = std::pair<CJBig2_CacheKey, CJBig2_SymbolDict*>;
@@ -74,7 +74,7 @@ class CJBig2_Context {
int32_t decode_RandomOrgnazation(IFX_Pause* pPause);
- CJBig2_Segment* findSegmentByNumber(FX_DWORD dwNumber);
+ CJBig2_Segment* findSegmentByNumber(uint32_t dwNumber);
CJBig2_Segment* findReferredSegmentByTypeAndIndex(CJBig2_Segment* pSegment,
uint8_t cType,
@@ -103,7 +103,7 @@ class CJBig2_Context {
int32_t parseRegionInfo(JBig2RegionInfo* pRI);
JBig2HuffmanCode* decodeSymbolIDHuffmanTable(CJBig2_BitStream* pStream,
- FX_DWORD SBNUMSYMS);
+ uint32_t SBNUMSYMS);
void huffman_assign_code(int* CODES, int* PREFLEN, int NTEMP);
@@ -125,7 +125,7 @@ class CJBig2_Context {
std::unique_ptr<CJBig2_GRDProc> m_pGRD;
JBig2ArithCtx* m_gbContext;
std::unique_ptr<CJBig2_Segment> m_pSegment;
- FX_DWORD m_dwOffset;
+ uint32_t m_dwOffset;
JBig2RegionInfo m_ri;
std::list<CJBig2_CachePair>* const m_pSymbolDictCache;
bool m_bIsGlobal;
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrdProc.cpp
index a3fc33c2be..5f3b47f659 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.cpp
@@ -66,8 +66,8 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template0_opt3(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2;
+ uint32_t CONTEXT;
+ uint32_t line1, line2;
uint8_t *pLine, *pLine1, *pLine2, cVal;
int32_t nStride, nStride2, k;
int32_t nLineBytes, nBitsLeft, cc;
@@ -81,8 +81,8 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template0_opt3(
nStride2 = nStride << 1;
nLineBytes = ((GBW + 7) >> 3) - 1;
nBitsLeft = GBW - (nLineBytes << 3);
- FX_DWORD height = GBH & 0x7fffffff;
- for (FX_DWORD h = 0; h < height; h++) {
+ uint32_t height = GBH & 0x7fffffff;
+ for (uint32_t h = 0; h < height; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x9b25]);
LTP = LTP ^ SLTP;
@@ -156,12 +156,12 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template0_unopt(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2, line3;
+ uint32_t CONTEXT;
+ uint32_t line1, line2, line3;
LTP = 0;
std::unique_ptr<CJBig2_Image> GBREG(new CJBig2_Image(GBW, GBH));
GBREG->fill(0);
- for (FX_DWORD h = 0; h < GBH; h++) {
+ for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x9b25]);
LTP = LTP ^ SLTP;
@@ -175,7 +175,7 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template0_unopt(
line2 |= GBREG->getPixel(1, h - 1) << 1;
line2 |= GBREG->getPixel(0, h - 1) << 2;
line3 = 0;
- for (FX_DWORD w = 0; w < GBW; w++) {
+ for (uint32_t w = 0; w < GBW; w++) {
if (USESKIP && SKIP->getPixel(w, h)) {
bVal = 0;
} else {
@@ -204,8 +204,8 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template1_opt3(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2;
+ uint32_t CONTEXT;
+ uint32_t line1, line2;
uint8_t *pLine, *pLine1, *pLine2, cVal;
int32_t nStride, nStride2, k;
int32_t nLineBytes, nBitsLeft, cc;
@@ -219,7 +219,7 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template1_opt3(
nStride2 = nStride << 1;
nLineBytes = ((GBW + 7) >> 3) - 1;
nBitsLeft = GBW - (nLineBytes << 3);
- for (FX_DWORD h = 0; h < GBH; h++) {
+ for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0795]);
LTP = LTP ^ SLTP;
@@ -293,12 +293,12 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template1_unopt(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2, line3;
+ uint32_t CONTEXT;
+ uint32_t line1, line2, line3;
LTP = 0;
std::unique_ptr<CJBig2_Image> GBREG(new CJBig2_Image(GBW, GBH));
GBREG->fill(0);
- for (FX_DWORD h = 0; h < GBH; h++) {
+ for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0795]);
LTP = LTP ^ SLTP;
@@ -313,7 +313,7 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template1_unopt(
line2 |= GBREG->getPixel(1, h - 1) << 1;
line2 |= GBREG->getPixel(0, h - 1) << 2;
line3 = 0;
- for (FX_DWORD w = 0; w < GBW; w++) {
+ for (uint32_t w = 0; w < GBW; w++) {
if (USESKIP && SKIP->getPixel(w, h)) {
bVal = 0;
} else {
@@ -338,8 +338,8 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template2_opt3(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2;
+ uint32_t CONTEXT;
+ uint32_t line1, line2;
uint8_t *pLine, *pLine1, *pLine2, cVal;
int32_t nStride, nStride2, k;
int32_t nLineBytes, nBitsLeft, cc;
@@ -353,7 +353,7 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template2_opt3(
nStride2 = nStride << 1;
nLineBytes = ((GBW + 7) >> 3) - 1;
nBitsLeft = GBW - (nLineBytes << 3);
- for (FX_DWORD h = 0; h < GBH; h++) {
+ for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x00e5]);
LTP = LTP ^ SLTP;
@@ -427,12 +427,12 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template2_unopt(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2, line3;
+ uint32_t CONTEXT;
+ uint32_t line1, line2, line3;
LTP = 0;
std::unique_ptr<CJBig2_Image> GBREG(new CJBig2_Image(GBW, GBH));
GBREG->fill(0);
- for (FX_DWORD h = 0; h < GBH; h++) {
+ for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x00e5]);
LTP = LTP ^ SLTP;
@@ -445,7 +445,7 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template2_unopt(
line2 = GBREG->getPixel(1, h - 1);
line2 |= GBREG->getPixel(0, h - 1) << 1;
line3 = 0;
- for (FX_DWORD w = 0; w < GBW; w++) {
+ for (uint32_t w = 0; w < GBW; w++) {
if (USESKIP && SKIP->getPixel(w, h)) {
bVal = 0;
} else {
@@ -471,8 +471,8 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template3_opt3(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1;
+ uint32_t CONTEXT;
+ uint32_t line1;
uint8_t *pLine, *pLine1, cVal;
int32_t nStride, k;
int32_t nLineBytes, nBitsLeft, cc;
@@ -485,7 +485,7 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template3_opt3(
nStride = GBREG->m_nStride;
nLineBytes = ((GBW + 7) >> 3) - 1;
nBitsLeft = GBW - (nLineBytes << 3);
- for (FX_DWORD h = 0; h < GBH; h++) {
+ for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0195]);
LTP = LTP ^ SLTP;
@@ -546,12 +546,12 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template3_unopt(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2;
+ uint32_t CONTEXT;
+ uint32_t line1, line2;
LTP = 0;
std::unique_ptr<CJBig2_Image> GBREG(new CJBig2_Image(GBW, GBH));
GBREG->fill(0);
- for (FX_DWORD h = 0; h < GBH; h++) {
+ for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0195]);
LTP = LTP ^ SLTP;
@@ -562,7 +562,7 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith_Template3_unopt(
line1 = GBREG->getPixel(1, h - 1);
line1 |= GBREG->getPixel(0, h - 1) << 1;
line2 = 0;
- for (FX_DWORD w = 0; w < GBW; w++) {
+ for (uint32_t w = 0; w < GBW; w++) {
if (USESKIP && SKIP->getPixel(w, h)) {
bVal = 0;
} else {
@@ -673,7 +673,7 @@ FXCODEC_STATUS CJBig2_GRDProc::Start_decode_MMR(CJBig2_Image** pImage,
FaxG4Decode(pStream->getBuf(), pStream->getLength(), &bitpos,
(*pImage)->m_pData, GBW, GBH, (*pImage)->m_nStride);
pStream->setBitPos(bitpos);
- for (i = 0; (FX_DWORD)i < (*pImage)->m_nStride * GBH; i++) {
+ for (i = 0; (uint32_t)i < (*pImage)->m_nStride * GBH; i++) {
(*pImage)->m_pData[i] = ~(*pImage)->m_pData[i];
}
m_ProssiveStatus = FXCODEC_STATUS_DECODE_FINISH;
@@ -698,8 +698,8 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_opt3(
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
FX_BOOL SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2;
+ uint32_t CONTEXT;
+ uint32_t line1, line2;
uint8_t *pLine1, *pLine2, cVal;
int32_t nStride, nStride2, k;
int32_t nLineBytes, nBitsLeft, cc;
@@ -710,7 +710,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_opt3(
nStride2 = nStride << 1;
nLineBytes = ((GBW + 7) >> 3) - 1;
nBitsLeft = GBW - (nLineBytes << 3);
- FX_DWORD height = GBH & 0x7fffffff;
+ uint32_t height = GBH & 0x7fffffff;
for (; m_loopIndex < height; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x9b25]);
@@ -793,8 +793,8 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_unopt(
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
FX_BOOL SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2, line3;
+ uint32_t CONTEXT;
+ uint32_t line1, line2, line3;
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x9b25]);
@@ -809,7 +809,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_unopt(
line2 |= pImage->getPixel(1, m_loopIndex - 1) << 1;
line2 |= pImage->getPixel(0, m_loopIndex - 1) << 2;
line3 = 0;
- for (FX_DWORD w = 0; w < GBW; w++) {
+ for (uint32_t w = 0; w < GBW; w++) {
if (USESKIP && SKIP->getPixel(w, m_loopIndex)) {
bVal = 0;
} else {
@@ -848,8 +848,8 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_opt3(
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
FX_BOOL SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2;
+ uint32_t CONTEXT;
+ uint32_t line1, line2;
uint8_t *pLine1, *pLine2, cVal;
int32_t nStride, nStride2, k;
int32_t nLineBytes, nBitsLeft, cc;
@@ -942,9 +942,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_unopt(
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
FX_BOOL SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2, line3;
- for (FX_DWORD h = 0; h < GBH; h++) {
+ uint32_t CONTEXT;
+ uint32_t line1, line2, line3;
+ for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0795]);
LTP = LTP ^ SLTP;
@@ -959,7 +959,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_unopt(
line2 |= pImage->getPixel(1, h - 1) << 1;
line2 |= pImage->getPixel(0, h - 1) << 2;
line3 = 0;
- for (FX_DWORD w = 0; w < GBW; w++) {
+ for (uint32_t w = 0; w < GBW; w++) {
if (USESKIP && SKIP->getPixel(w, h)) {
bVal = 0;
} else {
@@ -993,8 +993,8 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_opt3(
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
FX_BOOL SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2;
+ uint32_t CONTEXT;
+ uint32_t line1, line2;
uint8_t *pLine1, *pLine2, cVal;
int32_t nStride, nStride2, k;
int32_t nLineBytes, nBitsLeft, cc;
@@ -1087,8 +1087,8 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_unopt(
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
FX_BOOL SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2, line3;
+ uint32_t CONTEXT;
+ uint32_t line1, line2, line3;
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x00e5]);
@@ -1102,7 +1102,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_unopt(
line2 = pImage->getPixel(1, m_loopIndex - 1);
line2 |= pImage->getPixel(0, m_loopIndex - 1) << 1;
line3 = 0;
- for (FX_DWORD w = 0; w < GBW; w++) {
+ for (uint32_t w = 0; w < GBW; w++) {
if (USESKIP && SKIP->getPixel(w, m_loopIndex)) {
bVal = 0;
} else {
@@ -1138,8 +1138,8 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_opt3(
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
FX_BOOL SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1;
+ uint32_t CONTEXT;
+ uint32_t line1;
uint8_t *pLine1, cVal;
int32_t nStride, k;
int32_t nLineBytes, nBitsLeft, cc;
@@ -1218,8 +1218,8 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_unopt(
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
FX_BOOL SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2;
+ uint32_t CONTEXT;
+ uint32_t line1, line2;
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0195]);
@@ -1231,7 +1231,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_unopt(
line1 = pImage->getPixel(1, m_loopIndex - 1);
line1 |= pImage->getPixel(0, m_loopIndex - 1) << 1;
line2 = 0;
- for (FX_DWORD w = 0; w < GBW; w++) {
+ for (uint32_t w = 0; w < GBW; w++) {
if (USESKIP && SKIP->getPixel(w, m_loopIndex)) {
bVal = 0;
} else {
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h
index 2a638aa8d6..f6a5448769 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.h
@@ -35,8 +35,8 @@ class CJBig2_GRDProc {
FX_RECT GetReplaceRect() const { return m_ReplaceRect; }
FX_BOOL MMR;
- FX_DWORD GBW;
- FX_DWORD GBH;
+ uint32_t GBW;
+ uint32_t GBH;
uint8_t GBTEMPLATE;
FX_BOOL TPGDON;
FX_BOOL USESKIP;
@@ -109,7 +109,7 @@ class CJBig2_GRDProc {
CJBig2_Image* decode_Arith_Template3_unopt(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext);
- FX_DWORD m_loopIndex;
+ uint32_t m_loopIndex;
uint8_t* m_pLine;
IFX_Pause* m_pPause;
FXCODEC_STATUS m_ProssiveStatus;
diff --git a/core/fxcodec/jbig2/JBig2_GrrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
index c6ff3dd647..17d17d558e 100644
--- a/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
@@ -20,13 +20,13 @@ CJBig2_Image* CJBig2_GRRDProc::decode(CJBig2_ArithDecoder* pArithDecoder,
if (GRTEMPLATE == 0) {
if ((GRAT[0] == -1) && (GRAT[1] == -1) && (GRAT[2] == -1) &&
(GRAT[3] == -1) && (GRREFERENCEDX == 0) &&
- (GRW == (FX_DWORD)GRREFERENCE->m_nWidth)) {
+ (GRW == (uint32_t)GRREFERENCE->m_nWidth)) {
return decode_Template0_opt(pArithDecoder, grContext);
}
return decode_Template0_unopt(pArithDecoder, grContext);
}
- if ((GRREFERENCEDX == 0) && (GRW == (FX_DWORD)GRREFERENCE->m_nWidth))
+ if ((GRREFERENCEDX == 0) && (GRW == (uint32_t)GRREFERENCE->m_nWidth))
return decode_Template1_opt(pArithDecoder, grContext);
return decode_Template1_unopt(pArithDecoder, grContext);
}
@@ -35,12 +35,12 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template0_unopt(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* grContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2, line3, line4, line5;
+ uint32_t CONTEXT;
+ uint32_t line1, line2, line3, line4, line5;
LTP = 0;
std::unique_ptr<CJBig2_Image> GRREG(new CJBig2_Image(GRW, GRH));
GRREG->fill(0);
- for (FX_DWORD h = 0; h < GRH; h++) {
+ for (uint32_t h = 0; h < GRH; h++) {
if (TPGRON) {
SLTP = pArithDecoder->DECODE(&grContext[0x0010]);
LTP = LTP ^ SLTP;
@@ -61,7 +61,7 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template0_unopt(
<< 1;
line5 |= GRREFERENCE->getPixel(-GRREFERENCEDX - 1, h - GRREFERENCEDY + 1)
<< 2;
- for (FX_DWORD w = 0; w < GRW; w++) {
+ for (uint32_t w = 0; w < GRW; w++) {
CONTEXT = line5;
CONTEXT |= line4 << 3;
CONTEXT |= line3 << 6;
@@ -104,7 +104,7 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template0_unopt(
<< 1;
line5 |= GRREFERENCE->getPixel(-GRREFERENCEDX - 1, h - GRREFERENCEDY + 1)
<< 2;
- for (FX_DWORD w = 0; w < GRW; w++) {
+ for (uint32_t w = 0; w < GRW; w++) {
bVal = GRREFERENCE->getPixel(w, h);
if (!(TPGRON && (bVal == GRREFERENCE->getPixel(w - 1, h - 1)) &&
(bVal == GRREFERENCE->getPixel(w, h - 1)) &&
@@ -153,8 +153,8 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template0_opt(
return nullptr;
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line1_r, line2_r, line3_r;
+ uint32_t CONTEXT;
+ uint32_t line1, line1_r, line2_r, line3_r;
uint8_t *pLine, *pLineR, cVal;
intptr_t nStride, nStrideR, nOffset;
int32_t k, nBits;
@@ -287,12 +287,12 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template1_unopt(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* grContext) {
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line2, line3, line4, line5;
+ uint32_t CONTEXT;
+ uint32_t line1, line2, line3, line4, line5;
LTP = 0;
std::unique_ptr<CJBig2_Image> GRREG(new CJBig2_Image(GRW, GRH));
GRREG->fill(0);
- for (FX_DWORD h = 0; h < GRH; h++) {
+ for (uint32_t h = 0; h < GRH; h++) {
if (TPGRON) {
SLTP = pArithDecoder->DECODE(&grContext[0x0008]);
LTP = LTP ^ SLTP;
@@ -310,7 +310,7 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template1_unopt(
line5 = GRREFERENCE->getPixel(-GRREFERENCEDX + 1, h - GRREFERENCEDY + 1);
line5 |= GRREFERENCE->getPixel(-GRREFERENCEDX, h - GRREFERENCEDY + 1)
<< 1;
- for (FX_DWORD w = 0; w < GRW; w++) {
+ for (uint32_t w = 0; w < GRW; w++) {
CONTEXT = line5;
CONTEXT |= line4 << 2;
CONTEXT |= line3 << 5;
@@ -346,7 +346,7 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template1_unopt(
line5 = GRREFERENCE->getPixel(-GRREFERENCEDX + 1, h - GRREFERENCEDY + 1);
line5 |= GRREFERENCE->getPixel(-GRREFERENCEDX, h - GRREFERENCEDY + 1)
<< 1;
- for (FX_DWORD w = 0; w < GRW; w++) {
+ for (uint32_t w = 0; w < GRW; w++) {
bVal = GRREFERENCE->getPixel(w, h);
if (!(TPGRON && (bVal == GRREFERENCE->getPixel(w - 1, h - 1)) &&
(bVal == GRREFERENCE->getPixel(w, h - 1)) &&
@@ -391,8 +391,8 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template1_opt(
return nullptr;
FX_BOOL LTP, SLTP, bVal;
- FX_DWORD CONTEXT;
- FX_DWORD line1, line1_r, line2_r, line3_r;
+ uint32_t CONTEXT;
+ uint32_t line1, line1_r, line2_r, line3_r;
uint8_t *pLine, *pLineR, cVal;
intptr_t nStride, nStrideR, nOffset;
int32_t k, nBits;
diff --git a/core/fxcodec/jbig2/JBig2_GrrdProc.h b/core/fxcodec/jbig2/JBig2_GrrdProc.h
index 2c6d02d271..17adf1900e 100644
--- a/core/fxcodec/jbig2/JBig2_GrrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrrdProc.h
@@ -30,8 +30,8 @@ class CJBig2_GRRDProc {
CJBig2_Image* decode_Template1_opt(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* grContext);
- FX_DWORD GRW;
- FX_DWORD GRH;
+ uint32_t GRW;
+ uint32_t GRH;
FX_BOOL GRTEMPLATE;
CJBig2_Image* GRREFERENCE;
int32_t GRREFERENCEDX;
diff --git a/core/fxcodec/jbig2/JBig2_GsidProc.cpp b/core/fxcodec/jbig2/JBig2_GsidProc.cpp
index 2ac96fc9d8..30f95b8200 100644
--- a/core/fxcodec/jbig2/JBig2_GsidProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GsidProc.cpp
@@ -14,7 +14,7 @@
#include "core/fxcodec/jbig2/JBig2_List.h"
#include "core/fxcrt/include/fx_basic.h"
-FX_DWORD* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
+uint32_t* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
std::unique_ptr<CJBig2_GRDProc> pGRD(new CJBig2_GRDProc());
@@ -56,11 +56,11 @@ FX_DWORD* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
if (i < GSBPP - 1)
pImage->composeFrom(0, 0, GSPLANES.get(i + 1), JBIG2_COMPOSE_XOR);
}
- std::unique_ptr<FX_DWORD, FxFreeDeleter> GSVALS(
- FX_Alloc2D(FX_DWORD, GSW, GSH));
- JBIG2_memset(GSVALS.get(), 0, sizeof(FX_DWORD) * GSW * GSH);
- for (FX_DWORD y = 0; y < GSH; ++y) {
- for (FX_DWORD x = 0; x < GSW; ++x) {
+ std::unique_ptr<uint32_t, FxFreeDeleter> GSVALS(
+ FX_Alloc2D(uint32_t, GSW, GSH));
+ JBIG2_memset(GSVALS.get(), 0, sizeof(uint32_t) * GSW * GSH);
+ for (uint32_t y = 0; y < GSH; ++y) {
+ for (uint32_t x = 0; x < GSW; ++x) {
for (int32_t i = 0; i < GSBPP; ++i) {
GSVALS.get()[y * GSW + x] |= GSPLANES.get(i)->getPixel(x, y) << i;
}
@@ -69,7 +69,7 @@ FX_DWORD* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
return GSVALS.release();
}
-FX_DWORD* CJBig2_GSIDProc::decode_MMR(CJBig2_BitStream* pStream,
+uint32_t* CJBig2_GSIDProc::decode_MMR(CJBig2_BitStream* pStream,
IFX_Pause* pPause) {
std::unique_ptr<CJBig2_GRDProc> pGRD(new CJBig2_GRDProc());
pGRD->MMR = GSMMR;
@@ -106,10 +106,10 @@ FX_DWORD* CJBig2_GSIDProc::decode_MMR(CJBig2_BitStream* pStream,
JBIG2_COMPOSE_XOR);
J = J - 1;
}
- std::unique_ptr<FX_DWORD> GSVALS(FX_Alloc2D(FX_DWORD, GSW, GSH));
- JBIG2_memset(GSVALS.get(), 0, sizeof(FX_DWORD) * GSW * GSH);
- for (FX_DWORD y = 0; y < GSH; ++y) {
- for (FX_DWORD x = 0; x < GSW; ++x) {
+ std::unique_ptr<uint32_t> GSVALS(FX_Alloc2D(uint32_t, GSW, GSH));
+ JBIG2_memset(GSVALS.get(), 0, sizeof(uint32_t) * GSW * GSH);
+ for (uint32_t y = 0; y < GSH; ++y) {
+ for (uint32_t x = 0; x < GSW; ++x) {
for (J = 0; J < GSBPP; ++J) {
GSVALS.get()[y * GSW + x] |= GSPLANES.get()[J]->getPixel(x, y) << J;
}
diff --git a/core/fxcodec/jbig2/JBig2_GsidProc.h b/core/fxcodec/jbig2/JBig2_GsidProc.h
index 8124db54d2..b3bd022f03 100644
--- a/core/fxcodec/jbig2/JBig2_GsidProc.h
+++ b/core/fxcodec/jbig2/JBig2_GsidProc.h
@@ -17,18 +17,18 @@ struct JBig2ArithCtx;
class CJBig2_GSIDProc {
public:
- FX_DWORD* decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
+ uint32_t* decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext,
IFX_Pause* pPause);
- FX_DWORD* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause);
+ uint32_t* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause);
public:
FX_BOOL GSMMR;
FX_BOOL GSUSESKIP;
uint8_t GSBPP;
- FX_DWORD GSW;
- FX_DWORD GSH;
+ uint32_t GSW;
+ uint32_t GSH;
uint8_t GSTEMPLATE;
CJBig2_Image* GSKIP;
};
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
index a9f15343d2..aaa617cd73 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
@@ -14,10 +14,10 @@
CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
- FX_DWORD ng, mg;
+ uint32_t ng, mg;
int32_t x, y;
- FX_DWORD HBPP;
- FX_DWORD* GI;
+ uint32_t HBPP;
+ uint32_t* GI;
std::unique_ptr<CJBig2_Image> HSKIP;
std::unique_ptr<CJBig2_Image> HTREG(new CJBig2_Image(HBW, HBH));
HTREG->fill(HDEFPIXEL);
@@ -37,7 +37,7 @@ CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
}
}
HBPP = 1;
- while ((FX_DWORD)(1 << HBPP) < HNUMPATS) {
+ while ((uint32_t)(1 << HBPP) < HNUMPATS) {
HBPP++;
}
std::unique_ptr<CJBig2_GSIDProc> pGID(new CJBig2_GSIDProc());
@@ -56,7 +56,7 @@ CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
for (ng = 0; ng < HGW; ng++) {
x = (HGX + mg * HRY + ng * HRX) >> 8;
y = (HGY + mg * HRX - ng * HRY) >> 8;
- FX_DWORD pat_index = GI[mg * HGW + ng];
+ uint32_t pat_index = GI[mg * HGW + ng];
if (pat_index >= HNUMPATS) {
pat_index = HNUMPATS - 1;
}
@@ -69,13 +69,13 @@ CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
CJBig2_Image* CJBig2_HTRDProc::decode_MMR(CJBig2_BitStream* pStream,
IFX_Pause* pPause) {
- FX_DWORD ng, mg;
+ uint32_t ng, mg;
int32_t x, y;
- FX_DWORD* GI;
+ uint32_t* GI;
std::unique_ptr<CJBig2_Image> HTREG(new CJBig2_Image(HBW, HBH));
HTREG->fill(HDEFPIXEL);
- FX_DWORD HBPP = 1;
- while ((FX_DWORD)(1 << HBPP) < HNUMPATS) {
+ uint32_t HBPP = 1;
+ while ((uint32_t)(1 << HBPP) < HNUMPATS) {
HBPP++;
}
std::unique_ptr<CJBig2_GSIDProc> pGID(new CJBig2_GSIDProc());
@@ -92,7 +92,7 @@ CJBig2_Image* CJBig2_HTRDProc::decode_MMR(CJBig2_BitStream* pStream,
for (ng = 0; ng < HGW; ng++) {
x = (HGX + mg * HRY + ng * HRX) >> 8;
y = (HGY + mg * HRX - ng * HRY) >> 8;
- FX_DWORD pat_index = GI[mg * HGW + ng];
+ uint32_t pat_index = GI[mg * HGW + ng];
if (pat_index >= HNUMPATS) {
pat_index = HNUMPATS - 1;
}
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h
index 62ae57d9c9..b4f55c6124 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h
@@ -24,17 +24,17 @@ class CJBig2_HTRDProc {
CJBig2_Image* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause);
public:
- FX_DWORD HBW;
- FX_DWORD HBH;
+ uint32_t HBW;
+ uint32_t HBH;
FX_BOOL HMMR;
uint8_t HTEMPLATE;
- FX_DWORD HNUMPATS;
+ uint32_t HNUMPATS;
CJBig2_Image** HPATS;
FX_BOOL HDEFPIXEL;
JBig2ComposeOp HCOMBOP;
FX_BOOL HENABLESKIP;
- FX_DWORD HGW;
- FX_DWORD HGH;
+ uint32_t HGW;
+ uint32_t HGH;
int32_t HGX;
int32_t HGY;
uint16_t HRX;
diff --git a/core/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp b/core/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp
index afcc17a55e..050b5e6074 100644
--- a/core/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp
+++ b/core/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp
@@ -18,13 +18,13 @@ int CJBig2_HuffmanDecoder::decodeAValue(CJBig2_HuffmanTable* pTable,
int nVal = 0;
int nBits = 0;
while (1) {
- FX_DWORD nTmp;
+ uint32_t nTmp;
if (m_pStream->read1Bit(&nTmp) == -1)
break;
nVal = (nVal << 1) | nTmp;
++nBits;
- for (FX_DWORD i = 0; i < pTable->Size(); ++i) {
+ for (uint32_t i = 0; i < pTable->Size(); ++i) {
if (pTable->GetPREFLEN()[i] == nBits && pTable->GetCODES()[i] == nVal) {
if (pTable->IsHTOOB() && i == pTable->Size() - 1)
return JBIG2_OOB;
@@ -32,7 +32,7 @@ int CJBig2_HuffmanDecoder::decodeAValue(CJBig2_HuffmanTable* pTable,
if (m_pStream->readNBits(pTable->GetRANGELEN()[i], &nTmp) == -1)
return -1;
- FX_DWORD offset = pTable->IsHTOOB() ? 3 : 2;
+ uint32_t offset = pTable->IsHTOOB() ? 3 : 2;
if (i == pTable->Size() - offset)
*nResult = pTable->GetRANGELOW()[i] - nTmp;
else
diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp b/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp
index 7b1855113d..038921e740 100644
--- a/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp
+++ b/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp
@@ -15,7 +15,7 @@
#include "core/fxcrt/include/fx_memory.h"
CJBig2_HuffmanTable::CJBig2_HuffmanTable(const JBig2TableLine* pTable,
- FX_DWORD nLines,
+ uint32_t nLines,
bool bHTOOB)
: m_bOK(true), HTOOB(bHTOOB), NTEMP(nLines) {
ParseFromStandardTable(pTable);
@@ -32,7 +32,7 @@ void CJBig2_HuffmanTable::ParseFromStandardTable(const JBig2TableLine* pTable) {
PREFLEN.resize(NTEMP);
RANGELEN.resize(NTEMP);
RANGELOW.resize(NTEMP);
- for (FX_DWORD i = 0; i < NTEMP; ++i) {
+ for (uint32_t i = 0; i < NTEMP; ++i) {
PREFLEN[i] = pTable[i].PREFLEN;
RANGELEN[i] = pTable[i].RANDELEN;
RANGELOW[i] = pTable[i].RANGELOW;
@@ -48,8 +48,8 @@ bool CJBig2_HuffmanTable::ParseFromCodedBuffer(CJBig2_BitStream* pStream) {
HTOOB = !!(cTemp & 0x01);
unsigned char HTPS = ((cTemp >> 1) & 0x07) + 1;
unsigned char HTRS = ((cTemp >> 4) & 0x07) + 1;
- FX_DWORD HTLOW;
- FX_DWORD HTHIGH;
+ uint32_t HTLOW;
+ uint32_t HTHIGH;
if (pStream->readInteger(&HTLOW) == -1 ||
pStream->readInteger(&HTHIGH) == -1) {
return false;
@@ -99,7 +99,7 @@ bool CJBig2_HuffmanTable::ParseFromCodedBuffer(CJBig2_BitStream* pStream) {
void CJBig2_HuffmanTable::InitCodes() {
int lenmax = 0;
- for (FX_DWORD i = 0; i < NTEMP; ++i)
+ for (uint32_t i = 0; i < NTEMP; ++i)
lenmax = std::max(PREFLEN[i], lenmax);
CODES.resize(NTEMP);
@@ -113,7 +113,7 @@ void CJBig2_HuffmanTable::InitCodes() {
for (int i = 1; i <= lenmax; ++i) {
FIRSTCODE[i] = (FIRSTCODE[i - 1] + LENCOUNT[i - 1]) << 1;
int CURCODE = FIRSTCODE[i];
- for (FX_DWORD j = 0; j < NTEMP; ++j) {
+ for (uint32_t j = 0; j < NTEMP; ++j) {
if (PREFLEN[j] == i)
CODES[j] = CURCODE++;
}
diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable.h b/core/fxcodec/jbig2/JBig2_HuffmanTable.h
index 7a31cf60dd..9b29847e4d 100644
--- a/core/fxcodec/jbig2/JBig2_HuffmanTable.h
+++ b/core/fxcodec/jbig2/JBig2_HuffmanTable.h
@@ -17,7 +17,7 @@ struct JBig2TableLine;
class CJBig2_HuffmanTable {
public:
CJBig2_HuffmanTable(const JBig2TableLine* pTable,
- FX_DWORD nLines,
+ uint32_t nLines,
bool bHTOOB);
explicit CJBig2_HuffmanTable(CJBig2_BitStream* pStream);
@@ -25,7 +25,7 @@ class CJBig2_HuffmanTable {
~CJBig2_HuffmanTable();
bool IsHTOOB() const { return HTOOB; }
- FX_DWORD Size() const { return NTEMP; }
+ uint32_t Size() const { return NTEMP; }
const std::vector<int>& GetCODES() const { return CODES; }
const std::vector<int>& GetPREFLEN() const { return PREFLEN; }
const std::vector<int>& GetRANGELEN() const { return RANGELEN; }
@@ -40,7 +40,7 @@ class CJBig2_HuffmanTable {
bool m_bOK;
bool HTOOB;
- FX_DWORD NTEMP;
+ uint32_t NTEMP;
std::vector<int> CODES;
std::vector<int> PREFLEN;
std::vector<int> RANGELEN;
diff --git a/core/fxcodec/jbig2/JBig2_Image.cpp b/core/fxcodec/jbig2/JBig2_Image.cpp
index bb3674000f..7297199112 100644
--- a/core/fxcodec/jbig2/JBig2_Image.cpp
+++ b/core/fxcodec/jbig2/JBig2_Image.cpp
@@ -149,14 +149,14 @@ FX_BOOL CJBig2_Image::composeFrom(int32_t x,
return pSrc->composeTo(this, x, y, op, pSrcRect);
}
#define JBIG2_GETDWORD(buf) \
- ((FX_DWORD)(((buf)[0] << 24) | ((buf)[1] << 16) | ((buf)[2] << 8) | (buf)[3]))
+ ((uint32_t)(((buf)[0] << 24) | ((buf)[1] << 16) | ((buf)[2] << 8) | (buf)[3]))
CJBig2_Image* CJBig2_Image::subImage(int32_t x,
int32_t y,
int32_t w,
int32_t h) {
int32_t m, n, j;
uint8_t *pLineSrc, *pLineDst;
- FX_DWORD wTmp;
+ uint32_t wTmp;
uint8_t *pSrc, *pSrcEnd, *pDst, *pDstEnd;
if (w == 0 || h == 0) {
return NULL;
@@ -180,7 +180,7 @@ CJBig2_Image* CJBig2_Image::subImage(int32_t x,
pDst = pLineDst;
pDstEnd = pLineDst + pImage->m_nStride;
for (; pDst < pDstEnd; pSrc += 4, pDst += 4) {
- *((FX_DWORD*)pDst) = *((FX_DWORD*)pSrc);
+ *((uint32_t*)pDst) = *((uint32_t*)pSrc);
}
pLineSrc += m_nStride;
pLineDst += pImage->m_nStride;
@@ -213,9 +213,9 @@ void CJBig2_Image::expand(int32_t h, FX_BOOL v) {
if (!m_pData || h <= m_nHeight) {
return;
}
- FX_DWORD dwH = pdfium::base::checked_cast<FX_DWORD>(h);
- FX_DWORD dwStride = pdfium::base::checked_cast<FX_DWORD>(m_nStride);
- FX_DWORD dwHeight = pdfium::base::checked_cast<FX_DWORD>(m_nHeight);
+ uint32_t dwH = pdfium::base::checked_cast<uint32_t>(h);
+ uint32_t dwStride = pdfium::base::checked_cast<uint32_t>(m_nStride);
+ uint32_t dwHeight = pdfium::base::checked_cast<uint32_t>(m_nHeight);
FX_SAFE_DWORD safeMemSize = dwH;
safeMemSize *= dwStride;
if (!safeMemSize.IsValid()) {
@@ -240,7 +240,7 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
int32_t xs0 = 0, ys0 = 0, xs1 = 0, ys1 = 0, xd0 = 0, yd0 = 0, xd1 = 0,
yd1 = 0, xx = 0, yy = 0, w = 0, h = 0, middleDwords = 0, lineLeft = 0;
- FX_DWORD s1 = 0, d1 = 0, d2 = 0, shift = 0, shift1 = 0, shift2 = 0, tmp = 0,
+ uint32_t s1 = 0, d1 = 0, d2 = 0, shift = 0, shift1 = 0, shift2 = 0, tmp = 0,
tmp1 = 0, tmp2 = 0, maskL = 0, maskR = 0, maskM = 0;
uint8_t *lineSrc = NULL, *lineDst = NULL, *sp = NULL, *dp = NULL;
@@ -700,11 +700,11 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
if ((xd0 & ~31) == ((xd1 - 1) & ~31)) {
if ((xs0 & ~31) == ((xs1 - 1) & ~31)) {
if (s1 > d1) {
- FX_DWORD shift = s1 - d1;
+ uint32_t shift = s1 - d1;
for (int32_t yy = yd0; yy < yd1; yy++) {
- FX_DWORD tmp1 = JBIG2_GETDWORD(lineSrc) << shift;
- FX_DWORD tmp2 = JBIG2_GETDWORD(lineDst);
- FX_DWORD tmp = 0;
+ uint32_t tmp1 = JBIG2_GETDWORD(lineSrc) << shift;
+ uint32_t tmp2 = JBIG2_GETDWORD(lineDst);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskM) | ((tmp1 | tmp2) & maskM);
@@ -730,11 +730,11 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
lineDst += pDst->m_nStride;
}
} else {
- FX_DWORD shift = d1 - s1;
+ uint32_t shift = d1 - s1;
for (int32_t yy = yd0; yy < yd1; yy++) {
- FX_DWORD tmp1 = JBIG2_GETDWORD(lineSrc) >> shift;
- FX_DWORD tmp2 = JBIG2_GETDWORD(lineDst);
- FX_DWORD tmp = 0;
+ uint32_t tmp1 = JBIG2_GETDWORD(lineSrc) >> shift;
+ uint32_t tmp2 = JBIG2_GETDWORD(lineDst);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskM) | ((tmp1 | tmp2) & maskM);
@@ -761,13 +761,13 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
}
}
} else {
- FX_DWORD shift1 = s1 - d1;
- FX_DWORD shift2 = 32 - shift1;
+ uint32_t shift1 = s1 - d1;
+ uint32_t shift2 = 32 - shift1;
for (int32_t yy = yd0; yy < yd1; yy++) {
- FX_DWORD tmp1 = (JBIG2_GETDWORD(lineSrc) << shift1) |
+ uint32_t tmp1 = (JBIG2_GETDWORD(lineSrc) << shift1) |
(JBIG2_GETDWORD(lineSrc + 4) >> shift2);
- FX_DWORD tmp2 = JBIG2_GETDWORD(lineDst);
- FX_DWORD tmp = 0;
+ uint32_t tmp2 = JBIG2_GETDWORD(lineDst);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskM) | ((tmp1 | tmp2) & maskM);
@@ -795,17 +795,17 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
}
} else {
if (s1 > d1) {
- FX_DWORD shift1 = s1 - d1;
- FX_DWORD shift2 = 32 - shift1;
+ uint32_t shift1 = s1 - d1;
+ uint32_t shift2 = 32 - shift1;
int32_t middleDwords = (xd1 >> 5) - ((xd0 + 31) >> 5);
for (int32_t yy = yd0; yy < yd1; yy++) {
uint8_t* sp = lineSrc;
uint8_t* dp = lineDst;
if (d1 != 0) {
- FX_DWORD tmp1 = (JBIG2_GETDWORD(sp) << shift1) |
+ uint32_t tmp1 = (JBIG2_GETDWORD(sp) << shift1) |
(JBIG2_GETDWORD(sp + 4) >> shift2);
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskL) | ((tmp1 | tmp2) & maskL);
@@ -831,10 +831,10 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
dp += 4;
}
for (int32_t xx = 0; xx < middleDwords; xx++) {
- FX_DWORD tmp1 = (JBIG2_GETDWORD(sp) << shift1) |
+ uint32_t tmp1 = (JBIG2_GETDWORD(sp) << shift1) |
(JBIG2_GETDWORD(sp + 4) >> shift2);
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = tmp1 | tmp2;
@@ -860,12 +860,12 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
dp += 4;
}
if (d2 != 0) {
- FX_DWORD tmp1 =
+ uint32_t tmp1 =
(JBIG2_GETDWORD(sp) << shift1) |
(((sp + 4) < lineSrc + lineLeft ? JBIG2_GETDWORD(sp + 4) : 0) >>
shift2);
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskR) | ((tmp1 | tmp2) & maskR);
@@ -897,9 +897,9 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
uint8_t* sp = lineSrc;
uint8_t* dp = lineDst;
if (d1 != 0) {
- FX_DWORD tmp1 = JBIG2_GETDWORD(sp);
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp1 = JBIG2_GETDWORD(sp);
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskL) | ((tmp1 | tmp2) & maskL);
@@ -925,9 +925,9 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
dp += 4;
}
for (int32_t xx = 0; xx < middleDwords; xx++) {
- FX_DWORD tmp1 = JBIG2_GETDWORD(sp);
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp1 = JBIG2_GETDWORD(sp);
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = tmp1 | tmp2;
@@ -953,9 +953,9 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
dp += 4;
}
if (d2 != 0) {
- FX_DWORD tmp1 = JBIG2_GETDWORD(sp);
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp1 = JBIG2_GETDWORD(sp);
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskR) | ((tmp1 | tmp2) & maskR);
@@ -982,16 +982,16 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
lineDst += pDst->m_nStride;
}
} else {
- FX_DWORD shift1 = d1 - s1;
- FX_DWORD shift2 = 32 - shift1;
+ uint32_t shift1 = d1 - s1;
+ uint32_t shift2 = 32 - shift1;
int32_t middleDwords = (xd1 >> 5) - ((xd0 + 31) >> 5);
for (int32_t yy = yd0; yy < yd1; yy++) {
uint8_t* sp = lineSrc;
uint8_t* dp = lineDst;
if (d1 != 0) {
- FX_DWORD tmp1 = JBIG2_GETDWORD(sp) >> shift1;
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp1 = JBIG2_GETDWORD(sp) >> shift1;
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskL) | ((tmp1 | tmp2) & maskL);
@@ -1016,10 +1016,10 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
dp += 4;
}
for (int32_t xx = 0; xx < middleDwords; xx++) {
- FX_DWORD tmp1 = (JBIG2_GETDWORD(sp) << shift2) |
+ uint32_t tmp1 = (JBIG2_GETDWORD(sp) << shift2) |
((JBIG2_GETDWORD(sp + 4)) >> shift1);
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = tmp1 | tmp2;
@@ -1045,12 +1045,12 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image* pDst,
dp += 4;
}
if (d2 != 0) {
- FX_DWORD tmp1 =
+ uint32_t tmp1 =
(JBIG2_GETDWORD(sp) << shift2) |
(((sp + 4) < lineSrc + lineLeft ? JBIG2_GETDWORD(sp + 4) : 0) >>
shift1);
- FX_DWORD tmp2 = JBIG2_GETDWORD(dp);
- FX_DWORD tmp = 0;
+ uint32_t tmp2 = JBIG2_GETDWORD(dp);
+ uint32_t tmp = 0;
switch (op) {
case JBIG2_COMPOSE_OR:
tmp = (tmp2 & ~maskR) | ((tmp1 | tmp2) & maskR);
diff --git a/core/fxcodec/jbig2/JBig2_Page.h b/core/fxcodec/jbig2/JBig2_Page.h
index 6a33549145..e9ffa76791 100644
--- a/core/fxcodec/jbig2/JBig2_Page.h
+++ b/core/fxcodec/jbig2/JBig2_Page.h
@@ -10,10 +10,10 @@
#include "core/fxcrt/include/fx_system.h"
struct JBig2PageInfo {
- FX_DWORD m_dwWidth;
- FX_DWORD m_dwHeight;
- FX_DWORD m_dwResolutionX;
- FX_DWORD m_dwResolutionY;
+ uint32_t m_dwWidth;
+ uint32_t m_dwHeight;
+ uint32_t m_dwResolutionX;
+ uint32_t m_dwResolutionY;
uint8_t m_cFlags;
FX_BOOL m_bIsStriped;
uint16_t m_wMaxStripeSize;
diff --git a/core/fxcodec/jbig2/JBig2_PatternDict.cpp b/core/fxcodec/jbig2/JBig2_PatternDict.cpp
index 3db672e86b..e74d83647c 100644
--- a/core/fxcodec/jbig2/JBig2_PatternDict.cpp
+++ b/core/fxcodec/jbig2/JBig2_PatternDict.cpp
@@ -15,7 +15,7 @@ CJBig2_PatternDict::CJBig2_PatternDict() {
CJBig2_PatternDict::~CJBig2_PatternDict() {
if (HDPATS) {
- for (FX_DWORD i = 0; i < NUMPATS; i++) {
+ for (uint32_t i = 0; i < NUMPATS; i++) {
delete HDPATS[i];
}
FX_Free(HDPATS);
diff --git a/core/fxcodec/jbig2/JBig2_PatternDict.h b/core/fxcodec/jbig2/JBig2_PatternDict.h
index 3196fcaaf3..dddd4747f0 100644
--- a/core/fxcodec/jbig2/JBig2_PatternDict.h
+++ b/core/fxcodec/jbig2/JBig2_PatternDict.h
@@ -16,7 +16,7 @@ class CJBig2_PatternDict {
~CJBig2_PatternDict();
- FX_DWORD NUMPATS;
+ uint32_t NUMPATS;
CJBig2_Image** HDPATS;
};
diff --git a/core/fxcodec/jbig2/JBig2_PddProc.cpp b/core/fxcodec/jbig2/JBig2_PddProc.cpp
index 5b67aadb57..12f66c3b7d 100644
--- a/core/fxcodec/jbig2/JBig2_PddProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_PddProc.cpp
@@ -16,7 +16,7 @@ CJBig2_PatternDict* CJBig2_PDDProc::decode_Arith(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext,
IFX_Pause* pPause) {
- FX_DWORD GRAY;
+ uint32_t GRAY;
CJBig2_Image* BHDC = nullptr;
std::unique_ptr<CJBig2_PatternDict> pDict(new CJBig2_PatternDict());
pDict->NUMPATS = GRAYMAX + 1;
@@ -59,7 +59,7 @@ CJBig2_PatternDict* CJBig2_PDDProc::decode_Arith(
CJBig2_PatternDict* CJBig2_PDDProc::decode_MMR(CJBig2_BitStream* pStream,
IFX_Pause* pPause) {
- FX_DWORD GRAY;
+ uint32_t GRAY;
CJBig2_Image* BHDC = nullptr;
std::unique_ptr<CJBig2_PatternDict> pDict(new CJBig2_PatternDict());
pDict->NUMPATS = GRAYMAX + 1;
diff --git a/core/fxcodec/jbig2/JBig2_PddProc.h b/core/fxcodec/jbig2/JBig2_PddProc.h
index ce0089ac14..6bdd186ffc 100644
--- a/core/fxcodec/jbig2/JBig2_PddProc.h
+++ b/core/fxcodec/jbig2/JBig2_PddProc.h
@@ -27,7 +27,7 @@ class CJBig2_PDDProc {
FX_BOOL HDMMR;
uint8_t HDPW;
uint8_t HDPH;
- FX_DWORD GRAYMAX;
+ uint32_t GRAYMAX;
uint8_t HDTEMPLATE;
};
diff --git a/core/fxcodec/jbig2/JBig2_SddProc.cpp b/core/fxcodec/jbig2/JBig2_SddProc.cpp
index 54c0bb9dd6..81d7c89270 100644
--- a/core/fxcodec/jbig2/JBig2_SddProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_SddProc.cpp
@@ -24,18 +24,18 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith(
std::vector<JBig2ArithCtx>* gbContext,
std::vector<JBig2ArithCtx>* grContext) {
CJBig2_Image** SDNEWSYMS;
- FX_DWORD HCHEIGHT, NSYMSDECODED;
+ uint32_t HCHEIGHT, NSYMSDECODED;
int32_t HCDH;
- FX_DWORD SYMWIDTH, TOTWIDTH;
+ uint32_t SYMWIDTH, TOTWIDTH;
int32_t DW;
CJBig2_Image* BS;
- FX_DWORD I, J, REFAGGNINST;
+ uint32_t I, J, REFAGGNINST;
FX_BOOL* EXFLAGS;
- FX_DWORD EXINDEX;
+ uint32_t EXINDEX;
FX_BOOL CUREXFLAG;
- FX_DWORD EXRUNLENGTH;
- FX_DWORD nTmp;
- FX_DWORD SBNUMSYMS;
+ uint32_t EXRUNLENGTH;
+ uint32_t nTmp;
+ uint32_t SBNUMSYMS;
uint8_t SBSYMCODELEN;
int32_t RDXI, RDYI;
CJBig2_Image** SBSYMS;
@@ -55,7 +55,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith(
std::unique_ptr<CJBig2_ArithIntDecoder> IARDW(new CJBig2_ArithIntDecoder);
std::unique_ptr<CJBig2_ArithIntDecoder> IARDH(new CJBig2_ArithIntDecoder);
nTmp = 0;
- while ((FX_DWORD)(1 << nTmp) < (SDNUMINSYMS + SDNUMNEWSYMS)) {
+ while ((uint32_t)(1 << nTmp) < (SDNUMINSYMS + SDNUMNEWSYMS)) {
nTmp++;
}
IAID.reset(new CJBig2_ArithIaidDecoder((uint8_t)nTmp));
@@ -124,7 +124,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith(
pDecoder->SBNUMSYMS = SDNUMINSYMS + NSYMSDECODED;
SBNUMSYMS = pDecoder->SBNUMSYMS;
nTmp = 0;
- while ((FX_DWORD)(1 << nTmp) < SBNUMSYMS) {
+ while ((uint32_t)(1 << nTmp) < SBNUMSYMS) {
nTmp++;
}
SBSYMCODELEN = (uint8_t)nTmp;
@@ -192,7 +192,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith(
FX_Free(SBSYMS);
} else if (REFAGGNINST == 1) {
SBNUMSYMS = SDNUMINSYMS + NSYMSDECODED;
- FX_DWORD IDI;
+ uint32_t IDI;
IAID->decode(pArithDecoder, &IDI);
IARDX->decode(pArithDecoder, &RDXI);
IARDY->decode(pArithDecoder, &RDYI);
@@ -283,26 +283,26 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman(
std::vector<JBig2ArithCtx>* grContext,
IFX_Pause* pPause) {
CJBig2_Image** SDNEWSYMS;
- FX_DWORD* SDNEWSYMWIDTHS;
- FX_DWORD HCHEIGHT, NSYMSDECODED;
+ uint32_t* SDNEWSYMWIDTHS;
+ uint32_t HCHEIGHT, NSYMSDECODED;
int32_t HCDH;
- FX_DWORD SYMWIDTH, TOTWIDTH, HCFIRSTSYM;
+ uint32_t SYMWIDTH, TOTWIDTH, HCFIRSTSYM;
int32_t DW;
CJBig2_Image *BS, *BHC;
- FX_DWORD I, J, REFAGGNINST;
+ uint32_t I, J, REFAGGNINST;
FX_BOOL* EXFLAGS;
- FX_DWORD EXINDEX;
+ uint32_t EXINDEX;
FX_BOOL CUREXFLAG;
- FX_DWORD EXRUNLENGTH;
+ uint32_t EXRUNLENGTH;
int32_t nVal, nBits;
- FX_DWORD nTmp;
- FX_DWORD SBNUMSYMS;
+ uint32_t nTmp;
+ uint32_t SBNUMSYMS;
uint8_t SBSYMCODELEN;
JBig2HuffmanCode* SBSYMCODES;
- FX_DWORD IDI;
+ uint32_t IDI;
int32_t RDXI, RDYI;
- FX_DWORD BMSIZE;
- FX_DWORD stride;
+ uint32_t BMSIZE;
+ uint32_t stride;
CJBig2_Image** SBSYMS;
std::unique_ptr<CJBig2_HuffmanDecoder> pHuffmanDecoder(
new CJBig2_HuffmanDecoder(pStream));
@@ -311,8 +311,8 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman(
SDNEWSYMWIDTHS = nullptr;
BHC = nullptr;
if (SDREFAGG == 0) {
- SDNEWSYMWIDTHS = FX_Alloc(FX_DWORD, SDNUMNEWSYMS);
- FXSYS_memset(SDNEWSYMWIDTHS, 0, SDNUMNEWSYMS * sizeof(FX_DWORD));
+ SDNEWSYMWIDTHS = FX_Alloc(uint32_t, SDNUMNEWSYMS);
+ FXSYS_memset(SDNEWSYMWIDTHS, 0, SDNUMNEWSYMS * sizeof(uint32_t));
}
std::unique_ptr<CJBig2_SymbolDict> pDict(new CJBig2_SymbolDict());
std::unique_ptr<CJBig2_HuffmanTable> pTable;
@@ -370,7 +370,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman(
SBNUMSYMS = pDecoder->SBNUMSYMS;
SBSYMCODES = FX_Alloc(JBig2HuffmanCode, SBNUMSYMS);
nTmp = 1;
- while ((FX_DWORD)(1 << nTmp) < SBNUMSYMS) {
+ while ((uint32_t)(1 << nTmp) < SBNUMSYMS) {
nTmp++;
}
for (I = 0; I < SBNUMSYMS; I++) {
@@ -433,7 +433,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman(
} else if (REFAGGNINST == 1) {
SBNUMSYMS = SDNUMINSYMS + SDNUMNEWSYMS;
nTmp = 1;
- while ((FX_DWORD)(1 << nTmp) < SBNUMSYMS) {
+ while ((uint32_t)(1 << nTmp) < SBNUMSYMS) {
nTmp++;
}
SBSYMCODELEN = (uint8_t)nTmp;
@@ -499,7 +499,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman(
}
pStream->alignByte();
pStream->offset(2);
- if ((FX_DWORD)nVal != (pStream->getOffset() - nTmp)) {
+ if ((uint32_t)nVal != (pStream->getOffset() - nTmp)) {
delete BS;
FX_Free(SBSYMS);
goto failed;
diff --git a/core/fxcodec/jbig2/JBig2_SddProc.h b/core/fxcodec/jbig2/JBig2_SddProc.h
index edfc37263b..4febc8d553 100644
--- a/core/fxcodec/jbig2/JBig2_SddProc.h
+++ b/core/fxcodec/jbig2/JBig2_SddProc.h
@@ -32,10 +32,10 @@ class CJBig2_SDDProc {
public:
FX_BOOL SDHUFF;
FX_BOOL SDREFAGG;
- FX_DWORD SDNUMINSYMS;
+ uint32_t SDNUMINSYMS;
CJBig2_Image** SDINSYMS;
- FX_DWORD SDNUMNEWSYMS;
- FX_DWORD SDNUMEXSYMS;
+ uint32_t SDNUMNEWSYMS;
+ uint32_t SDNUMEXSYMS;
CJBig2_HuffmanTable* SDHUFFDH;
CJBig2_HuffmanTable* SDHUFFDW;
CJBig2_HuffmanTable* SDHUFFBMSIZE;
diff --git a/core/fxcodec/jbig2/JBig2_Segment.h b/core/fxcodec/jbig2/JBig2_Segment.h
index 61550ada09..d89d652699 100644
--- a/core/fxcodec/jbig2/JBig2_Segment.h
+++ b/core/fxcodec/jbig2/JBig2_Segment.h
@@ -35,7 +35,7 @@ class CJBig2_Segment {
~CJBig2_Segment();
- FX_DWORD m_dwNumber;
+ uint32_t m_dwNumber;
union {
struct {
uint8_t type : 6;
@@ -45,13 +45,13 @@ class CJBig2_Segment {
uint8_t c;
} m_cFlags;
int32_t m_nReferred_to_segment_count;
- FX_DWORD* m_pReferred_to_segment_numbers;
- FX_DWORD m_dwPage_association;
- FX_DWORD m_dwData_length;
+ uint32_t* m_pReferred_to_segment_numbers;
+ uint32_t m_dwPage_association;
+ uint32_t m_dwData_length;
- FX_DWORD m_dwHeader_Length;
- FX_DWORD m_dwObjNum;
- FX_DWORD m_dwDataOffset;
+ uint32_t m_dwHeader_Length;
+ uint32_t m_dwObjNum;
+ uint32_t m_dwDataOffset;
JBig2_SegmentState m_State;
JBig2_ResultType m_nResultType;
union {
diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.cpp b/core/fxcodec/jbig2/JBig2_TrdProc.cpp
index 1a078a1592..5b0ef19505 100644
--- a/core/fxcodec/jbig2/JBig2_TrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_TrdProc.cpp
@@ -25,7 +25,7 @@ CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream,
STRIPT *= SBSTRIPS;
STRIPT = -STRIPT;
- FX_DWORD NINSTANCES = 0;
+ uint32_t NINSTANCES = 0;
while (NINSTANCES < SBNUMINSTANCES) {
int32_t DT;
if (pHuffmanDecoder->decodeAValue(SBHUFFDT, &DT) != 0)
@@ -58,8 +58,8 @@ CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream,
}
uint8_t CURT = 0;
if (SBSTRIPS != 1) {
- FX_DWORD nTmp = 1;
- while ((FX_DWORD)(1 << nTmp) < SBSTRIPS) {
+ uint32_t nTmp = 1;
+ while ((uint32_t)(1 << nTmp) < SBSTRIPS) {
nTmp++;
}
int32_t nVal;
@@ -71,9 +71,9 @@ CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream,
int32_t TI = STRIPT + CURT;
int32_t nVal = 0;
int32_t nBits = 0;
- FX_DWORD IDI;
+ uint32_t IDI;
for (;;) {
- FX_DWORD nTmp;
+ uint32_t nTmp;
if (pStream->read1Bit(&nTmp) != 0)
return nullptr;
@@ -109,13 +109,13 @@ CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream,
return nullptr;
}
pStream->alignByte();
- FX_DWORD nTmp = pStream->getOffset();
+ uint32_t nTmp = pStream->getOffset();
CJBig2_Image* IBOI = SBSYMS[IDI];
if (!IBOI)
return nullptr;
- FX_DWORD WOI = IBOI->m_nWidth;
- FX_DWORD HOI = IBOI->m_nHeight;
+ uint32_t WOI = IBOI->m_nWidth;
+ uint32_t HOI = IBOI->m_nHeight;
if ((int)(WOI + RDWI) < 0 || (int)(HOI + RDHI) < 0)
return nullptr;
@@ -142,7 +142,7 @@ CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream,
pStream->alignByte();
pStream->offset(2);
- if ((FX_DWORD)nVal != (pStream->getOffset() - nTmp)) {
+ if ((uint32_t)nVal != (pStream->getOffset() - nTmp)) {
delete IBI;
return nullptr;
}
@@ -150,8 +150,8 @@ CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream,
if (!IBI) {
continue;
}
- FX_DWORD WI = IBI->m_nWidth;
- FX_DWORD HI = IBI->m_nHeight;
+ uint32_t WI = IBI->m_nWidth;
+ uint32_t HI = IBI->m_nHeight;
if (TRANSPOSED == 0 && ((REFCORNER == JBIG2_CORNER_TOPRIGHT) ||
(REFCORNER == JBIG2_CORNER_BOTTOMRIGHT))) {
CURS = CURS + WI - 1;
@@ -270,7 +270,7 @@ CJBig2_Image* CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
STRIPT *= SBSTRIPS;
STRIPT = -STRIPT;
int32_t FIRSTS = 0;
- FX_DWORD NINSTANCES = 0;
+ uint32_t NINSTANCES = 0;
while (NINSTANCES < SBNUMINSTANCES) {
int32_t CURS = 0;
int32_t DT;
@@ -299,7 +299,7 @@ CJBig2_Image* CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
pIAIT->decode(pArithDecoder, &CURT);
int32_t TI = STRIPT + CURT;
- FX_DWORD IDI;
+ uint32_t IDI;
pIAID->decode(pArithDecoder, &IDI);
if (IDI >= SBNUMSYMS)
return nullptr;
@@ -324,8 +324,8 @@ CJBig2_Image* CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
pIARDX->decode(pArithDecoder, &RDXI);
pIARDY->decode(pArithDecoder, &RDYI);
CJBig2_Image* IBOI = SBSYMS[IDI];
- FX_DWORD WOI = IBOI->m_nWidth;
- FX_DWORD HOI = IBOI->m_nHeight;
+ uint32_t WOI = IBOI->m_nWidth;
+ uint32_t HOI = IBOI->m_nHeight;
if ((int)(WOI + RDWI) < 0 || (int)(HOI + RDHI) < 0) {
return nullptr;
}
@@ -347,8 +347,8 @@ CJBig2_Image* CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
if (!pIBI)
return nullptr;
- FX_DWORD WI = pIBI->m_nWidth;
- FX_DWORD HI = pIBI->m_nHeight;
+ uint32_t WI = pIBI->m_nWidth;
+ uint32_t HI = pIBI->m_nHeight;
if (TRANSPOSED == 0 && ((REFCORNER == JBIG2_CORNER_TOPRIGHT) ||
(REFCORNER == JBIG2_CORNER_BOTTOMRIGHT))) {
CURS += WI - 1;
diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.h b/core/fxcodec/jbig2/JBig2_TrdProc.h
index d73e012296..fdad75fb6e 100644
--- a/core/fxcodec/jbig2/JBig2_TrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_TrdProc.h
@@ -50,11 +50,11 @@ class CJBig2_TRDProc {
public:
FX_BOOL SBHUFF;
FX_BOOL SBREFINE;
- FX_DWORD SBW;
- FX_DWORD SBH;
- FX_DWORD SBNUMINSTANCES;
- FX_DWORD SBSTRIPS;
- FX_DWORD SBNUMSYMS;
+ uint32_t SBW;
+ uint32_t SBH;
+ uint32_t SBNUMINSTANCES;
+ uint32_t SBSTRIPS;
+ uint32_t SBNUMSYMS;
JBig2HuffmanCode* SBSYMCODES;
uint8_t SBSYMCODELEN;