This commit is contained in:
iceman1001 committed 2026-09-27 21:15:18 +02:00
1 parent 2630310336
commit 2e2598bca9
43 files changed
+462 -444

No files matched your search

+2 -2
View File
@@ -2247,7 +2247,7 @@ static OPJ_BOOL opj_dwt_decode_tile(opj_thread_pool_t *tp,
tr->y0); /* height of the resolution level computed */
OPJ_UINT32 w = (OPJ_UINT32)(tilec->resolutions[tilec->minimum_num_resolutions -
1].x1 -
1].x1 -
tilec->resolutions[tilec->minimum_num_resolutions - 1].x0);
OPJ_SIZE_T h_mem_size;
int num_threads;
@@ -3464,7 +3464,7 @@ OPJ_BOOL opj_dwt_decode_tile_97(opj_thread_pool_t *tp,
res->y0); /* height of the resolution level computed */
OPJ_UINT32 w = (OPJ_UINT32)(tilec->resolutions[tilec->minimum_num_resolutions -
1].x1 -
1].x1 -
tilec->resolutions[tilec->minimum_num_resolutions - 1].x0);
OPJ_SIZE_T l_data_size;
+26 -26
View File
@@ -1154,7 +1154,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "We do not support ROI in decoding "
"HT codeblocks\n");
"HT codeblocks\n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
@@ -1265,8 +1265,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_WARNING, "A malformed codeblock that has "
"more than one coding pass, but zero length for "
"2nd and potentially the 3rd pass in an HT codeblock.\n");
"more than one coding pass, but zero length for "
"2nd and potentially the 3rd pass in an HT codeblock.\n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
@@ -1277,8 +1277,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "We do not support more than 3 "
"coding passes in an HT codeblock; This codeblocks has "
"%d passes.\n", num_passes);
"coding passes in an HT codeblock; This codeblocks has "
"%d passes.\n", num_passes);
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
@@ -1299,8 +1299,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "32 bits are not enough to "
"decode this codeblock, since the number of "
"bitplane, %d, is larger than 30.\n", cblk->Mb);
"decode this codeblock, since the number of "
"bitplane, %d, is larger than 30.\n", cblk->Mb);
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
@@ -1315,8 +1315,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "Malformed HT codeblock. "
"Decoding this codeblock is stopped. There are "
"%d zero bitplanes in %d bitplanes.\n",
"Decoding this codeblock is stopped. There are "
"%d zero bitplanes in %d bitplanes.\n",
zero_bplanes, cblk->Mb);
if (p_manager_mutex) {
@@ -1337,11 +1337,11 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
if (only_cleanup_pass_is_decoded == OPJ_FALSE) {
only_cleanup_pass_is_decoded = OPJ_TRUE;
opj_event_msg(p_manager, EVT_WARNING, "Malformed HT codeblock. "
"When the number of zero planes bitplanes is "
"equal to the number of bitplanes, only the cleanup "
"pass makes sense, but we have %d passes in this "
"codeblock. Therefore, only the cleanup pass will be "
"decoded. This message will not be displayed again.\n",
"When the number of zero planes bitplanes is "
"equal to the number of bitplanes, only the cleanup "
"pass makes sense, but we have %d passes in this "
"codeblock. Therefore, only the cleanup pass will be "
"decoded. This message will not be displayed again.\n",
num_passes);
}
if (p_manager_mutex) {
@@ -1363,7 +1363,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "Malformed HT codeblock. "
"Invalid codeblock length values.\n");
"Invalid codeblock length values.\n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
@@ -1380,8 +1380,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "Malformed HT codeblock. "
"One of the following condition is not met: "
"2 <= Scup <= min(Lcup, 4079)\n");
"One of the following condition is not met: "
"2 <= Scup <= min(Lcup, 4079)\n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
@@ -1395,7 +1395,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "Malformed HT codeblock. "
"Incorrect MEL segment sequence.\n");
"Incorrect MEL segment sequence.\n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
@@ -1557,8 +1557,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "Malformed HT codeblock. Decoding "
"this codeblock is stopped. U_q is larger than zero "
"bitplanes + 1 \n");
"this codeblock is stopped. U_q is larger than zero "
"bitplanes + 1 \n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
@@ -1583,8 +1583,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "Malformed HT codeblock. "
"VLC code produces significant samples outside "
"the codeblock area.\n");
"VLC code produces significant samples outside "
"the codeblock area.\n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
@@ -1858,8 +1858,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "Malformed HT codeblock. "
"Decoding this codeblock is stopped. U_q is"
"larger than bitplanes + 1 \n");
"Decoding this codeblock is stopped. U_q is"
"larger than bitplanes + 1 \n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
@@ -1884,8 +1884,8 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_ERROR, "Malformed HT codeblock. "
"VLC code produces significant samples outside "
"the codeblock area.\n");
"VLC code produces significant samples outside "
"the codeblock area.\n");
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
}
+12 -12
View File
@@ -2445,7 +2445,7 @@ static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k,
for (i = 0; i < l_image->numcomps; ++i) {
if (! l_image->comps[i].sgnd) {
p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps[i].m_dc_level_shift = 1
<< (l_image->comps[i].prec - 1);
<< (l_image->comps[i].prec - 1);
}
}
@@ -3220,7 +3220,7 @@ static OPJ_BOOL opj_j2k_read_qcc(opj_j2k_t *p_j2k,
/* we try to correct */
l_comp_no = backup_compno % l_num_comp;
opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust this\n"
"- setting component number to %d\n",
"- setting component number to %d\n",
l_comp_no);
}
@@ -4469,7 +4469,7 @@ static OPJ_BOOL opj_j2k_read_sot(opj_j2k_t *p_j2k,
/* we try to correct */
tileno = backup_tileno;
opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust this\n"
"- setting tile number to %d\n",
"- setting tile number to %d\n",
tileno);
}
@@ -4512,7 +4512,7 @@ static OPJ_BOOL opj_j2k_read_sot(opj_j2k_t *p_j2k,
/* we try to correct */
l_tot_len = 0;
opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust this\n"
"- setting Psot to %d => assuming it is the last tile\n",
"- setting Psot to %d => assuming it is the last tile\n",
l_tot_len);
}
};
@@ -4864,7 +4864,7 @@ static OPJ_BOOL opj_j2k_write_sod(opj_j2k_t *p_j2k,
if (l_remaining_data <
p_j2k->m_specific_param.m_encoder.m_reserved_bytes_for_PLT) {
opj_event_msg(p_manager, EVT_ERROR,
"Not enough bytes in output buffer to write SOD marker\n");
"Not enough bytes in output buffer to write SOD marker\n");
opj_tcd_marker_info_destroy(marker_info);
return OPJ_FALSE;
}
@@ -8734,14 +8734,14 @@ static OPJ_BOOL opj_j2k_encoding_validation(opj_j2k_t *p_j2k,
if ((p_j2k->m_cp.tdx) < (OPJ_UINT32)(1 <<
(p_j2k->m_cp.tcps->tccps->numresolutions - 1U))) {
opj_event_msg(p_manager, EVT_ERROR,
"Number of resolutions is too high in comparison to the size of tiles\n");
"Number of resolutions is too high in comparison to the size of tiles\n");
return OPJ_FALSE;
}
if ((p_j2k->m_cp.tdy) < (OPJ_UINT32)(1 <<
(p_j2k->m_cp.tcps->tccps->numresolutions - 1U))) {
opj_event_msg(p_manager, EVT_ERROR,
"Number of resolutions is too high in comparison to the size of tiles\n");
"Number of resolutions is too high in comparison to the size of tiles\n");
return OPJ_FALSE;
}
@@ -9807,7 +9807,7 @@ OPJ_BOOL opj_j2k_read_tile_header(opj_j2k_t *p_j2k,
(OPJ_UINT32)l_tcp->m_current_tile_part_number + 1 < l_tcp->m_nb_tile_parts) {
const OPJ_OFF_T next_tp_sot_pos = p_j2k->cstr_index->tile_index[
p_j2k->m_current_tile_number].tp_index[l_tcp->m_current_tile_part_number +
1].start_pos;
1].start_pos;
if (next_tp_sot_pos != opj_stream_tell(p_stream)) {
#if 0
@@ -11209,7 +11209,7 @@ static OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
/* we try to correct */
l_num_band = 1;
opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust them\n"
"- setting number of bands to %d => HYPOTHESIS!!!\n",
"- setting number of bands to %d => HYPOTHESIS!!!\n",
l_num_band);
};
@@ -11398,7 +11398,7 @@ static void opj_j2k_dump_MH_index(opj_j2k_t *p_j2k, FILE *out_stream) {
fprintf(out_stream, "Codestream index from main header: {\n");
fprintf(out_stream, "\t Main header start position=%" PRIi64 "\n"
"\t Main header end position=%" PRIi64 "\n",
"\t Main header end position=%" PRIi64 "\n",
cstr_index->main_head_start, cstr_index->main_head_end);
fprintf(out_stream, "\t Marker list: {\n");
@@ -12341,10 +12341,10 @@ OPJ_BOOL opj_j2k_get_tile(opj_j2k_t *p_j2k,
l_img_comp->w = (OPJ_UINT32)(opj_int_ceildivpow2(l_comp_x1,
(OPJ_INT32)l_img_comp->factor) - opj_int_ceildivpow2((OPJ_INT32)l_img_comp->x0,
(OPJ_INT32)l_img_comp->factor));
(OPJ_INT32)l_img_comp->factor));
l_img_comp->h = (OPJ_UINT32)(opj_int_ceildivpow2(l_comp_y1,
(OPJ_INT32)l_img_comp->factor) - opj_int_ceildivpow2((OPJ_INT32)l_img_comp->y0,
(OPJ_INT32)l_img_comp->factor));
(OPJ_INT32)l_img_comp->factor));
l_img_comp++;
}
+6 -6
View File
@@ -671,9 +671,9 @@ opj_codec_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format) {
struct opj_event_mgr *)) opj_j2k_setup_encoder;
l_codec->m_codec_data.m_compression.opj_encoder_set_extra_options = (OPJ_BOOL(
*)(void *,
const char *const *,
struct opj_event_mgr *)) opj_j2k_encoder_set_extra_options;
*)(void *,
const char *const *,
struct opj_event_mgr *)) opj_j2k_encoder_set_extra_options;
l_codec->opj_set_threads =
(OPJ_BOOL(*)(void *p_codec, OPJ_UINT32 num_threads)) opj_j2k_set_threads;
@@ -717,9 +717,9 @@ opj_codec_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format) {
struct opj_event_mgr *)) opj_jp2_setup_encoder;
l_codec->m_codec_data.m_compression.opj_encoder_set_extra_options = (OPJ_BOOL(
*)(void *,
const char *const *,
struct opj_event_mgr *)) opj_jp2_encoder_set_extra_options;
*)(void *,
const char *const *,
struct opj_event_mgr *)) opj_jp2_encoder_set_extra_options;
l_codec->opj_set_threads =
(OPJ_BOOL(*)(void *p_codec, OPJ_UINT32 num_threads)) opj_jp2_set_threads;
+2 -2
View File
@@ -1759,7 +1759,7 @@ static void opj_t1_clbl_decode_processor(void *user_data, opj_tls_t *tls) {
}
} else if (tccp->qmfbid == 1) {
OPJ_INT32 *OPJ_RESTRICT tiledp = &tilec->data[(OPJ_SIZE_T)y * tile_w +
(OPJ_SIZE_T)x];
(OPJ_SIZE_T)x];
for (j = 0; j < cblk_h; ++j) {
//positive -> round down aka. (83)/2 = 41.5 -> 41
//negative -> round up aka. (-83)/2 = -41.5 -> -41
@@ -1814,7 +1814,7 @@ static void opj_t1_clbl_decode_processor(void *user_data, opj_tls_t *tls) {
} else { /* if (tccp->qmfbid == 0) */
const float stepsize = 0.5f * band->stepsize;
OPJ_FLOAT32 *OPJ_RESTRICT tiledp = (OPJ_FLOAT32 *) &tilec->data[(OPJ_SIZE_T)y *
tile_w + (OPJ_SIZE_T)x];
tile_w + (OPJ_SIZE_T)x];
for (j = 0; j < cblk_h; ++j) {
OPJ_FLOAT32 *OPJ_RESTRICT tiledp2 = tiledp;
for (i = 0; i < cblk_w; ++i) {
+3 -3
View File
@@ -351,7 +351,7 @@ OPJ_BOOL opj_t2_encode_packets(opj_t2_t *p_t2,
} else {
info_PK->start_pos = ((l_cp->m_specific_param.m_enc.m_tp_on | l_tcp->POC) &&
info_PK->start_pos) ? info_PK->start_pos : info_TL->packet[cstr_info->packno -
1].end_pos + 1;
1].end_pos + 1;
}
info_PK->end_pos = info_PK->start_pos + l_nb_bytes - 1;
info_PK->end_ph_pos += info_PK->start_pos -
@@ -550,7 +550,7 @@ OPJ_BOOL opj_t2_decode_packets(opj_tcd_t *tcd,
} else {
info_PK->start_pos = (l_cp->m_specific_param.m_enc.m_tp_on &&
info_PK->start_pos) ? info_PK->start_pos : info_TL->packet[p_cstr_info->packno -
1].end_pos + 1;
1].end_pos + 1;
}
info_PK->end_pos = info_PK->start_pos + l_nb_bytes_read - 1;
info_PK->end_ph_pos += info_PK->start_pos -
@@ -1439,7 +1439,7 @@ static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t *p_t2,
(partial_buffer)) {
if (p_t2->cp->strict) {
opj_event_msg(p_manager, EVT_ERROR,
"read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n",
"read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n",
l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno,
p_pi->compno);
return OPJ_FALSE;
+3 -3
View File
@@ -368,7 +368,7 @@ void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno,
for (k = 0; k < 3; k++) {
matrice[i][j][k] =
(OPJ_INT32)((OPJ_FLOAT32)cp->m_specific_param.m_enc.m_matrice[i *
tilec->numresolutions * 3 + j * 3 + k]
tilec->numresolutions * 3 + j * 3 + k]
* (OPJ_FLOAT32)(tcd->image->comps[compno].prec / 16.0));
}
}
@@ -1152,7 +1152,7 @@ static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no,
if ((((OPJ_UINT32) - 1) / (OPJ_UINT32)sizeof_block) <
l_nb_code_blocks) {
opj_event_msg(manager, EVT_ERROR,
"Size of code block data exceeds system limits\n");
"Size of code block data exceeds system limits\n");
return OPJ_FALSE;
}
l_nb_code_blocks_size = l_nb_code_blocks * (OPJ_UINT32)sizeof_block;
@@ -1805,7 +1805,7 @@ OPJ_BOOL opj_tcd_update_tile_data(opj_tcd_t *p_tcd,
l_width = (OPJ_UINT32)(l_res->x1 - l_res->x0);
l_height = (OPJ_UINT32)(l_res->y1 - l_res->y0);
l_stride = (OPJ_UINT32)(l_tilec->resolutions[l_tilec->minimum_num_resolutions -
1].x1 -
1].x1 -
l_tilec->resolutions[l_tilec->minimum_num_resolutions - 1].x0) - l_width;
l_src_data = l_tilec->data;
} else {