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 c4a0f88201a81db97599ac9aea9b1d7385585cdd..501a6845edca988995456fedf17b24d38af12738 100644 |
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp |
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp |
@@ -314,6 +314,7 @@ void color_apply_icc_profile(opj_image_t *image) |
{ |
cmsHPROFILE in_prof, out_prof; |
cmsHTRANSFORM transform; |
+ // TODO(tsepez): unused in_space seems suspicious. |
cmsColorSpaceSignature in_space, out_space; |
cmsUInt32Number intent, in_type, out_type, nr_samples; |
int *r, *g, *b; |
@@ -469,14 +470,12 @@ void color_apply_conversion(opj_image_t *image) |
int *L, *a, *b, *red, *green, *blue, *src0, *src1, *src2; |
double rl, ol, ra, oa, rb, ob, prec0, prec1, prec2; |
double minL, maxL, mina, maxa, minb, maxb; |
- unsigned int default_type, il; |
- unsigned int i, max, illu; |
+ unsigned int default_type; |
+ unsigned int i, max; |
cmsHPROFILE in, out; |
cmsHTRANSFORM transform; |
cmsUInt16Number RGB[3]; |
cmsCIELab Lab; |
- illu = 0; |
- il = 0; |
in = cmsCreateLab4Profile(NULL); |
out = cmsCreate_sRGBProfile(); |
transform = |
@@ -673,7 +672,6 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo |
FX_BYTE** channel_bufs; |
int* adjust_comps; |
int i, wid, hei, row, col, channel, src; |
- FX_BOOL flag; |
FX_LPBYTE pChannel, pScanline, pPixel; |
if(image->comps[0].w != image->x1 || image->comps[0].h != image->y1) { |
@@ -692,7 +690,6 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo |
FX_Free(channel_bufs); |
return FALSE; |
} |
- flag = TRUE; |
for (i = 0; i < (int)image->numcomps; i ++) { |
channel_bufs[i] = dest_buf + offsets[i]; |
adjust_comps[i] = image->comps[i].prec - 8; |
@@ -700,7 +697,6 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo |
if(image->comps[i].dx != image->comps[i - 1].dx |
|| image->comps[i].dy != image->comps[i - 1].dy |
|| image->comps[i].prec != image->comps[i - 1].prec) { |
- flag = FALSE; |
goto failed; |
} |
} |