X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fopenjp2%2Fjp2.h;h=9e7fa56674cd45d8133518b2b6ebffb0e0a7b348;hb=6daf5f3e1ec6eff03b7982889874a3de6617db8d;hp=2e248061d0d8e48baec1a0b029d039b67fc5df73;hpb=13cde9fa37249628af6b6f10601b733f87a025f4;p=openjpeg.git diff --git a/src/lib/openjp2/jp2.h b/src/lib/openjp2/jp2.h index 2e248061..9e7fa566 100644 --- a/src/lib/openjp2/jp2.h +++ b/src/lib/openjp2/jp2.h @@ -187,6 +187,8 @@ typedef struct opj_jp2 { opj_jp2_color_t color; OPJ_BOOL ignore_pclr_cmap_cdef; + OPJ_BYTE has_jp2h; + OPJ_BYTE has_ihdr; } opj_jp2_t; @@ -233,6 +235,12 @@ Decoding parameters are returned in jp2->j2k->cp. */ void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters); +/** Allocates worker threads for the compressor/decompressor. + * + * @param jp2 JP2 decompressor handle + * @param num_threads Number of threads. + * @return OPJ_TRUE in case of success. + */ OPJ_BOOL opj_jp2_set_threads(opj_jp2_t *jp2, OPJ_UINT32 num_threads); /** @@ -325,6 +333,21 @@ OPJ_BOOL opj_jp2_read_header(opj_stream_private_t *p_stream, opj_image_t ** p_image, opj_event_mgr_t * p_manager); +/** Sets the indices of the components to decode. + * + * @param jp2 JP2 decompressor handle + * @param numcomps Number of components to decode. + * @param comps_indices Array of num_compts indices (numbering starting at 0) + * corresponding to the components to decode. + * @param p_manager Event manager; + * + * @return OPJ_TRUE in case of success. + */ +OPJ_BOOL opj_jp2_set_decoded_components(opj_jp2_t *jp2, + OPJ_UINT32 numcomps, + const OPJ_UINT32* comps_indices, + opj_event_mgr_t * p_manager); + /** * Reads a tile header. * @param p_jp2 the jpeg2000 codec. @@ -436,6 +459,20 @@ OPJ_BOOL opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2, OPJ_UINT32 res_factor, opj_event_mgr_t * p_manager); +/** + * Specify extra options for the encoder. + * + * @param p_jp2 the jpeg2000 codec. + * @param p_options options + * @param p_manager the user event manager + * + * @see opj_encoder_set_extra_options() for more details. + */ +OPJ_BOOL opj_jp2_encoder_set_extra_options( + opj_jp2_t *p_jp2, + const char* const* p_options, + opj_event_mgr_t * p_manager); + /* TODO MSD: clean these 3 functions */ /**