summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
commitbb17868d736f698d5217c30d52c5bbfed62c5936 (patch)
tree9d4d3e2538a81e6241d4992570bc3f3c1af71d28 /core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
parentbf6c2a4873f8cc12ad910fb904218a78087a3735 (diff)
downloadpdfium-bb17868d736f698d5217c30d52c5bbfed62c5936.tar.xz
Use stdint.h types throughout PDFium.
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
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;
}
}
}