diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-09-04 17:35:52 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-09-04 17:35:52 +0200 |
| commit | 579b8937eae7e6b6868b8b5c6286a742c10a5130 (patch) | |
| tree | 534fa8370ed7ea9c7e24427f0c1611d85a3b2924 /src/lib/openjp2/sparse_array.c | |
| parent | c1e0fba0c46cb528a08b89b986e86ff0f4792558 (diff) | |
Replace uses of size_t by OPJ_SIZE_T
Diffstat (limited to 'src/lib/openjp2/sparse_array.c')
| -rw-r--r-- | src/lib/openjp2/sparse_array.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/openjp2/sparse_array.c b/src/lib/openjp2/sparse_array.c index 40459bdb..6a2d8d43 100644 --- a/src/lib/openjp2/sparse_array.c +++ b/src/lib/openjp2/sparse_array.c @@ -142,14 +142,14 @@ static OPJ_BOOL opj_sparse_array_int32_read_or_write( if (is_read_op) { if (src_block == NULL) { if (buf_col_stride == 1) { - OPJ_INT32* dest_ptr = buf + (y - y0) * (size_t)buf_line_stride + + OPJ_INT32* dest_ptr = buf + (y - y0) * (OPJ_SIZE_T)buf_line_stride + (x - x0) * buf_col_stride; for (j = 0; j < y_incr; j++) { memset(dest_ptr, 0, sizeof(OPJ_INT32) * x_incr); dest_ptr += buf_line_stride; } } else { - OPJ_INT32* dest_ptr = buf + (y - y0) * (size_t)buf_line_stride + + OPJ_INT32* dest_ptr = buf + (y - y0) * (OPJ_SIZE_T)buf_line_stride + (x - x0) * buf_col_stride; for (j = 0; j < y_incr; j++) { OPJ_UINT32 k; @@ -161,9 +161,10 @@ static OPJ_BOOL opj_sparse_array_int32_read_or_write( } } else { const OPJ_INT32* OPJ_RESTRICT src_ptr = src_block + block_y_offset * - (size_t)block_width + block_x_offset; + (OPJ_SIZE_T)block_width + block_x_offset; if (buf_col_stride == 1) { - OPJ_INT32* OPJ_RESTRICT dest_ptr = buf + (y - y0) * (size_t)buf_line_stride + + OPJ_INT32* OPJ_RESTRICT dest_ptr = buf + (y - y0) * (OPJ_SIZE_T)buf_line_stride + + (x - x0) * buf_col_stride; if (x_incr == 4) { // Same code as general branch, but the compiler @@ -181,7 +182,8 @@ static OPJ_BOOL opj_sparse_array_int32_read_or_write( } } } else { - OPJ_INT32* OPJ_RESTRICT dest_ptr = buf + (y - y0) * (size_t)buf_line_stride + + OPJ_INT32* OPJ_RESTRICT dest_ptr = buf + (y - y0) * (OPJ_SIZE_T)buf_line_stride + + (x - x0) * buf_col_stride; if (x_incr == 1) { for (j = 0; j < y_incr; j++) { @@ -240,9 +242,9 @@ static OPJ_BOOL opj_sparse_array_int32_read_or_write( if (buf_col_stride == 1) { OPJ_INT32* OPJ_RESTRICT dest_ptr = src_block + block_y_offset * - (size_t)block_width + block_x_offset; + (OPJ_SIZE_T)block_width + block_x_offset; const OPJ_INT32* OPJ_RESTRICT src_ptr = buf + (y - y0) * - (size_t)buf_line_stride + (x - x0) * buf_col_stride; + (OPJ_SIZE_T)buf_line_stride + (x - x0) * buf_col_stride; if (x_incr == 4) { // Same code as general branch, but the compiler // can have an efficient memcpy() @@ -260,9 +262,9 @@ static OPJ_BOOL opj_sparse_array_int32_read_or_write( } } else { OPJ_INT32* OPJ_RESTRICT dest_ptr = src_block + block_y_offset * - (size_t)block_width + block_x_offset; + (OPJ_SIZE_T)block_width + block_x_offset; const OPJ_INT32* OPJ_RESTRICT src_ptr = buf + (y - y0) * - (size_t)buf_line_stride + (x - x0) * buf_col_stride; + (OPJ_SIZE_T)buf_line_stride + (x - x0) * buf_col_stride; if (x_incr == 1) { for (j = 0; j < y_incr; j++) { *dest_ptr = *src_ptr; |
