summaryrefslogtreecommitdiff
path: root/libopenjpeg/j2k.c
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-08-16 14:16:28 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-08-16 14:16:28 +0000
commit0f19c958da987932183aaec79357f5a115625dd4 (patch)
tree763337a6a361b8408eaf469e5bf56c6b0f46b714 /libopenjpeg/j2k.c
parent2935fbc0899f44f480c0f1f5407c0e20841453c4 (diff)
remove deprecated v1 style function j2k_read_eoc; rename j2k_read_eoc_v2 to opj_j2k_read_eoc
Diffstat (limited to 'libopenjpeg/j2k.c')
-rw-r--r--libopenjpeg/j2k.c72
1 files changed, 6 insertions, 66 deletions
diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c
index 65e90509..ead3332c 100644
--- a/libopenjpeg/j2k.c
+++ b/libopenjpeg/j2k.c
@@ -844,17 +844,6 @@ static opj_bool j2k_write_eoc_v2( opj_j2k_v2_t *p_j2k,
opj_event_mgr_t * p_manager );
/**
-Write the EOC marker (end of codestream)
-@param j2k J2K handle
-*/
-static void j2k_write_eoc(opj_j2k_t *j2k);
-/**
-Read the EOC marker (end of codestream)
-@param j2k J2K handle
-*/
-static void j2k_read_eoc(opj_j2k_t *j2k);
-
-/**
* Reads a EOC marker (End Of Codestream)
*
* @param p_header_data the data contained in the SOD box.
@@ -862,15 +851,9 @@ static void j2k_read_eoc(opj_j2k_t *j2k);
* @param p_header_size the size of the data contained in the SOD marker.
* @param p_manager the user event manager.
*/
-#if 0
-static opj_bool j2k_read_eoc_v2 (
- opj_j2k_v2_t *p_j2k,
- struct opj_stream_private *p_stream,
- struct opj_event_mgr * p_manager
- ) ;
-#endif
-
-
+static opj_bool opj_j2k_read_eoc ( opj_j2k_v2_t *p_j2k,
+ opj_stream_private_t *p_stream,
+ opj_event_mgr_t * p_manager );
/**
* Writes the CBD-MCT-MCC-MCO markers (Multi components transform)
@@ -4771,47 +4754,6 @@ opj_bool opj_j2k_update_rates( opj_j2k_v2_t *p_j2k,
return OPJ_TRUE;
}
-static void j2k_read_eoc(opj_j2k_t *j2k) {
- int i, tileno;
- opj_bool success = OPJ_FALSE;
-
- /* if packets should be decoded */
- if (j2k->cp->limit_decoding != DECODE_ALL_BUT_PACKETS) {
- opj_tcd_t *tcd = tcd_create(j2k->cinfo);
- tcd_malloc_decode(tcd, j2k->image, j2k->cp);
- for (i = 0; i < j2k->cp->tileno_size; i++) {
- tcd_malloc_decode_tile(tcd, j2k->image, j2k->cp, i, j2k->cstr_info);
- if (j2k->cp->tileno[i] != -1)
- {
- tileno = j2k->cp->tileno[i];
- success = tcd_decode_tile(tcd, j2k->tile_data[tileno], j2k->tile_len[tileno], tileno, j2k->cstr_info);
- opj_free(j2k->tile_data[tileno]);
- j2k->tile_data[tileno] = NULL;
- tcd_free_decode_tile(tcd, i);
- }
- else
- success = OPJ_FALSE;
- if (success == OPJ_FALSE) {
- j2k->state |= J2K_STATE_ERR;
- break;
- }
- }
- tcd_free_decode(tcd);
- tcd_destroy(tcd);
- }
- /* if packets should not be decoded */
- else {
- for (i = 0; i < j2k->cp->tileno_size; i++) {
- tileno = j2k->cp->tileno[i];
- opj_free(j2k->tile_data[tileno]);
- j2k->tile_data[tileno] = NULL;
- }
- }
- if (j2k->state & J2K_STATE_ERR)
- j2k->state = J2K_STATE_MT + J2K_STATE_ERR;
- else
- j2k->state = J2K_STATE_MT;
-}
/**
* Reads a EOC marker (End Of Codestream)
@@ -4821,10 +4763,9 @@ static void j2k_read_eoc(opj_j2k_t *j2k) {
* @param p_header_size the size of the data contained in the SOD marker.
* @param p_manager the user event manager.
*/
-#if 0
-opj_bool j2k_read_eoc_v2 ( opj_j2k_v2_t *p_j2k,
- struct opj_stream_private *p_stream,
- struct opj_event_mgr * p_manager )
+opj_bool opj_j2k_read_eoc ( opj_j2k_v2_t *p_j2k,
+ opj_stream_private_t *p_stream,
+ opj_event_mgr_t * p_manager )
{
OPJ_UINT32 i;
opj_tcd_v2_t * l_tcd = 00;
@@ -4870,7 +4811,6 @@ opj_bool j2k_read_eoc_v2 ( opj_j2k_v2_t *p_j2k,
tcd_destroy_v2(l_tcd);
return OPJ_TRUE;
}
-#endif
/**
* Gets the offset of the header.