[trunk] style
This commit is contained in:
parent
5652ccc780
commit
e7c8a22c67
|
@ -201,21 +201,21 @@ opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_c
|
||||||
opj_image_t *image = 00;
|
opj_image_t *image = 00;
|
||||||
|
|
||||||
image = (opj_image_t*) opj_malloc(sizeof(opj_image_t));
|
image = (opj_image_t*) opj_malloc(sizeof(opj_image_t));
|
||||||
if
|
if (image)
|
||||||
(image)
|
|
||||||
{
|
{
|
||||||
memset(image,0,sizeof(opj_image_t));
|
memset(image,0,sizeof(opj_image_t));
|
||||||
|
|
||||||
image->color_space = clrspc;
|
image->color_space = clrspc;
|
||||||
image->numcomps = numcmpts;
|
image->numcomps = numcmpts;
|
||||||
|
|
||||||
/* allocate memory for the per-component information */
|
/* allocate memory for the per-component information */
|
||||||
image->comps = (opj_image_comp_t*)opj_malloc(image->numcomps * sizeof(opj_image_comp_t));
|
image->comps = (opj_image_comp_t*)opj_malloc(image->numcomps * sizeof(opj_image_comp_t));
|
||||||
if
|
if (!image->comps) {
|
||||||
(!image->comps)
|
|
||||||
{
|
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
return 00;
|
return 00;
|
||||||
}
|
}
|
||||||
memset(image->comps,0,image->numcomps * sizeof(opj_image_comp_t));
|
memset(image->comps,0,image->numcomps * sizeof(opj_image_comp_t));
|
||||||
|
|
||||||
/* create the individual image components */
|
/* create the individual image components */
|
||||||
for(compno = 0; compno < numcmpts; compno++) {
|
for(compno = 0; compno < numcmpts; compno++) {
|
||||||
opj_image_comp_t *comp = &image->comps[compno];
|
opj_image_comp_t *comp = &image->comps[compno];
|
||||||
|
@ -230,5 +230,6 @@ opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_c
|
||||||
comp->data = 0;
|
comp->data = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1333,7 +1333,7 @@ opj_bool OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,
|
||||||
{
|
{
|
||||||
if (p_codec && p_stream && p_data) {
|
if (p_codec && p_stream && p_data) {
|
||||||
opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
|
opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
|
||||||
opj_stream_private_t * l_cio = (opj_stream_private_t *) p_stream;
|
opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream;
|
||||||
|
|
||||||
if (l_codec->is_decompressor) {
|
if (l_codec->is_decompressor) {
|
||||||
return OPJ_FALSE;
|
return OPJ_FALSE;
|
||||||
|
@ -1343,7 +1343,7 @@ opj_bool OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,
|
||||||
p_tile_index,
|
p_tile_index,
|
||||||
p_data,
|
p_data,
|
||||||
p_data_size,
|
p_data_size,
|
||||||
l_cio,
|
l_stream,
|
||||||
&(l_codec->m_event_mgr) );
|
&(l_codec->m_event_mgr) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue