Index: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp |
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp |
index 1a1616c0a1150c5957784f363ee1bc171f32e7e4..01faf67a30d07c66986aa11c52d10bfd30dbc8f9 100644 |
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp |
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp |
@@ -714,7 +714,7 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo |
return FALSE; |
} |
FXSYS_memset8(dest_buf, 0xff, image->y1 * pitch); |
- FX_BYTE** channel_bufs = FX_Alloc(FX_BYTE*, image->numcomps); |
+ uint8_t** channel_bufs = FX_Alloc(uint8_t*, image->numcomps); |
FX_BOOL result = FALSE; |
int* adjust_comps = FX_Alloc(int, image->numcomps); |
for (i = 0; i < (int)image->numcomps; i ++) { |
@@ -742,7 +742,7 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo |
if (adjust_comps[channel] > 0) { |
*pPixel = 0; |
} else { |
- *pPixel = (FX_BYTE)(src << -adjust_comps[channel]); |
+ *pPixel = (uint8_t)(src << -adjust_comps[channel]); |
} |
} |
} |
@@ -757,7 +757,7 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo |
src = image->comps[channel].data[row * wid + col]; |
src += image->comps[channel].sgnd ? 1 << (image->comps[channel].prec - 1) : 0; |
if (adjust_comps[channel] - 1 < 0) { |
- *pPixel = (FX_BYTE)((src >> adjust_comps[channel])); |
+ *pPixel = (uint8_t)((src >> adjust_comps[channel])); |
} else { |
int tmpPixel = (src >> adjust_comps[channel]) + ((src >> (adjust_comps[channel] - 1)) % 2); |
if (tmpPixel > 255) { |
@@ -765,7 +765,7 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo |
} else if (tmpPixel < 0) { |
tmpPixel = 0; |
} |
- *pPixel = (FX_BYTE)tmpPixel; |
+ *pPixel = (uint8_t)tmpPixel; |
} |
} |
} |