summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_jpx_opj.cpp')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 1a1616c0a1..01faf67a30 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;
}
}
}