diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-04 09:19:49 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-04 09:19:49 +0000 |
| commit | 7185faa8570248a024504a18b88ba9a60d8e46b0 (patch) | |
| tree | 0984f884071350ad28befe376ecd02b55608c568 /src | |
| parent | 0c80fcff2a880aef6bc2757fcb374ab57512d7eb (diff) | |
[trunk] Remove warning about conversion.
Update issue 256
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/openjp2/tcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c index f44d3e96..19ccca71 100644 --- a/src/lib/openjp2/tcd.c +++ b/src/lib/openjp2/tcd.c @@ -301,7 +301,7 @@ void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno, OPJ_UINT32 final) for (j = 0; j < tilec->numresolutions; j++) { for (k = 0; k < 3; k++) { matrice[i][j][k] = - (OPJ_INT32) (cp->m_specific_param.m_enc.m_matrice[i * tilec->numresolutions * 3 + j * 3 + k] + (OPJ_INT32) ((OPJ_FLOAT32)cp->m_specific_param.m_enc.m_matrice[i * tilec->numresolutions * 3 + j * 3 + k] * (OPJ_FLOAT32) (tcd->image->comps[compno].prec / 16.0)); } } @@ -580,7 +580,7 @@ OPJ_BOOL opj_tcd_init( opj_tcd_t *p_tcd, } memset(p_tcd->tcd_image->tiles,0, sizeof(opj_tcd_tile_t)); - l_tile_comp_size = p_image->numcomps * sizeof(opj_tcd_tilecomp_t); + l_tile_comp_size = p_image->numcomps * (OPJ_UINT32)sizeof(opj_tcd_tilecomp_t); p_tcd->tcd_image->tiles->comps = (opj_tcd_tilecomp_t *) opj_malloc(l_tile_comp_size); if (! p_tcd->tcd_image->tiles->comps ) { return OPJ_FALSE; @@ -1691,7 +1691,7 @@ OPJ_BOOL opj_tcd_dc_level_shift_decode ( opj_tcd_t *p_tcd ) for (j=0;j<l_height;++j) { for (i = 0; i < l_width; ++i) { OPJ_FLOAT32 l_value = *((OPJ_FLOAT32 *) l_current_ptr); - *l_current_ptr = opj_int_clamp(lrintf(l_value) + l_tccp->m_dc_level_shift, l_min, l_max); ; + *l_current_ptr = opj_int_clamp((OPJ_INT32)lrintf(l_value) + l_tccp->m_dc_level_shift, l_min, l_max); ; ++l_current_ptr; } l_current_ptr += l_stride; |
