diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2012-08-10 10:22:51 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2012-08-10 10:22:51 +0000 |
| commit | 3c0e360df15161de69c0fc301a2730f4bae2f16f (patch) | |
| tree | a1ae13bdf0dabe1c8038623faa962789b7318af2 /libopenjpeg/jp2.c | |
| parent | 1de6f5fcf661680cf319243b65e2c1ff6915b661 (diff) | |
remove deprecated v1 style function jp2_read_ftyp
Diffstat (limited to 'libopenjpeg/jp2.c')
| -rw-r--r-- | libopenjpeg/jp2.c | 49 |
1 files changed, 6 insertions, 43 deletions
diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c index a1d05981..e5f30502 100644 --- a/libopenjpeg/jp2.c +++ b/libopenjpeg/jp2.c @@ -112,12 +112,6 @@ static opj_bool opj_jp2_read_cdef( opj_jp2_v2_t * jp2, static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio); /** -Write the FTYP box - File type box -@param jp2 JP2 handle -@param cio Output buffer stream -*/ - -/** * Writes the Colour Specification box. * * @param jp2 jpeg2000 file codec. @@ -128,14 +122,13 @@ Write the FTYP box - File type box static unsigned char *jp2_write_colr_v2(opj_jp2_v2_t *jp2, unsigned int * p_nb_bytes_written ); -static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); /** -Read the FTYP box - File type box +Write the FTYP box - File type box @param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise +@param cio Output buffer stream */ -static opj_bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); +static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); + /** * Writes a FTYP box - File type box @@ -161,9 +154,9 @@ static opj_bool jp2_write_ftyp_v2( opj_jp2_v2_t *jp2, * @return true if the FTYP box is valid. */ static opj_bool jp2_read_ftyp_v2( opj_jp2_v2_t *jp2, - unsigned char * p_header_data, + OPJ_BYTE * p_header_data, OPJ_UINT32 p_header_size, - struct opj_event_mgr * p_manager ); + opj_event_mgr_t * p_manager ); /** * Skips the Jpeg2000 Codestream Header box - JP2C Header box. @@ -1593,36 +1586,6 @@ opj_bool jp2_write_ftyp_v2( opj_jp2_v2_t *jp2, return l_result; } -static opj_bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio) { - int i; - opj_jp2_box_t box; - - opj_common_ptr cinfo = jp2->cinfo; - - jp2_read_boxhdr(cinfo, cio, &box); - - if (JP2_FTYP != box.type) { - opj_event_msg(cinfo, EVT_ERROR, "Expected FTYP Marker\n"); - return OPJ_FALSE; - } - - jp2->brand = cio_read(cio, 4); /* BR */ - jp2->minversion = cio_read(cio, 4); /* MinV */ - jp2->numcl = (box.length - 16) / 4; - jp2->cl = (unsigned int *) opj_malloc(jp2->numcl * sizeof(unsigned int)); - - for (i = 0; i < (int)jp2->numcl; i++) { - jp2->cl[i] = cio_read(cio, 4); /* CLi */ - } - - if (cio_tell(cio) - box.init_pos != box.length) { - opj_event_msg(cinfo, EVT_ERROR, "Error with FTYP Box\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - 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; |
