summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
commit320b2313d19869333ed453af546e61a9fc2b81c9 (patch)
tree25f2eb8a0991ac485ca6354f0d3caf7fd775e732 /core/src/fxcodec/jbig2
parent065e9321b84fc0490f3da9099e8840c65e06868d (diff)
downloadpdfium-320b2313d19869333ed453af546e61a9fc2b81c9.tar.xz
FX_BOOL considered harmful, part 2.
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
Diffstat (limited to 'core/src/fxcodec/jbig2')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_BitStream.h4
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Context.cpp30
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Context.h4
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp114
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h40
-rw-r--r--core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp10
-rw-r--r--core/src/fxcodec/jbig2/JBig2_HuffmanTable.h10
-rw-r--r--core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h30
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Image.cpp60
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Image.h26
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Page.h2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_SymbolDict.h2
13 files changed, 167 insertions, 167 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_BitStream.h b/core/src/fxcodec/jbig2/JBig2_BitStream.h
index ff0b9fcfeb..fcd11f4ddf 100644
--- a/core/src/fxcodec/jbig2/JBig2_BitStream.h
+++ b/core/src/fxcodec/jbig2/JBig2_BitStream.h
@@ -23,7 +23,7 @@ public:
int32_t read1Bit(FX_DWORD *dwResult);
- int32_t read1Bit(FX_BOOL *bResult);
+ int32_t read1Bit(bool *bResult);
int32_t read1Byte(uint8_t *cResult);
@@ -165,7 +165,7 @@ inline int32_t CJBig2_BitStream::read1Bit(FX_DWORD *dwResult)
}
}
-inline int32_t CJBig2_BitStream::read1Bit(FX_BOOL *bResult)
+inline int32_t CJBig2_BitStream::read1Bit(bool *bResult)
{
if(m_dwByteIdx < m_dwLength) {
*bResult = (m_pBuf[m_dwByteIdx] >> (7 - m_dwBitIdx)) & 0x01;
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp
index 68c973547c..0b71c475c2 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp
@@ -47,7 +47,7 @@ CJBig2_Context::CJBig2_Context(uint8_t *pGlobalData, FX_DWORD dwGlobalLength,
JBIG2_ALLOC(m_pSegmentList, CJBig2_List<CJBig2_Segment>);
JBIG2_ALLOC(m_pPageInfoList, CJBig2_List<JBig2PageInfo>(1));
m_pPage = NULL;
- m_bBufSpecified = FALSE;
+ m_bBufSpecified = false;
m_pPause = pPause;
m_nSegmentDecoded = 0;
m_PauseStep = 10;
@@ -231,11 +231,11 @@ int32_t CJBig2_Context::getFirstPage(uint8_t *pBuf, int32_t width, int32_t heigh
return nRet;
}
}
- m_bFirstPage = TRUE;
+ m_bFirstPage = true;
m_PauseStep = 0;
delete m_pPage;
JBIG2_ALLOC(m_pPage, CJBig2_Image(width, height, stride, pBuf));
- m_bBufSpecified = TRUE;
+ m_bBufSpecified = true;
if(m_pPage && pPause && pPause->NeedToPauseNow()) {
m_PauseStep = 1;
m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -298,11 +298,11 @@ int32_t CJBig2_Context::Continue(IFX_Pause* pPause)
int32_t CJBig2_Context::getNextPage(uint8_t *pBuf, int32_t width, int32_t height, int32_t stride, IFX_Pause* pPause)
{
int32_t nRet = JBIG2_ERROR_STREAM_TYPE;
- m_bFirstPage = FALSE;
+ m_bFirstPage = false;
m_PauseStep = 0;
delete m_pPage;
JBIG2_ALLOC(m_pPage, CJBig2_Image(width, height, stride, pBuf));
- m_bBufSpecified = TRUE;
+ m_bBufSpecified = true;
if(m_pPage && pPause && pPause->NeedToPauseNow()) {
m_PauseStep = 1;
m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -330,7 +330,7 @@ int32_t CJBig2_Context::getNextPage(uint8_t *pBuf, int32_t width, int32_t height
int32_t CJBig2_Context::getFirstPage(CJBig2_Image **image, IFX_Pause* pPause)
{
int32_t nRet;
- m_bFirstPage = TRUE;
+ m_bFirstPage = true;
m_PauseStep = 0;
if(m_pGlobalContext) {
nRet = m_pGlobalContext->decode_EmbedOrgnazation(pPause);
@@ -338,14 +338,14 @@ int32_t CJBig2_Context::getFirstPage(CJBig2_Image **image, IFX_Pause* pPause)
return nRet;
}
}
- m_bBufSpecified = FALSE;
+ m_bBufSpecified = false;
return Continue(pPause);
}
int32_t CJBig2_Context::getNextPage(CJBig2_Image **image, IFX_Pause* pPause)
{
int32_t nRet;
- m_bBufSpecified = FALSE;
- m_bFirstPage = FALSE;
+ m_bBufSpecified = false;
+ m_bFirstPage = false;
m_PauseStep = 0;
switch(m_nStreamType) {
case JBIG2_FILE_STREAM:
@@ -601,14 +601,14 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment *pSegment, IFX_Pause* pPa
CJBig2_HuffmanTable *Table_B1 = NULL, *Table_B2 = NULL, *Table_B3 = NULL, *Table_B4 = NULL, *Table_B5 = NULL;
int32_t i, nIndex, nRet;
CJBig2_Segment *pSeg = NULL, *pLRSeg = NULL;
- FX_BOOL bUsed;
+ bool bUsed;
CJBig2_Image ** SDINSYMS = NULL;
CJBig2_SDDProc *pSymbolDictDecoder;
JBig2ArithCtx *gbContext = NULL, *grContext = NULL;
CJBig2_ArithDecoder *pArithDecoder;
JBIG2_ALLOC(pSymbolDictDecoder, CJBig2_SDDProc());
uint8_t *key = pSegment->m_pData;
- FX_BOOL cache_hit = false;
+ bool cache_hit = false;
if(m_pStream->readShortInteger(&wFlags) != 0) {
m_pModule->JBig2_Error("symbol dictionary segment : data header too short.");
nRet = JBIG2_ERROR_TOO_SHORT;
@@ -825,16 +825,16 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment *pSegment, IFX_Pause* pPa
}
}
if(wFlags & 0x0200) {
- pSegment->m_Result.sd->m_bContextRetained = TRUE;
+ pSegment->m_Result.sd->m_bContextRetained = true;
if(pSymbolDictDecoder->SDHUFF == 0) {
pSegment->m_Result.sd->m_gbContext = gbContext;
}
if(pSymbolDictDecoder->SDREFAGG == 1) {
pSegment->m_Result.sd->m_grContext = grContext;
}
- bUsed = TRUE;
+ bUsed = true;
} else {
- bUsed = FALSE;
+ bUsed = false;
}
delete pSymbolDictDecoder;
if(SDINSYMS) {
@@ -845,7 +845,7 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment *pSegment, IFX_Pause* pPa
delete Table_B3;
delete Table_B4;
delete Table_B5;
- if(bUsed == FALSE) {
+ if(bUsed == false) {
if(gbContext) {
m_pModule->JBig2_Free(gbContext);
}
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.h b/core/src/fxcodec/jbig2/JBig2_Context.h
index e6a0d7b3bc..02d4192ee9 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.h
+++ b/core/src/fxcodec/jbig2/JBig2_Context.h
@@ -123,13 +123,13 @@ private:
CJBig2_Image *m_pPage;
- FX_BOOL m_bBufSpecified;
+ bool m_bBufSpecified;
int32_t m_nSegmentDecoded;
IFX_Pause* m_pPause;
int32_t m_PauseStep;
FXCODEC_STATUS m_ProcessiveStatus;
- FX_BOOL m_bFirstPage;
+ bool m_bFirstPage;
CJBig2_ArithDecoder *m_pArithDecoder;
CJBig2_GRDProc *m_pGRD;
JBig2ArithCtx *m_gbContext;
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index cabcd4c634..1e338a5f60 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
@@ -101,7 +101,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2, line3;
@@ -146,7 +146,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template0_opt(CJBig2_ArithDecoder *pA
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template0_opt2(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2;
@@ -213,7 +213,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template0_opt2(CJBig2_ArithDecoder *p
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template0_opt3(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2;
@@ -305,7 +305,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template0_opt3(CJBig2_ArithDecoder *p
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template0_unopt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2, line3;
@@ -352,7 +352,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template0_unopt(CJBig2_ArithDecoder *
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template1_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2, line3;
@@ -397,7 +397,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template1_opt(CJBig2_ArithDecoder *pA
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template1_opt2(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2;
@@ -464,7 +464,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template1_opt2(CJBig2_ArithDecoder *p
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template1_opt3(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2;
@@ -555,7 +555,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template1_opt3(CJBig2_ArithDecoder *p
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template1_unopt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2, line3;
@@ -600,7 +600,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template1_unopt(CJBig2_ArithDecoder *
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template2_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2, line3;
@@ -643,7 +643,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template2_opt(CJBig2_ArithDecoder *pA
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template2_opt2(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2;
@@ -710,7 +710,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template2_opt2(CJBig2_ArithDecoder *p
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template2_opt3(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2;
@@ -801,7 +801,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template2_opt3(CJBig2_ArithDecoder *p
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template2_unopt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2, line3;
@@ -844,7 +844,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template2_unopt(CJBig2_ArithDecoder *
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2;
@@ -883,7 +883,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_opt(CJBig2_ArithDecoder *pA
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_opt2(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1;
@@ -941,7 +941,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_opt2(CJBig2_ArithDecoder *p
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_opt3(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1;
@@ -1017,7 +1017,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_opt3(CJBig2_ArithDecoder *p
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_unopt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2;
@@ -1056,7 +1056,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_unopt(CJBig2_ArithDecoder *
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_V2(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG;
FX_DWORD line1, line2, line3;
@@ -1195,7 +1195,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_V2(CJBig2_ArithDecoder *pArithDecoder
}
CJBig2_Image *CJBig2_GRDProc::decode_Arith_V1(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT = 0;
CJBig2_Image *GBREG;
LTP = 0;
@@ -1340,7 +1340,7 @@ CJBig2_Image *CJBig2_GRRDProc::decode(CJBig2_ArithDecoder *pArithDecoder, JBig2A
}
CJBig2_Image *CJBig2_GRRDProc::decode_Template0_unopt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GRREG;
FX_DWORD line1, line2, line3, line4, line5;
@@ -1424,7 +1424,7 @@ CJBig2_Image *CJBig2_GRRDProc::decode_Template0_unopt(CJBig2_ArithDecoder *pArit
}
CJBig2_Image *CJBig2_GRRDProc::decode_Template0_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GRREG;
FX_DWORD line1, line1_r, line2_r, line3_r;
@@ -1459,9 +1459,9 @@ CJBig2_Image *CJBig2_GRRDProc::decode_Template0_opt(CJBig2_ArithDecoder *pArithD
}
line1 = (h > 0) ? pLine[-nStride] << 4 : 0;
int32_t reference_h = h - GRREFERENCEDY;
- FX_BOOL line1_r_ok = (reference_h > 0 && reference_h < GRHR + 1);
- FX_BOOL line2_r_ok = (reference_h > -1 && reference_h < GRHR);
- FX_BOOL line3_r_ok = (reference_h > -2 && reference_h < GRHR - 1);
+ bool line1_r_ok = (reference_h > 0 && reference_h < GRHR + 1);
+ bool line2_r_ok = (reference_h > -1 && reference_h < GRHR);
+ bool line3_r_ok = (reference_h > -2 && reference_h < GRHR - 1);
line1_r = line1_r_ok ? pLineR[nOffset - nStrideR] : 0;
line2_r = line2_r_ok ? pLineR[nOffset] : 0;
line3_r = line3_r_ok ? pLineR[nOffset + nStrideR] : 0;
@@ -1555,7 +1555,7 @@ CJBig2_Image *CJBig2_GRRDProc::decode_Template0_opt(CJBig2_ArithDecoder *pArithD
}
CJBig2_Image *CJBig2_GRRDProc::decode_Template1_unopt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GRREG;
FX_DWORD line1, line2, line3, line4, line5;
@@ -1633,7 +1633,7 @@ CJBig2_Image *CJBig2_GRRDProc::decode_Template1_unopt(CJBig2_ArithDecoder *pArit
}
CJBig2_Image *CJBig2_GRRDProc::decode_Template1_opt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grContext)
{
- FX_BOOL LTP, SLTP, bVal;
+ bool LTP, SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GRREG;
FX_DWORD line1, line1_r, line2_r, line3_r;
@@ -1668,9 +1668,9 @@ CJBig2_Image *CJBig2_GRRDProc::decode_Template1_opt(CJBig2_ArithDecoder *pArithD
}
line1 = (h > 0) ? pLine[-nStride] << 1 : 0;
int32_t reference_h = h - GRREFERENCEDY;
- FX_BOOL line1_r_ok = (reference_h > 0 && reference_h < GRHR + 1);
- FX_BOOL line2_r_ok = (reference_h > -1 && reference_h < GRHR);
- FX_BOOL line3_r_ok = (reference_h > -2 && reference_h < GRHR - 1);
+ bool line1_r_ok = (reference_h > 0 && reference_h < GRHR + 1);
+ bool line2_r_ok = (reference_h > -1 && reference_h < GRHR);
+ bool line3_r_ok = (reference_h > -2 && reference_h < GRHR - 1);
line1_r = line1_r_ok ? pLineR[nOffset - nStrideR] : 0;
line2_r = line2_r_ok ? pLineR[nOffset] : 0;
line3_r = line3_r_ok ? pLineR[nOffset + nStrideR] : 0;
@@ -1758,8 +1758,8 @@ CJBig2_Image *CJBig2_GRRDProc::decode_Template1_opt(CJBig2_ArithDecoder *pArithD
}
CJBig2_Image *CJBig2_GRRDProc::decode_V1(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grContext)
{
- FX_BOOL LTP, SLTP, bVal;
- FX_BOOL TPGRPIX, TPGRVAL;
+ bool LTP, SLTP, bVal;
+ bool TPGRPIX, TPGRVAL;
FX_DWORD CONTEXT;
CJBig2_Image *GRREG;
LTP = 0;
@@ -1881,12 +1881,12 @@ CJBig2_Image *CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream *pStream, JBig2Ari
CJBig2_Image *IBI;
FX_DWORD WI, HI;
int32_t IDS;
- FX_BOOL RI;
+ bool RI;
int32_t RDWI, RDHI, RDXI, RDYI;
CJBig2_Image *IBOI;
FX_DWORD WOI, HOI;
CJBig2_Image *SBREG;
- FX_BOOL bFirst;
+ bool bFirst;
FX_DWORD nTmp;
int32_t nVal, nBits;
CJBig2_HuffmanDecoder *pHuffmanDecoder;
@@ -1910,7 +1910,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream *pStream, JBig2Ari
}
DT *= SBSTRIPS;
STRIPT = STRIPT + DT;
- bFirst = TRUE;
+ bFirst = true;
for(;;) {
if(bFirst) {
if(pHuffmanDecoder->decodeAValue(SBHUFFFS, &DFS) != 0) {
@@ -1919,7 +1919,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream *pStream, JBig2Ari
}
FIRSTS = FIRSTS + DFS;
CURS = FIRSTS;
- bFirst = FALSE;
+ bFirst = false;
} else {
nVal = pHuffmanDecoder->decodeAValue(SBHUFFDS, &IDS);
if(nVal == JBIG2_OOB) {
@@ -2106,7 +2106,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
CJBig2_Image *IBOI;
FX_DWORD WOI, HOI;
CJBig2_Image *SBREG;
- FX_BOOL bFirst;
+ bool bFirst;
int32_t nRet, nVal;
int32_t bRetained;
CJBig2_ArithIntDecoder *IADT, *IAFS, *IADS, *IAIT, *IARI, *IARDW, *IARDH, *IARDX, *IARDY;
@@ -2123,7 +2123,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
IARDX = pIDS->IARDX;
IARDY = pIDS->IARDY;
IAID = pIDS->IAID;
- bRetained = TRUE;
+ bRetained = true;
} else {
JBIG2_ALLOC(IADT, CJBig2_ArithIntDecoder());
JBIG2_ALLOC(IAFS, CJBig2_ArithIntDecoder());
@@ -2135,7 +2135,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
JBIG2_ALLOC(IARDX, CJBig2_ArithIntDecoder());
JBIG2_ALLOC(IARDY, CJBig2_ArithIntDecoder());
JBIG2_ALLOC(IAID , CJBig2_ArithIaidDecoder(SBSYMCODELEN));
- bRetained = FALSE;
+ bRetained = false;
}
JBIG2_ALLOC(SBREG, CJBig2_Image(SBW, SBH));
SBREG->fill(SBDEFPIXEL);
@@ -2154,7 +2154,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
}
DT *= SBSTRIPS;
STRIPT = STRIPT + DT;
- bFirst = TRUE;
+ bFirst = true;
for(;;) {
if(bFirst) {
if(IAFS->decode(pArithDecoder, &DFS) == -1) {
@@ -2163,7 +2163,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
}
FIRSTS = FIRSTS + DFS;
CURS = FIRSTS;
- bFirst = FALSE;
+ bFirst = false;
} else {
nRet = IADS->decode(pArithDecoder, &IDS);
if(nRet == JBIG2_OOB) {
@@ -2299,7 +2299,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
NINSTANCES = NINSTANCES + 1;
}
}
- if(bRetained == FALSE) {
+ if(bRetained == false) {
delete IADT;
delete IAFS;
delete IADS;
@@ -2313,7 +2313,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
}
return SBREG;
failed:
- if(bRetained == FALSE) {
+ if(bRetained == false) {
delete IADT;
delete IAFS;
delete IADS;
@@ -2338,9 +2338,9 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecod
int32_t DW;
CJBig2_Image *BS;
FX_DWORD I, J, REFAGGNINST;
- FX_BOOL *EXFLAGS;
+ bool *EXFLAGS;
FX_DWORD EXINDEX;
- FX_BOOL CUREXFLAG;
+ bool CUREXFLAG;
FX_DWORD EXRUNLENGTH;
int32_t nVal;
FX_DWORD nTmp;
@@ -2585,7 +2585,7 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecod
}
EXINDEX = 0;
CUREXFLAG = 0;
- EXFLAGS = (FX_BOOL*)m_pModule->JBig2_Malloc2(sizeof(FX_BOOL), (SDNUMINSYMS + SDNUMNEWSYMS));
+ EXFLAGS = (bool*)m_pModule->JBig2_Malloc2(sizeof(bool), (SDNUMINSYMS + SDNUMNEWSYMS));
while(EXINDEX < SDNUMINSYMS + SDNUMNEWSYMS) {
if(IAEX->decode(pArithDecoder, (int*)&EXRUNLENGTH) == -1) {
m_pModule->JBig2_Free(EXFLAGS);
@@ -2676,9 +2676,9 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Huffman(CJBig2_BitStream *pStream,
int32_t DW;
CJBig2_Image *BS, *BHC;
FX_DWORD I, J, REFAGGNINST;
- FX_BOOL *EXFLAGS;
+ bool *EXFLAGS;
FX_DWORD EXINDEX;
- FX_BOOL CUREXFLAG;
+ bool CUREXFLAG;
FX_DWORD EXRUNLENGTH;
int32_t nVal, nBits;
FX_DWORD nTmp;
@@ -2976,7 +2976,7 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Huffman(CJBig2_BitStream *pStream,
CUREXFLAG = 0;
JBIG2_ALLOC(pTable, CJBig2_HuffmanTable(HuffmanTable_B1,
sizeof(HuffmanTable_B1) / sizeof(JBig2TableLine), HuffmanTable_HTOOB_B1));
- EXFLAGS = (FX_BOOL*)m_pModule->JBig2_Malloc2(sizeof(FX_BOOL), (SDNUMINSYMS + SDNUMNEWSYMS));
+ EXFLAGS = (bool*)m_pModule->JBig2_Malloc2(sizeof(bool), (SDNUMINSYMS + SDNUMNEWSYMS));
while(EXINDEX < SDNUMINSYMS + SDNUMNEWSYMS) {
if(pHuffmanDecoder->decodeAValue(pTable, (int*)&EXRUNLENGTH) != 0) {
delete pTable;
@@ -3477,7 +3477,7 @@ FXCODEC_STATUS CJBig2_GRDProc::Start_decode_Arith_V2(CJBig2_Image** pImage, CJBi
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_V2(IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
CJBig2_Image *GBREG = *m_pImage;
FX_DWORD line1, line2, line3;
@@ -3650,7 +3650,7 @@ FXCODEC_STATUS CJBig2_GRDProc::Start_decode_Arith_V1(CJBig2_Image** pImage, CJBi
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_V1(IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT = 0;
CJBig2_Image *GBREG = (*m_pImage);
for(; m_loopIndex < GBH; m_loopIndex++) {
@@ -3799,7 +3799,7 @@ FXCODEC_STATUS CJBig2_GRDProc::Continue_decode(IFX_Pause* pPause)
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_opt3(CJBig2_Image *pImage, CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
FX_DWORD line1, line2;
uint8_t *pLine1, *pLine2, cVal;
@@ -3891,7 +3891,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_opt3(CJBig2_Image *pImage,
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_unopt(CJBig2_Image * pImage, CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
FX_DWORD line1, line2, line3;
for(; m_loopIndex < GBH; m_loopIndex++) {
@@ -3940,7 +3940,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_unopt(CJBig2_Image * pImag
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_opt3(CJBig2_Image *pImage, CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
FX_DWORD line1, line2;
uint8_t *pLine1, *pLine2, cVal;
@@ -4031,7 +4031,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_opt3(CJBig2_Image *pImage,
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_unopt(CJBig2_Image * pImage, CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
FX_DWORD line1, line2, line3;
for(FX_DWORD h = 0; h < GBH; h++) {
@@ -4078,7 +4078,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_unopt(CJBig2_Image * pImag
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_opt3(CJBig2_Image *pImage, CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
FX_DWORD line1, line2;
uint8_t *pLine1, *pLine2, cVal;
@@ -4169,7 +4169,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_opt3(CJBig2_Image *pImage,
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_unopt(CJBig2_Image * pImage, CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
FX_DWORD line1, line2, line3;
for(; m_loopIndex < GBH; m_loopIndex++) {
@@ -4214,7 +4214,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_unopt(CJBig2_Image * pImag
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_opt3(CJBig2_Image *pImage, CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
FX_DWORD line1;
uint8_t *pLine1, cVal;
@@ -4290,7 +4290,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_opt3(CJBig2_Image *pImage,
}
FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_unopt(CJBig2_Image * pImage, CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext, IFX_Pause* pPause)
{
- FX_BOOL SLTP, bVal;
+ bool SLTP, bVal;
FX_DWORD CONTEXT;
FX_DWORD line1, line2;
for(; m_loopIndex < GBH; m_loopIndex++) {
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
index 2bd2ceac95..f348e96546 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
@@ -76,7 +76,7 @@ private:
CJBig2_ArithDecoder *m_pArithDecoder;
JBig2ArithCtx *m_gbContext;
FX_WORD m_DecodeType;
- FX_BOOL LTP;
+ bool LTP;
FX_RECT m_ReplaceRect;
private:
@@ -112,12 +112,12 @@ private:
CJBig2_Image *decode_Arith_Template3_unopt(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *gbContext);
public:
- FX_BOOL MMR;
+ bool MMR;
FX_DWORD GBW;
FX_DWORD GBH;
uint8_t GBTEMPLATE;
- FX_BOOL TPGDON;
- FX_BOOL USESKIP;
+ bool TPGDON;
+ bool USESKIP;
CJBig2_Image * SKIP;
signed char GBAT[8];
};
@@ -139,11 +139,11 @@ public:
public:
FX_DWORD GRW;
FX_DWORD GRH;
- FX_BOOL GRTEMPLATE;
+ bool GRTEMPLATE;
CJBig2_Image *GRREFERENCE;
int32_t GRREFERENCEDX;
int32_t GRREFERENCEDY;
- FX_BOOL TPGRON;
+ bool TPGRON;
signed char GRAT[4];
};
typedef struct {
@@ -167,8 +167,8 @@ public:
CJBig2_Image *decode_Arith(CJBig2_ArithDecoder *pArithDecoder, JBig2ArithCtx *grContext,
JBig2IntDecoderState *pIDS = NULL);
public:
- FX_BOOL SBHUFF;
- FX_BOOL SBREFINE;
+ bool SBHUFF;
+ bool SBREFINE;
FX_DWORD SBW;
FX_DWORD SBH;
FX_DWORD SBNUMINSTANCES;
@@ -179,10 +179,10 @@ public:
uint8_t SBSYMCODELEN;
CJBig2_Image **SBSYMS;
- FX_BOOL SBDEFPIXEL;
+ bool SBDEFPIXEL;
JBig2ComposeOp SBCOMBOP;
- FX_BOOL TRANSPOSED;
+ bool TRANSPOSED;
JBig2Corner REFCORNER;
signed char SBDSOFFSET;
@@ -194,7 +194,7 @@ public:
*SBHUFFRDX,
*SBHUFFRDY,
*SBHUFFRSIZE;
- FX_BOOL SBRTEMPLATE;
+ bool SBRTEMPLATE;
signed char SBRAT[4];
};
class CJBig2_SDDProc : public CJBig2_Object
@@ -205,8 +205,8 @@ public:
CJBig2_SymbolDict *decode_Huffman(CJBig2_BitStream *pStream, JBig2ArithCtx *gbContext, JBig2ArithCtx *grContext, IFX_Pause* pPause);
public:
- FX_BOOL SDHUFF;
- FX_BOOL SDREFAGG;
+ bool SDHUFF;
+ bool SDREFAGG;
FX_DWORD SDNUMINSYMS;
CJBig2_Image ** SDINSYMS;
FX_DWORD SDNUMNEWSYMS;
@@ -217,7 +217,7 @@ public:
*SDHUFFAGGINST;
uint8_t SDTEMPLATE;
signed char SDAT[8];
- FX_BOOL SDRTEMPLATE;
+ bool SDRTEMPLATE;
signed char SDRAT[4];
};
class CJBig2_HTRDProc : public CJBig2_Object
@@ -230,13 +230,13 @@ public:
public:
FX_DWORD HBW,
HBH;
- FX_BOOL HMMR;
+ bool HMMR;
uint8_t HTEMPLATE;
FX_DWORD HNUMPATS;
CJBig2_Image **HPATS;
- FX_BOOL HDEFPIXEL;
+ bool HDEFPIXEL;
JBig2ComposeOp HCOMBOP;
- FX_BOOL HENABLESKIP;
+ bool HENABLESKIP;
FX_DWORD HGW,
HGH;
int32_t HGX,
@@ -254,7 +254,7 @@ public:
CJBig2_PatternDict *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause);
public:
- FX_BOOL HDMMR;
+ bool HDMMR;
uint8_t HDPW,
HDPH;
FX_DWORD GRAYMAX;
@@ -268,8 +268,8 @@ public:
FX_DWORD *decode_MMR(CJBig2_BitStream *pStream, IFX_Pause* pPause);
public:
- FX_BOOL GSMMR;
- FX_BOOL GSUSESKIP;
+ bool GSMMR;
+ bool GSUSESKIP;
uint8_t GSBPP;
FX_DWORD GSW,
GSH;
diff --git a/core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp b/core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp
index 0616123c1e..4932e571f2 100644
--- a/core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp
@@ -9,7 +9,7 @@
#include <string.h>
CJBig2_HuffmanTable::CJBig2_HuffmanTable(const JBig2TableLine *pTable, int nLines,
- FX_BOOL bHTOOB)
+ bool bHTOOB)
{
init();
m_bOK = parseFromStandardTable(pTable, nLines, bHTOOB);
@@ -38,14 +38,14 @@ CJBig2_HuffmanTable::~CJBig2_HuffmanTable()
}
void CJBig2_HuffmanTable::init()
{
- HTOOB = FALSE;
+ HTOOB = false;
NTEMP = 0;
CODES = NULL;
PREFLEN = NULL;
RANGELEN = NULL;
RANGELOW = NULL;
}
-int CJBig2_HuffmanTable::parseFromStandardTable(const JBig2TableLine *pTable, int nLines, FX_BOOL bHTOOB)
+int CJBig2_HuffmanTable::parseFromStandardTable(const JBig2TableLine *pTable, int nLines, bool bHTOOB)
{
int CURLEN, LENMAX, CURCODE, CURTEMP, i;
int *LENCOUNT;
@@ -188,7 +188,7 @@ int CJBig2_HuffmanTable::parseFromCodedBuffer(CJBig2_BitStream *pStream)
}
m_pModule->JBig2_Free(LENCOUNT);
m_pModule->JBig2_Free(FIRSTCODE);
- return TRUE;
+ return true;
failed:
- return FALSE;
+ return false;
}
diff --git a/core/src/fxcodec/jbig2/JBig2_HuffmanTable.h b/core/src/fxcodec/jbig2/JBig2_HuffmanTable.h
index d68ced2fca..d6bc3d1c4b 100644
--- a/core/src/fxcodec/jbig2/JBig2_HuffmanTable.h
+++ b/core/src/fxcodec/jbig2/JBig2_HuffmanTable.h
@@ -13,7 +13,7 @@ class CJBig2_HuffmanTable : public CJBig2_Object
{
public:
- CJBig2_HuffmanTable(const JBig2TableLine *pTable, int nLines, FX_BOOL bHTOOB);
+ CJBig2_HuffmanTable(const JBig2TableLine *pTable, int nLines, bool bHTOOB);
CJBig2_HuffmanTable(CJBig2_BitStream *pStream);
@@ -21,22 +21,22 @@ public:
void init();
- int parseFromStandardTable(const JBig2TableLine *pTable, int nLines, FX_BOOL bHTOOB);
+ int parseFromStandardTable(const JBig2TableLine *pTable, int nLines, bool bHTOOB);
int parseFromCodedBuffer(CJBig2_BitStream *pStream);
- FX_BOOL isOK()
+ bool isOK()
{
return m_bOK;
}
private:
- FX_BOOL HTOOB;
+ bool HTOOB;
int NTEMP;
int *CODES;
int *PREFLEN;
int *RANGELEN;
int *RANGELOW;
- FX_BOOL m_bOK;
+ bool m_bOK;
friend class CJBig2_HuffmanDecoder;
};
#endif
diff --git a/core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h b/core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h
index 428b2c3671..c08d2456d4 100644
--- a/core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h
+++ b/core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h
@@ -11,7 +11,7 @@ typedef struct {
int RANDELEN;
int RANGELOW;
} JBig2TableLine;
-const FX_BOOL HuffmanTable_HTOOB_B1 = FALSE;
+const bool HuffmanTable_HTOOB_B1 = false;
const JBig2TableLine HuffmanTable_B1[] = {
{ 1, 4, 0 },
{ 2, 8, 16 },
@@ -19,7 +19,7 @@ const JBig2TableLine HuffmanTable_B1[] = {
{ 0, 32, -1 },
{ 3, 32, 65808 }
};
-const FX_BOOL HuffmanTable_HTOOB_B2 = TRUE;
+const bool HuffmanTable_HTOOB_B2 = true;
const JBig2TableLine HuffmanTable_B2[] = {
{ 1, 0, 0 },
{ 2, 0, 1 },
@@ -30,7 +30,7 @@ const JBig2TableLine HuffmanTable_B2[] = {
{ 6, 32, 75 },
{ 6, 0, 0 }
};
-const FX_BOOL HuffmanTable_HTOOB_B3 = TRUE;
+const bool HuffmanTable_HTOOB_B3 = true;
const JBig2TableLine HuffmanTable_B3[] = {
{ 8, 8, -256 },
{ 1, 0, 0 },
@@ -42,7 +42,7 @@ const JBig2TableLine HuffmanTable_B3[] = {
{ 7, 32, 75 },
{ 6, 0, 0 }
};
-const FX_BOOL HuffmanTable_HTOOB_B4 = FALSE;
+const bool HuffmanTable_HTOOB_B4 = false;
const JBig2TableLine HuffmanTable_B4[] = {
{ 1, 0, 1 },
{ 2, 0, 2 },
@@ -52,7 +52,7 @@ const JBig2TableLine HuffmanTable_B4[] = {
{ 0, 32, -1 },
{ 5, 32, 76 },
};
-const FX_BOOL HuffmanTable_HTOOB_B5 = FALSE;
+const bool HuffmanTable_HTOOB_B5 = false;
const JBig2TableLine HuffmanTable_B5[] = {
{ 7, 8, -255 },
{ 1, 0, 1 },
@@ -63,7 +63,7 @@ const JBig2TableLine HuffmanTable_B5[] = {
{ 7, 32, -256 },
{ 6, 32, 76 }
};
-const FX_BOOL HuffmanTable_HTOOB_B6 = FALSE;
+const bool HuffmanTable_HTOOB_B6 = false;
const JBig2TableLine HuffmanTable_B6[] = {
{ 5, 10, -2048 },
{ 4, 9, -1024 },
@@ -80,7 +80,7 @@ const JBig2TableLine HuffmanTable_B6[] = {
{ 6, 32, -2049 },
{ 6, 32, 2048 }
};
-const FX_BOOL HuffmanTable_HTOOB_B7 = FALSE;
+const bool HuffmanTable_HTOOB_B7 = false;
const JBig2TableLine HuffmanTable_B7[] = {
{ 4, 9, -1024 },
{ 3, 8, -512 },
@@ -98,7 +98,7 @@ const JBig2TableLine HuffmanTable_B7[] = {
{ 5, 32, -1025 },
{ 5, 32, 2048 },
};
-const FX_BOOL HuffmanTable_HTOOB_B8 = TRUE;
+const bool HuffmanTable_HTOOB_B8 = true;
const JBig2TableLine HuffmanTable_B8[] = {
{ 8, 3, -15 },
{ 9, 1, -7 },
@@ -122,7 +122,7 @@ const JBig2TableLine HuffmanTable_B8[] = {
{ 9, 32, 1670 },
{ 2, 0, 0 }
};
-const FX_BOOL HuffmanTable_HTOOB_B9 = TRUE;
+const bool HuffmanTable_HTOOB_B9 = true;
const JBig2TableLine HuffmanTable_B9[] = {
{ 8, 4, -31 },
{ 9, 2, -15 },
@@ -147,7 +147,7 @@ const JBig2TableLine HuffmanTable_B9[] = {
{ 9, 32, 3339 },
{ 2, 0, 0 }
};
-const FX_BOOL HuffmanTable_HTOOB_B10 = TRUE;
+const bool HuffmanTable_HTOOB_B10 = true;
const JBig2TableLine HuffmanTable_B10[] = {
{ 7, 4, -21 },
{ 8, 0, -5 },
@@ -171,7 +171,7 @@ const JBig2TableLine HuffmanTable_B10[] = {
{ 8, 32, 4166 },
{ 2, 0, 0 }
};
-const FX_BOOL HuffmanTable_HTOOB_B11 = FALSE;
+const bool HuffmanTable_HTOOB_B11 = false;
const JBig2TableLine HuffmanTable_B11[] = {
{ 1, 0, 1 },
{ 2, 1, 2 },
@@ -188,7 +188,7 @@ const JBig2TableLine HuffmanTable_B11[] = {
{ 0, 32, 0 },
{ 7, 32, 141 }
};
-const FX_BOOL HuffmanTable_HTOOB_B12 = FALSE;
+const bool HuffmanTable_HTOOB_B12 = false;
const JBig2TableLine HuffmanTable_B12[] = {
{ 1, 0, 1 },
{ 2, 0, 2 },
@@ -205,7 +205,7 @@ const JBig2TableLine HuffmanTable_B12[] = {
{ 0, 32, 0 },
{ 8, 32, 73 }
};
-const FX_BOOL HuffmanTable_HTOOB_B13 = FALSE;
+const bool HuffmanTable_HTOOB_B13 = false;
const JBig2TableLine HuffmanTable_B13[] = {
{ 1, 0, 1 },
{ 3, 0, 2 },
@@ -222,7 +222,7 @@ const JBig2TableLine HuffmanTable_B13[] = {
{ 0, 32, 0 },
{ 7, 32, 141 }
};
-const FX_BOOL HuffmanTable_HTOOB_B14 = FALSE;
+const bool HuffmanTable_HTOOB_B14 = false;
const JBig2TableLine HuffmanTable_B14[] = {
{ 3, 0, -2 },
{ 3, 0, -1 },
@@ -232,7 +232,7 @@ const JBig2TableLine HuffmanTable_B14[] = {
{ 0, 32, -3 },
{ 0, 32, 3 }
};
-const FX_BOOL HuffmanTable_HTOOB_B15 = FALSE;
+const bool HuffmanTable_HTOOB_B15 = false;
const JBig2TableLine HuffmanTable_B15[] = {
{ 7, 4, -24 },
{ 6, 2, -8 },
diff --git a/core/src/fxcodec/jbig2/JBig2_Image.cpp b/core/src/fxcodec/jbig2/JBig2_Image.cpp
index 9ef4464ef0..030b0c2493 100644
--- a/core/src/fxcodec/jbig2/JBig2_Image.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Image.cpp
@@ -16,7 +16,7 @@ CJBig2_Image::CJBig2_Image(int32_t w, int32_t h)
m_nHeight = h;
if (m_nWidth <= 0 || m_nHeight <= 0 || m_nWidth > INT_MAX - 31) {
m_pData = NULL;
- m_bNeedFree = FALSE;
+ m_bNeedFree = false;
return;
}
m_nStride = ((w + 31) >> 5) << 2;
@@ -25,7 +25,7 @@ CJBig2_Image::CJBig2_Image(int32_t w, int32_t h)
} else {
m_pData = NULL;
}
- m_bNeedFree = TRUE;
+ m_bNeedFree = true;
}
CJBig2_Image::CJBig2_Image(int32_t w, int32_t h, int32_t stride, uint8_t*pBuf)
{
@@ -33,7 +33,7 @@ CJBig2_Image::CJBig2_Image(int32_t w, int32_t h, int32_t stride, uint8_t*pBuf)
m_nHeight = h;
m_nStride = stride;
m_pData = pBuf;
- m_bNeedFree = FALSE;
+ m_bNeedFree = false;
}
CJBig2_Image::CJBig2_Image(CJBig2_Image &im)
{
@@ -47,7 +47,7 @@ CJBig2_Image::CJBig2_Image(CJBig2_Image &im)
} else {
m_pData = NULL;
}
- m_bNeedFree = TRUE;
+ m_bNeedFree = true;
}
CJBig2_Image::~CJBig2_Image()
{
@@ -55,7 +55,7 @@ CJBig2_Image::~CJBig2_Image()
m_pModule->JBig2_Free(m_pData);
}
}
-FX_BOOL CJBig2_Image::getPixel(int32_t x, int32_t y)
+bool CJBig2_Image::getPixel(int32_t x, int32_t y)
{
if (!m_pData) {
return 0;
@@ -72,7 +72,7 @@ FX_BOOL CJBig2_Image::getPixel(int32_t x, int32_t y)
return ((m_pData[m] >> (7 - n)) & 1);
}
-int32_t CJBig2_Image::setPixel(int32_t x, int32_t y, FX_BOOL v)
+int32_t CJBig2_Image::setPixel(int32_t x, int32_t y, bool v)
{
if (!m_pData) {
return 0;
@@ -104,31 +104,31 @@ void CJBig2_Image::copyLine(int32_t hTo, int32_t hFrom)
JBIG2_memcpy(m_pData + hTo * m_nStride, m_pData + hFrom * m_nStride, m_nStride);
}
}
-void CJBig2_Image::fill(FX_BOOL v)
+void CJBig2_Image::fill(bool v)
{
if (!m_pData) {
return;
}
JBIG2_memset(m_pData, v ? 0xff : 0, m_nStride * m_nHeight);
}
-FX_BOOL CJBig2_Image::composeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
+bool CJBig2_Image::composeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
{
if (!m_pData) {
- return FALSE;
+ return false;
}
return composeTo_opt2(pDst, x, y, op);
}
-FX_BOOL CJBig2_Image::composeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op, const FX_RECT* pSrcRect)
+bool CJBig2_Image::composeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op, const FX_RECT* pSrcRect)
{
if (!m_pData) {
- return FALSE;
+ return false;
}
if (NULL == pSrcRect || *pSrcRect == FX_RECT(0, 0, m_nWidth, m_nHeight)) {
return composeTo_opt2(pDst, x, y, op);
}
return composeTo_opt2(pDst, x, y, op, pSrcRect);
}
-FX_BOOL CJBig2_Image::composeTo_unopt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
+bool CJBig2_Image::composeTo_unopt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
{
int32_t w, h, dx, dy;
int32_t i, j;
@@ -192,17 +192,17 @@ FX_BOOL CJBig2_Image::composeTo_unopt(CJBig2_Image *pDst, int32_t x, int32_t y,
}
break;
}
- return TRUE;
+ return true;
}
-FX_BOOL CJBig2_Image::composeTo_opt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
+bool CJBig2_Image::composeTo_opt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
{
int32_t x0, x1, y0, y1, xx, yy;
uint8_t *pLineSrc, *pLineDst, *srcPtr, *destPtr;
FX_DWORD src0, src1, src, dest, s1, s2, m1, m2, m3;
- FX_BOOL oneByte;
+ bool oneByte;
if (!m_pData) {
- return FALSE;
+ return false;
}
if (y < 0) {
y0 = -y;
@@ -215,7 +215,7 @@ FX_BOOL CJBig2_Image::composeTo_opt(CJBig2_Image *pDst, int32_t x, int32_t y, JB
y1 = m_nHeight;
}
if (y0 >= y1) {
- return FALSE;
+ return false;
}
if (x >= 0) {
x0 = x & ~7;
@@ -227,7 +227,7 @@ FX_BOOL CJBig2_Image::composeTo_opt(CJBig2_Image *pDst, int32_t x, int32_t y, JB
x1 = pDst->m_nWidth;
}
if (x0 >= x1) {
- return FALSE;
+ return false;
}
s1 = x & 7;
s2 = 8 - s1;
@@ -679,19 +679,19 @@ FX_BOOL CJBig2_Image::composeTo_opt(CJBig2_Image *pDst, int32_t x, int32_t y, JB
}
}
}
- return TRUE;
+ return true;
}
-FX_BOOL CJBig2_Image::composeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op)
+bool CJBig2_Image::composeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op)
{
if (!m_pData) {
- return FALSE;
+ return false;
}
return pSrc->composeTo(this, x, y, op);
}
-FX_BOOL CJBig2_Image::composeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op, const FX_RECT* pSrcRect)
+bool CJBig2_Image::composeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op, const FX_RECT* pSrcRect)
{
if (!m_pData) {
- return FALSE;
+ return false;
}
return pSrc->composeTo(this, x, y, op, pSrcRect);
}
@@ -765,7 +765,7 @@ CJBig2_Image *CJBig2_Image::subImage(int32_t x, int32_t y, int32_t w, int32_t h)
}
return pImage;
}
-void CJBig2_Image::expand(int32_t h, FX_BOOL v)
+void CJBig2_Image::expand(int32_t h, bool v)
{
if (!m_pData || h <= m_nHeight) {
return;
@@ -788,7 +788,7 @@ void CJBig2_Image::expand(int32_t h, FX_BOOL v)
JBIG2_memset(m_pData + dwHeight * dwStride, v ? 0xff : 0, (dwH - dwHeight) * dwStride);
m_nHeight = h;
}
-FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
+bool CJBig2_Image::composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op)
{
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;
@@ -799,10 +799,10 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, J
uint8_t *lineSrc = NULL, *lineDst = NULL, *sp = NULL, *dp = NULL;
if (!m_pData) {
- return FALSE;
+ return false;
}
if (x < -1048576 || x > 1048576 || y < -1048576 || y > 1048576) {
- return FALSE;
+ return false;
}
if(y < 0) {
ys0 = -y;
@@ -1205,17 +1205,17 @@ FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, J
}
return 1;
}
-FX_BOOL CJBig2_Image::composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op, const FX_RECT* pSrcRect)
+bool CJBig2_Image::composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op, const FX_RECT* pSrcRect)
{
int32_t xs0, ys0, xs1, ys1, xd0, yd0, xd1, yd1, xx, yy, w, h, middleDwords, lineLeft;
FX_DWORD s1, d1, d2, shift, shift1, shift2, tmp, tmp1, tmp2, maskL, maskR, maskM;
uint8_t *lineSrc, *lineDst, *sp, *dp;
int32_t sw, sh;
if (!m_pData) {
- return FALSE;
+ return false;
}
if (x < -1048576 || x > 1048576 || y < -1048576 || y > 1048576) {
- return FALSE;
+ return false;
}
sw = pSrcRect->Width();
sh = pSrcRect->Height();
diff --git a/core/src/fxcodec/jbig2/JBig2_Image.h b/core/src/fxcodec/jbig2/JBig2_Image.h
index 423bebcede..d51d99907d 100644
--- a/core/src/fxcodec/jbig2/JBig2_Image.h
+++ b/core/src/fxcodec/jbig2/JBig2_Image.h
@@ -28,31 +28,31 @@ public:
~CJBig2_Image();
- FX_BOOL getPixel(int32_t x, int32_t y);
+ bool getPixel(int32_t x, int32_t y);
- int32_t setPixel(int32_t x, int32_t y, FX_BOOL v);
+ int32_t setPixel(int32_t x, int32_t y, bool v);
void copyLine(int32_t hTo, int32_t hFrom);
- void fill(FX_BOOL v);
+ void fill(bool v);
- FX_BOOL composeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op);
- FX_BOOL composeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op, const FX_RECT* pSrcRect);
+ bool composeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op);
+ bool composeTo(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op, const FX_RECT* pSrcRect);
- FX_BOOL composeTo_unopt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op);
+ bool composeTo_unopt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op);
- FX_BOOL composeTo_opt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op);
+ bool composeTo_opt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op);
- FX_BOOL composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op);
- FX_BOOL composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op, const FX_RECT* pSrcRect);
+ bool composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op);
+ bool composeTo_opt2(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op, const FX_RECT* pSrcRect);
- FX_BOOL composeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op);
- FX_BOOL composeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op, const FX_RECT* pSrcRect);
+ bool composeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op);
+ bool composeFrom(int32_t x, int32_t y, CJBig2_Image *pSrc, JBig2ComposeOp op, const FX_RECT* pSrcRect);
CJBig2_Image *subImage_unopt(int32_t x, int32_t y, int32_t w, int32_t h);
CJBig2_Image *subImage(int32_t x, int32_t y, int32_t w, int32_t h);
- void expand(int32_t h, FX_BOOL v);
+ void expand(int32_t h, bool v);
public:
int32_t m_nWidth;
@@ -63,6 +63,6 @@ public:
uint8_t *m_pData;
- FX_BOOL m_bNeedFree;
+ bool m_bNeedFree;
};
#endif
diff --git a/core/src/fxcodec/jbig2/JBig2_Page.h b/core/src/fxcodec/jbig2/JBig2_Page.h
index b07eba8a3a..b4e159f2a2 100644
--- a/core/src/fxcodec/jbig2/JBig2_Page.h
+++ b/core/src/fxcodec/jbig2/JBig2_Page.h
@@ -13,7 +13,7 @@ struct JBig2PageInfo : public CJBig2_Object {
FX_DWORD m_dwResolutionX,
m_dwResolutionY;
uint8_t m_cFlags;
- FX_BOOL m_bIsStriped;
+ bool m_bIsStriped;
FX_WORD m_wMaxStripeSize;
};
#endif
diff --git a/core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp b/core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
index 0e5b92ff5a..c10d461623 100644
--- a/core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
@@ -9,7 +9,7 @@ CJBig2_SymbolDict::CJBig2_SymbolDict()
{
SDNUMEXSYMS = 0;
SDEXSYMS = NULL;
- m_bContextRetained = FALSE;
+ m_bContextRetained = false;
m_gbContext = m_grContext = NULL;
}
diff --git a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
index 9156e30ea8..5f94dc7be8 100644
--- a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
+++ b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
@@ -19,7 +19,7 @@ public:
public:
FX_DWORD SDNUMEXSYMS;
CJBig2_Image **SDEXSYMS;
- FX_BOOL m_bContextRetained;
+ bool m_bContextRetained;
JBig2ArithCtx *m_gbContext,
*m_grContext;
};