Skip to content

Commit

Permalink
next
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Apr 19, 2024
1 parent 2ab5c91 commit d96472d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ jobs:
- name: Checkout Pillow
uses: actions/checkout@v4

- name: Checkout cached dependencies
uses: actions/checkout@v4
with:
repository: python-pillow/pillow-depends
path: winbuild\depends

# sets env: pythonLocation
- name: Set up Python
uses: actions/setup-python@v5
Expand Down
Binary file not shown.
Binary file added winbuild/build/depends/zlib-1.2.13.tar.gz
Binary file not shown.
12 changes: 12 additions & 0 deletions winbuild/build/src/openjpeg-2.5.2/src/lib/openjp2/j2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -9859,6 +9859,7 @@ OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{
printf("opj_j2k_decode_tile %d\n", (int)time(NULL));
OPJ_UINT32 l_current_marker;
OPJ_BYTE l_data [2];
opj_tcp_t * l_tcp;
Expand All @@ -9871,12 +9872,14 @@ OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t * p_j2k,

if (!(p_j2k->m_specific_param.m_decoder.m_state & J2K_STATE_DATA)
|| (p_tile_index != p_j2k->m_current_tile_number)) {
printf("false1 %d\n", (int)time(NULL));
return OPJ_FALSE;
}

l_tcp = &(p_j2k->m_cp.tcps[p_tile_index]);
if (! l_tcp->m_data) {
opj_j2k_tcp_destroy(l_tcp);
printf("false2 %d\n", (int)time(NULL));
return OPJ_FALSE;
}

Expand All @@ -9887,6 +9890,7 @@ OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t * p_j2k,
/* but full tile decoding is done */
l_image_for_bounds = p_j2k->m_output_image ? p_j2k->m_output_image :
p_j2k->m_private_image;
printf("2.5 %d\n", (int)time(NULL));
if (! opj_tcd_decode_tile(p_j2k->m_tcd,
l_image_for_bounds->x0,
l_image_for_bounds->y0,
Expand All @@ -9901,14 +9905,17 @@ OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t * p_j2k,
opj_j2k_tcp_destroy(l_tcp);
p_j2k->m_specific_param.m_decoder.m_state |= J2K_STATE_ERR;
opj_event_msg(p_manager, EVT_ERROR, "Failed to decode.\n");
printf("false3 %d\n", (int)time(NULL));
return OPJ_FALSE;
}
printf("2.7 %d\n", (int)time(NULL));

/* p_data can be set to NULL when the call will take care of using */
/* itself the TCD data. This is typically the case for whole single */
/* tile decoding optimization. */
if (p_data != NULL) {
if (! opj_tcd_update_tile_data(p_j2k->m_tcd, p_data, p_data_size)) {
printf("false4 %d\n", (int)time(NULL));
return OPJ_FALSE;
}

Expand All @@ -9924,13 +9931,15 @@ OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t * p_j2k,

if (opj_stream_get_number_byte_left(p_stream) == 0
&& p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC) {
printf("true5 %d\n", (int)time(NULL));
return OPJ_TRUE;
}

if (p_j2k->m_specific_param.m_decoder.m_state != J2K_STATE_EOC) {
if (opj_stream_read_data(p_stream, l_data, 2, p_manager) != 2) {
opj_event_msg(p_manager, p_j2k->m_cp.strict ? EVT_ERROR : EVT_WARNING,
"Stream too short\n");
printf("both6 %d\n", (int)time(NULL));
return p_j2k->m_cp.strict ? OPJ_FALSE : OPJ_TRUE;
}
opj_read_bytes(l_data, &l_current_marker, 2);
Expand All @@ -9942,12 +9951,15 @@ OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t * p_j2k,
if (opj_stream_get_number_byte_left(p_stream) == 0) {
p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC;
opj_event_msg(p_manager, EVT_WARNING, "Stream does not end with EOC\n");
printf("true7 %d\n", (int)time(NULL));
return OPJ_TRUE;
}
opj_event_msg(p_manager, EVT_ERROR, "Stream too short, expected SOT\n");
printf("false8 %d\n", (int)time(NULL));
return OPJ_FALSE;
}
}
printf("true9 %d\n", (int)time(NULL));

return OPJ_TRUE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(opj_codec_t *p_codec,
opj_stream_t *p_stream
)
{
printf("torchwood\n");
printf("torchwood %d\n", (int)time(NULL));
if (p_codec && p_data && p_stream) {
opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream;
Expand Down
5 changes: 5 additions & 0 deletions winbuild/build/src/openjpeg-2.5.2/src/lib/openjp2/tcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,7 @@ OPJ_BOOL opj_tcd_decode_tile(opj_tcd_t *p_tcd,
}
/* << INDEX */
#endif
printf("tcd1 %d\n", (int)time(NULL));

/*--------------TIER2------------------*/
/* FIXME _ProfStart(PGROUP_T2); */
Expand All @@ -1727,8 +1728,10 @@ OPJ_BOOL opj_tcd_decode_tile(opj_tcd_t *p_tcd,

/* For subtile decoding, now we know the resno_decoded, we can allocate */
/* the tile data buffer */
printf("tcd2 %d\n", (int)time(NULL));
if (!p_tcd->whole_tile_decoding) {
for (compno = 0; compno < p_tcd->image->numcomps; compno++) {
printf("tcd3 %d %d\n", compno, (int)time(NULL));
opj_tcd_tilecomp_t* tilec = &(p_tcd->tcd_image->tiles->comps[compno]);
opj_image_comp_t* image_comp = &(p_tcd->image->comps[compno]);
opj_tcd_resolution_t *res = tilec->resolutions + image_comp->resno_decoded;
Expand Down Expand Up @@ -1766,6 +1769,7 @@ OPJ_BOOL opj_tcd_decode_tile(opj_tcd_t *p_tcd,
}
}
}
printf("tcd8 %d\n", (int)time(NULL));

/*----------------DWT---------------------*/

Expand All @@ -1790,6 +1794,7 @@ OPJ_BOOL opj_tcd_decode_tile(opj_tcd_t *p_tcd,
return OPJ_FALSE;
}
/* FIXME _ProfStop(PGROUP_DC_SHIFT); */
printf("tcd9 %d\n", (int)time(NULL));


/*---------------TILE-------------------*/
Expand Down

0 comments on commit d96472d

Please sign in to comment.