Add opj_codec_set_threads() in public API and propagate resulting thread pool to...
[openjpeg.git] / src / lib / openjp2 / tcd.h
index bb9a6205f9ea86f0f761b5cda4ee21442b4add4b..77817bf6c21ef4b10d4a1cb5a05e9373d829854e 100644 (file)
@@ -220,6 +220,8 @@ typedef struct opj_tcd
        OPJ_UINT32 tcd_tileno;
        /** tell if the tcd is a decoder. */
        OPJ_UINT32 m_is_decoder : 1;
+    /** Thread pool */
+    opj_thread_pool_t* thread_pool;
 } opj_tcd_t;
 
 /** @name Exported functions */
@@ -249,12 +251,14 @@ void opj_tcd_destroy(opj_tcd_t *tcd);
  * @param      p_tcd           TCD handle.
  * @param      p_image         raw image.
  * @param      p_cp            coding parameters.
+ * @param   p_tp        thread pool
  *
  * @return true if the encoding values could be set (false otherwise).
 */
 OPJ_BOOL opj_tcd_init( opj_tcd_t *p_tcd,
                                                opj_image_t * p_image,
-                                               opj_cp_t * p_cp );
+                                               opj_cp_t * p_cp,
+                        opj_thread_pool_t* p_tp);
 
 /**
  * Allocates memory for decoding a specific tile.
@@ -296,7 +300,7 @@ OPJ_UINT32 opj_tcd_get_decoded_tile_size (opj_tcd_t *p_tcd );
  * @param      p_data_written  pointer to an int that is incremented by the number of bytes really written on p_dest
  * @param      p_len                   Maximum length of the destination buffer
  * @param      p_cstr_info             Codestream information structure
- * @return  true if the coding is successfull.
+ * @return  true if the coding is successful.
 */
 OPJ_BOOL opj_tcd_encode_tile(   opj_tcd_t *p_tcd,
                                                            OPJ_UINT32 p_tile_no,