summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r--core/src/fxcodec/codec/codec_int.h2
-rw-r--r--core/src/fxcodec/codec/fx_codec_flate.cpp8
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp4
3 files changed, 8 insertions, 6 deletions
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index 244793b634..a1445a5003 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -152,7 +152,7 @@ public:
virtual void Finish(void* pContext);
virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size);
virtual int ReadHeader(void* pContext, int* width, int* height, int* nComps, CFX_DIBAttribute* pAttribute = NULL);
- virtual FX_BOOL StartScanline(void* pContext, int down_scale);
+ virtual int StartScanline(void* pContext, int down_scale);
virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf);
virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr);
protected:
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index 6223b9c670..d129e36392 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -84,19 +84,21 @@ extern "C"
class CLZWDecoder
{
public:
- FX_BOOL Decode(uint8_t* output, FX_DWORD& outlen, const uint8_t* input, FX_DWORD& size, FX_BOOL bEarlyChange);
+ int Decode(uint8_t* output, FX_DWORD& outlen, const uint8_t* input, FX_DWORD& size, FX_BOOL bEarlyChange);
+
private:
+ void AddCode(FX_DWORD prefix_code, uint8_t append_char);
+ void DecodeString(FX_DWORD code);
+
FX_DWORD m_InPos;
FX_DWORD m_OutPos;
uint8_t* m_pOutput;
const uint8_t* m_pInput;
FX_BOOL m_Early;
- void AddCode(FX_DWORD prefix_code, uint8_t append_char);
FX_DWORD m_CodeArray[5021];
FX_DWORD m_nCodes;
uint8_t m_DecodeStack[4000];
FX_DWORD m_StackLen;
- void DecodeString(FX_DWORD code);
int m_CodeLen;
};
void CLZWDecoder::AddCode(FX_DWORD prefix_code, uint8_t append_char)
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index e8e075e6b0..62963643cf 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -715,14 +715,14 @@ int CCodec_JpegModule::ReadHeader(void* pContext, int* width, int* height, int*
_JpegLoadAttribute(&p->m_Info, pAttribute);
return 0;
}
-FX_BOOL CCodec_JpegModule::StartScanline(void* pContext, int down_scale)
+int CCodec_JpegModule::StartScanline(void* pContext, int down_scale)
{
if (m_pExtProvider) {
return m_pExtProvider->StartScanline(pContext, down_scale);
}
FXJPEG_Context* p = (FXJPEG_Context*)pContext;
if (setjmp(p->m_JumpMark) == -1) {
- return FALSE;
+ return 0;
}
p->m_Info.scale_denom = down_scale;
return jpeg_start_decompress(&p->m_Info);