diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index a5617372..d27fd31b 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -7624,22 +7624,7 @@ opj_bool j2k_read_cbd ( opj_j2k_v2_t *p_j2k, /* J2K / JPT decoder interface */ /* ----------------------------------------------------------------------- */ -opj_j2k_t* j2k_create_decompress(opj_common_ptr cinfo) { - opj_j2k_t *j2k = (opj_j2k_t*) opj_calloc(1, sizeof(opj_j2k_t)); - if(!j2k) - return NULL; - j2k->default_tcp = (opj_tcp_t*) opj_calloc(1, sizeof(opj_tcp_t)); - if(!j2k->default_tcp) { - opj_free(j2k); - return NULL; - } - - j2k->cinfo = cinfo; - j2k->tile_data = NULL; - - return j2k; -} void j2k_destroy_decompress(opj_j2k_t *j2k) { int i = 0; diff --git a/libopenjpeg/j2k.h b/libopenjpeg/j2k.h index 2979cb7a..977847e8 100644 --- a/libopenjpeg/j2k.h +++ b/libopenjpeg/j2k.h @@ -778,12 +778,7 @@ opj_j2k_v2_t; /** @name Exported functions */ /*@{*/ /* ----------------------------------------------------------------------- */ -/** -Creates a J2K decompression structure -@param cinfo Codec context info -@return Returns a handle to a J2K decompressor if successful, returns NULL otherwise -*/ -opj_j2k_t* j2k_create_decompress(opj_common_ptr cinfo); + /** Destroy a J2K decompressor handle @param j2k J2K decompressor handle to destroy diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c index 307f53ab..dbdf999e 100644 --- a/libopenjpeg/jp2.c +++ b/libopenjpeg/jp2.c @@ -2227,20 +2227,6 @@ static void write_iptr( int offset, int length, opj_cio_t *cio) /* JP2 decoder interface */ /* ----------------------------------------------------------------------- */ -opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo) { - opj_jp2_t *jp2 = (opj_jp2_t*) opj_calloc(1, sizeof(opj_jp2_t)); - if(jp2) { - jp2->cinfo = cinfo; - /* create the J2K codec */ - jp2->j2k = j2k_create_decompress(cinfo); - if(jp2->j2k == NULL) { - jp2_destroy_decompress(jp2); - return NULL; - } - } - return jp2; -} - void jp2_destroy_decompress(opj_jp2_t *jp2) { if(jp2) { /* destroy the J2K codec */ diff --git a/libopenjpeg/jp2.h b/libopenjpeg/jp2.h index 5119ec37..200e1d5c 100644 --- a/libopenjpeg/jp2.h +++ b/libopenjpeg/jp2.h @@ -280,12 +280,7 @@ Read the JP2H box - JP2 Header box (used in MJ2) @return Returns true if successful, returns false otherwise */ opj_bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color); -/** -Creates a JP2 decompression structure -@param cinfo Codec context info -@return Returns a handle to a JP2 decompressor if successful, returns NULL otherwise -*/ -opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo); + /** Destroy a JP2 decompressor handle @param jp2 JP2 decompressor handle to destroy