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 32adb8e3e4d0864d0f04d034c96569e32fe265d0..77e7a95128b0bab15e5f9122975f8a5f84404c06 100644 |
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp |
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp |
@@ -167,7 +167,7 @@ static void sycc422_to_rgb(opj_image_t *img) |
d1 = g = FX_Alloc(int, (size_t)max); |
d2 = b = FX_Alloc(int, (size_t)max); |
for(i = 0; i < maxh; ++i) { |
- for(j = 0; j < maxw; j += 2) { |
+ for(j = 0; j < (maxw & ~(OPJ_UINT32)1); j += 2) { |
jun_fang
2014/10/10 21:06:08
shall keep & ~(OPJ_UINT32)1 here.
|
sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b); |
++y; |
++r; |
@@ -181,6 +181,13 @@ static void sycc422_to_rgb(opj_image_t *img) |
++cb; |
++cr; |
} |
+ if (j < maxw) { |
Tom Sepez
2014/10/10 21:03:41
nit: alternatively, you could run though this loop
|
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b); |
+ ++y; |
+ ++r; |
+ ++g; |
+ ++b; |
+ } |
} |
FX_Free(img->comps[0].data); |
img->comps[0].data = d0; |