summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-03 15:05:11 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-03 20:39:56 +0000
commit1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca (patch)
tree315955cce6b29093dcddfc48c0811957a172bedf /core/fxcodec/codec
parent2ae80f52cec81c080515724f99deb06b2fee3cc9 (diff)
downloadpdfium-1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca.tar.xz
Drop FXSYS_ from mem methods
This Cl drops the FXSYS_ from mem methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I9d5ae905997dbaaec5aa0b2ae4c07358ed9c6236 Reviewed-on: https://pdfium-review.googlesource.com/3613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r--core/fxcodec/codec/ccodec_bmpmodule.cpp2
-rw-r--r--core/fxcodec/codec/ccodec_gifmodule.cpp4
-rw-r--r--core/fxcodec/codec/ccodec_pngmodule.cpp10
-rw-r--r--core/fxcodec/codec/ccodec_tiffmodule.cpp8
-rw-r--r--core/fxcodec/codec/fx_codec.cpp10
-rw-r--r--core/fxcodec/codec/fx_codec_fax.cpp16
-rw-r--r--core/fxcodec/codec/fx_codec_flate.cpp25
-rw-r--r--core/fxcodec/codec/fx_codec_jbig.cpp2
-rw-r--r--core/fxcodec/codec/fx_codec_jpeg.cpp9
-rw-r--r--core/fxcodec/codec/fx_codec_jpx_opj.cpp8
-rw-r--r--core/fxcodec/codec/fx_codec_progress.cpp44
11 files changed, 68 insertions, 70 deletions
diff --git a/core/fxcodec/codec/ccodec_bmpmodule.cpp b/core/fxcodec/codec/ccodec_bmpmodule.cpp
index d891a37ee4..660e89c4a0 100644
--- a/core/fxcodec/codec/ccodec_bmpmodule.cpp
+++ b/core/fxcodec/codec/ccodec_bmpmodule.cpp
@@ -56,7 +56,7 @@ FXBMP_Context* CCodec_BmpModule::Start() {
if (!p)
return nullptr;
- FXSYS_memset(p, 0, sizeof(FXBMP_Context));
+ memset(p, 0, sizeof(FXBMP_Context));
if (!p)
return nullptr;
diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp
index b7352ba53c..caa21e1424 100644
--- a/core/fxcodec/codec/ccodec_gifmodule.cpp
+++ b/core/fxcodec/codec/ccodec_gifmodule.cpp
@@ -88,7 +88,7 @@ FXGIF_Context* CCodec_GifModule::Start() {
if (!p)
return nullptr;
- FXSYS_memset(p, 0, sizeof(FXGIF_Context));
+ memset(p, 0, sizeof(FXGIF_Context));
p->m_AllocFunc = gif_alloc_func;
p->m_FreeFunc = gif_free_func;
p->gif_ptr = nullptr;
@@ -177,7 +177,7 @@ int32_t CCodec_GifModule::LoadFrame(FXGIF_Context* ctx,
buf += size;
size = *buf++;
if (size == 20) {
- FXSYS_memcpy(pAttribute->m_strTime, buf, size);
+ memcpy(pAttribute->m_strTime, buf, size);
}
}
}
diff --git a/core/fxcodec/codec/ccodec_pngmodule.cpp b/core/fxcodec/codec/ccodec_pngmodule.cpp
index 2b8f95799e..ae34b53413 100644
--- a/core/fxcodec/codec/ccodec_pngmodule.cpp
+++ b/core/fxcodec/codec/ccodec_pngmodule.cpp
@@ -55,7 +55,7 @@ static void _png_load_bmp_attribute(png_structp png_ptr,
png_timep t = nullptr;
png_get_tIME(png_ptr, info_ptr, &t);
if (t) {
- FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
+ memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
FXSYS_snprintf((char*)pAttribute->m_strTime,
sizeof(pAttribute->m_strTime), "%4u:%2u:%2u %2u:%2u:%2u",
t->year, t->month, t->day, t->hour, t->minute, t->second);
@@ -73,16 +73,16 @@ static void _png_load_bmp_attribute(png_structp png_ptr,
for (i = 0; i < num_text; i++) {
len = FXSYS_strlen(text[i].key);
buf = "Time";
- if (!FXSYS_memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
+ if (!memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
if (!bTime) {
- FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
- FXSYS_memcpy(
+ memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
+ memcpy(
pAttribute->m_strTime, text[i].text,
std::min(sizeof(pAttribute->m_strTime) - 1, text[i].text_length));
}
} else {
buf = "Author";
- if (!FXSYS_memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
+ if (!memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
pAttribute->m_strAuthor =
CFX_ByteString(reinterpret_cast<uint8_t*>(text[i].text),
static_cast<FX_STRSIZE>(text[i].text_length));
diff --git a/core/fxcodec/codec/ccodec_tiffmodule.cpp b/core/fxcodec/codec/ccodec_tiffmodule.cpp
index 0a0b56ce94..cc51677abd 100644
--- a/core/fxcodec/codec/ccodec_tiffmodule.cpp
+++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp
@@ -74,15 +74,15 @@ void* _TIFFrealloc(void* ptr, tmsize_t size) {
}
void _TIFFmemset(void* ptr, int val, tmsize_t size) {
- FXSYS_memset(ptr, val, (size_t)size);
+ memset(ptr, val, (size_t)size);
}
void _TIFFmemcpy(void* des, const void* src, tmsize_t size) {
- FXSYS_memcpy(des, src, (size_t)size);
+ memcpy(des, src, (size_t)size);
}
int _TIFFmemcmp(const void* ptr1, const void* ptr2, tmsize_t size) {
- return FXSYS_memcmp(ptr1, ptr2, (size_t)size);
+ return memcmp(ptr1, ptr2, (size_t)size);
}
int _TIFFIfMultiplicationOverflow(tmsize_t op1, tmsize_t op2) {
@@ -199,7 +199,7 @@ void Tiff_Exif_GetStringInfo(TIFF* tif_ctx,
return;
FX_STRSIZE size = FXSYS_strlen(buf);
uint8_t* ptr = FX_Alloc(uint8_t, size + 1);
- FXSYS_memcpy(ptr, buf, size);
+ memcpy(ptr, buf, size);
ptr[size] = 0;
pAttr->m_Exif[tag] = ptr;
}
diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp
index 0d886b43cb..900fed2d87 100644
--- a/core/fxcodec/codec/fx_codec.cpp
+++ b/core/fxcodec/codec/fx_codec.cpp
@@ -254,7 +254,7 @@ CFX_DIBAttribute::CFX_DIBAttribute()
m_pGifLocalPalette(nullptr),
m_nGifLocalPalNum(0),
m_nBmpCompressType(0) {
- FXSYS_memset(m_strTime, 0, sizeof(m_strTime));
+ memset(m_strTime, 0, sizeof(m_strTime));
}
CFX_DIBAttribute::~CFX_DIBAttribute() {
for (const auto& pair : m_Exif)
@@ -361,7 +361,7 @@ bool CCodec_RLScanlineDecoder::Create(const uint8_t* src_buf,
return CheckDestSize();
}
bool CCodec_RLScanlineDecoder::v_Rewind() {
- FXSYS_memset(m_pScanline, 0, m_Pitch);
+ memset(m_pScanline, 0, m_Pitch);
m_SrcOffset = 0;
m_bEOD = false;
m_Operator = 0;
@@ -375,7 +375,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine() {
return nullptr;
}
}
- FXSYS_memset(m_pScanline, 0, m_Pitch);
+ memset(m_pScanline, 0, m_Pitch);
uint32_t col_pos = 0;
bool eol = false;
while (m_SrcOffset < m_SrcSize && !eol) {
@@ -389,7 +389,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine() {
copy_len = m_SrcSize - m_SrcOffset;
m_bEOD = true;
}
- FXSYS_memcpy(m_pScanline + col_pos, m_pSrcBuf + m_SrcOffset, copy_len);
+ 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) {
@@ -402,7 +402,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine() {
duplicate_len = m_dwLineBytes - col_pos;
eol = true;
}
- FXSYS_memset(m_pScanline + col_pos, fill, duplicate_len);
+ memset(m_pScanline + col_pos, fill, duplicate_len);
col_pos += duplicate_len;
UpdateOperator((uint8_t)duplicate_len);
} else {
diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp
index 7865da925e..641e0fd9d1 100644
--- a/core/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/fxcodec/codec/fx_codec_fax.cpp
@@ -123,7 +123,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_memset(dest_buf + first_byte + 1, 0, last_byte - first_byte - 1);
+ memset(dest_buf + first_byte + 1, 0, last_byte - first_byte - 1);
}
inline bool NextBit(const uint8_t* src_buf, int* bitpos) {
@@ -502,7 +502,7 @@ CCodec_FaxDecoder::CCodec_FaxDecoder(const uint8_t* src_buf,
CCodec_FaxDecoder::~CCodec_FaxDecoder() {}
bool CCodec_FaxDecoder::v_Rewind() {
- FXSYS_memset(m_RefBuf.data(), 0xff, m_RefBuf.size());
+ memset(m_RefBuf.data(), 0xff, m_RefBuf.size());
m_bitpos = 0;
return true;
}
@@ -513,7 +513,7 @@ uint8_t* CCodec_FaxDecoder::v_GetNextLine() {
if (m_bitpos >= bitsize)
return nullptr;
- FXSYS_memset(m_ScanlineBuf.data(), 0xff, m_ScanlineBuf.size());
+ memset(m_ScanlineBuf.data(), 0xff, m_ScanlineBuf.size());
if (m_Encoding < 0) {
FaxG4GetRow(m_pSrcBuf, bitsize, &m_bitpos, m_ScanlineBuf.data(), m_RefBuf,
m_OrigWidth);
@@ -570,9 +570,9 @@ void FaxG4Decode(const uint8_t* src_buf,
int bitpos = *pbitpos;
for (int iRow = 0; iRow < height; iRow++) {
uint8_t* line_buf = dest_buf + iRow * pitch;
- FXSYS_memset(line_buf, 0xff, pitch);
+ memset(line_buf, 0xff, pitch);
FaxG4GetRow(src_buf, src_size << 3, &bitpos, line_buf, ref_buf, width);
- FXSYS_memcpy(ref_buf.data(), line_buf, pitch);
+ memcpy(ref_buf.data(), line_buf, pitch);
}
*pbitpos = bitpos;
}
@@ -756,7 +756,7 @@ CCodec_FaxEncoder::CCodec_FaxEncoder(const uint8_t* src_buf,
int pitch)
: m_Cols(width), m_Rows(height), m_Pitch(pitch), m_pSrcBuf(src_buf) {
m_RefLine.resize(m_Pitch);
- FXSYS_memset(m_RefLine.data(), 0xff, m_Pitch);
+ memset(m_RefLine.data(), 0xff, m_Pitch);
m_pLineBuf = FX_Alloc2D(uint8_t, m_Pitch, 8);
m_DestBuf.EstimateSize(0, 10240);
}
@@ -772,13 +772,13 @@ void CCodec_FaxEncoder::Encode(
uint8_t last_byte = 0;
for (int i = 0; i < m_Rows; i++) {
const uint8_t* scan_line = m_pSrcBuf + i * m_Pitch;
- FXSYS_memset(m_pLineBuf, 0, m_Pitch * 8);
+ memset(m_pLineBuf, 0, m_Pitch * 8);
m_pLineBuf[0] = last_byte;
FaxEncode2DLine(m_pLineBuf, &dest_bitpos, scan_line, m_RefLine, m_Cols);
m_DestBuf.AppendBlock(m_pLineBuf, dest_bitpos / 8);
last_byte = m_pLineBuf[dest_bitpos / 8];
dest_bitpos %= 8;
- FXSYS_memcpy(m_RefLine.data(), scan_line, m_Pitch);
+ memcpy(m_RefLine.data(), scan_line, m_Pitch);
}
if (dest_bitpos)
m_DestBuf.AppendByte(last_byte);
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp
index dd9c4c9fa6..2ac316100a 100644
--- a/core/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/fxcodec/codec/fx_codec_flate.cpp
@@ -52,7 +52,7 @@ bool FlateCompress(unsigned char* dest_buf,
void* FlateInit() {
z_stream* p = FX_Alloc(z_stream, 1);
- FXSYS_memset(p, 0, sizeof(z_stream));
+ memset(p, 0, sizeof(z_stream));
p->zalloc = my_alloc_func;
p->zfree = my_free_func;
inflateInit(p);
@@ -80,7 +80,7 @@ uint32_t FlateOutput(void* context,
uint32_t written = post_pos - pre_pos;
if (written < dest_size)
- FXSYS_memset(dest_buf + written, '\0', dest_size - written);
+ memset(dest_buf + written, '\0', dest_size - written);
return ret;
}
@@ -290,7 +290,7 @@ void PNG_PredictLine(uint8_t* pDestData,
int BytesPerPixel = (bpc * nColors + 7) / 8;
uint8_t tag = pSrcData[0];
if (tag == 0) {
- FXSYS_memmove(pDestData, pSrcData + 1, row_size);
+ memmove(pDestData, pSrcData + 1, row_size);
return;
}
for (int byte = 0; byte < row_size; byte++) {
@@ -372,7 +372,7 @@ bool PNG_Predictor(uint8_t*& data_buf,
if ((row + 1) * (move_size + 1) > (int)data_size) {
move_size = last_row_size - 1;
}
- FXSYS_memmove(pDestData, pSrcData + 1, move_size);
+ memmove(pDestData, pSrcData + 1, move_size);
pSrcData += move_size + 1;
pDestData += move_size;
byte_cnt += move_size;
@@ -603,7 +603,7 @@ void FlateUncompress(const uint8_t* src_buf,
tmp_buf_size = last_buf_size;
uint32_t cp_size = std::min(tmp_buf_size, remaining);
- FXSYS_memcpy(result_buf + result_pos, tmp_buf, cp_size);
+ memcpy(result_buf + result_pos, tmp_buf, cp_size);
result_pos += cp_size;
remaining -= cp_size;
@@ -736,7 +736,7 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine() {
FlateOutput(m_pFlate, m_pPredictRaw, m_PredictPitch + 1);
PNG_PredictLine(m_pScanline, m_pPredictRaw, m_pLastLine,
m_BitsPerComponent, m_Colors, m_Columns);
- FXSYS_memcpy(m_pLastLine, m_pScanline, m_PredictPitch);
+ memcpy(m_pLastLine, m_pScanline, m_PredictPitch);
} else {
FlateOutput(m_pFlate, m_pScanline, m_Pitch);
TIFF_PredictLine(m_pScanline, m_PredictPitch, m_bpc, m_nComps,
@@ -747,9 +747,8 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine() {
size_t read_leftover =
m_LeftOver > bytes_to_go ? bytes_to_go : m_LeftOver;
if (read_leftover) {
- FXSYS_memcpy(m_pScanline,
- m_pPredictBuffer + m_PredictPitch - m_LeftOver,
- read_leftover);
+ memcpy(m_pScanline, m_pPredictBuffer + m_PredictPitch - m_LeftOver,
+ read_leftover);
m_LeftOver -= read_leftover;
bytes_to_go -= read_leftover;
}
@@ -758,7 +757,7 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine() {
FlateOutput(m_pFlate, m_pPredictRaw, m_PredictPitch + 1);
PNG_PredictLine(m_pPredictBuffer, m_pPredictRaw, m_pLastLine,
m_BitsPerComponent, m_Colors, m_Columns);
- FXSYS_memcpy(m_pLastLine, m_pPredictBuffer, m_PredictPitch);
+ memcpy(m_pLastLine, m_pPredictBuffer, m_PredictPitch);
} else {
FlateOutput(m_pFlate, m_pPredictBuffer, m_PredictPitch);
TIFF_PredictLine(m_pPredictBuffer, m_PredictPitch, m_BitsPerComponent,
@@ -766,8 +765,8 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine() {
}
size_t read_bytes =
m_PredictPitch > bytes_to_go ? bytes_to_go : m_PredictPitch;
- FXSYS_memcpy(m_pScanline + m_Pitch - bytes_to_go, m_pPredictBuffer,
- read_bytes);
+ memcpy(m_pScanline + m_Pitch - bytes_to_go, m_pPredictBuffer,
+ read_bytes);
m_LeftOver += m_PredictPitch - read_bytes;
bytes_to_go -= read_bytes;
}
@@ -873,7 +872,7 @@ bool CCodec_FlateModule::PngEncode(const uint8_t* src_buf,
uint8_t** dest_buf,
uint32_t* dest_size) {
uint8_t* pSrcBuf = FX_Alloc(uint8_t, src_size);
- FXSYS_memcpy(pSrcBuf, src_buf, src_size);
+ memcpy(pSrcBuf, src_buf, src_size);
PNG_PredictorEncode(&pSrcBuf, &src_size);
bool ret = Encode(pSrcBuf, src_size, dest_buf, dest_size);
FX_Free(pSrcBuf);
diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp
index 926541f07d..dc82305616 100644
--- a/core/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/fxcodec/codec/fx_codec_jbig.cpp
@@ -62,7 +62,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(
pJbig2Context->m_dest_buf = dest_buf;
pJbig2Context->m_dest_pitch = dest_pitch;
pJbig2Context->m_pPause = pPause;
- FXSYS_memset(dest_buf, 0, height * dest_pitch);
+ memset(dest_buf, 0, height * dest_pitch);
pJbig2Context->m_pContext = pdfium::MakeUnique<CJBig2_Context>(
global_stream, src_stream, pJBig2DocumentContext->GetSymbolDictCache(),
pPause, false);
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp
index 0431560529..584148d148 100644
--- a/core/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/fxcodec/codec/fx_codec_jpeg.cpp
@@ -185,9 +185,9 @@ CCodec_JpegDecoder::CCodec_JpegDecoder() {
m_pScanlineBuf = nullptr;
m_bStarted = false;
m_bInited = false;
- FXSYS_memset(&cinfo, 0, sizeof(cinfo));
- FXSYS_memset(&jerr, 0, sizeof(jerr));
- FXSYS_memset(&src, 0, sizeof(src));
+ memset(&cinfo, 0, sizeof(cinfo));
+ memset(&jerr, 0, sizeof(jerr));
+ memset(&src, 0, sizeof(src));
m_nDefaultScaleDenom = 1;
}
@@ -253,8 +253,7 @@ bool CCodec_JpegDecoder::Create(const uint8_t* src_buf,
src.fill_input_buffer = _src_fill_buffer;
src.resync_to_restart = _src_resync;
m_bJpegTransform = ColorTransform;
- if (src_size > 1 &&
- FXSYS_memcmp(src_buf + src_size - 2, "\xFF\xD9", 2) != 0) {
+ if (src_size > 1 && 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/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
index 4fc3d689f1..30e79deeeb 100644
--- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -564,9 +564,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_memset(image->comps[1].data, 0, sizeof(int) * (size_t)max);
+ memset(image->comps[1].data, 0, sizeof(int) * (size_t)max);
image->comps[2].data = FX_Alloc(int, (size_t)max);
- FXSYS_memset(image->comps[2].data, 0, sizeof(int) * (size_t)max);
+ 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) {
@@ -707,7 +707,7 @@ bool CJPX_Decoder::Init(const unsigned char* src_data, uint32_t src_size) {
opj_set_default_decoder_parameters(&parameters);
parameters.decod_format = 0;
parameters.cod_format = 3;
- if (FXSYS_memcmp(m_SrcData, szJP2Header, sizeof(szJP2Header)) == 0) {
+ if (memcmp(m_SrcData, szJP2Header, sizeof(szJP2Header)) == 0) {
l_codec = opj_create_decompress(OPJ_CODEC_JP2);
parameters.decod_format = 1;
} else {
@@ -788,7 +788,7 @@ bool CJPX_Decoder::Decode(uint8_t* dest_buf,
if (pitch<(int)(image->comps[0].w * 8 * image->numcomps + 31)>> 5 << 2)
return false;
- FXSYS_memset(dest_buf, 0xff, image->y1 * pitch);
+ memset(dest_buf, 0xff, image->y1 * pitch);
std::vector<uint8_t*> channel_bufs(image->numcomps);
std::vector<int> adjust_comps(image->numcomps);
for (uint32_t i = 0; i < image->numcomps; i++) {
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index e06c592cdc..d8b123b254 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -331,7 +331,7 @@ bool CCodec_ProgressiveDecoder::JpegReadMoreData(CCodec_JpegModule* pJpegModule,
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -593,7 +593,7 @@ bool CCodec_ProgressiveDecoder::GifReadMoreData(ICodec_GifModule* pGifModule,
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -682,7 +682,7 @@ bool CCodec_ProgressiveDecoder::GifInputRecordPositionBuf(
case 3: {
uint8_t gray =
FXRGB2GRAY(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb));
- FXSYS_memset(pScanline, gray, sizeX);
+ memset(pScanline, gray, sizeX);
break;
}
case 8: {
@@ -724,11 +724,11 @@ void CCodec_ProgressiveDecoder::GifReadScanline(int32_t row_num,
if (m_GifTransIndex != -1 && m_pDeviceBitmap->HasAlpha()) {
pal_index = m_GifTransIndex;
}
- FXSYS_memset(m_pDecodeBuf, pal_index, m_SrcWidth);
+ memset(m_pDecodeBuf, pal_index, m_SrcWidth);
bool bLastPass = (row_num % 2) == 1;
int32_t line = row_num + m_GifFrameRect.top;
int32_t left = m_GifFrameRect.left;
- FXSYS_memcpy(m_pDecodeBuf + left, row_buf, img_width);
+ memcpy(m_pDecodeBuf + left, row_buf, img_width);
int src_top = m_clipBox.top;
int src_bottom = m_clipBox.bottom;
int des_top = m_startY;
@@ -762,7 +762,7 @@ void CCodec_ProgressiveDecoder::GifReadScanline(int32_t row_num,
uint8_t* scan_des =
(uint8_t*)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
}
if (bLastPass)
@@ -872,7 +872,7 @@ bool CCodec_ProgressiveDecoder::BmpReadMoreData(ICodec_BmpModule* pBmpModule,
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -897,7 +897,7 @@ void CCodec_ProgressiveDecoder::BmpReadScanline(int32_t row_num,
uint8_t* row_buf) {
CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap;
ASSERT(pDIBitmap);
- FXSYS_memcpy(m_pDecodeBuf, row_buf, m_ScanlineSize);
+ memcpy(m_pDecodeBuf, row_buf, m_ScanlineSize);
int src_top = m_clipBox.top;
int src_bottom = m_clipBox.bottom;
int des_top = m_startY;
@@ -941,7 +941,7 @@ void CCodec_ProgressiveDecoder::ResampleVertBT(
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
return;
}
@@ -1017,7 +1017,7 @@ bool CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
}
FX_Free(m_pSrcBuf);
m_pSrcBuf = FX_Alloc(uint8_t, size);
- FXSYS_memset(m_pSrcBuf, 0, size);
+ memset(m_pSrcBuf, 0, size);
m_SrcSize = size;
switch (imageType) {
case FXCODEC_IMAGE_BMP: {
@@ -1059,8 +1059,8 @@ bool CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
FX_Free(m_pSrcPalette);
if (m_SrcPaletteNumber) {
m_pSrcPalette = FX_Alloc(FX_ARGB, m_SrcPaletteNumber);
- FXSYS_memcpy(m_pSrcPalette, pPalette,
- m_SrcPaletteNumber * sizeof(uint32_t));
+ memcpy(m_pSrcPalette, pPalette,
+ m_SrcPaletteNumber * sizeof(uint32_t));
} else {
m_pSrcPalette = nullptr;
}
@@ -1150,7 +1150,7 @@ bool CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
if (m_pSrcBuf && input_size > m_SrcSize) {
FX_Free(m_pSrcBuf);
m_pSrcBuf = FX_Alloc(uint8_t, input_size);
- FXSYS_memset(m_pSrcBuf, 0, input_size);
+ memset(m_pSrcBuf, 0, input_size);
m_SrcSize = input_size;
}
bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);
@@ -1531,7 +1531,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(
pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
des_g += pixel_weight * src_scan[j];
}
- FXSYS_memset(des_scan, (uint8_t)(des_g >> 16), 3);
+ memset(des_scan, (uint8_t)(des_g >> 16), 3);
des_scan += des_Bpp;
} break;
case 8: {
@@ -1664,7 +1664,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
}
return;
@@ -1739,7 +1739,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
}
return;
@@ -1755,7 +1755,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
}
}
@@ -1912,7 +1912,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(
scanline_size = (scanline_size * m_SrcComponents + 3) / 4 * 4;
FX_Free(m_pDecodeBuf);
m_pDecodeBuf = FX_Alloc(uint8_t, scanline_size);
- FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
+ 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());
@@ -1977,7 +1977,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(
int scanline_size = (m_SrcWidth * m_SrcComponents + 3) / 4 * 4;
FX_Free(m_pDecodeBuf);
m_pDecodeBuf = FX_Alloc(uint8_t, scanline_size);
- FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
+ memset(m_pDecodeBuf, 0, scanline_size);
m_WeightHorzOO.Calc(m_sizeX, m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -1996,7 +1996,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(
int scanline_size = (m_SrcWidth + 3) / 4 * 4;
FX_Free(m_pDecodeBuf);
m_pDecodeBuf = FX_Alloc(uint8_t, scanline_size);
- FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
+ 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());
@@ -2027,7 +2027,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(
m_ScanlineSize = (m_SrcWidth * m_SrcComponents + 3) / 4 * 4;
FX_Free(m_pDecodeBuf);
m_pDecodeBuf = FX_Alloc(uint8_t, m_ScanlineSize);
- FXSYS_memset(m_pDecodeBuf, 0, m_ScanlineSize);
+ 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());
@@ -2102,7 +2102,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause) {
if (m_pSrcBuf && input_size > m_SrcSize) {
FX_Free(m_pSrcBuf);
m_pSrcBuf = FX_Alloc(uint8_t, input_size);
- FXSYS_memset(m_pSrcBuf, 0, input_size);
+ memset(m_pSrcBuf, 0, input_size);
m_SrcSize = input_size;
}
bool bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);