[trunk] Another round of fixes for sign conversion warnings.
Update issue 256
This commit is contained in:
parent
33c472d734
commit
f9a0f869e3
|
@ -80,7 +80,7 @@ int opj_write_tpix( int coff,
|
||||||
opj_stream_write_data(cio,l_data_header,4,p_manager);
|
opj_stream_write_data(cio,l_data_header,4,p_manager);
|
||||||
opj_stream_seek(cio, lenp+len,p_manager);
|
opj_stream_seek(cio, lenp+len,p_manager);
|
||||||
|
|
||||||
return len;
|
return (int)len;
|
||||||
}
|
}
|
||||||
|
|
||||||
int opj_write_tpixfaix( int coff,
|
int opj_write_tpixfaix( int coff,
|
||||||
|
@ -92,15 +92,15 @@ int opj_write_tpixfaix( int coff,
|
||||||
{
|
{
|
||||||
OPJ_UINT32 len;
|
OPJ_UINT32 len;
|
||||||
OPJ_OFF_T lenp;
|
OPJ_OFF_T lenp;
|
||||||
int i, j;
|
OPJ_UINT32 i, j;
|
||||||
int Aux;
|
OPJ_UINT32 Aux;
|
||||||
int num_max_tile_parts;
|
OPJ_UINT32 num_max_tile_parts;
|
||||||
int size_of_coding; /* 4 or 8 */
|
OPJ_UINT32 size_of_coding; /* 4 or 8 */
|
||||||
opj_tp_info_t tp;
|
opj_tp_info_t tp;
|
||||||
OPJ_BYTE l_data_header [8];
|
OPJ_BYTE l_data_header [8];
|
||||||
int version;
|
OPJ_UINT32 version;
|
||||||
|
|
||||||
num_max_tile_parts = get_num_max_tile_parts( cstr_info);
|
num_max_tile_parts = (OPJ_UINT32)get_num_max_tile_parts( cstr_info);
|
||||||
|
|
||||||
if( j2klen > pow( 2, 32)){
|
if( j2klen > pow( 2, 32)){
|
||||||
size_of_coding = 8;
|
size_of_coding = 8;
|
||||||
|
@ -120,24 +120,24 @@ int opj_write_tpixfaix( int coff,
|
||||||
|
|
||||||
opj_write_bytes(l_data_header,num_max_tile_parts,size_of_coding); /* NMAX */
|
opj_write_bytes(l_data_header,num_max_tile_parts,size_of_coding); /* NMAX */
|
||||||
opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager);
|
opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager);
|
||||||
opj_write_bytes(l_data_header,cstr_info.tw*cstr_info.th,size_of_coding); /* M */
|
opj_write_bytes(l_data_header,(OPJ_UINT32)(cstr_info.tw*cstr_info.th),size_of_coding); /* M */
|
||||||
opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager);
|
opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager);
|
||||||
|
|
||||||
for (i = 0; i < cstr_info.tw*cstr_info.th; i++)
|
for (i = 0; i < (OPJ_UINT32)(cstr_info.tw*cstr_info.th); i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < cstr_info.tile[i].num_tps; j++)
|
for (j = 0; j < (OPJ_UINT32)cstr_info.tile[i].num_tps; j++)
|
||||||
{
|
{
|
||||||
tp = cstr_info.tile[i].tp[j];
|
tp = cstr_info.tile[i].tp[j];
|
||||||
|
|
||||||
opj_write_bytes(l_data_header,tp.tp_start_pos-coff,size_of_coding); /* start position */
|
opj_write_bytes(l_data_header,(OPJ_UINT32)(tp.tp_start_pos-coff),size_of_coding); /* start position */
|
||||||
opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager);
|
opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager);
|
||||||
opj_write_bytes(l_data_header,tp.tp_end_pos-tp.tp_start_pos+1,size_of_coding); /* length */
|
opj_write_bytes(l_data_header,(OPJ_UINT32)(tp.tp_end_pos-tp.tp_start_pos+1),size_of_coding); /* length */
|
||||||
opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager);
|
opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager);
|
||||||
|
|
||||||
if (version & 0x02)
|
if (version & 0x02)
|
||||||
{
|
{
|
||||||
if( cstr_info.tile[i].num_tps == 1 && cstr_info.numdecompos[compno] > 1)
|
if( cstr_info.tile[i].num_tps == 1 && cstr_info.numdecompos[compno] > 1)
|
||||||
Aux = cstr_info.numdecompos[compno] + 1;
|
Aux = (OPJ_UINT32)(cstr_info.numdecompos[compno] + 1);
|
||||||
else
|
else
|
||||||
Aux = j + 1;
|
Aux = j + 1;
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ int opj_write_tpixfaix( int coff,
|
||||||
opj_stream_write_data(cio,l_data_header,4,p_manager);
|
opj_stream_write_data(cio,l_data_header,4,p_manager);
|
||||||
opj_stream_seek(cio, lenp+len,p_manager);
|
opj_stream_seek(cio, lenp+len,p_manager);
|
||||||
|
|
||||||
return len;
|
return (int)len;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_num_max_tile_parts( opj_codestream_info_t cstr_info)
|
int get_num_max_tile_parts( opj_codestream_info_t cstr_info)
|
||||||
|
|
Loading…
Reference in New Issue