Add opj_codec_set_threads() in public API and propagate resulting thread pool to...
authorEven Rouault <even.rouault@spatialys.com>
Wed, 25 May 2016 14:36:47 +0000 (16:36 +0200)
committerEven Rouault <even.rouault@spatialys.com>
Wed, 25 May 2016 19:02:07 +0000 (21:02 +0200)
commitd4b7f03cfa4732132767188782683f3d957da912
tree47ae5bbd2694e2df24c80d3f4779a25f07345181
parent54179fe1d53156c6b440166fe71a10f238a6ea56
Add opj_codec_set_threads() in public API and propagate resulting thread pool to tcd level

By default, only the main thread is used. If opj_codec_set_threads() is not used,
but the OPJ_NUM_THREADS environment variable is set, its value will be
used to initialize the number of threads. The value can be either an integer
number, or "ALL_CPUS". If OPJ_NUM_THREADS is set and this function is called,
this function will override the behaviour of the environment variable.
src/lib/openjp2/j2k.c
src/lib/openjp2/j2k.h
src/lib/openjp2/jp2.c
src/lib/openjp2/jp2.h
src/lib/openjp2/openjpeg.c
src/lib/openjp2/openjpeg.h
src/lib/openjp2/opj_codec.h
src/lib/openjp2/tcd.c
src/lib/openjp2/tcd.h