remove deprecated v1 style function jp2_read_jp2h

This commit is contained in:
Mickael Savinaud 2012-08-10 09:39:40 +00:00
parent 6822291f91
commit 4a80e821df
2 changed files with 0 additions and 100 deletions

View File

@ -1603,98 +1603,6 @@ static opj_bool jp2_read_colr_v2( opj_jp2_v2_t * jp2,
return OPJ_TRUE;
}
opj_bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color)
{
opj_jp2_box_t box;
int jp2h_end;
opj_common_ptr cinfo = jp2->cinfo;
jp2_read_boxhdr(cinfo, cio, &box);
do
{
if (JP2_JP2H != box.type)
{
if (box.type == JP2_JP2C)
{
opj_event_msg(cinfo, EVT_ERROR, "Expected JP2H Marker\n");
return OPJ_FALSE;
}
cio_skip(cio, box.length - 8);
if(cio->bp >= cio->end) return OPJ_FALSE;
jp2_read_boxhdr(cinfo, cio, &box);
}
} while(JP2_JP2H != box.type);
if (!jp2_read_ihdr(jp2, cio))
return OPJ_FALSE;
jp2h_end = box.init_pos + box.length;
if (jp2->bpc == 255)
{
if (!jp2_read_bpcc(jp2, cio))
return OPJ_FALSE;
}
jp2_read_boxhdr(cinfo, cio, &box);
while(cio_tell(cio) < jp2h_end)
{
if(box.type == JP2_COLR)
{
if( !jp2_read_colr(jp2, cio, &box, color))
{
cio_seek(cio, box.init_pos + 8);
cio_skip(cio, box.length - 8);
}
jp2_read_boxhdr(cinfo, cio, &box);
continue;
}
if(box.type == JP2_CDEF && !jp2->ignore_pclr_cmap_cdef)
{
if( !jp2_read_cdef(jp2, cio, &box, color))
{
cio_seek(cio, box.init_pos + 8);
cio_skip(cio, box.length - 8);
}
jp2_read_boxhdr(cinfo, cio, &box);
continue;
}
if(box.type == JP2_PCLR && !jp2->ignore_pclr_cmap_cdef)
{
if( !jp2_read_pclr(jp2, cio, &box, color))
{
cio_seek(cio, box.init_pos + 8);
cio_skip(cio, box.length - 8);
}
jp2_read_boxhdr(cinfo, cio, &box);
continue;
}
if(box.type == JP2_CMAP && !jp2->ignore_pclr_cmap_cdef)
{
if( !jp2_read_cmap(jp2, cio, &box, color))
{
cio_seek(cio, box.init_pos + 8);
cio_skip(cio, box.length - 8);
}
jp2_read_boxhdr(cinfo, cio, &box);
continue;
}
cio_seek(cio, box.init_pos + 8);
cio_skip(cio, box.length - 8);
jp2_read_boxhdr(cinfo, cio, &box);
}/* while(cio_tell(cio) < box_end) */
cio_seek(cio, jp2h_end);
/* Part 1, I.5.3.3 : 'must contain at least one' */
return (color->jp2_has_colr == 1);
}/* jp2_read_jp2h() */
opj_bool opj_jp2_decode(opj_jp2_v2_t *jp2,
opj_stream_private_t *p_stream,

View File

@ -272,14 +272,6 @@ opj_bool jp2_write_jp2h_v2( opj_jp2_v2_t *jp2,
struct opj_stream_private *cio,
struct opj_event_mgr * p_manager );
/**
Read the JP2H box - JP2 Header box (used in MJ2)
@param jp2 JP2 handle
@param cio Input buffer stream
@param ext Collector for profile, cdef and pclr data
@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);
/**
Setup the decoder decoding parameters using user parameters.