------------------------------------------------------------------------------- Overview of Kakadu V8.0.5: A foundation for JPEG2000 applications ----------------------------------------------------------------- Author: David Taubman, the University of New South Wales, Australia -> see the end of this file for copyright and licensing information. Disclaimer: The Kakadu framework represents a collection of software development tools, which may be of assistance in developing JPEG2000- based applications. Neither the author, nor the university accept any responsibility for the way in which these tools are used. ------------------------------------------------------------------------------- NEW in KDU-8.0.5 ---------------- 1. Improved the handling of images with sub-sampled chrominance components (really any collection of components with different sampling rates) during compression, in the following ways: A. Buffering used to maintain concurrency for multi-threaded wavelet transform processing is now sized so as to create similar effective latencies in all image components, which avoids issues when the Cplex-EST complexity-constraint algorithm is used in a high memory configuration or for low-latency compression. B. Corrected an oversight in the implementation of "kdu_v_compress" which resulted in component lines being pushed into the compression machinery at an equal rate even when they have different vertical sub-sampling factors -- none of the other compression demo-apps suffered from this problem. 2. Also introduced new accelerated implementation stubs for the HT block encoding and decoding passes for AVX2-based platforms with slow PEXT/PDEP instructions -- notably modern AMD processors. These functions should allow AMD processors to reach processing throughputs not all that far behind that of Intel processors, but we have yet to perform a comparison. 3. Fixed a bug accidentally introduced into version 8.0.4 as part of the changes required for Qfactor control during compression. The bug interfered with transcoding functionality in Kakadu, as opposed to compression, decompression or rendering. 4. Fixed a number of other minor bugs and oversights, including one that resulted in overwritten files not being first truncated, as produced by most of the Kakadu demo-apps, leaving potentially confusing file lengths even though valid content was written. NEW in KDU-8.0.4 ---------------- Bug fixes in this release include a couple of issues found with Kakadu's AVX2-accelerated implementations of the HT block encoder and decoder, that could be excited under rare conditions. Apart from these, the two very substantial contributions of this release are as follows: 1. Low-latency compression is dramatically improved with this release. For quite a long time, Kakadu has been able to perform low-latency compression with a constant-bit-rate communication channel, avoiding underflow and overflow while flushing the codestream in discrete "flush-sets" that are individually rate controlled and can be very small, with end-to-end latencies as low as a few tens of lines from an image or video frame. These capabilities are enabled by the `Scbr' parameter attribute; they can be used to simulate the behaviour of a hardware implementation with guaranteed end-to-end latency constraints; but they can also be used to actually perform low-latency compression in software, admittedly with some extra latency due to the uncertainties introduced by process and thread scheduling in the operating system. The most significant enhancements to low latency in this release are as follows: a) The Cplex-EST complexity constraint generation procedure, that is so valuable in ensuring guaranteed high encoding throughput with the HTJ2K block coding algorithm, has been extended to properly handle the `Scbr' low-latency constant-bit-rate flushing model. When used with small flush-sets, for low latency, even the high memory form of Cplex-EST does not use much memory, and constrained-complexity HTJ2K encoding (with at most 2 HT-Sets generated per code-block) proceeds with essentially the same coding efficiency as full HTJ2K encoding (all possible coding passes), without any reliance on statistics collected from earlier frames of a video or by training a background model. b) The `kdu_stripe_decompressor' interface has been augmented with features to facilitate the construction of low-latency high throughput video decompression machinery that can produce rendered video lines as soon as possible after the arrival of compressed data that may have been flushed incrementally from the corresponding encoder. c) Facilties have been added to the core multi-threading sub-system to allow any thread to discover its `kdu_thread_entity' reference. This allows jobs to be scheduled to custom Kakadu-based job queues from within the implementation of functions that do not explicitly provide a `kdu_thread_entity' (or `kdu_thread_env' reference) -- most notably from within `kdu_compressed_source::seek' and `kdu_compressed_source::read'. This, in turn, allows an application to trigger the start of processing for a subsequent video frame as soon as all compressed bytes associated with a previous video frame have been consumed, tpyically with a higher thread queue sequence number so that the later codestream will not steal processing resources away from the earlier codestream so long as it still has work to do. This completes the tools necessary to simultaneously minimize latency and maximize throughput in a software video decoding application. 2. A JPEG 2000 `Qfactor' is finally available from this version of Kakadu. One point of concern for some users of JPEG 2000 has been the lack of a well defined, intuitive quality factor that can be used to control the compressed image quality in a similar way to the quality factor used with the original JPEG compression standard. The first road block to this was cleared away by a recently published study (see A. Ahar, S., S. Mahmoudpour, O. Watanabe, D. Taubman and P. Schelkens, "Parameterization of the quality factor for the High Throughput JPEG 2000," in proc. SPIE Photonics Europe, vol. 11353, Optics, Photonics and Digital Technologies for Imaging Applications VI; SPIE Optics and Photonics: Digital Technologies for Imaging Applications VI, April 2020). In that work, it was established that a resaonable equivalent to JPEG quality factor Q, for 4:2:0 YCbCr colour imagery (the most common format employed for colour JPEG image compression) could be derived setting `Qstep' equal to 0.04*(50/Q) for 0