ISO/IEC 21122-5:2022
(Main)Information technology — JPEG XS low-latency lightweight image coding system — Part 5: Reference software
Information technology — JPEG XS low-latency lightweight image coding system — Part 5: Reference software
This document contains the reference software of the ISO/IEC 21122 series. It acts as a guideline for implementation and as a reference for conformance testing.
Technologies de l'information — Système de codage d’images léger à faible latence JPEG XS — Partie 5: Logiciel de référence
General Information
RELATIONS
Standards Content (sample)
INTERNATIONAL ISO/IEC
STANDARD 21122-5
Second edition
2022-09
Information technology — JPEG XS
low-latency lightweight image coding
system —
Part 5:
Reference software
Technologies de l'information — Système de codage d’images léger à
faible latence JPEG XS —
Partie 5: Logiciel de référence
Reference number
ISO/IEC 21122-5:2022(E)
© ISO/IEC 2022
---------------------- Page: 1 ----------------------
ISO/IEC 21122-5:2022(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2022
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on
the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below
or ISO’s member body in the country of the requester.ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
© ISO/IEC 2022 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC 21122-5:2022(E)
Contents Page
Foreword ........................................................................................................................................................................................................................................iv
Introduction .................................................................................................................................................................................................................................v
1 Scope ................................................................................................................................................................................................................................. 1
2 Normative references ..................................................................................................................................................................................... 1
3 Terms and definitions .................................................................................................................................................................................... 1
4 Reference software ........................................................................................................................................................................................... 1
4.1 General ........................................................................................................................................................................................................... 1
4.2 Purpose ......................................................................................................................................................................................................... 1
4.3 Examples of use ..................................................................................................................................................................................... 2
5 Copyright, licensing and intellectual property ................................................................................................................... 2
Annex A (informative) Building the reference software ................................................................................................................ 3
Annex B (informative) Image file formats read and written by the reference software.............................4
Annex C (informative) Using the reference software ........................................................................................................................ 8
Bibliography .............................................................................................................................................................................................................................13
iii© ISO/IEC 2022 – All rights reserved
---------------------- Page: 3 ----------------------
ISO/IEC 21122-5:2022(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are
members of ISO or IEC participate in the development of International Standards through technical
committees established by the respective organization to deal with particular fields of technical
activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international
organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the
work.The procedures used to develop this document and those intended for its further maintenance
are described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria
needed for the different types of document should be noted. This document was drafted in
accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives or
www.iec.ch/members_experts/refdocs).Attention is drawn to the possibility that some of the elements of this document may be the subject
of patent rights. ISO and IEC shall not be held responsible for identifying any or all such patent
rights. Details of any patent rights identified during the development of the document will be in the
Introduction and/or on the ISO list of patent declarations received (see www.iso.org/patents) or the IEC
list of patent declarations received (see https://patents.iec.ch).Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and
expressions related to conformity assessment, as well as information about ISO's adherence to
the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see
www.iso.org/iso/foreword.html. In the IEC, see www.iec.ch/understanding-standards.
This document was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 29, Coding of audio, picture, multimedia and hypermedia information.
This second edition cancels and replaces the first edition (ISO/IEC 21122-5:2020), which has been
technically revised.The main changes are as follows:
— Updated reference software.
A list of all parts in the ISO/IEC 21122 series can be found on the ISO and IEC websites.
Any feedback or questions on this document should be directed to the user’s national standards
body. A complete listing of these bodies can be found at www.iso.org/members.html and
www.iec.ch/national-committees.© ISO/IEC 2022 – All rights reserved
---------------------- Page: 4 ----------------------
ISO/IEC 21122-5:2022(E)
Introduction
This document is part of a series of standards for a low-latency lightweight image coding system,
denoted JPEG XS.It provides the software reference implementation of the ISO/IEC 21122-1 and ISO/IEC 21122-2
standards. It has been successfully compiled and tested on various operating systems at the time of
writing. It is important to note that this reference software implementation represents just one way of
implementing JPEG XS. This implementation can serve as a validation anchor to other implementations.
No guarantee of the quality that will be achieved by an encoder is provided by its conformance
to ISO/IEC 21122-1 and ISO/IEC 21122-2, as the conformance is only defined in terms of specific
constraints imposed on the syntax of the generated codestream. In particular, while sample encoder
software implementations may suffice to provide some illustrative examples of which quality can be
achieved within the ISO/IEC 21122 series, they provide neither an assurance of minimum guaranteed
image encoding quality nor maximum achievable image encoding quality.Similarly, the computation resource characteristics in terms of program or data memory usage,
execution speed, etc. of sample software encoder or decoder implementations should not be construed
as a representative of the typical, minimal or maximal computational resource characteristics to be
exhibited by implementations of the ISO/IEC 21122 series.The International Organization for Standardization (ISO) and the International Electrotechnical
Commission (IEC) draw attention to the fact that it is claimed that compliance with this document may
involve the use of a patent.ISO and IEC take no position concerning the evidence, validity and scope of this patent right.
The holder of this patent right has assured ISO and IEC that he/she is willing to negotiate licences under
reasonable and non-discriminatory terms and conditions with applicants throughout the world. In this
respect, the statement of the holder of this patent right is registered with ISO and IEC. Information may
be obtained from the patent database available at www.iso.org/patents or https://patents.iec.ch.
Attention is drawn to the possibility that some of the elements of this document may be the subject
of patent rights other than those in the patent database. ISO and IEC shall not be held responsible for
identifying any or all such patent rights.© ISO/IEC 2022 – All rights reserved
---------------------- Page: 5 ----------------------
INTERNATIONAL STANDARD ISO/IEC 21122-5:2022(E)
Information technology — JPEG XS low-latency lightweight
image coding system —
Part 5:
Reference software
1 Scope
This document contains the reference software of the ISO/IEC 21122 series. It acts as a guideline for
implementation and as a reference for conformance testing.2 Normative references
The following documents are referred to in the text in such a way that some or all of their content
constitutes requirements of this document. For dated references, only the edition cited applies. For
undated references, the latest edition of the referenced document (including any amendments) applies.
ISO/IEC 21122-1, Information technology — JPEG XS low-latency lightweight image coding system — Part
1: Core coding systemISO/IEC 21122-2, Information technology — JPEG XS low-latency lightweight image coding system — Part
2: Profiles and buffer models3 Terms and definitions
For the purposes of this document, the terms and definitions given in ISO/IEC 21122-1 and
ISO/IEC 21122-2 apply.ISO and IEC maintain terminology databases for use in standardization at the following addresses:
— ISO Online browsing platform: available at https:// www .iso .org/ obp— IEC Electropedia: available at https:// www .electropedia .org/
4 Reference software
4.1 General
In addition to the main text, including Annexes A to C, the reference software is available at https://
standards .iso .org/ iso -iec/ 21122/ -5/ ed -2/ en/ .4.2 Purpose
The purpose of this document is to provide the following:
— Provide a reference decoder software implementation, capable of decoding codestreams that
conform to ISO/IEC 21122-1, or to ISO/IEC 21122-1 and ISO/IEC 21122-2.— Provide a sample encoder software implementation, capable of producing codestreams that conform
to ISO/IEC 21122-1, or to ISO/IEC 21122-1 and ISO/IEC 21122-2.© ISO/IEC 2022 – All rights reserved
---------------------- Page: 6 ----------------------
ISO/IEC 21122-5:2022(E)
The use of this reference software is not required for making an implementation of an encoder or
decoder in conformance to any of the parts of the ISO/IEC 21122 series. Requirements established in
ISO/IEC 21122-1 and ISO/IEC 21122-2 take precedence over the behaviour of the reference software.
The reference decoder software generates the normative output of the decoding process specified
by ISO/IEC 21122-1. The output of the reference decoder satisfies the requirements of the strict
conformance point of ISO/IEC 21122-4. It therefore allows conformance testing by means of comparing
the output of a candidate implementation by that of the reference software specified in this document.
Conformance testing is specified in ISO/IEC 21122-4. The reference decoder software can also be used
to validate the syntactic correctness of a codestream by attempting to decode a candidate codestream
with the reference software.4.3 Examples of use
Some examples of use for the reference decoder software implementations are as follows:
— As an illustration of how to perform the decoding processes specified in ISO/IEC 21122-1.
— As the starting basis for the implementation of a decoder that conforms to ISO/IEC 21122-1.
— For testing the conformance of a decoder implementation to ISO/IEC 21122-1 with the procedures
specified in ISO/IEC 21122-4. Details on reference testing can be found in ISO/IEC 21122-4.
— For (non-exhaustive) testing of the conformance of a codestream (or file) to the constraints specified
in ISO/IEC 21122-1.The lack of detection of any conformance violation by any reference software implementation should
not be considered as a definite proof that the codestream under testing conforms to all constraints
required for it be conforming to ISO/IEC 21122-1 or ISO/IEC 21122-2. In fact, ISO/IEC 21122-4 defines
additional testing procedures that can be used to test a codestream for conformance to ISO/IEC 21122-1
and ISO/IEC 21122-2, such as for example testing the conformance to the buffer models specified there.
Some examples of use for a sample encoder software are as follows:— As an illustration of how to implement an encoding process that produces codestreams that are
conforming to ISO/IEC 21122-1 and ISO/IEC 21122-2.— As starting point for an implementation of an encoder that conforms to ISO/IEC 21122-1 and
ISO/IEC 21122-2.— As a means of generating codestreams conforming to ISO/IEC 21122-1 and ISO/IEC 21122-2 for
testing purposes.— As a means of demonstrating and evaluating examples of the quality that can be achieved by an
encoding process that conforms to ISO/IEC 21122-1 and ISO/IEC 21122-2.It is not recommended to use the reference software in a production environment, as it lacks proper
protection mechanisms against memory corruption and code execution exploits.5 Copyright, licensing and intellectual property
The reference software was originally developed by the parties indicated in the file LICENCE.md within
the package forming a part of this document, in the course of development of ISO/IEC 21122-5. ISO/
IEC draws the attention of the users of this software to the license terms and conditions specified in the
same LICENSE.md file.© ISO/IEC 2022 – All rights reserved
---------------------- Page: 7 ----------------------
ISO/IEC 21122-5:2022(E)
Annex A
(informative)
Building the reference software
A.1 Unpacking the software
The reference software is provided in the form of a ZIP archive named xs_ref_sw_ed2.zip. Unpacking
the archive is operating system specific, but on most POSIX compliant operating systems this can be
done by opening a command line terminal and issuing the following:unzip xs_ref_sw_ed2.zip
This will unpack all files in the archive into the current directory.
A.2 Building the software
The source code is written in C11 and is designed to run on most modern operating systems. The exact
tools and versions depend on the operating system and the compiler to be used. A README.md file is
included with the software describing the steps to build the software.© ISO/IEC 2022 – All rights reserved
---------------------- Page: 8 ----------------------
ISO/IEC 21122-5:2022(E)
Annex B
(informative)
Image file formats read and written by the reference software
B.1 General
The reference software supports a wide variety of image file formats, used as input for the encoder and
as output for the decoder, that are well established and easy to use, understand, and implement. This
annex describes the three most important image file formats.B.2 PGX
B.2.1 General
This clause describes the PGX image file format, supported by the reference software and used by
ISO/IEC 21122-4 for the decoded reference images. This file format is capable of representing any input
or output image that is supported by JPEG XS (1 or more components and 1 to 16 bits per component
value).The format consists of a directory file, one header file per component, and one raw data file per
component.NOTE The difftest_ng tool (see ISO/IEC 21122-4) can convert between PGX and many other image file
formats.B.2.2 Directory file
The directory file is the file that is provided as input file to the comparison tool (PGX file extension). It
consists, for each component, of the file name of the raw data file encoded in ASCII (see Reference [1]),
relative to the path where the directory file is located. Each raw data file name is terminated by a single
line feed character (ASCII 10=0x0a).NOTE The PGX directory file does not separate lines by CR/LF pairs, i.e. the ASCII 13=0x0d, 10=0x0a code
sequence.B.2.3 Header file
The header file is derived from the file name of the raw data file listed in the directory file by removing
the postfix .raw and replacing it by the postfix .h. It describes the format in which the raw format is
encoded. There is one separate header file per component.Each header file consists of a single line, terminated by a single Line Feed character (ASCII 10=0x0a)
describing the format. It consists of the following fields, where angle brackets < > indicate parameters
described below and SPC indicates a blank space (ASCII 32=0x20):PSPCSPCSPCSPC
where:
identifies the header file and shall be present. It has no particular meaning beyond
format identification.© ISO/IEC 2022 – All rights reserved
---------------------- Page: 9 ----------------------
ISO/IEC 21122-5:2022(E)
identifies the sample format. ISO/IEC 21122 stores integer samples only, which are
indicated by the single character G as dataformat.identifies the endianness of the encoded data. The characte
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.