OLD | NEW |
1 /* | 1 /* |
2 * The copyright in this software is being made available under the 2-clauses | 2 * The copyright in this software is being made available under the 2-clauses |
3 * BSD License, included below. This software may be subject to other third | 3 * BSD License, included below. This software may be subject to other third |
4 * party and contributor rights, including patent rights, and no such rights | 4 * party and contributor rights, including patent rights, and no such rights |
5 * are granted under this license. | 5 * are granted under this license. |
6 * | 6 * |
7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium | 7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium |
8 * Copyright (c) 2002-2014, Professor Benoit Macq | 8 * Copyright (c) 2002-2014, Professor Benoit Macq |
9 * Copyright (c) 2001-2003, David Janssens | 9 * Copyright (c) 2001-2003, David Janssens |
10 * Copyright (c) 2002-2003, Yannick Verschueren | 10 * Copyright (c) 2002-2003, Yannick Verschueren |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 opj_event_msg(p_manager, EVT_ERROR, "Insufficient data for CMAP
box.\n"); | 1187 opj_event_msg(p_manager, EVT_ERROR, "Insufficient data for CMAP
box.\n"); |
1188 return OPJ_FALSE; | 1188 return OPJ_FALSE; |
1189 } | 1189 } |
1190 | 1190 |
1191 cmap = (opj_jp2_cmap_comp_t*) opj_malloc(nr_channels * sizeof(opj_jp2_cm
ap_comp_t)); | 1191 cmap = (opj_jp2_cmap_comp_t*) opj_malloc(nr_channels * sizeof(opj_jp2_cm
ap_comp_t)); |
1192 if (!cmap) | 1192 if (!cmap) |
1193 return OPJ_FALSE; | 1193 return OPJ_FALSE; |
1194 | 1194 |
1195 | 1195 |
1196 for(i = 0; i < nr_channels; ++i) { | 1196 for(i = 0; i < nr_channels; ++i) { |
1197 » » opj_read_bytes(p_cmap_header_data, &l_value, 2);» »
» /* CMP^i */ | 1197 » » opj_read_bytes_BE(p_cmap_header_data, &l_value, 2);» »
» /* CMP^i */ |
1198 p_cmap_header_data +=2; | 1198 p_cmap_header_data +=2; |
1199 cmap[i].cmp = (OPJ_UINT16) l_value; | 1199 cmap[i].cmp = (OPJ_UINT16) l_value; |
1200 | 1200 |
1201 opj_read_bytes(p_cmap_header_data, &l_value, 1);
/* MTYP^i */ | 1201 opj_read_bytes(p_cmap_header_data, &l_value, 1);
/* MTYP^i */ |
1202 ++p_cmap_header_data; | 1202 ++p_cmap_header_data; |
1203 cmap[i].mtyp = (OPJ_BYTE) l_value; | 1203 cmap[i].mtyp = (OPJ_BYTE) l_value; |
1204 | 1204 |
1205 opj_read_bytes(p_cmap_header_data, &l_value, 1);
/* PCOL^i */ | 1205 opj_read_bytes(p_cmap_header_data, &l_value, 1);
/* PCOL^i */ |
1206 ++p_cmap_header_data; | 1206 ++p_cmap_header_data; |
1207 cmap[i].pcol = (OPJ_BYTE) l_value; | 1207 cmap[i].pcol = (OPJ_BYTE) l_value; |
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3149 len = opj_stream_tell(cio)-lenp; | 3149 len = opj_stream_tell(cio)-lenp; |
3150 opj_stream_skip(cio, lenp, p_manager); | 3150 opj_stream_skip(cio, lenp, p_manager); |
3151 opj_write_bytes(l_data_header,len,4);/* L */ | 3151 opj_write_bytes(l_data_header,len,4);/* L */ |
3152 opj_stream_write_data(cio,l_data_header,4,p_manager); | 3152 opj_stream_write_data(cio,l_data_header,4,p_manager); |
3153 opj_stream_seek(cio, lenp+len,p_manager); | 3153 opj_stream_seek(cio, lenp+len,p_manager); |
3154 | 3154 |
3155 return len; | 3155 return len; |
3156 } | 3156 } |
3157 #endif | 3157 #endif |
3158 #endif /* USE_JPIP */ | 3158 #endif /* USE_JPIP */ |
OLD | NEW |