diff options
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_jbig.cpp | 8 | ||||
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_Context.cpp | 48 | ||||
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_Context.h | 6 |
3 files changed, 31 insertions, 31 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp index 9361604b9d..dec7330fe2 100644 --- a/core/src/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp @@ -55,7 +55,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, } int ret = m_pJbig2Context->m_pContext->getFirstPage(dest_buf, width, height, dest_pitch, pPause); - if (m_pJbig2Context->m_pContext->GetProcessiveStatus() == + if (m_pJbig2Context->m_pContext->GetProcessingStatus() == FXCODEC_STATUS_DECODE_FINISH) { CJBig2_Context::DestroyContext(m_pJbig2Context->m_pContext); m_pJbig2Context->m_pContext = NULL; @@ -69,15 +69,15 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, } return FXCODEC_STATUS_DECODE_FINISH; } - return m_pJbig2Context->m_pContext->GetProcessiveStatus(); + return m_pJbig2Context->m_pContext->GetProcessingStatus(); } FXCODEC_STATUS CCodec_Jbig2Module::ContinueDecode(void* pJbig2Context, IFX_Pause* pPause) { CCodec_Jbig2Context* m_pJbig2Context = (CCodec_Jbig2Context*)pJbig2Context; int ret = m_pJbig2Context->m_pContext->Continue(pPause); - if (m_pJbig2Context->m_pContext->GetProcessiveStatus() != + if (m_pJbig2Context->m_pContext->GetProcessingStatus() != FXCODEC_STATUS_DECODE_FINISH) { - return m_pJbig2Context->m_pContext->GetProcessiveStatus(); + return m_pJbig2Context->m_pContext->GetProcessingStatus(); } if (m_pJbig2Context->m_bFileReader) { CJBig2_Context::DestroyContext(m_pJbig2Context->m_pContext); diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp index 9cf39cb1b4..b70054171d 100644 --- a/core/src/fxcodec/jbig2/JBig2_Context.cpp +++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp @@ -56,7 +56,7 @@ CJBig2_Context::CJBig2_Context(const uint8_t* pGlobalData, m_pGRD = NULL; m_gbContext = NULL; m_dwOffset = 0; - m_ProcessiveStatus = FXCODEC_STATUS_FRAME_READY; + m_ProcessingStatus = FXCODEC_STATUS_FRAME_READY; m_pSymbolDictCache = pSymbolDictCache; } CJBig2_Context::~CJBig2_Context() { @@ -126,8 +126,8 @@ int32_t CJBig2_Context::decode_SquentialOrgnazation(IFX_Pause* pPause) { m_dwOffset = m_pStream->getOffset(); } nRet = parseSegmentData(m_pSegment.get(), pPause); - if (m_ProcessiveStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE) { - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; + if (m_ProcessingStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE) { + m_ProcessingStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; m_PauseStep = 2; return JBIG2_SUCCESS; } @@ -148,7 +148,7 @@ int32_t CJBig2_Context::decode_SquentialOrgnazation(IFX_Pause* pPause) { m_SegmentList.push_back(m_pSegment.release()); if (m_pStream->getByteLeft() > 0 && m_pPage && pPause && pPause->NeedToPauseNow()) { - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; + m_ProcessingStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; m_PauseStep = 2; return JBIG2_SUCCESS; } @@ -171,7 +171,7 @@ int32_t CJBig2_Context::decode_RandomOrgnazation_FirstPage(IFX_Pause* pPause) { m_SegmentList.push_back(pSegment.release()); if (pPause && m_pPause && pPause->NeedToPauseNow()) { m_PauseStep = 3; - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; + m_ProcessingStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; return JBIG2_SUCCESS; } } @@ -190,7 +190,7 @@ int32_t CJBig2_Context::decode_RandomOrgnazation(IFX_Pause* pPause) { if (m_pPage && pPause && pPause->NeedToPauseNow()) { m_PauseStep = 4; - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; + m_ProcessingStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; return JBIG2_SUCCESS; } } @@ -205,7 +205,7 @@ int32_t CJBig2_Context::getFirstPage(uint8_t* pBuf, if (m_pGlobalContext) { nRet = m_pGlobalContext->decode_EmbedOrgnazation(pPause); if (nRet != JBIG2_SUCCESS) { - m_ProcessiveStatus = FXCODEC_STATUS_ERROR; + m_ProcessingStatus = FXCODEC_STATUS_ERROR; return nRet; } } @@ -216,14 +216,14 @@ int32_t CJBig2_Context::getFirstPage(uint8_t* pBuf, m_bBufSpecified = TRUE; if (m_pPage && pPause && pPause->NeedToPauseNow()) { m_PauseStep = 1; - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; + m_ProcessingStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE; return nRet; } int ret = Continue(pPause); return ret; } int32_t CJBig2_Context::Continue(IFX_Pause* pPause) { - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_READY; + m_ProcessingStatus = FXCODEC_STATUS_DECODE_READY; int32_t nRet; if (m_PauseStep <= 1) { switch (m_nStreamType) { @@ -244,7 +244,7 @@ int32_t CJBig2_Context::Continue(IFX_Pause* pPause) { nRet = decode_EmbedOrgnazation(pPause); break; default: - m_ProcessiveStatus = FXCODEC_STATUS_ERROR; + m_ProcessingStatus = FXCODEC_STATUS_ERROR; return JBIG2_ERROR_STREAM_TYPE; } } else if (m_PauseStep == 2) { @@ -254,21 +254,21 @@ int32_t CJBig2_Context::Continue(IFX_Pause* pPause) { } else if (m_PauseStep == 4) { nRet = decode_RandomOrgnazation(pPause); } else if (m_PauseStep == 5) { - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_FINISH; + m_ProcessingStatus = FXCODEC_STATUS_DECODE_FINISH; return JBIG2_SUCCESS; } - if (m_ProcessiveStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE) { + if (m_ProcessingStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE) { return nRet; } m_PauseStep = 5; if (!m_bBufSpecified && nRet == JBIG2_SUCCESS) { - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_FINISH; + m_ProcessingStatus = FXCODEC_STATUS_DECODE_FINISH; return JBIG2_SUCCESS; } if (nRet == JBIG2_SUCCESS) { - m_ProcessiveStatus = FXCODEC_STATUS_DECODE_FINISH; + m_ProcessingStatus = FXCODEC_STATUS_DECODE_FINISH; } else { - m_ProcessiveStatus = FXCODEC_STATUS_ERROR; + m_ProcessingStatus = FXCODEC_STATUS_ERROR; } return nRet; } @@ -397,15 +397,15 @@ int32_t CJBig2_Context::parseSegmentHeader(CJBig2_Segment* pSegment) { int32_t CJBig2_Context::parseSegmentData(CJBig2_Segment* pSegment, IFX_Pause* pPause) { - int32_t ret = ProcessiveParseSegmentData(pSegment, pPause); - while (m_ProcessiveStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE && + int32_t ret = ProcessingParseSegmentData(pSegment, pPause); + while (m_ProcessingStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE && m_pStream->getByteLeft() > 0) { - ret = ProcessiveParseSegmentData(pSegment, pPause); + ret = ProcessingParseSegmentData(pSegment, pPause); } return ret; } -int32_t CJBig2_Context::ProcessiveParseSegmentData(CJBig2_Segment* pSegment, +int32_t CJBig2_Context::ProcessingParseSegmentData(CJBig2_Segment* pSegment, IFX_Pause* pPause) { switch (pSegment->m_cFlags.s.type) { case 0: @@ -461,7 +461,7 @@ int32_t CJBig2_Context::ProcessiveParseSegmentData(CJBig2_Segment* pSegment, } if (!m_pPage->m_pData) { - m_ProcessiveStatus = FXCODEC_STATUS_ERROR; + m_ProcessingStatus = FXCODEC_STATUS_ERROR; return JBIG2_ERROR_TOO_SHORT; } @@ -1304,12 +1304,12 @@ int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment* pSegment, } if (m_pArithDecoder == NULL) { m_pArithDecoder = new CJBig2_ArithDecoder(m_pStream); - m_ProcessiveStatus = m_pGRD->Start_decode_Arith( + m_ProcessingStatus = m_pGRD->Start_decode_Arith( &pSegment->m_Result.im, m_pArithDecoder, m_gbContext, pPause); } else { - m_ProcessiveStatus = m_pGRD->Continue_decode(pPause); + m_ProcessingStatus = m_pGRD->Continue_decode(pPause); } - if (m_ProcessiveStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE) { + if (m_ProcessingStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE) { if (pSegment->m_cFlags.s.type != 36) { if (!m_bBufSpecified) { JBig2PageInfo* pPageInfo = m_PageInfoList.back(); @@ -1332,7 +1332,7 @@ int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment* pSegment, FX_Free(m_gbContext); nRet = JBIG2_ERROR_FATAL; m_gbContext = NULL; - m_ProcessiveStatus = FXCODEC_STATUS_ERROR; + m_ProcessingStatus = FXCODEC_STATUS_ERROR; goto failed; } FX_Free(m_gbContext); diff --git a/core/src/fxcodec/jbig2/JBig2_Context.h b/core/src/fxcodec/jbig2/JBig2_Context.h index 5ae6897bab..1af6b9444c 100644 --- a/core/src/fxcodec/jbig2/JBig2_Context.h +++ b/core/src/fxcodec/jbig2/JBig2_Context.h @@ -56,7 +56,7 @@ class CJBig2_Context { int32_t getFirstPage(CJBig2_Image** image, IFX_Pause* pPause); int32_t Continue(IFX_Pause* pPause); - FXCODEC_STATUS GetProcessiveStatus() { return m_ProcessiveStatus; } + FXCODEC_STATUS GetProcessingStatus() { return m_ProcessingStatus; } private: enum JBig2State { @@ -93,7 +93,7 @@ class CJBig2_Context { int32_t parseSegmentHeader(CJBig2_Segment* pSegment); int32_t parseSegmentData(CJBig2_Segment* pSegment, IFX_Pause* pPause); - int32_t ProcessiveParseSegmentData(CJBig2_Segment* pSegment, + int32_t ProcessingParseSegmentData(CJBig2_Segment* pSegment, IFX_Pause* pPause); int32_t parseSymbolDict(CJBig2_Segment* pSegment, IFX_Pause* pPause); @@ -131,7 +131,7 @@ class CJBig2_Context { size_t m_nSegmentDecoded; IFX_Pause* m_pPause; int32_t m_PauseStep; - FXCODEC_STATUS m_ProcessiveStatus; + FXCODEC_STATUS m_ProcessingStatus; FX_BOOL m_bFirstPage; CJBig2_ArithDecoder* m_pArithDecoder; CJBig2_GRDProc* m_pGRD; |