Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_jpeg.cpp ('k') | core/src/fxcodec/codec/fx_codec_png.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
}
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_jpeg.cpp ('k') | core/src/fxcodec/codec/fx_codec_png.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698