Fix indentation

This commit is contained in:
Nicolas Derouineau 2019-01-10 10:47:53 +01:00
parent 4b88e35371
commit d052bb8f7f
2 changed files with 21 additions and 17 deletions

View File

@ -1497,10 +1497,11 @@ static OPJ_BOOL opj_jp2_read_pxfm(opj_jp2_t * jp2,
num_channel = (OPJ_UINT16) l_value;
p_pxfm_header_data+=2;
p_pxfm_header_data += 2;
if (jp2->numcomps != num_channel) {
opj_event_msg(p_manager, EVT_ERROR, "Mismatch between num comps and PXFM number of channel \n");
opj_event_msg(p_manager, EVT_ERROR,
"Mismatch between num comps and PXFM number of channel \n");
return OPJ_FALSE;
}
jp2->pixel_format = (opj_jp2_pixel_format_t*) opj_malloc(jp2->numcomps * sizeof(
@ -1509,18 +1510,21 @@ static OPJ_BOOL opj_jp2_read_pxfm(opj_jp2_t * jp2,
for (i = 0; i < jp2->numcomps; ++i) {
opj_read_bytes(p_pxfm_header_data, &l_value,
2);
p_pxfm_header_data+=2;
p_pxfm_header_data += 2;
Channel_index = (OPJ_UINT16) l_value;
opj_read_bytes(p_pxfm_header_data, &l_value,
2);
p_pxfm_header_data+=2;
if(Channel_index < jp2->numcomps){
jp2->pixel_format[Channel_index].pixel_format_type = ((OPJ_UINT16) l_value) & 0xF000;
p_pxfm_header_data += 2;
if (Channel_index < jp2->numcomps) {
jp2->pixel_format[Channel_index].pixel_format_type = ((OPJ_UINT16) l_value) &
0xF000;
if(jp2->pixel_format[Channel_index].pixel_format_type == 0 ||
if (jp2->pixel_format[Channel_index].pixel_format_type == 0 ||
jp2->pixel_format[Channel_index].pixel_format_type == 4
)
jp2->pixel_format[Channel_index].pixel_format_values.mentissa = ((OPJ_UINT16) l_value) & 0x0FFF;
) {
jp2->pixel_format[Channel_index].pixel_format_values.mentissa = ((
OPJ_UINT16) l_value) & 0x0FFF;
}
}
}

View File

@ -159,7 +159,7 @@ typedef struct opj_jp2_pixel_format_values_t {
OPJ_UINT8 exponent;
OPJ_UINT8 mentissa;
OPJ_UINT8 fractional_bits;
}opj_jp2_pixel_format_values_t;
} opj_jp2_pixel_format_values_t;
/**
Non Linear Transform