Content

Getting and Compilation of JPEG-XS Codec (in Windows)

Running JPEG-XS Reference Codec

How to Play JPEG-XS file

 

 

JPEG XS is an International Standard from the JPEG Committee, formally known as ISO/IEC
SC29 WG1. It provides visually lossless, lightweight and low-latency image compression, compression ratios of JPEG-XS tend to around 10:1

JPEG-XS files have the extension ‘jxs’.

 

Getting and Compilation of JPEG-XS Codec (in Windows)

Reference code of JPEG-XS in the format of zip-file are available here

 Download the zip-file (ISO_IEC_21122-5_2_Ed-2) and extract the folder  xs_ref_sw_ed2

 Go to the directory xs_ref_sw_ed2 and type:  mkdir build , i.e. create the folder ‘build’

 Go to the folder ‘build’  (cd build)

 Use cmake to construct Visual Studio 2019 solution (x64) of JPEG-XS reference code:

cmake .. -G "Visual Studio 16 2019" -DCMAKE_GENERATOR_PLATFORM=x64

As the result of ‘cmake’ the Visual Studio solution ‘jxs_ref_sw.sln‘ is created in the folder ‘build‘, open this solution, set Release mode (by default Debug mode is set) and build the solution:

Two exe-files  jxs_encoder.exe and jxs_decoder are created in the folder  \build\bin\Release

 

Running JPEG-XS Reference Codec

JPEG-XS reference code supports only raw image formats. If you have for example bmp-file and wish to encode it in jxs, you need a converter, ffmpeg is a good converter:  ffmpeg -i test.bmp  -y test.ppm

Encoding Example [input ppm-file (rgb24), rate 2bpp, output 4:2:0 jxs-file]

  jxs_encoder -c profile=Main420.12 -c rate=2  baboon.ppm  baboon420.jxs

rate=2  means the compression level, chosen 2 bits per pixel

Main420.12 instruct to JPEG-XS encoder to get 4:4:4, to decimate it into 4:2:0 and encode.  

 

Encoding Example [input ppm-file (rgb24), rate 2bpp, output 4:4:4 jxs-file]

  jxs_encoder -c profile=Main444.12 -c rate=2  baboon.ppm  baboon444.jxs

Main444.12 instruct to JPEG-XS encoder to get 4:4:4 and encode it without sub-sampling

 

Decoding Example [input jxs file,  output ppm-file, verbose = True]

jxs_decoder.exe   -v baboon420.jxs   baboon512x512_dec.ppm

JPEG XS test model (XSM) version 2.0.2-ED2
Image: 512×512 3-comp@8bpp
Sampling: 1×1/1×1/1×1
Format: 4:4:4

 

 

How to Play JPEG-XS file

I don’t know any player which supports JPEG-XS. I use jxs_decoder to decode jxs-file and dump raw data it in the format ppm and then play the ppm file.

Leave a Reply

Your email address will not be published. Required fields are marked *