summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-21 15:00:20 -0700
committerTom Sepez <tsepez@chromium.org>2016-03-21 15:00:20 -0700
commit62a70f90c49cf7714c960186eb063ad55333e6f3 (patch)
tree84b5d0f70b770e6a9ec261342d46638f4d5102bd /core/fxcodec
parent4161c5ca6c5438476bf07b6dacfafb61ea611cc5 (diff)
downloadpdfium-62a70f90c49cf7714c960186eb063ad55333e6f3.tar.xz
Remove FX_WORD in favor of uint16_t.
It isn't buying us anthing, and it looks strange in a struct when other uint types are already present. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821043003 .
Diffstat (limited to 'core/fxcodec')
-rw-r--r--core/fxcodec/codec/fx_codec_flate.cpp4
-rw-r--r--core/fxcodec/codec/fx_codec_tiff.cpp10
-rw-r--r--core/fxcodec/jbig2/JBig2_BitStream.cpp2
-rw-r--r--core/fxcodec/jbig2/JBig2_BitStream.h2
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.cpp8
-rw-r--r--core/fxcodec/jbig2/JBig2_GrdProc.h2
-rw-r--r--core/fxcodec/jbig2/JBig2_HtrdProc.h4
-rw-r--r--core/fxcodec/jbig2/JBig2_Page.h2
-rw-r--r--core/fxcodec/lbmp/fx_bmp.cpp12
-rw-r--r--core/fxcodec/lbmp/fx_bmp.h26
-rw-r--r--core/fxcodec/lgif/fx_gif.cpp26
-rw-r--r--core/fxcodec/lgif/fx_gif.h52
12 files changed, 75 insertions, 75 deletions
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp
index 27416f1c67..d4ad241a4d 100644
--- a/core/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/fxcodec/codec/fx_codec_flate.cpp
@@ -530,7 +530,7 @@ void TIFF_PredictorEncodeLine(uint8_t* dest_buf,
} else {
for (int i = row_size - BytesPerPixel; i >= BytesPerPixel;
i -= BytesPerPixel) {
- FX_WORD pixel = (dest_buf[i] << 8) | dest_buf[i + 1];
+ uint16_t pixel = (dest_buf[i] << 8) | dest_buf[i + 1];
pixel -=
(dest_buf[i - BytesPerPixel] << 8) | dest_buf[i - BytesPerPixel + 1];
dest_buf[i] = pixel >> 8;
@@ -587,7 +587,7 @@ void TIFF_PredictLine(uint8_t* dest_buf,
int BytesPerPixel = BitsPerComponent * Colors / 8;
if (BitsPerComponent == 16) {
for (FX_DWORD i = BytesPerPixel; i < row_size; i += 2) {
- FX_WORD pixel =
+ uint16_t pixel =
(dest_buf[i - BytesPerPixel] << 8) | dest_buf[i - BytesPerPixel + 1];
pixel += (dest_buf[i] << 8) | dest_buf[i + 1];
dest_buf[i] = pixel >> 8;
diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp
index 0312622fb4..58f08707cb 100644
--- a/core/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/fxcodec/codec/fx_codec_tiff.cpp
@@ -285,11 +285,11 @@ FX_BOOL CCodec_TiffContext::LoadFrameInfo(int32_t frame,
if (!TIFFSetDirectory(tif_ctx, (uint16)frame)) {
return FALSE;
}
- FX_WORD tif_cs;
+ uint16_t tif_cs;
FX_DWORD tif_icc_size = 0;
uint8_t* tif_icc_buf = NULL;
- FX_WORD tif_bpc = 0;
- FX_WORD tif_cps;
+ uint16_t tif_bpc = 0;
+ uint16_t tif_cps;
FX_DWORD tif_rps;
width = height = comps = 0;
TIFFGetField(tif_ctx, TIFFTAG_IMAGEWIDTH, &width);
@@ -306,7 +306,7 @@ FX_BOOL CCodec_TiffContext::LoadFrameInfo(int32_t frame,
&pAttribute->m_wDPIUnit)) {
pAttribute->m_wDPIUnit -= 1;
}
- Tiff_Exif_GetInfo<FX_WORD>(tif_ctx, TIFFTAG_ORIENTATION, pAttribute);
+ Tiff_Exif_GetInfo<uint16_t>(tif_ctx, TIFFTAG_ORIENTATION, pAttribute);
if (Tiff_Exif_GetInfo<FX_FLOAT>(tif_ctx, TIFFTAG_XRESOLUTION, pAttribute)) {
void* val = pAttribute->m_Exif[TIFFTAG_XRESOLUTION];
FX_FLOAT fDpi = val ? *reinterpret_cast<FX_FLOAT*>(val) : 0;
@@ -487,7 +487,7 @@ FX_BOOL CCodec_TiffContext::Decode(CFX_DIBitmap* pDIBitmap) {
return FALSE;
}
if (pDIBitmap->GetBPP() == 32) {
- FX_WORD rotation = ORIENTATION_TOPLEFT;
+ uint16_t rotation = ORIENTATION_TOPLEFT;
TIFFGetField(tif_ctx, TIFFTAG_ORIENTATION, &rotation);
if (TIFFReadRGBAImageOriented(tif_ctx, img_wid, img_hei,
(uint32*)pDIBitmap->GetBuffer(), rotation,
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.cpp b/core/fxcodec/jbig2/JBig2_BitStream.cpp
index a2a4c2c7c0..4ca4be16d4 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.cpp
+++ b/core/fxcodec/jbig2/JBig2_BitStream.cpp
@@ -101,7 +101,7 @@ int32_t CJBig2_BitStream::readInteger(FX_DWORD* dwResult) {
return 0;
}
-int32_t CJBig2_BitStream::readShortInteger(FX_WORD* dwResult) {
+int32_t CJBig2_BitStream::readShortInteger(uint16_t* dwResult) {
if (m_dwByteIdx + 1 >= m_dwLength)
return -1;
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.h b/core/fxcodec/jbig2/JBig2_BitStream.h
index c24fedfba1..37b18b53a3 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.h
+++ b/core/fxcodec/jbig2/JBig2_BitStream.h
@@ -23,7 +23,7 @@ class CJBig2_BitStream {
int32_t read1Bit(FX_BOOL* bResult);
int32_t read1Byte(uint8_t* cResult);
int32_t readInteger(FX_DWORD* dwResult);
- int32_t readShortInteger(FX_WORD* wResult);
+ int32_t readShortInteger(uint16_t* wResult);
void alignByte();
uint8_t getCurByte() const;
void incByteIdx();
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 7060f3522b..da020a6a75 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -302,7 +302,7 @@ int32_t CJBig2_Context::parseSegmentHeader(CJBig2_Segment* pSegment) {
pSegment->m_pReferred_to_segment_numbers[i] = cTemp;
break;
case 2:
- FX_WORD wTemp;
+ uint16_t wTemp;
if (m_pStream->readShortInteger(&wTemp) != 0)
return JBIG2_ERROR_TOO_SHORT;
@@ -379,7 +379,7 @@ int32_t CJBig2_Context::ProcessingParseSegmentData(CJBig2_Segment* pSegment,
return JBIG2_ERROR_FATAL;
return parseGenericRefinementRegion(pSegment);
case 48: {
- FX_WORD wTemp;
+ uint16_t wTemp;
std::unique_ptr<JBig2PageInfo> pPageInfo(new JBig2PageInfo);
if (m_pStream->readInteger(&pPageInfo->m_dwWidth) != 0 ||
m_pStream->readInteger(&pPageInfo->m_dwHeight) != 0 ||
@@ -435,7 +435,7 @@ int32_t CJBig2_Context::ProcessingParseSegmentData(CJBig2_Segment* pSegment,
int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
IFX_Pause* pPause) {
- FX_WORD wFlags;
+ uint16_t wFlags;
if (m_pStream->readShortInteger(&wFlags) != 0)
return JBIG2_ERROR_TOO_SHORT;
@@ -653,7 +653,7 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
}
int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) {
- FX_WORD wFlags;
+ uint16_t wFlags;
JBig2RegionInfo ri;
if (parseRegionInfo(&ri) != JBIG2_SUCCESS ||
m_pStream->readShortInteger(&wFlags) != 0) {
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h
index 2a181b1822..9d7f8b0221 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.h
@@ -116,7 +116,7 @@ class CJBig2_GRDProc {
CJBig2_Image** m_pImage;
CJBig2_ArithDecoder* m_pArithDecoder;
JBig2ArithCtx* m_gbContext;
- FX_WORD m_DecodeType;
+ uint16_t m_DecodeType;
FX_BOOL LTP;
FX_RECT m_ReplaceRect;
};
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h
index 583145b5ca..7766ce6d46 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h
@@ -37,8 +37,8 @@ class CJBig2_HTRDProc {
FX_DWORD HGH;
int32_t HGX;
int32_t HGY;
- FX_WORD HRX;
- FX_WORD HRY;
+ uint16_t HRX;
+ uint16_t HRY;
uint8_t HPW;
uint8_t HPH;
};
diff --git a/core/fxcodec/jbig2/JBig2_Page.h b/core/fxcodec/jbig2/JBig2_Page.h
index b3e09d8ae0..81800ba2d4 100644
--- a/core/fxcodec/jbig2/JBig2_Page.h
+++ b/core/fxcodec/jbig2/JBig2_Page.h
@@ -16,7 +16,7 @@ struct JBig2PageInfo {
FX_DWORD m_dwResolutionY;
uint8_t m_cFlags;
FX_BOOL m_bIsStriped;
- FX_WORD m_wMaxStripeSize;
+ uint16_t m_wMaxStripeSize;
};
#endif // CORE_FXCODEC_JBIG2_JBIG2_PAGE_H_
diff --git a/core/fxcodec/lbmp/fx_bmp.cpp b/core/fxcodec/lbmp/fx_bmp.cpp
index 15384d56ff..90d8fe1247 100644
--- a/core/fxcodec/lbmp/fx_bmp.cpp
+++ b/core/fxcodec/lbmp/fx_bmp.cpp
@@ -26,10 +26,10 @@ void SetDWord_LSBFirst(uint8_t* p, FX_DWORD v) {
}
} // namespace
-FX_WORD GetWord_LSBFirst(uint8_t* p) {
+uint16_t GetWord_LSBFirst(uint8_t* p) {
return p[0] | (p[1] << 8);
}
-void SetWord_LSBFirst(uint8_t* p, FX_WORD v) {
+void SetWord_LSBFirst(uint8_t* p, uint16_t v) {
p[0] = (uint8_t)v;
p[1] = (uint8_t)(v >> 8);
}
@@ -145,7 +145,7 @@ int32_t bmp_read_header(bmp_decompress_struct_p bmp_ptr) {
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- FX_WORD biPlanes;
+ uint16_t biPlanes;
bmp_ptr->width =
GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biWidth);
bmp_ptr->height =
@@ -340,7 +340,7 @@ int32_t bmp_decode_rgb(bmp_decompress_struct_p bmp_ptr) {
}
} break;
case 16: {
- FX_WORD* buf = (FX_WORD*)des_buf;
+ uint16_t* buf = (uint16_t*)des_buf;
uint8_t blue_bits = 0;
uint8_t green_bits = 0;
uint8_t red_bits = 0;
@@ -551,7 +551,7 @@ int32_t bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr) {
}
} break;
default: {
- uint8_t size = (uint8_t)(((FX_WORD)(*first_byte_ptr) + 1) >> 1);
+ uint8_t size = (uint8_t)(((uint16_t)(*first_byte_ptr) + 1) >> 1);
if ((int32_t)*first_byte_ptr >=
bmp_ptr->out_row_bytes - bmp_ptr->col_num) {
if (size + (bmp_ptr->col_num >> 1) > bmp_ptr->src_row_bytes) {
@@ -584,7 +584,7 @@ int32_t bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr) {
}
if ((int32_t)*first_byte_ptr >
bmp_ptr->out_row_bytes - bmp_ptr->col_num) {
- uint8_t size = (uint8_t)(((FX_WORD)(*first_byte_ptr) + 1) >> 1);
+ uint8_t size = (uint8_t)(((uint16_t)(*first_byte_ptr) + 1) >> 1);
if (size + (bmp_ptr->col_num >> 1) > bmp_ptr->src_row_bytes) {
bmp_error(bmp_ptr, "The Bmp File Is Corrupt");
return 0;
diff --git a/core/fxcodec/lbmp/fx_bmp.h b/core/fxcodec/lbmp/fx_bmp.h
index 2ef0c0a8b0..1c269c6507 100644
--- a/core/fxcodec/lbmp/fx_bmp.h
+++ b/core/fxcodec/lbmp/fx_bmp.h
@@ -35,25 +35,25 @@
#define BMP_MAX_ERROR_SIZE 256
#pragma pack(1)
typedef struct tagBmpFileHeader {
- FX_WORD bfType;
+ uint16_t bfType;
FX_DWORD bfSize;
- FX_WORD bfReserved1;
- FX_WORD bfReserved2;
+ uint16_t bfReserved1;
+ uint16_t bfReserved2;
FX_DWORD bfOffBits;
} BmpFileHeader, *BmpFileHeaderPtr;
typedef struct tagBmpCoreHeader {
FX_DWORD bcSize;
- FX_WORD bcWidth;
- FX_WORD bcHeight;
- FX_WORD bcPlanes;
- FX_WORD bcBitCount;
+ uint16_t bcWidth;
+ uint16_t bcHeight;
+ uint16_t bcPlanes;
+ uint16_t bcBitCount;
} BmpCoreHeader, *BmpCoreHeaderPtr;
typedef struct tagBmpInfoHeader {
FX_DWORD biSize;
int32_t biWidth;
int32_t biHeight;
- FX_WORD biPlanes;
- FX_WORD biBitCount;
+ uint16_t biPlanes;
+ uint16_t biBitCount;
FX_DWORD biCompression;
FX_DWORD biSizeImage;
int32_t biXPelsPerMeter;
@@ -82,7 +82,7 @@ struct tag_bmp_decompress_struct {
int32_t src_row_bytes;
int32_t out_row_bytes;
uint8_t* out_row_buffer;
- FX_WORD bitCounts;
+ uint16_t bitCounts;
FX_DWORD color_used;
FX_BOOL imgTB_flag;
int32_t pal_num;
@@ -139,7 +139,7 @@ struct tag_bmp_compress_struct {
FX_DWORD src_width;
FX_BOOL src_free;
FX_DWORD* pal_ptr;
- FX_WORD pal_num;
+ uint16_t pal_num;
uint8_t bit_type;
};
@@ -149,7 +149,7 @@ FX_BOOL bmp_encode_image(bmp_compress_struct_p bmp_ptr,
uint8_t*& dst_buf,
FX_DWORD& dst_size);
-FX_WORD GetWord_LSBFirst(uint8_t* p);
-void SetWord_LSBFirst(uint8_t* p, FX_WORD v);
+uint16_t GetWord_LSBFirst(uint8_t* p);
+void SetWord_LSBFirst(uint8_t* p, uint16_t v);
#endif // CORE_FXCODEC_LBMP_FX_BMP_H_
diff --git a/core/fxcodec/lgif/fx_gif.cpp b/core/fxcodec/lgif/fx_gif.cpp
index af447dc84b..b20b4dfdec 100644
--- a/core/fxcodec/lgif/fx_gif.cpp
+++ b/core/fxcodec/lgif/fx_gif.cpp
@@ -30,14 +30,14 @@ void CGifLZWDecoder::InitTable(uint8_t code_len) {
void CGifLZWDecoder::ClearTable() {
code_size_cur = code_size + 1;
code_next = code_end + 1;
- code_old = (FX_WORD)-1;
+ code_old = (uint16_t)-1;
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++) {
+ for (uint16_t i = 0; i < code_clear; i++) {
code_table[i].suffix = (uint8_t)i;
}
}
-void CGifLZWDecoder::DecodeString(FX_WORD code) {
+void CGifLZWDecoder::DecodeString(uint16_t code) {
stack_size = 0;
while (TRUE) {
ASSERT(code <= code_next);
@@ -50,7 +50,7 @@ void CGifLZWDecoder::DecodeString(FX_WORD code) {
stack[GIF_MAX_LZW_CODE - 1 - stack_size++] = (uint8_t)code;
code_first = (uint8_t)code;
}
-void CGifLZWDecoder::AddCode(FX_WORD prefix_code, uint8_t append_char) {
+void CGifLZWDecoder::AddCode(uint16_t prefix_code, uint8_t append_char) {
if (code_next == GIF_MAX_LZW_CODE) {
return;
}
@@ -70,7 +70,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
if (stack_size != 0) {
if (des_size < stack_size) {
FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
- stack_size -= (FX_WORD)des_size;
+ stack_size -= (uint16_t)des_size;
return 3;
}
FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
@@ -78,7 +78,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
i += stack_size;
stack_size = 0;
}
- FX_WORD code = 0;
+ uint16_t code = 0;
while (i <= des_size && (avail_in > 0 || bits_left >= code_size_cur)) {
if (code_size_cur > 12) {
if (err_msg_ptr) {
@@ -93,7 +93,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
bits_left += 8;
}
while (bits_left >= code_size_cur) {
- code = (FX_WORD)code_store & ((1 << code_size_cur) - 1);
+ code = (uint16_t)code_store & ((1 << code_size_cur) - 1);
code_store >>= code_size_cur;
bits_left -= code_size_cur;
if (code == code_clear) {
@@ -103,7 +103,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
des_size = i;
return 1;
} else {
- if (code_old != (FX_WORD)-1) {
+ if (code_old != (uint16_t)-1) {
if (code_next < GIF_MAX_LZW_CODE) {
if (code == code_next) {
AddCode(code_old, code_first);
@@ -127,7 +127,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
if (i + stack_size > des_size) {
FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size],
des_size - i);
- stack_size -= (FX_WORD)(des_size - i);
+ stack_size -= (uint16_t)(des_size - i);
return 3;
}
FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size],
@@ -179,7 +179,7 @@ static inline uint8_t gif_cut_buf(const uint8_t* buf,
uint8_t& bit_offset,
FX_DWORD& bit_num) {
if (bit_cut != 8) {
- FX_WORD index = 0;
+ uint16_t index = 0;
index |= ((1 << bit_cut) - 1) << (7 - bit_offset);
uint8_t ret = ((index & buf[offset]) >> (7 - bit_offset));
bit_offset += bit_cut;
@@ -204,7 +204,7 @@ void CGifLZWEncoder::ClearTable() {
index_bit_cur = code_size + 1;
index_num = code_end + 1;
table_cur = code_end + 1;
- for (FX_WORD i = 0; i < GIF_MAX_LZW_CODE; i++) {
+ for (uint16_t i = 0; i < GIF_MAX_LZW_CODE; i++) {
code_table[i].prefix = 0;
code_table[i].suffix = 0;
}
@@ -335,7 +335,7 @@ FX_BOOL CGifLZWEncoder::Encode(const uint8_t* src_buf,
FX_BOOL CGifLZWEncoder::LookUpInTable(const uint8_t* buf,
FX_DWORD& offset,
uint8_t& bit_offset) {
- for (FX_WORD i = table_cur; i < index_num; i++) {
+ for (uint16_t i = table_cur; i < index_num; i++) {
if (code_table[i].prefix == code_table[index_num].prefix &&
code_table[i].suffix == code_table[index_num].suffix) {
code_table[index_num].prefix = i;
@@ -1041,7 +1041,7 @@ static FX_BOOL gif_write_header(gif_compress_struct_p gif_ptr,
dst_buf[gif_ptr->cur_offset++] = gif_ptr->lsd_ptr->bc_index;
dst_buf[gif_ptr->cur_offset++] = gif_ptr->lsd_ptr->pixel_aspect;
if (gif_ptr->global_pal) {
- FX_WORD size = sizeof(GifPalette) * gif_ptr->gpal_num;
+ uint16_t size = sizeof(GifPalette) * gif_ptr->gpal_num;
if (!gif_grow_buf(dst_buf, dst_len, gif_ptr->cur_offset + size)) {
return FALSE;
}
diff --git a/core/fxcodec/lgif/fx_gif.h b/core/fxcodec/lgif/fx_gif.h
index c44fb7a7cb..ad65d199b6 100644
--- a/core/fxcodec/lgif/fx_gif.h
+++ b/core/fxcodec/lgif/fx_gif.h
@@ -52,17 +52,17 @@ typedef struct tagGifHeader {
char version[3];
} GifHeader;
typedef struct tagGifLSD {
- FX_WORD width;
- FX_WORD height;
+ uint16_t width;
+ uint16_t height;
uint8_t global_flag;
uint8_t bc_index;
uint8_t pixel_aspect;
} GifLSD;
typedef struct tagGifImageInfo {
- FX_WORD left;
- FX_WORD top;
- FX_WORD width;
- FX_WORD height;
+ uint16_t left;
+ uint16_t top;
+ uint16_t width;
+ uint16_t height;
uint8_t local_flag;
} GifImageInfo;
@@ -75,15 +75,15 @@ typedef struct tagGifCEF {
typedef struct tagGifGCE {
uint8_t block_size;
uint8_t gce_flag;
- FX_WORD delay_time;
+ uint16_t delay_time;
uint8_t trans_index;
} GifGCE;
typedef struct tagGifPTE {
uint8_t block_size;
- FX_WORD grid_left;
- FX_WORD grid_top;
- FX_WORD grid_width;
- FX_WORD grid_height;
+ uint16_t grid_left;
+ uint16_t grid_top;
+ uint16_t grid_width;
+ uint16_t grid_height;
uint8_t char_width;
uint8_t char_height;
@@ -115,7 +115,7 @@ typedef struct tagGifPlainText {
class CGifLZWDecoder {
public:
struct tag_Table {
- FX_WORD prefix;
+ uint16_t prefix;
uint8_t suffix;
};
CGifLZWDecoder(FX_CHAR* error_ptr = NULL) { err_msg_ptr = error_ptr; }
@@ -128,18 +128,18 @@ class CGifLZWDecoder {
private:
void ClearTable();
- void AddCode(FX_WORD prefix_code, uint8_t append_char);
- void DecodeString(FX_WORD code);
+ void AddCode(uint16_t prefix_code, uint8_t append_char);
+ void DecodeString(uint16_t code);
uint8_t code_size;
uint8_t code_size_cur;
- FX_WORD code_clear;
- FX_WORD code_end;
- FX_WORD code_next;
+ uint16_t code_clear;
+ uint16_t code_end;
+ uint16_t code_next;
uint8_t code_first;
uint8_t stack[GIF_MAX_LZW_CODE];
- FX_WORD stack_size;
+ uint16_t stack_size;
tag_Table code_table[GIF_MAX_LZW_CODE];
- FX_WORD code_old;
+ uint16_t code_old;
uint8_t* next_in;
FX_DWORD avail_in;
@@ -152,7 +152,7 @@ class CGifLZWDecoder {
class CGifLZWEncoder {
public:
struct tag_Table {
- FX_WORD prefix;
+ uint16_t prefix;
uint8_t suffix;
};
CGifLZWEncoder();
@@ -184,15 +184,15 @@ class CGifLZWEncoder {
uint8_t src_bit_cut;
FX_DWORD src_bit_num;
uint8_t code_size;
- FX_WORD code_clear;
- FX_WORD code_end;
- FX_WORD index_num;
+ uint16_t code_clear;
+ uint16_t code_end;
+ uint16_t index_num;
uint8_t bit_offset;
uint8_t index_bit_cur;
uint8_t index_buf[GIF_DATA_BLOCK];
uint8_t index_buf_len;
tag_Table code_table[GIF_MAX_LZW_CODE];
- FX_WORD table_cur;
+ uint16_t table_cur;
};
typedef struct tag_gif_decompress_struct gif_decompress_struct;
typedef gif_decompress_struct* gif_decompress_struct_p;
@@ -251,9 +251,9 @@ struct tag_gif_compress_struct {
GifHeader* header_ptr;
GifLSD* lsd_ptr;
GifPalette* global_pal;
- FX_WORD gpal_num;
+ uint16_t gpal_num;
GifPalette* local_pal;
- FX_WORD lpal_num;
+ uint16_t lpal_num;
GifImageInfo* image_info_ptr;
CGifLZWEncoder* img_encoder_ptr;