From: Mickael Savinaud Date: Mon, 13 Aug 2012 09:55:57 +0000 (+0000) Subject: remove deprecated v1 style function jp2_write_jp2c X-Git-Tag: version.2.0~272 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=d24404ca9abbef130972dc2684d8bf64ebcc232c;p=openjpeg.git remove deprecated v1 style function jp2_write_jp2c --- diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c index 4b51c967..4648a0f0 100644 --- a/libopenjpeg/jp2.c +++ b/libopenjpeg/jp2.c @@ -165,9 +165,6 @@ static opj_bool opj_jp2_read_jp2h( opj_jp2_v2_t *jp2, OPJ_UINT32 p_header_size, opj_event_mgr_t * p_manager ); -static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); - - /** * Writes the Jpeg2000 codestream Header box - JP2C Header box. This function must be called AFTER the coding has been done. * @@ -1421,35 +1418,6 @@ opj_bool opj_jp2_write_ftyp(opj_jp2_v2_t *jp2, return l_result; } -static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { - unsigned int j2k_codestream_offset, j2k_codestream_length; - opj_jp2_box_t box; - - opj_j2k_t *j2k = jp2->j2k; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_JP2C, 4); /* JP2C */ - - /* J2K encoding */ - j2k_codestream_offset = cio_tell(cio); - if(!j2k_encode(j2k, cio, image, cstr_info)) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "Failed to encode image\n"); - return 0; - } - j2k_codestream_length = cio_tell(cio) - j2k_codestream_offset; - - jp2->j2k_codestream_offset = j2k_codestream_offset; - jp2->j2k_codestream_length = j2k_codestream_length; - - box.length = 8 + jp2->j2k_codestream_length; - cio_seek(cio, box.init_pos); - cio_write(cio, box.length, 4); /* L */ - cio_seek(cio, box.init_pos + box.length); - - return box.length; -} - /** * Writes the Jpeg2000 codestream Header box - JP2C Header box. *