Add opj_codec_set_threads() in public API and propagate resulting thread pool to...
[openjpeg.git] / src / lib / openjp2 / tcd.h
index 07f8379afd48cf307051fe2f7cb2fb0ac282d849..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.