The JXS_codec_pipeline is a derivative work and includes in their entirety the files from the ISO-IEC 21122 (5) and SVT-JPEG-XS (https://github.com/OpenVisualCloud/SVT-JPEG-XS) software packages individually specified in the projects of this solution.
This is is a series of projects to help understand and effectively use ISO 21122 (5) reference software packet.
The first of the series, a JXS wavelet transform project, demonstrates an unconventional picture of wavelet decomposition approximation and details coefficients with the JPEG XS Le Gall 5/3 wavelet transform. To make my intention more pronounced, the project only includes a dwt.c source code file from the xs_ref_sw_ed2 CMake project. The code for upscaling image data to 20 bit precision and reversible color decorrelation transform, as well as the corresponding inverse transforms, is included with the main() of the project.
Also, the image data is generated in the header image_create.h, the function int image_create(xs_image_t& image, ids_t& ids), which may later be extended to the use of function pointer as in image_create(xs_image_t& image, ids_t& ids, func_t imagefunc) to provide for a diversity of image data including image data read from image files.
The header image_write.h writes the generated images to files, using Microsoft WIC component, and later can be modified to use a crossplatform cairo library for the purpose.
In the second project, JXS_precincts, operations of precinct creation from the DWT result data and restoring this data with precinct_to_image calls is inserted between dwt_forward_transform and dwt_inverse_transform calls. The image generated with the precinct_to_image call is written to the png file. The example image in this project is 3840x2160, so the processing can take a while and uses 694 MB of RAM. This memory consumption is the result of unfolding precincts in memory arrays instead of writing these to stream. It is made on purpose to help student examine the precinct operations. You can vary the dimensions of synthesized image in the image_create.h header file.
So we have the model of encoder followed by the model of encoder in this project. The data from encoder to decoder are passed through memory here, rather than via stream.
This project may later be extended for examining the rate control mechanism in the ISO 21122 (5) reference software packet.
The project JXS_polyptych demonstrates an accidental art sometimes "spontaneously" created in the course of image wavelet decomposition. With lucky selection of parameters the landscape can become transformed into the tetraptych (or, in general, polyptich), sort of "Four Seasons" or "Morning, Afternoon, Evening, Night" or something else. Most often, however, decomposition images resemble Piet Mondrian's figurative paintings if any art at all.
The project JXS_encode_decode introduces encoding as such into consideration. It is a beneficial learning experience to repeatedly run this snippet, each time (reasonably) changing hard coded parameters and analysing log printouts.
More efficiently, you can use this snippet with the xs_ref_sw_ed2 reference software library itself (https://standards.iso.org/iso-iec/21122/-5/ed-2/en/ISO_IEC_21122-5_2_Ed-2.zip).
The item on the entropy encoding with JPEG XS standard can be found in the JXS_MLS.12_enc folder (not a full-blown project, only code snippets and readme).