summaryrefslogtreecommitdiff
path: root/core/src/fxcodec
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcodec')
-rw-r--r--core/src/fxcodec/codec/codec_int.h6
-rw-r--r--core/src/fxcodec/codec/fx_codec.cpp40
-rw-r--r--core/src/fxcodec/codec/fx_codec_bmp.cpp2
-rw-r--r--core/src/fxcodec/codec/fx_codec_fax.cpp22
-rw-r--r--core/src/fxcodec/codec/fx_codec_flate.cpp22
-rw-r--r--core/src/fxcodec/codec/fx_codec_gif.cpp4
-rw-r--r--core/src/fxcodec/codec/fx_codec_icc.cpp2
-rw-r--r--core/src/fxcodec/codec/fx_codec_jbig.cpp6
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp18
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp8
-rw-r--r--core/src/fxcodec/codec/fx_codec_png.cpp10
-rw-r--r--core/src/fxcodec/codec/fx_codec_progress.cpp46
-rw-r--r--core/src/fxcodec/codec/fx_codec_tiff.cpp10
-rw-r--r--core/src/fxcodec/fx_zlib/zlib_v128/zutil.h6
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Define.h6
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp6
-rw-r--r--core/src/fxcodec/lbmp/fx_bmp.cpp34
-rw-r--r--core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c4
-rw-r--r--core/src/fxcodec/lgif/fx_gif.cpp82
-rw-r--r--core/src/fxcodec/libjpeg/jinclude.h4
20 files changed, 169 insertions, 169 deletions
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index 90e8b8c02c..7e3b2e12e0 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -164,7 +164,7 @@ class CCodec_PngModule : public ICodec_PngModule
public:
CCodec_PngModule()
{
- FXSYS_memset8(m_szLastError, '\0', PNG_ERROR_SIZE);
+ FXSYS_memset(m_szLastError, '\0', PNG_ERROR_SIZE);
}
virtual void* Start(void* pModule);
@@ -178,7 +178,7 @@ class CCodec_GifModule : public ICodec_GifModule
public:
CCodec_GifModule()
{
- FXSYS_memset8(m_szLastError, '\0', 256);
+ FXSYS_memset(m_szLastError, '\0', 256);
}
virtual void* Start(void* pModule);
virtual void Finish(void* pContext);
@@ -200,7 +200,7 @@ class CCodec_BmpModule : public ICodec_BmpModule
public:
CCodec_BmpModule()
{
- FXSYS_memset8(m_szLastError, '\0', 256);
+ FXSYS_memset(m_szLastError, '\0', 256);
}
virtual void* Start(void* pModule);
virtual void Finish(void* pContext);
diff --git a/core/src/fxcodec/codec/fx_codec.cpp b/core/src/fxcodec/codec/fx_codec.cpp
index ed007fdcb1..319e66e69b 100644
--- a/core/src/fxcodec/codec/fx_codec.cpp
+++ b/core/src/fxcodec/codec/fx_codec.cpp
@@ -102,7 +102,7 @@ uint8_t* CCodec_ScanlineDecoder::ReadNextLine()
return NULL;
}
if (m_pDataCache && m_NextLine == m_pDataCache->m_nCachedLines) {
- FXSYS_memcpy32(&m_pDataCache->m_Data + m_NextLine * m_Pitch, pLine, m_Pitch);
+ FXSYS_memcpy(&m_pDataCache->m_Data + m_NextLine * m_Pitch, pLine, m_Pitch);
m_pDataCache->m_nCachedLines ++;
}
return pLine;
@@ -255,7 +255,7 @@ void CCodec_ModuleMgr::Destroy()
}
CFX_DIBAttribute::CFX_DIBAttribute()
{
- FXSYS_memset32(this, 0, sizeof(CFX_DIBAttribute));
+ FXSYS_memset(this, 0, sizeof(CFX_DIBAttribute));
m_nXDPI = -1;
m_nYDPI = -1;
m_fAspectRatio = -1.0f;
@@ -328,7 +328,7 @@ uint8_t* CFX_DIBAttributeExif::ParseExifIFH(uint8_t* data, FX_DWORD len, _Read2B
{
if (len > 8) {
FX_BOOL tag = FALSE;
- if (FXSYS_memcmp32(data, "\x49\x49\x2a\x00", 4) == 0) {
+ if (FXSYS_memcmp(data, "\x49\x49\x2a\x00", 4) == 0) {
if (pReadWord) {
*pReadWord = _Read2BytesL;
}
@@ -336,7 +336,7 @@ uint8_t* CFX_DIBAttributeExif::ParseExifIFH(uint8_t* data, FX_DWORD len, _Read2B
*pReadDword = _Read4BytesL;
}
tag = TRUE;
- } else if (FXSYS_memcmp32(data, "\x4d\x4d\x00\x2a", 4) == 0) {
+ } else if (FXSYS_memcmp(data, "\x4d\x4d\x00\x2a", 4) == 0) {
if (pReadWord) {
*pReadWord = _Read2BytesB;
}
@@ -372,7 +372,7 @@ FX_BOOL CFX_DIBAttributeExif::ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, uint8_t*
if (buf == NULL) {
return FALSE;
}
- FXSYS_memcpy32(buf, data, 10);
+ FXSYS_memcpy(buf, data, 10);
pMap->SetAt(wTag, buf);
}
data += 10;
@@ -391,7 +391,7 @@ FX_BOOL CFX_DIBAttributeExif::ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, uint8_t*
if (buf == NULL) {
return FALSE;
}
- FXSYS_memcpy32(buf, data, 10);
+ FXSYS_memcpy(buf, data, 10);
pMap->SetAt(wTag, buf);
}
data += 10;
@@ -459,9 +459,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(val, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(val, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(val, head, dwSize);
+ FXSYS_memcpy(val, head, dwSize);
}
break;
case FX_UnsignedShort:
@@ -472,9 +472,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(val, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(val, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(val, head, dwSize);
+ FXSYS_memcpy(val, head, dwSize);
}
buf = val;
for(i = 0; i < (int)dwModuleNum; i ++) {
@@ -491,9 +491,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(val, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(val, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(val, head, dwSize);
+ FXSYS_memcpy(val, head, dwSize);
}
buf = val;
for(i = 0; i < (int)dwModuleNum; i ++) {
@@ -509,9 +509,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(buf, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(buf, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(buf, head, dwSize);
+ FXSYS_memcpy(buf, head, dwSize);
}
temp = buf;
val = FX_Alloc(uint8_t, dwSize / 2);
@@ -537,9 +537,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(val, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(val, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(val, head, dwSize);
+ FXSYS_memcpy(val, head, dwSize);
}
buf = val;
for(i = 0; i < (int)dwModuleNum; i ++) {
@@ -680,7 +680,7 @@ FX_BOOL CCodec_RLScanlineDecoder::Create(const uint8_t* src_buf, FX_DWORD src_si
}
FX_BOOL CCodec_RLScanlineDecoder::v_Rewind()
{
- FXSYS_memset32(m_pScanline, 0, m_Pitch);
+ FXSYS_memset(m_pScanline, 0, m_Pitch);
m_SrcOffset = 0;
m_bEOD = FALSE;
m_Operator = 0;
@@ -695,7 +695,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine()
return NULL;
}
}
- FXSYS_memset32(m_pScanline, 0, m_Pitch);
+ FXSYS_memset(m_pScanline, 0, m_Pitch);
FX_DWORD col_pos = 0;
FX_BOOL eol = FALSE;
while (m_SrcOffset < m_SrcSize && !eol) {
@@ -709,7 +709,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine()
copy_len = m_SrcSize - m_SrcOffset;
m_bEOD = TRUE;
}
- FXSYS_memcpy32(m_pScanline + col_pos, m_pSrcBuf + m_SrcOffset, copy_len);
+ FXSYS_memcpy(m_pScanline + col_pos, m_pSrcBuf + m_SrcOffset, copy_len);
col_pos += copy_len;
UpdateOperator((uint8_t)copy_len);
} else if (m_Operator > 128) {
@@ -722,7 +722,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine()
duplicate_len = m_dwLineBytes - col_pos;
eol = TRUE;
}
- FXSYS_memset8(m_pScanline + col_pos, fill, duplicate_len);
+ FXSYS_memset(m_pScanline + col_pos, fill, duplicate_len);
col_pos += duplicate_len;
UpdateOperator((uint8_t)duplicate_len);
} else {
diff --git a/core/src/fxcodec/codec/fx_codec_bmp.cpp b/core/src/fxcodec/codec/fx_codec_bmp.cpp
index 554ce358e0..da7a8bf1a6 100644
--- a/core/src/fxcodec/codec/fx_codec_bmp.cpp
+++ b/core/src/fxcodec/codec/fx_codec_bmp.cpp
@@ -51,7 +51,7 @@ void* CCodec_BmpModule::Start(void* pModule)
if (p == NULL) {
return NULL;
}
- FXSYS_memset32(p, 0, sizeof(FXBMP_Context));
+ FXSYS_memset(p, 0, sizeof(FXBMP_Context));
if(p == NULL) {
return NULL;
}
diff --git a/core/src/fxcodec/codec/fx_codec_fax.cpp b/core/src/fxcodec/codec/fx_codec_fax.cpp
index 40502362d5..148d3d49fc 100644
--- a/core/src/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/src/fxcodec/codec/fx_codec_fax.cpp
@@ -130,7 +130,7 @@ void _FaxFillBits(uint8_t* dest_buf, int columns, int startpos, int endpos)
dest_buf[last_byte] -= 1 << (7 - i);
}
if (last_byte > first_byte + 1) {
- FXSYS_memset32(dest_buf + first_byte + 1, 0, last_byte - first_byte - 1);
+ FXSYS_memset(dest_buf + first_byte + 1, 0, last_byte - first_byte - 1);
}
}
#define NEXTBIT src_buf[bitpos/8] & (1 << (7-bitpos%8)); bitpos ++;
@@ -633,7 +633,7 @@ FX_BOOL CCodec_FaxDecoder::Create(const uint8_t* src_buf, FX_DWORD src_size, int
}
FX_BOOL CCodec_FaxDecoder::v_Rewind()
{
- FXSYS_memset8(m_pRefBuf, 0xff, m_Pitch);
+ FXSYS_memset(m_pRefBuf, 0xff, m_Pitch);
bitpos = 0;
return TRUE;
}
@@ -644,10 +644,10 @@ uint8_t* CCodec_FaxDecoder::v_GetNextLine()
if (bitpos >= bitsize) {
return NULL;
}
- FXSYS_memset8(m_pScanlineBuf, 0xff, m_Pitch);
+ FXSYS_memset(m_pScanlineBuf, 0xff, m_Pitch);
if (m_Encoding < 0) {
_FaxG4GetRow(m_pSrcBuf, bitsize, bitpos, m_pScanlineBuf, m_pRefBuf, m_OrigWidth);
- FXSYS_memcpy32(m_pRefBuf, m_pScanlineBuf, m_Pitch);
+ FXSYS_memcpy(m_pRefBuf, m_pScanlineBuf, m_Pitch);
} else if (m_Encoding == 0) {
_FaxGet1DLine(m_pSrcBuf, bitsize, bitpos, m_pScanlineBuf, m_OrigWidth);
} else {
@@ -658,7 +658,7 @@ uint8_t* CCodec_FaxDecoder::v_GetNextLine()
} else {
_FaxG4GetRow(m_pSrcBuf, bitsize, bitpos, m_pScanlineBuf, m_pRefBuf, m_OrigWidth);
}
- FXSYS_memcpy32(m_pRefBuf, m_pScanlineBuf, m_Pitch);
+ FXSYS_memcpy(m_pRefBuf, m_pScanlineBuf, m_Pitch);
}
if (m_bEndOfLine) {
_FaxSkipEOL(m_pSrcBuf, bitsize, bitpos);
@@ -700,13 +700,13 @@ extern "C" {
pitch = (width + 7) / 8;
}
uint8_t* ref_buf = FX_Alloc(uint8_t, pitch);
- FXSYS_memset8(ref_buf, 0xff, pitch);
+ FXSYS_memset(ref_buf, 0xff, pitch);
int bitpos = *pbitpos;
for (int iRow = 0; iRow < height; iRow ++) {
uint8_t* line_buf = dest_buf + iRow * pitch;
- FXSYS_memset8(line_buf, 0xff, pitch);
+ FXSYS_memset(line_buf, 0xff, pitch);
_FaxG4GetRow(src_buf, src_size << 3, bitpos, line_buf, ref_buf, width);
- FXSYS_memcpy32(ref_buf, line_buf, pitch);
+ FXSYS_memcpy(ref_buf, line_buf, pitch);
}
FX_Free(ref_buf);
*pbitpos = bitpos;
@@ -938,7 +938,7 @@ CCodec_FaxEncoder::CCodec_FaxEncoder(const uint8_t* src_buf, int width, int heig
m_Rows = height;
m_Pitch = pitch;
m_pRefLine = FX_Alloc(uint8_t, m_Pitch);
- FXSYS_memset8(m_pRefLine, 0xff, m_Pitch);
+ FXSYS_memset(m_pRefLine, 0xff, m_Pitch);
m_pLineBuf = FX_Alloc2D(uint8_t, m_Pitch, 8);
m_DestBuf.EstimateSize(0, 10240);
}
@@ -957,13 +957,13 @@ void CCodec_FaxEncoder::Encode(uint8_t*& dest_buf, FX_DWORD& dest_size)
uint8_t last_byte = 0;
for (int i = 0; i < m_Rows; i ++) {
const uint8_t* scan_line = m_pSrcBuf + i * m_Pitch;
- FXSYS_memset32(m_pLineBuf, 0, m_Pitch * 8);
+ FXSYS_memset(m_pLineBuf, 0, m_Pitch * 8);
m_pLineBuf[0] = last_byte;
_FaxEncode2DLine(m_pLineBuf, dest_bitpos, scan_line, m_pRefLine, m_Cols);
m_DestBuf.AppendBlock(m_pLineBuf, dest_bitpos / 8);
last_byte = m_pLineBuf[dest_bitpos / 8];
dest_bitpos %= 8;
- FXSYS_memcpy32(m_pRefLine, scan_line, m_Pitch);
+ FXSYS_memcpy(m_pRefLine, scan_line, m_Pitch);
}
if (dest_bitpos) {
m_DestBuf.AppendByte(last_byte);
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index 2e6cf4e8db..f9925c323c 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -26,7 +26,7 @@ extern "C"
if (p == NULL) {
return NULL;
}
- FXSYS_memset32(p, 0, sizeof(z_stream));
+ FXSYS_memset(p, 0, sizeof(z_stream));
p->zalloc = alloc_func;
p->zfree = free_func;
inflateInit(p);
@@ -50,7 +50,7 @@ extern "C"
unsigned int post_pos = (unsigned int)FPDFAPI_FlateGetTotalOut(context);
unsigned int written = post_pos - pre_pos;
if (written < dest_size) {
- FXSYS_memset8(dest_buf + written, '\0', dest_size - written);
+ FXSYS_memset(dest_buf + written, '\0', dest_size - written);
}
return ret;
}
@@ -252,7 +252,7 @@ static FX_BOOL PNG_PredictorEncode(uint8_t*& data_buf, FX_DWORD& data_size,
if (move_size * (row + 1) > (int)data_size) {
move_size = data_size - (move_size * row);
}
- FXSYS_memmove32(pDestData + 1, pSrcData, move_size);
+ FXSYS_memmove(pDestData + 1, pSrcData, move_size);
pDestData += (move_size + 1);
pSrcData += move_size;
byte_cnt += move_size;
@@ -330,7 +330,7 @@ static void PNG_PredictLine(uint8_t* pDestData, const uint8_t* pSrcData, const u
int BytesPerPixel = (bpc * nColors + 7) / 8;
uint8_t tag = pSrcData[0];
if (tag == 0) {
- FXSYS_memmove32(pDestData, pSrcData + 1, row_size);
+ FXSYS_memmove(pDestData, pSrcData + 1, row_size);
return;
}
for (int byte = 0; byte < row_size; byte ++) {
@@ -407,7 +407,7 @@ static FX_BOOL PNG_Predictor(uint8_t*& data_buf, FX_DWORD& data_size,
if ((row + 1) * (move_size + 1) > (int)data_size) {
move_size = last_row_size - 1;
}
- FXSYS_memmove32(pDestData, pSrcData + 1, move_size);
+ FXSYS_memmove(pDestData, pSrcData + 1, move_size);
pSrcData += move_size + 1;
pDestData += move_size;
byte_cnt += move_size;
@@ -685,7 +685,7 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine()
if (m_Predictor == 2) {
FPDFAPI_FlateOutput(m_pFlate, m_pPredictRaw, m_PredictPitch + 1);
PNG_PredictLine(m_pScanline, m_pPredictRaw, m_pLastLine, m_BitsPerComponent, m_Colors, m_Columns);
- FXSYS_memcpy32(m_pLastLine, m_pScanline, m_PredictPitch);
+ FXSYS_memcpy(m_pLastLine, m_pScanline, m_PredictPitch);
} else {
FPDFAPI_FlateOutput(m_pFlate, m_pScanline, m_Pitch);
TIFF_PredictLine(m_pScanline, m_PredictPitch, m_bpc, m_nComps, m_OutputWidth);
@@ -694,7 +694,7 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine()
int bytes_to_go = m_Pitch;
int read_leftover = m_LeftOver > bytes_to_go ? bytes_to_go : m_LeftOver;
if (read_leftover) {
- FXSYS_memcpy32(m_pScanline, m_pPredictBuffer + m_PredictPitch - m_LeftOver, read_leftover);
+ FXSYS_memcpy(m_pScanline, m_pPredictBuffer + m_PredictPitch - m_LeftOver, read_leftover);
m_LeftOver -= read_leftover;
bytes_to_go -= read_leftover;
}
@@ -702,13 +702,13 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine()
if (m_Predictor == 2) {
FPDFAPI_FlateOutput(m_pFlate, m_pPredictRaw, m_PredictPitch + 1);
PNG_PredictLine(m_pPredictBuffer, m_pPredictRaw, m_pLastLine, m_BitsPerComponent, m_Colors, m_Columns);
- FXSYS_memcpy32(m_pLastLine, m_pPredictBuffer, m_PredictPitch);
+ FXSYS_memcpy(m_pLastLine, m_pPredictBuffer, m_PredictPitch);
} else {
FPDFAPI_FlateOutput(m_pFlate, m_pPredictBuffer, m_PredictPitch);
TIFF_PredictLine(m_pPredictBuffer, m_PredictPitch, m_BitsPerComponent, m_Colors, m_Columns);
}
int read_bytes = m_PredictPitch > bytes_to_go ? bytes_to_go : m_PredictPitch;
- FXSYS_memcpy32(m_pScanline + m_Pitch - bytes_to_go, m_pPredictBuffer, read_bytes);
+ FXSYS_memcpy(m_pScanline + m_Pitch - bytes_to_go, m_pPredictBuffer, read_bytes);
m_LeftOver += m_PredictPitch - read_bytes;
bytes_to_go -= read_bytes;
}
@@ -809,7 +809,7 @@ static void FlateUncompress(const uint8_t* src_buf, FX_DWORD src_size, FX_DWORD
if (i == result_tmp_bufs.GetSize() - 1) {
tmp_buf_size = last_buf_size;
}
- FXSYS_memcpy32(result_buf + result_pos, tmp_buf, tmp_buf_size);
+ FXSYS_memcpy(result_buf + result_pos, tmp_buf, tmp_buf_size);
result_pos += tmp_buf_size;
FX_Free(result_tmp_bufs[i]);
}
@@ -888,7 +888,7 @@ FX_BOOL CCodec_FlateModule::Encode(const uint8_t* src_buf, FX_DWORD src_size,
}
uint8_t* pSrcBuf = NULL;
pSrcBuf = FX_Alloc(uint8_t, src_size);
- FXSYS_memcpy32(pSrcBuf, src_buf, src_size);
+ FXSYS_memcpy(pSrcBuf, src_buf, src_size);
FX_BOOL ret = TRUE;
if (predictor == 2) {
ret = TIFF_PredictorEncode(pSrcBuf, src_size, Colors, BitsPerComponent,
diff --git a/core/src/fxcodec/codec/fx_codec_gif.cpp b/core/src/fxcodec/codec/fx_codec_gif.cpp
index d22c156fdb..4281a0d492 100644
--- a/core/src/fxcodec/codec/fx_codec_gif.cpp
+++ b/core/src/fxcodec/codec/fx_codec_gif.cpp
@@ -70,7 +70,7 @@ void* CCodec_GifModule::Start(void* pModule)
if (p == NULL) {
return NULL;
}
- FXSYS_memset32(p, 0, sizeof(FXGIF_Context));
+ FXSYS_memset(p, 0, sizeof(FXGIF_Context));
p->m_AllocFunc = _gif_alloc_func;
p->m_FreeFunc = _gif_free_func;
p->gif_ptr = NULL;
@@ -156,7 +156,7 @@ int32_t CCodec_GifModule::LoadFrame(void* pContext, int frame_num, CFX_DIBAttrib
buf += size;
size = *buf++;
if (size == 20) {
- FXSYS_memcpy32(pAttribute->m_strTime, buf, size);
+ FXSYS_memcpy(pAttribute->m_strTime, buf, size);
}
}
}
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp
index 6fe92ff240..26537b541c 100644
--- a/core/src/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/src/fxcodec/codec/fx_codec_icc.cpp
@@ -414,7 +414,7 @@ void* CCodec_IccModule::CreateProfile(ICodec_IccModule::IccParam* pIccParam, Icc
MD5ComputeID(pIccParam->pProfileData, pIccParam->dwProfileSize, ID);
break;
case Icc_PARAMTYPE_PARAM:
- FXSYS_memset32(ID, 0, 16);
+ FXSYS_memset(ID, 0, 16);
switch (pIccParam->ColorSpace) {
case IccCS_Gray:
text.Format("%lf", pIccParam->Gamma);
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index b908915227..b50ae6460d 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -8,7 +8,7 @@
#include "codec_int.h"
CCodec_Jbig2Context::CCodec_Jbig2Context()
{
- FXSYS_memset32(this, 0, sizeof(CCodec_Jbig2Context));
+ FXSYS_memset(this, 0, sizeof(CCodec_Jbig2Context));
}
CCodec_Jbig2Module::~CCodec_Jbig2Module()
{
@@ -28,7 +28,7 @@ void CCodec_Jbig2Module::DestroyJbig2Context(void* pJbig2Content)
FX_BOOL CCodec_Jbig2Module::Decode(FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch)
{
- FXSYS_memset32(dest_buf, 0, height * dest_pitch);
+ FXSYS_memset(dest_buf, 0, height * dest_pitch);
CJBig2_Context* pContext = CJBig2_Context::CreateContext(&m_Module,
(uint8_t*)global_data, global_size, (uint8_t*)src_buf, src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache);
if (pContext == NULL) {
@@ -97,7 +97,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, FX_DWORD wid
m_pJbig2Context->m_dest_pitch = dest_pitch;
m_pJbig2Context->m_pPause = pPause;
m_pJbig2Context->m_bFileReader = FALSE;
- FXSYS_memset32(dest_buf, 0, height * dest_pitch);
+ FXSYS_memset(dest_buf, 0, height * dest_pitch);
m_pJbig2Context->m_pContext = CJBig2_Context::CreateContext(&m_Module,
(uint8_t*)global_data, global_size, (uint8_t*)src_buf, src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache, pPause);
if(!m_pJbig2Context->m_pContext) {
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index df0ef5e9b6..b61fd49b3b 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -81,7 +81,7 @@ static FX_BOOL _JpegIsIccMarker(jpeg_saved_marker_ptr marker)
{
if (marker->marker == JPEG_MARKER_ICC &&
marker->data_length >= JPEG_OVERHEAD_LEN &&
- (FXSYS_memcmp32(marker->data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12) == 0)) {
+ (FXSYS_memcmp(marker->data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12) == 0)) {
return TRUE;
}
return FALSE;
@@ -134,7 +134,7 @@ static FX_BOOL _JpegLoadIccProfile(j_decompress_ptr cinfo, uint8_t** icc_buf_ptr
*icc_length = icc_data_len;
for (int idx = 0; idx < num_icc_marker; idx++) {
icc_data_len = marker_list[idx]->data_length - JPEG_OVERHEAD_LEN;
- FXSYS_memcpy32(icc_data_ptr, marker_list[idx]->data + JPEG_OVERHEAD_LEN, icc_data_len);
+ FXSYS_memcpy(icc_data_ptr, marker_list[idx]->data + JPEG_OVERHEAD_LEN, icc_data_len);
icc_data_ptr += icc_data_len;
}
return TRUE;
@@ -151,16 +151,16 @@ static FX_BOOL _JpegEmbedIccProfile(j_compress_ptr cinfo, const uint8_t* icc_buf
}
FX_DWORD icc_data_length = JPEG_OVERHEAD_LEN + (icc_segment_num > 1 ? icc_segment_size : icc_length);
uint8_t* icc_data = FX_Alloc(uint8_t, icc_data_length);
- FXSYS_memcpy32(icc_data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12);
+ FXSYS_memcpy(icc_data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12);
icc_data[13] = (uint8_t)icc_segment_num;
for (uint8_t i = 0; i < (icc_segment_num - 1); i++) {
icc_data[12] = i + 1;
- FXSYS_memcpy32(icc_data + JPEG_OVERHEAD_LEN, icc_buf_ptr + i * icc_segment_size, icc_segment_size);
+ FXSYS_memcpy(icc_data + JPEG_OVERHEAD_LEN, icc_buf_ptr + i * icc_segment_size, icc_segment_size);
jpeg_write_marker(cinfo, JPEG_MARKER_ICC, icc_data, icc_data_length);
}
icc_data[12] = (uint8_t)icc_segment_num;
FX_DWORD icc_size = (icc_segment_num - 1) * icc_segment_size;
- FXSYS_memcpy32(icc_data + JPEG_OVERHEAD_LEN, icc_buf_ptr + icc_size, icc_length - icc_size);
+ FXSYS_memcpy(icc_data + JPEG_OVERHEAD_LEN, icc_buf_ptr + icc_size, icc_length - icc_size);
jpeg_write_marker(cinfo, JPEG_MARKER_ICC, icc_data, JPEG_OVERHEAD_LEN + icc_length - icc_size);
FX_Free(icc_data);
return TRUE;
@@ -385,9 +385,9 @@ CCodec_JpegDecoder::CCodec_JpegDecoder()
m_bInited = FALSE;
m_pExtProvider = NULL;
m_pExtContext = NULL;
- FXSYS_memset32(&cinfo, 0, sizeof(cinfo));
- FXSYS_memset32(&jerr, 0, sizeof(jerr));
- FXSYS_memset32(&src, 0, sizeof(src));
+ FXSYS_memset(&cinfo, 0, sizeof(cinfo));
+ FXSYS_memset(&jerr, 0, sizeof(jerr));
+ FXSYS_memset(&src, 0, sizeof(src));
m_nDefaultScaleDenom = 1;
}
CCodec_JpegDecoder::~CCodec_JpegDecoder()
@@ -461,7 +461,7 @@ FX_BOOL CCodec_JpegDecoder::Create(const uint8_t* src_buf, FX_DWORD src_size, in
src.fill_input_buffer = _src_fill_buffer;
src.resync_to_restart = _src_resync;
m_bJpegTransform = ColorTransform;
- if(src_size > 1 && FXSYS_memcmp32(src_buf + src_size - 2, "\xFF\xD9", 2) != 0) {
+ if(src_size > 1 && FXSYS_memcmp(src_buf + src_size - 2, "\xFF\xD9", 2) != 0) {
((uint8_t*)src_buf)[src_size - 2] = 0xFF;
((uint8_t*)src_buf)[src_size - 1] = 0xD9;
}
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 312ce78759..a397a4504a 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -472,9 +472,9 @@ void color_apply_icc_profile(opj_image_t *image)
image->comps[1] = image->comps[0];
image->comps[2] = image->comps[0];
image->comps[1].data = FX_Alloc(int, (size_t)max);
- FXSYS_memset8(image->comps[1].data, 0, sizeof(int) * (size_t)max);
+ FXSYS_memset(image->comps[1].data, 0, sizeof(int) * (size_t)max);
image->comps[2].data = FX_Alloc(int, (size_t)max);
- FXSYS_memset8(image->comps[2].data, 0, sizeof(int) * (size_t)max);
+ FXSYS_memset(image->comps[2].data, 0, sizeof(int) * (size_t)max);
image->numcomps += 2;
r = image->comps[0].data;
for(int i = 0; i < max; ++i) {
@@ -630,7 +630,7 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, int src_size)
opj_set_default_decoder_parameters(&parameters);
parameters.decod_format = 0;
parameters.cod_format = 3;
- if(FXSYS_memcmp32(m_SrcData, szJP2Header, sizeof(szJP2Header)) == 0) {
+ if(FXSYS_memcmp(m_SrcData, szJP2Header, sizeof(szJP2Header)) == 0) {
l_codec = opj_create_decompress(OPJ_CODEC_JP2);
parameters.decod_format = 1;
} else {
@@ -715,7 +715,7 @@ FX_BOOL CJPX_Decoder::Decode(uint8_t* dest_buf, int pitch, FX_BOOL bTranslateCol
if(pitch < (int)(image->comps[0].w * 8 * image->numcomps + 31) >> 5 << 2) {
return FALSE;
}
- FXSYS_memset8(dest_buf, 0xff, image->y1 * pitch);
+ FXSYS_memset(dest_buf, 0xff, image->y1 * pitch);
uint8_t** channel_bufs = FX_Alloc(uint8_t*, image->numcomps);
FX_BOOL result = FALSE;
int* adjust_comps = FX_Alloc(int, image->numcomps);
diff --git a/core/src/fxcodec/codec/fx_codec_png.cpp b/core/src/fxcodec/codec/fx_codec_png.cpp
index 55d66a3ccf..b96ccf6dec 100644
--- a/core/src/fxcodec/codec/fx_codec_png.cpp
+++ b/core/src/fxcodec/codec/fx_codec_png.cpp
@@ -50,7 +50,7 @@ static void _png_load_bmp_attribute(png_structp png_ptr, png_infop info_ptr, CFX
png_timep t = NULL;
png_get_tIME(png_ptr, info_ptr, &t);
if (t) {
- FXSYS_memset32(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
+ FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
FXSYS_snprintf((FX_CHAR*)pAttribute->m_strTime, sizeof(pAttribute->m_strTime), "%4d:%2d:%2d %2d:%2d:%2d",
t->year, t->month, t->day, t->hour, t->minute, t->second);
pAttribute->m_strTime[sizeof(pAttribute->m_strTime) - 1] = 0;
@@ -67,15 +67,15 @@ static void _png_load_bmp_attribute(png_structp png_ptr, png_infop info_ptr, CFX
for (i = 0; i < num_text; i++) {
len = (FX_DWORD)FXSYS_strlen(text[i].key);
buf = "Time";
- if (!FXSYS_memcmp32(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
+ if (!FXSYS_memcmp(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
if (!bTime) {
- FXSYS_memset32(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
- FXSYS_memcpy32(pAttribute->m_strTime, text[i].text,
+ FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
+ FXSYS_memcpy(pAttribute->m_strTime, text[i].text,
FX_MIN(sizeof(pAttribute->m_strTime) - 1, text[i].text_length));
}
} else {
buf = "Author";
- if (!FXSYS_memcmp32(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
+ if (!FXSYS_memcmp(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
pAttribute->m_strAuthor.Empty();
pAttribute->m_strAuthor.Load((uint8_t*)text[i].text, (FX_STRSIZE)text[i].text_length);
}
diff --git a/core/src/fxcodec/codec/fx_codec_progress.cpp b/core/src/fxcodec/codec/fx_codec_progress.cpp
index da64eed42f..33398f0663 100644
--- a/core/src/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/src/fxcodec/codec/fx_codec_progress.cpp
@@ -107,7 +107,7 @@ void CFXCODEC_HorzTable::Calc(int dest_len, int src_len, FX_BOOL bInterpol)
if(m_pWeightTables == NULL) {
return;
}
- FXSYS_memset32(m_pWeightTables, 0, size);
+ FXSYS_memset(m_pWeightTables, 0, size);
if(scale > 1) {
int pre_des_col = 0;
for (int src_col = 0; src_col < src_len; src_col++) {
@@ -164,7 +164,7 @@ void CFXCODEC_VertTable::Calc(int dest_len, int src_len)
if(m_pWeightTables == NULL) {
return;
}
- FXSYS_memset32(m_pWeightTables, 0, size);
+ FXSYS_memset(m_pWeightTables, 0, size);
if(scale > 1) {
double step = 0.0;
int src_row = 0;
@@ -296,7 +296,7 @@ FX_BOOL CCodec_ProgressiveDecoder::JpegReadMoreData(ICodec_JpegModule* pJpegModu
} else {
FX_DWORD dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -540,7 +540,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifReadMoreData(ICodec_GifModule* pGifModule,
} else {
FX_DWORD dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -621,7 +621,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
switch(pCodec->m_TransMethod) {
case 3: {
uint8_t gray = FXRGB2GRAY(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb));
- FXSYS_memset8(pScanline, gray, sizeX);
+ FXSYS_memset(pScanline, gray, sizeX);
break;
}
case 8: {
@@ -663,11 +663,11 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t r
if (pCodec->m_GifTransIndex != -1 && pCodec->m_pDeviceBitmap->HasAlpha()) {
pal_index = pCodec->m_GifTransIndex;
}
- FXSYS_memset8(pCodec->m_pDecodeBuf, pal_index, pCodec->m_SrcWidth);
+ FXSYS_memset(pCodec->m_pDecodeBuf, pal_index, pCodec->m_SrcWidth);
FX_BOOL bLastPass = ((row_num % 2) == 1) ? TRUE : FALSE;
int32_t line = row_num + pCodec->m_GifFrameRect.top;
int32_t left = pCodec->m_GifFrameRect.left;
- FXSYS_memcpy32(pCodec->m_pDecodeBuf + left, row_buf, img_width);
+ FXSYS_memcpy(pCodec->m_pDecodeBuf + left, row_buf, img_width);
int src_top = pCodec->m_clipBox.top;
int src_bottom = pCodec->m_clipBox.bottom;
int des_top = pCodec->m_startY;
@@ -695,7 +695,7 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t r
while (++cur_row < des_bottom) {
uint8_t* scan_des = (uint8_t*)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;
FX_DWORD size = pCodec->m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
}
if(bLastPass) {
@@ -799,7 +799,7 @@ FX_BOOL CCodec_ProgressiveDecoder::BmpReadMoreData(ICodec_BmpModule* pBmpModule,
} else {
FX_DWORD dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -828,7 +828,7 @@ void CCodec_ProgressiveDecoder::BmpReadScanlineCallback(void* pModule, int32_t r
CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;
CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;
ASSERT(pDIBitmap != NULL);
- FXSYS_memcpy32(pCodec->m_pDecodeBuf, row_buf, pCodec->m_ScanlineSize);
+ FXSYS_memcpy(pCodec->m_pDecodeBuf, row_buf, pCodec->m_ScanlineSize);
int src_top = pCodec->m_clipBox.top;
int src_bottom = pCodec->m_clipBox.bottom;
int des_top = pCodec->m_startY;
@@ -864,7 +864,7 @@ void CCodec_ProgressiveDecoder::ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, doub
while (++des_row < des_bottom) {
uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
return;
}
@@ -945,7 +945,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
m_status = FXCODEC_STATUS_ERR_MEMORY;
return FALSE;
}
- FXSYS_memset32(m_pSrcBuf, 0, size);
+ FXSYS_memset(m_pSrcBuf, 0, size);
m_SrcSize = size;
switch(imageType) {
case FXCODEC_IMAGE_BMP: {
@@ -993,7 +993,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
m_status = FXCODEC_STATUS_ERR_MEMORY;
return FALSE;
}
- FXSYS_memcpy32(m_pSrcPalette, pPalette, m_SrcPaletteNumber * sizeof(FX_DWORD));
+ FXSYS_memcpy(m_pSrcPalette, pPalette, m_SrcPaletteNumber * sizeof(FX_DWORD));
}
return TRUE;
}
@@ -1084,7 +1084,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
m_status = FXCODEC_STATUS_ERR_MEMORY;
return FALSE;
}
- FXSYS_memset32(m_pSrcBuf, 0, input_size);
+ FXSYS_memset(m_pSrcBuf, 0, input_size);
m_SrcSize = input_size;
}
bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);
@@ -1466,7 +1466,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
des_g += pixel_weight * src_scan[j];
}
- FXSYS_memset8(des_scan, (uint8_t)(des_g >> 16), 3);
+ FXSYS_memset(des_scan, (uint8_t)(des_g >> 16), 3);
des_scan += des_Bpp;
}
break;
@@ -1585,7 +1585,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
while (++des_row < des_bottom) {
uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
}
return;
@@ -1656,7 +1656,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
while (++des_row < des_bottom) {
uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
}
return;
@@ -1670,7 +1670,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
}
uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
}
}
@@ -1815,7 +1815,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);
+ FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0, m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
switch(m_SrcComponents) {
@@ -1884,7 +1884,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);
+ FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
m_WeightHorzOO.Calc(m_sizeX, m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
return m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -1910,7 +1910,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);
+ FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0, m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
m_FrameCur = frames;
@@ -1947,7 +1947,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pDecodeBuf, 0, m_ScanlineSize);
+ FXSYS_memset(m_pDecodeBuf, 0, m_ScanlineSize);
m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0, m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
return m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -2018,7 +2018,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pSrcBuf, 0, input_size);
+ FXSYS_memset(m_pSrcBuf, 0, input_size);
m_SrcSize = input_size;
}
FX_BOOL bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);
diff --git a/core/src/fxcodec/codec/fx_codec_tiff.cpp b/core/src/fxcodec/codec/fx_codec_tiff.cpp
index d057ff8020..13909476d1 100644
--- a/core/src/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/src/fxcodec/codec/fx_codec_tiff.cpp
@@ -160,15 +160,15 @@ void* _TIFFrealloc(void* ptr, tmsize_t size)
}
void _TIFFmemset(void* ptr, int val, tmsize_t size)
{
- FXSYS_memset8(ptr, val, (size_t)size);
+ FXSYS_memset(ptr, val, (size_t)size);
}
void _TIFFmemcpy(void* des, const void* src, tmsize_t size)
{
- FXSYS_memcpy32(des, src, (size_t)size);
+ FXSYS_memcpy(des, src, (size_t)size);
}
int _TIFFmemcmp(const void* ptr1, const void* ptr2, tmsize_t size)
{
- return FXSYS_memcmp32(ptr1, ptr2, (size_t)size);
+ return FXSYS_memcmp(ptr1, ptr2, (size_t)size);
}
static void _tiff_warning_ext(thandle_t context, const char* module, const char* fmt, va_list ap)
{
@@ -228,7 +228,7 @@ void CCodec_TiffContext::GetFrames(int32_t& frames)
if (size && buf) {\
(key) = FX_Alloc(uint8_t,size);\
if ((key)) {\
- FXSYS_memcpy32((key),buf,size);\
+ FXSYS_memcpy((key),buf,size);\
pExif->m_TagVal.SetAt(tag,(key));}}}\
(key) = NULL;
template <class T>
@@ -260,7 +260,7 @@ static void Tiff_Exif_GetStringInfo(TIFF* tif_ctx, ttag_t tag, CFX_DIBAttributeE
if ((key) == NULL) {
return;
}
- FXSYS_memcpy32((key), buf, size);
+ FXSYS_memcpy((key), buf, size);
key[size] = 0;
pExif->m_TagVal.SetAt(tag, (key));
}
diff --git a/core/src/fxcodec/fx_zlib/zlib_v128/zutil.h b/core/src/fxcodec/fx_zlib/zlib_v128/zutil.h
index 582d1b5f3c..e4ec2bdd91 100644
--- a/core/src/fxcodec/fx_zlib/zlib_v128/zutil.h
+++ b/core/src/fxcodec/fx_zlib/zlib_v128/zutil.h
@@ -207,9 +207,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define zmemcmp _fmemcmp
# define zmemzero(dest, len) _fmemset(dest, 0, len)
# else
-# define zmemcpy FXSYS_memcpy32
-# define zmemcmp FXSYS_memcmp32
-# define zmemzero(dest, len) FXSYS_memset32(dest, 0, len)
+# define zmemcpy FXSYS_memcpy
+# define zmemcmp FXSYS_memcmp
+# define zmemzero(dest, len) FXSYS_memset(dest, 0, len)
# endif
#else
void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
diff --git a/core/src/fxcodec/jbig2/JBig2_Define.h b/core/src/fxcodec/jbig2/JBig2_Define.h
index cc1e3904bd..f3bdd5a620 100644
--- a/core/src/fxcodec/jbig2/JBig2_Define.h
+++ b/core/src/fxcodec/jbig2/JBig2_Define.h
@@ -7,9 +7,9 @@
#ifndef _JBIG2_DEFINE_H_
#define _JBIG2_DEFINE_H_
#include "../../../include/fxcrt/fx_system.h"
-#define JBIG2_memset FXSYS_memset8
-#define JBIG2_memcmp FXSYS_memcmp32
-#define JBIG2_memcpy FXSYS_memcpy32
+#define JBIG2_memset FXSYS_memset
+#define JBIG2_memcmp FXSYS_memcmp
+#define JBIG2_memcpy FXSYS_memcpy
#include "JBig2_Object.h"
#define JBIG2_OOB 1
typedef struct {
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index bad595e6b7..929180e0b5 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
@@ -2376,7 +2376,7 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecod
}
JBIG2_ALLOC(IAID, CJBig2_ArithIaidDecoder((uint8_t)nTmp));
SDNEWSYMS = (CJBig2_Image**)m_pModule->JBig2_Malloc2(SDNUMNEWSYMS, sizeof(CJBig2_Image*));
- FXSYS_memset32(SDNEWSYMS, 0 , SDNUMNEWSYMS * sizeof(CJBig2_Image*));
+ FXSYS_memset(SDNEWSYMS, 0 , SDNUMNEWSYMS * sizeof(CJBig2_Image*));
HCHEIGHT = 0;
NSYMSDECODED = 0;
while(NSYMSDECODED < SDNUMNEWSYMS) {
@@ -2699,12 +2699,12 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Huffman(CJBig2_BitStream *pStream,
CJBig2_SymbolDict *pDict;
JBIG2_ALLOC(pHuffmanDecoder, CJBig2_HuffmanDecoder(pStream));
SDNEWSYMS = (CJBig2_Image**)m_pModule->JBig2_Malloc2(SDNUMNEWSYMS, sizeof(CJBig2_Image*));
- FXSYS_memset32(SDNEWSYMS, 0 , SDNUMNEWSYMS * sizeof(CJBig2_Image*));
+ FXSYS_memset(SDNEWSYMS, 0 , SDNUMNEWSYMS * sizeof(CJBig2_Image*));
SDNEWSYMWIDTHS = NULL;
BHC = NULL;
if(SDREFAGG == 0) {
SDNEWSYMWIDTHS = (FX_DWORD *)m_pModule->JBig2_Malloc2(SDNUMNEWSYMS, sizeof(FX_DWORD));
- FXSYS_memset32(SDNEWSYMWIDTHS, 0 , SDNUMNEWSYMS * sizeof(FX_DWORD));
+ FXSYS_memset(SDNEWSYMWIDTHS, 0 , SDNUMNEWSYMS * sizeof(FX_DWORD));
}
HCHEIGHT = 0;
NSYMSDECODED = 0;
diff --git a/core/src/fxcodec/lbmp/fx_bmp.cpp b/core/src/fxcodec/lbmp/fx_bmp.cpp
index 986a3272c4..7553ec7fac 100644
--- a/core/src/fxcodec/lbmp/fx_bmp.cpp
+++ b/core/src/fxcodec/lbmp/fx_bmp.cpp
@@ -37,7 +37,7 @@ bmp_decompress_struct_p _bmp_create_decompress()
if(bmp_ptr == NULL) {
return NULL;
}
- FXSYS_memset32(bmp_ptr, 0, sizeof(bmp_decompress_struct));
+ FXSYS_memset(bmp_ptr, 0, sizeof(bmp_decompress_struct));
bmp_ptr->decode_status = BMP_D_STATUS_HEADER;
bmp_ptr->bmp_header_ptr = FX_Alloc(BmpFileHeader, 1);
return bmp_ptr;
@@ -199,7 +199,7 @@ int32_t _bmp_read_header(bmp_decompress_struct_p bmp_ptr)
}
bmp_ptr->out_row_buffer = FX_Alloc(uint8_t, bmp_ptr->out_row_bytes);
BMP_PTR_NOT_NULL(bmp_ptr->out_row_buffer, bmp_ptr);
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
_bmp_save_decoding_status(bmp_ptr, BMP_D_STATUS_PAL);
}
if (bmp_ptr->decode_status == BMP_D_STATUS_PAL) {
@@ -362,7 +362,7 @@ int32_t _bmp_decode_rgb(bmp_decompress_struct_p bmp_ptr)
case 8:
case 24:
case 32:
- FXSYS_memcpy32(bmp_ptr->out_row_buffer, des_buf, bmp_ptr->src_row_bytes);
+ FXSYS_memcpy(bmp_ptr->out_row_buffer, des_buf, bmp_ptr->src_row_bytes);
break;
}
row_buf = bmp_ptr->out_row_buffer;
@@ -400,7 +400,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
bmp_ptr->imgTB_flag ? bmp_ptr->row_num++ : (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
bmp_ptr->col_num = 0;
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
_bmp_save_decoding_status(bmp_ptr, BMP_D_STATUS_DATA);
continue;
}
@@ -426,7 +426,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
return 0;
}
while(bmp_ptr->row_num < bmp_row_num_next) {
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
bmp_ptr->_bmp_get_row_fn(bmp_ptr,
bmp_ptr->imgTB_flag ? bmp_ptr->row_num++ : (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
@@ -443,7 +443,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- FXSYS_memcpy32(bmp_ptr->out_row_buffer + bmp_ptr->col_num, second_byte_ptr, *first_byte_ptr);
+ FXSYS_memcpy(bmp_ptr->out_row_buffer + bmp_ptr->col_num, second_byte_ptr, *first_byte_ptr);
bmp_ptr->col_num += (int32_t)(*first_byte_ptr);
}
}
@@ -458,7 +458,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
_bmp_error(bmp_ptr, "The Bmp File Is Corrupt");
return 0;
}
- FXSYS_memset8(bmp_ptr->out_row_buffer + bmp_ptr->col_num, *second_byte_ptr, *first_byte_ptr);
+ FXSYS_memset(bmp_ptr->out_row_buffer + bmp_ptr->col_num, *second_byte_ptr, *first_byte_ptr);
bmp_ptr->col_num += (int32_t)(*first_byte_ptr);
}
}
@@ -493,7 +493,7 @@ int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr)
bmp_ptr->imgTB_flag ? bmp_ptr->row_num++ : (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
bmp_ptr->col_num = 0;
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
_bmp_save_decoding_status(bmp_ptr, BMP_D_STATUS_DATA);
continue;
}
@@ -519,7 +519,7 @@ int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr)
return 0;
}
while(bmp_ptr->row_num < bmp_row_num_next) {
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
bmp_ptr->_bmp_get_row_fn(bmp_ptr,
bmp_ptr->imgTB_flag ? bmp_ptr->row_num++ : (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
@@ -614,7 +614,7 @@ bmp_compress_struct_p _bmp_create_compress()
bmp_compress_struct_p bmp_ptr;
bmp_ptr = FX_Alloc(bmp_compress_struct, 1);
if (bmp_ptr) {
- FXSYS_memset32(bmp_ptr, 0, sizeof(bmp_compress_struct));
+ FXSYS_memset(bmp_ptr, 0, sizeof(bmp_compress_struct));
}
return bmp_ptr;
}
@@ -683,7 +683,7 @@ static void _bmp_encode_bitfields(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_b
if (dst_buf == NULL) {
return;
}
- FXSYS_memset32(&dst_buf[dst_pos], 0, size);
+ FXSYS_memset(&dst_buf[dst_pos], 0, size);
FX_DWORD mask_red;
FX_DWORD mask_green;
FX_DWORD mask_blue;
@@ -770,9 +770,9 @@ static void _bmp_encode_rgb(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX
if (dst_buf == NULL) {
return;
}
- FXSYS_memset32(&dst_buf[dst_pos], 0, size);
+ FXSYS_memset(&dst_buf[dst_pos], 0, size);
for (int32_t row_num = bmp_ptr->src_row - 1; row_num > -1; row_num--) {
- FXSYS_memcpy32(&dst_buf[dst_pos], &bmp_ptr->src_buf[row_num * bmp_ptr->src_pitch], bmp_ptr->src_pitch);
+ FXSYS_memcpy(&dst_buf[dst_pos], &bmp_ptr->src_buf[row_num * bmp_ptr->src_pitch], bmp_ptr->src_pitch);
dst_pos += dst_pitch;
}
dst_size = dst_pos;
@@ -800,7 +800,7 @@ static void _bmp_encode_rle8(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, F
if (dst_buf == NULL) {
return;
}
- FXSYS_memset32(&dst_buf[dst_pos], 0, size);
+ FXSYS_memset(&dst_buf[dst_pos], 0, size);
for (int32_t row_num = bmp_ptr->src_row - 1, i = 0; row_num > -1; ) {
index = row_num * bmp_ptr->src_pitch;
rle[0] = _bmp_rle8_search(&bmp_ptr->src_buf[index + i], size - index - i);
@@ -848,7 +848,7 @@ static void _bmp_encode_rle4(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, F
if (dst_buf == NULL) {
return;
}
- FXSYS_memset32(&dst_buf[dst_pos], 0, size);
+ FXSYS_memset(&dst_buf[dst_pos], 0, size);
for (int32_t row_num = bmp_ptr->src_row - 1, i = 0; row_num > -1; rle[1] = 0) {
index = row_num * bmp_ptr->src_pitch;
rle[0] = _bmp_rle4_search(&bmp_ptr->src_buf[index + i], size - index - i);
@@ -886,10 +886,10 @@ FX_BOOL _bmp_encode_image( bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX_
if (dst_buf == NULL) {
return FALSE;
}
- FXSYS_memset32(dst_buf, 0, dst_size);
+ FXSYS_memset(dst_buf, 0, dst_size);
bmp_ptr->file_header.bfOffBits = head_size;
if (bmp_ptr->pal_ptr && pal_size) {
- FXSYS_memcpy32(&dst_buf[head_size], bmp_ptr->pal_ptr, pal_size);
+ FXSYS_memcpy(&dst_buf[head_size], bmp_ptr->pal_ptr, pal_size);
bmp_ptr->file_header.bfOffBits += pal_size;
}
WriteInfoHeader(&bmp_ptr->info_header, dst_buf);
diff --git a/core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c b/core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c
index 964182ae38..a32b6e2303 100644
--- a/core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c
+++ b/core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c
@@ -269,7 +269,7 @@ void* CMSEXPORT _cmsMalloc(cmsContext ContextID, cmsUInt32Number size)
void* CMSEXPORT _cmsMallocZero(cmsContext ContextID, cmsUInt32Number size)
{
void* p = FXMEM_DefaultAlloc(size, 1);
- if (p) FXSYS_memset32(p, 0, size);
+ if (p) FXSYS_memset(p, 0, size);
return p;
}
@@ -299,7 +299,7 @@ void CMSEXPORT _cmsFree(cmsContext ContextID, void* Ptr)
void* CMSEXPORT _cmsDupMem(cmsContext ContextID, const void* Org, cmsUInt32Number size)
{
void* p = FXMEM_DefaultAlloc(size, 1);
- FXSYS_memmove32(p, Org, size);
+ FXSYS_memmove(p, Org, size);
return p;
}
diff --git a/core/src/fxcodec/lgif/fx_gif.cpp b/core/src/fxcodec/lgif/fx_gif.cpp
index 29e99f2abf..6d22f58c16 100644
--- a/core/src/fxcodec/lgif/fx_gif.cpp
+++ b/core/src/fxcodec/lgif/fx_gif.cpp
@@ -32,8 +32,8 @@ void CGifLZWDecoder::ClearTable()
code_size_cur = code_size + 1;
code_next = code_end + 1;
code_old = (FX_WORD) - 1;
- FXSYS_memset32(code_table, 0, sizeof(tag_Table)*GIF_MAX_LZW_CODE);
- FXSYS_memset32(stack, 0, GIF_MAX_LZW_CODE);
+ FXSYS_memset(code_table, 0, sizeof(tag_Table)*GIF_MAX_LZW_CODE);
+ FXSYS_memset(stack, 0, GIF_MAX_LZW_CODE);
for (FX_WORD i = 0; i < code_clear; i++) {
code_table[i].suffix = (uint8_t)i;
}
@@ -73,11 +73,11 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size)
FX_DWORD i = 0;
if(stack_size != 0) {
if(des_size < stack_size) {
- FXSYS_memcpy32(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
+ FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
stack_size -= (FX_WORD)des_size;
return 3;
}
- FXSYS_memcpy32(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
+ FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
des_buf += stack_size;
i += stack_size;
stack_size = 0;
@@ -127,11 +127,11 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size)
}
code_old = code;
if(i + stack_size > des_size) {
- FXSYS_memcpy32(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size - i);
+ FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size - i);
stack_size -= (FX_WORD)(des_size - i);
return 3;
}
- FXSYS_memcpy32(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
+ FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
des_buf += stack_size;
i += stack_size;
stack_size = 0;
@@ -159,7 +159,7 @@ static FX_BOOL _gif_grow_buf(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD size
return FALSE;
}
}
- FXSYS_memset32(dst_buf + len_org, 0, dst_len - len_org);
+ FXSYS_memset(dst_buf + len_org, 0, dst_len - len_org);
return dst_buf != NULL;
}
return TRUE;
@@ -191,7 +191,7 @@ static inline uint8_t _gif_cut_buf(const uint8_t* buf, FX_DWORD& offset, uint8_t
}
CGifLZWEncoder::CGifLZWEncoder()
{
- FXSYS_memset32(this, 0, sizeof(CGifLZWEncoder));
+ FXSYS_memset(this, 0, sizeof(CGifLZWEncoder));
}
CGifLZWEncoder::~CGifLZWEncoder()
{
@@ -231,9 +231,9 @@ void CGifLZWEncoder::WriteBlock(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD&
longjmp(jmp, 1);
}
dst_buf[offset++] = index_buf_len;
- FXSYS_memcpy32(&dst_buf[offset], index_buf, index_buf_len);
+ FXSYS_memcpy(&dst_buf[offset], index_buf, index_buf_len);
offset += index_buf_len;
- FXSYS_memset32(index_buf, 0, GIF_DATA_BLOCK);
+ FXSYS_memset(index_buf, 0, GIF_DATA_BLOCK);
index_buf_len = 0;
}
void CGifLZWEncoder::EncodeString( FX_DWORD index, uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset )
@@ -340,7 +340,7 @@ gif_decompress_struct_p _gif_create_decompress()
if(gif_ptr == NULL) {
return NULL;
}
- FXSYS_memset32(gif_ptr, 0, sizeof(gif_decompress_struct));
+ FXSYS_memset(gif_ptr, 0, sizeof(gif_decompress_struct));
gif_ptr->decode_status = GIF_D_STATUS_SIG;
gif_ptr->img_ptr_arr_ptr = new CFX_ArrayTemplate<GifImage*>;
#ifdef GIF_SUPPORT_COMMENT_EXTENSION
@@ -427,7 +427,7 @@ gif_compress_struct_p _gif_create_compress()
if (gif_ptr == NULL) {
return NULL;
}
- FXSYS_memset32(gif_ptr, 0, sizeof(gif_compress_struct));
+ FXSYS_memset(gif_ptr, 0, sizeof(gif_compress_struct));
gif_ptr->img_encoder_ptr = new CGifLZWEncoder;
gif_ptr->header_ptr = (GifHeader*)FX_Alloc(uint8_t, sizeof(GifHeader));
if (gif_ptr->header_ptr == NULL) {
@@ -435,8 +435,8 @@ gif_compress_struct_p _gif_create_compress()
FX_Free(gif_ptr);
return NULL;
}
- FXSYS_memcpy32(gif_ptr->header_ptr->signature, GIF_SIGNATURE, 3);
- FXSYS_memcpy32(gif_ptr->header_ptr->version, "89a", 3);
+ FXSYS_memcpy(gif_ptr->header_ptr->signature, GIF_SIGNATURE, 3);
+ FXSYS_memcpy(gif_ptr->header_ptr->version, "89a", 3);
gif_ptr->lsd_ptr = (GifLSD*)FX_Alloc(uint8_t, sizeof(GifLSD));
if (gif_ptr->lsd_ptr == NULL) {
FX_Free(gif_ptr->header_ptr);
@@ -444,7 +444,7 @@ gif_compress_struct_p _gif_create_compress()
FX_Free(gif_ptr);
return NULL;
}
- FXSYS_memset32(gif_ptr->lsd_ptr, 0, sizeof(GifLSD));
+ FXSYS_memset(gif_ptr->lsd_ptr, 0, sizeof(GifLSD));
gif_ptr->image_info_ptr = (GifImageInfo*)FX_Alloc(uint8_t, sizeof(GifImageInfo));
if (gif_ptr->image_info_ptr == NULL) {
FX_Free(gif_ptr->lsd_ptr);
@@ -453,10 +453,10 @@ gif_compress_struct_p _gif_create_compress()
FX_Free(gif_ptr);
return NULL;
}
- FXSYS_memset32(gif_ptr->image_info_ptr, 0, sizeof(GifImageInfo));
+ FXSYS_memset(gif_ptr->image_info_ptr, 0, sizeof(GifImageInfo));
#ifdef GIF_SUPPORT_APPLICATION_EXTENSION
- FXSYS_memcpy32(gif_ptr->app_identify, "netscape", 8);
- FXSYS_memcpy32(gif_ptr->app_authentication, "2.0", 3);
+ FXSYS_memcpy(gif_ptr->app_identify, "netscape", 8);
+ FXSYS_memcpy(gif_ptr->app_authentication, "2.0", 3);
#endif
#ifdef GIF_SUPPORT_GRAPHIC_CONTROL_EXTENSION
gif_ptr->gce_ptr = (GifGCE*)FX_Alloc(uint8_t, sizeof(GifGCE));
@@ -480,7 +480,7 @@ gif_compress_struct_p _gif_create_compress()
FX_Free(gif_ptr);
return NULL;
}
- FXSYS_memset32(gif_ptr->pte_ptr, 0, sizeof(GifPTE));
+ FXSYS_memset(gif_ptr->pte_ptr, 0, sizeof(GifPTE));
gif_ptr->pte_ptr->block_size = 12;
#endif
return gif_ptr;
@@ -579,7 +579,7 @@ int32_t _gif_read_header(gif_decompress_struct_p gif_ptr)
gif_ptr->global_pal_ptr = NULL;
gif_ptr->global_pal_ptr = (GifPalette*)FX_Alloc(uint8_t, global_pal_size);
GIF_PTR_NOT_NULL(gif_ptr->global_pal_ptr, gif_ptr);
- FXSYS_memcpy32(gif_ptr->global_pal_ptr, global_pal_ptr, global_pal_size);
+ FXSYS_memcpy(gif_ptr->global_pal_ptr, global_pal_ptr, global_pal_size);
}
gif_ptr->width = (int)_GetWord_LSBFirst((uint8_t*)&gif_lsd_ptr->width);
gif_ptr->height = (int)_GetWord_LSBFirst((uint8_t*)&gif_lsd_ptr->height);
@@ -736,8 +736,8 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
gif_ae_data_str += CFX_ByteString((const uint8_t*)data_ptr, data_size);
}
- FXSYS_memcpy32(gif_ptr->app_identify, gif_ae_ptr->app_identify, 8);
- FXSYS_memcpy32(gif_ptr->app_authentication, gif_ae_ptr->app_authentication, 3);
+ FXSYS_memcpy(gif_ptr->app_identify, gif_ae_ptr->app_identify, 8);
+ FXSYS_memcpy(gif_ptr->app_authentication, gif_ae_ptr->app_authentication, 3);
gif_ptr->app_data_size = gif_ae_data_str.GetLength();
if(gif_ptr->app_data != NULL) {
FX_Free(gif_ptr->app_data);
@@ -745,7 +745,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
gif_ptr->app_data = FX_Alloc(uint8_t, gif_ptr->app_data_size);
GIF_PTR_NOT_NULL(gif_ptr->app_data, gif_ptr);
- FXSYS_memcpy32(gif_ptr->app_data, const uint8_t*(gif_ae_data_str), gif_ptr->app_data_size);
+ FXSYS_memcpy(gif_ptr->app_data, const uint8_t*(gif_ae_data_str), gif_ptr->app_data_size);
}
break;
#endif
@@ -777,7 +777,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
GifPlainText* gif_pt_ptr = FX_Alloc(GifPlainText, 1);
GIF_PTR_NOT_NULL(gif_pt_ptr, gif_ptr);
- FXSYS_memset32(gif_pt_ptr, 0, sizeof(GifPlainText));
+ FXSYS_memset(gif_pt_ptr, 0, sizeof(GifPlainText));
_gif_takeover_gce_ptr(gif_ptr, &gif_pt_ptr->gce_ptr);
gif_pt_ptr->pte_ptr = (GifPTE*)FX_Alloc(uint8_t, sizeof(GifPTE));
GIF_PTR_NOT_NULL(gif_pt_ptr->pte_ptr, gif_ptr);
@@ -891,7 +891,7 @@ int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr)
}
GifImage* gif_image_ptr = (GifImage*)FX_Alloc(uint8_t, sizeof(GifImage));
GIF_PTR_NOT_NULL(gif_image_ptr, gif_ptr);
- FXSYS_memset32(gif_image_ptr, 0, sizeof(GifImage));
+ FXSYS_memset(gif_image_ptr, 0, sizeof(GifImage));
gif_image_ptr->image_info_ptr = (GifImageInfo*)FX_Alloc(uint8_t, sizeof(GifImageInfo));
GIF_PTR_NOT_NULL(gif_image_ptr->image_info_ptr, gif_ptr);
gif_image_ptr->image_info_ptr->left = _GetWord_LSBFirst((uint8_t*)&gif_img_info_ptr->left);
@@ -929,7 +929,7 @@ int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr)
}
gif_image_ptr->local_pal_ptr = (GifPalette*)gif_ptr->_gif_ask_buf_for_pal_fn(gif_ptr, loc_pal_size);
if(gif_image_ptr->local_pal_ptr != NULL) {
- FXSYS_memcpy32((uint8_t*)gif_image_ptr->local_pal_ptr, loc_pal_ptr, loc_pal_size);
+ FXSYS_memcpy((uint8_t*)gif_image_ptr->local_pal_ptr, loc_pal_ptr, loc_pal_size);
}
}
uint8_t* code_size_ptr = NULL;
@@ -1151,8 +1151,8 @@ static FX_BOOL _gif_write_header( gif_compress_struct_p gif_ptr, uint8_t*& dst_b
if (dst_buf == NULL) {
return FALSE;
}
- FXSYS_memset32(dst_buf, 0, dst_len);
- FXSYS_memcpy32(dst_buf, gif_ptr->header_ptr, sizeof(GifHeader));
+ FXSYS_memset(dst_buf, 0, dst_len);
+ FXSYS_memcpy(dst_buf, gif_ptr->header_ptr, sizeof(GifHeader));
gif_ptr->cur_offset += sizeof(GifHeader);
_SetWord_LSBFirst(dst_buf + gif_ptr->cur_offset, gif_ptr->lsd_ptr->width);
gif_ptr->cur_offset += 2;
@@ -1166,7 +1166,7 @@ static FX_BOOL _gif_write_header( gif_compress_struct_p gif_ptr, uint8_t*& dst_b
if (!_gif_grow_buf(dst_buf, dst_len, gif_ptr->cur_offset + size)) {
return FALSE;
}
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->global_pal, size);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->global_pal, size);
gif_ptr->cur_offset += size;
}
return TRUE;
@@ -1192,13 +1192,13 @@ void interlace_buf(const uint8_t* buf, FX_DWORD pitch, FX_DWORD height)
if (temp == NULL) {
return;
}
- FXSYS_memcpy32(temp, &buf[pitch * row], pitch);
+ FXSYS_memcpy(temp, &buf[pitch * row], pitch);
pass[j].Add(temp);
row ++;
}
for (i = 0, row = 0; i < 4; i++) {
for (j = 0; j < pass[i].GetSize(); j++, row++) {
- FXSYS_memcpy32((uint8_t*)&buf[pitch * row], pass[i].GetAt(j), pitch);
+ FXSYS_memcpy((uint8_t*)&buf[pitch * row], pass[i].GetAt(j), pitch);
FX_Free(pass[i].GetAt(j));
}
}
@@ -1208,13 +1208,13 @@ static void _gif_write_block_data(const uint8_t* src_buf, FX_DWORD src_len, uint
FX_DWORD src_offset = 0;
while (src_len > GIF_DATA_BLOCK) {
dst_buf[dst_offset++] = GIF_DATA_BLOCK;
- FXSYS_memcpy32(&dst_buf[dst_offset], &src_buf[src_offset], GIF_DATA_BLOCK);
+ FXSYS_memcpy(&dst_buf[dst_offset], &src_buf[src_offset], GIF_DATA_BLOCK);
dst_offset += GIF_DATA_BLOCK;
src_offset += GIF_DATA_BLOCK;
src_len -= GIF_DATA_BLOCK;
}
dst_buf[dst_offset++] = (uint8_t)src_len;
- FXSYS_memcpy32(&dst_buf[dst_offset], &src_buf[src_offset], src_len);
+ FXSYS_memcpy(&dst_buf[dst_offset], &src_buf[src_offset], src_len);
dst_offset += src_len;
}
static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf, FX_DWORD& dst_len )
@@ -1223,7 +1223,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
return FALSE;
}
#ifdef GIF_SUPPORT_GRAPHIC_CONTROL_EXTENSION
- if (FXSYS_memcmp32(gif_ptr->header_ptr->version, "89a", 3) == 0) {
+ if (FXSYS_memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0) {
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_EXTENSION;
dst_buf[gif_ptr->cur_offset++] = GIF_BLOCK_GCE;
gif_ptr->gce_ptr->block_size = 4;
@@ -1254,7 +1254,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
if (!_gif_grow_buf(dst_buf, dst_len, pal_size + gif_ptr->cur_offset)) {
return FALSE;
}
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->local_pal, pal_size);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->local_pal, pal_size);
gif_ptr->cur_offset += pal_size;
}
if (lf.interlace) {
@@ -1276,7 +1276,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
gif_ptr->img_encoder_ptr->Finish(dst_buf, dst_len, gif_ptr->cur_offset);
dst_buf[gif_ptr->cur_offset++] = 0;
#ifdef GIF_SUPPORT_COMMENT_EXTENSION
- if (FXSYS_memcmp32(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->cmt_data_ptr) {
+ if (FXSYS_memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->cmt_data_ptr) {
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_EXTENSION;
dst_buf[gif_ptr->cur_offset++] = GIF_BLOCK_CE;
_gif_write_block_data(gif_ptr->cmt_data_ptr, gif_ptr->cmt_data_len, dst_buf, dst_len, gif_ptr->cur_offset);
@@ -1284,7 +1284,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
}
#endif
#ifdef GIF_SUPPORT_PLAIN_TEXT_EXTENSION
- if (FXSYS_memcmp32(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->pte_data_ptr) {
+ if (FXSYS_memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->pte_data_ptr) {
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_EXTENSION;
dst_buf[gif_ptr->cur_offset++] = GIF_BLOCK_PTE;
dst_buf[gif_ptr->cur_offset++] = gif_ptr->pte_ptr->block_size;
@@ -1310,15 +1310,15 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
}
#endif
#ifdef GIF_SUPPORT_APPLICATION_EXTENSION
- if (FXSYS_memcmp32(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->app_data) {
+ if (FXSYS_memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->app_data) {
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_EXTENSION;
dst_buf[gif_ptr->cur_offset++] = GIF_BLOCK_AE;
dst_buf[gif_ptr->cur_offset++] = 11;
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_identify, 8);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_identify, 8);
gif_ptr->cur_offset += 8;
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_authentication, 8);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_authentication, 8);
gif_ptr->cur_offset += 3;
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_data, gif_ptr->app_data_size);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_data, gif_ptr->app_data_size);
gif_ptr->cur_offset += gif_ptr->app_data_size;
dst_buf[gif_ptr->cur_offset++] = 0;
}
diff --git a/core/src/fxcodec/libjpeg/jinclude.h b/core/src/fxcodec/libjpeg/jinclude.h
index 0c7aa68360..5cfc6e1fc9 100644
--- a/core/src/fxcodec/libjpeg/jinclude.h
+++ b/core/src/fxcodec/libjpeg/jinclude.h
@@ -75,8 +75,8 @@
#else /* not BSD, assume ANSI/SysV string lib */
//#include <string.h>
-#define MEMZERO(target,size) FXSYS_memset32((void *)(target), 0, (size_t)(size))
-#define MEMCOPY(dest,src,size) FXSYS_memcpy32((void *)(dest), (const void *)(src), (size_t)(size))
+#define MEMZERO(target,size) FXSYS_memset((void *)(target), 0, (size_t)(size))
+#define MEMCOPY(dest,src,size) FXSYS_memcpy((void *)(dest), (const void *)(src), (size_t)(size))
#endif