ISO/IEC 10918-7:2023
(Main)Information technology — Digital compression and coding of continuous-tone still images — Part 7: Reference software
Information technology — Digital compression and coding of continuous-tone still images — Part 7: Reference software
This Specification provides reference software for the coding technology specified in Recommendation ITU-T T.81 | ISO/IEC 10918-1. While the reference implementations also provide an encoder, conformance testing of their encoding process is beyond the scope of this Specification.
Technologies de l'information — Compression numérique et codage des images fixes à modelé continu — Partie 7: Logiciel de référence
General Information
Relations
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 10918-7
Third edition
2023-11
Information technology — Digital
compression and coding of
continuous-tone still images —
Part 7:
Reference software
Technologies de l'information — Compression numérique et codage
des images fixes à modelé continu —
Partie 7: Logiciel de référence
Reference number
© ISO/IEC 2023
© ISO/IEC 2023
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
ii
© ISO/IEC 2023 – All rights reserved
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.
ISO and IEC draw attention to the possibility that the implementation of this document may involve the
use of (a) patent(s). ISO and IEC take no position concerning the evidence, validity or applicability of any
claimed patent rights in respect thereof. As of the date of publication of this document, ISO and IEC had
not received notice of (a) patent(s) which may be required to implement this document. However,
implementers are cautioned that this may not represent the latest information, which may be obtained
from the patent database available at www.iso.org/patents and https://patents.iec.ch. ISO and IEC shall
not be held responsible for identifying any or all such patent rights.
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 ITU-T (as ITU-T Rec T.873) and drafted in accordance with its editorial
rules, in collaboration with Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 29, Coding of audio, picture, multimedia and hypermedia information.
This third edition cancels and replaces the second edition (ISO/IEC 10918-7:2021), which has been
technically revised.
The main changes are as follows:
— update of reference software A to version 1.65 and reference software B to version 2.1.3.
A list of all parts in the ISO/IEC 10918 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 2023 – All rights reserved iii
INTERNATIONAL STANDARD ISO/IEC 10918-7
RECOMMENDATION ITU-T T.873 (V3)
Information technology – Digital compression and coding of continuous-tone still images:
Reference software
Summary
The ISO/IEC 10918-x series establishes guidelines and specifies requirements for coding of continuous-tone still images.
Rec. ITU-T T.81 | ISO/IEC 10918-1, also known under the name JPEG, specifies the codestream format and the
decoding process. It is designed primarily for compression of continuous-tone photographic content.
Rec. ITU-T T.873 | ISO/IEC 10918-7 provides reference software for Rec. ITU-T T.81 | ISO/IEC 10918-1. The software
has been successfully compiled and tested on Linux and Windows operating systems and conforms to the decoder
requirements specified in Recommendation ITU-T T.83 | ISO/IEC 10918-2. It has also been tested for conformance to
Rec. ITU-T T.86 | ISO/IEC 10918-4 and ISO/IEC 18477-4.
This third edition updates reference software A to version 1.65 and reference software B to version 3.0.0. The version of
reference software A does not include any new features; it only corrects implementation errors and improves the overall
stability of the software. Reference software B now also includes support for 8 and 12-bit codestreams in one single
integrated code.
*
History
Edition Recommendation Approval Study Group Unique ID
1.0 ITU-T T.873 2019-05-14 16 11.1002/1000/13915
2.0 ITU-T T.873 (V2) 2021-06-13 16 11.1002/1000/14693
3.0 ITU-T T.873 (V3) 2023-09-13 16 11.1002/1000/15654
Keywords
JPEG, reference software.
____________________
*
To access the Recommendation, type the URL https://handle.itu.int/ in the address field of your web
browser, followed by the Recommendation's unique ID.
Rec. ITU-T T.873 (V3) (09/2023) v
FOREWORD
The International Telecommunication Union (ITU) is the United Nations specialized agency in the field of
telecommunications, information and communication technologies (ICTs). The ITU Telecommunication
Standardization Sector (ITU-T) is a permanent organ of ITU. ITU-T is responsible for studying technical,
operating and tariff questions and issuing Recommendations on them with a view to standardizing
telecommunications on a worldwide basis.
The World Telecommunication Standardization Assembly (WTSA), which meets every four years,
establishes the topics for study by the ITU-T study groups which, in turn, produce Recommendations on
these topics.
The approval of ITU-T Recommendations is covered by the procedure laid down in WTSA Resolution 1.
In some areas of information technology which fall within ITU-T's purview, the necessary standards are
prepared on a collaborative basis with ISO and IEC.
NOTE
In this Recommendation, the expression "Administration" is used for conciseness to indicate both a
telecommunication administration and a recognized operating agency.
Compliance with this Recommendation is voluntary. However, the Recommendation may contain certain
mandatory provisions (to ensure, e.g., interoperability or applicability) and compliance with the
Recommendation is achieved when all of these mandatory provisions are met. The words "shall" or some
other obligatory language such as "must" and the negative equivalents are used to express requirements. The
use of such words does not suggest that compliance with the Recommendation is required of any party.
INTELLECTUAL PROPERTY RIGHTS
ITU draws attention to the possibility that the practice or implementation of this Recommendation may
involve the use of a claimed Intellectual Property Right. ITU takes no position concerning the evidence,
validity or applicability of claimed Intellectual Property Rights, whether asserted by ITU members or others
outside of the Recommendation development process.
As of the date of approval of this Recommendation, ITU had received notice of intellectual property,
protected by patents/software copyrights, which may be required to implement this Recommendation.
However, implementers are cautioned that this may not represent the latest information and are therefore
strongly urged to consult the appropriate ITU-T databases available via the ITU-T website at
http://www.itu.int/ITU-T/ipr/.
© ITU 2023
All rights reserved. No part of this publication may be reproduced, by any means whatsoever, without the
prior written permission of ITU.
vi Rec. ITU-T T.873 (V3) (09/2023)
CONTENTS
Page
1 Scope . 1
2 Normative references . 1
3 Definitions . 1
4 Abbreviations . 1
5 Conventions . 2
6 Reference software . 2
6.1 Purpose . 2
6.2 Examples of use . 2
6.3 General . 2
Annex A – Unpacking and compiling reference software A . 4
Annex B – Using reference software A . 5
B.1 General . 5
B.2 Encoder options defining the quality of the image . 5
B.3 Options controlling the colour space . 5
B.4 Options controlling the scan generation and entropy coding . 5
B.5 Options controlling the quantizer . 6
B.6 Options controlling the subsampling of components . 6
B.7 Miscellaneous options . 6
B.8 Decoder options . 6
Annex C – Unpacking and compiling reference software B . 7
Annex D – Using reference software B . 8
D.1 General . 8
D.2 Encoder options defining the quality of the base and full image . 8
D.3 Encoder options controlling the colour space . 8
D.4 Encoder options controlling the scan generation and entropy coding . 8
D.5 Encoder options controlling the DCT implementation . 9
D.6 Encoder options controlling the subsampling of components . 9
D.7 Miscellaneous encoder options . 9
D.8 Decoder options controlling the choice of the inverse discrete cosine transform . 10
D.9 Decoder options selecting the output file format . 10
D.10 Decoder options controlling the rendering of the output image . 10
D.11 Miscellaneous decoder options . 11
D.12 Decompressing to pgx . 11
Bibliography . 12
Electronic attachment with two reference implementations of Rec. ITU-T T.81 | ISO/IEC 10918-1.
Rec. ITU-T T.873 (V3) (09/2023) vii
Introduction
Rec. ITU-T T.81 | ISO/IEC 10918-1 specifies the codestream format and the decoding process, and is designed
primarily for compression of continuous-tone photographic content.
This Recommendation | International Standard provides reference software for Rec. ITU-T T.81 | ISO/IEC 10918-1.
The software has been successfully compiled and tested on Linux and Windows operating systems and conforms to the
decoder requirements set forth in Rec. ITU-T T.83 | ISO/IEC 10918-2. It has also been tested for conformance to
Rec. ITU-T T.86 | ISO/IEC 10918-4 and ISO/IEC 18477-4.
Instructions for unpacking and building the software are found in Annexes A and C. Instructions for its use are listed in
Annexes B and D.
viii Rec. ITU-T T.873 (V3) (09/2023)
INTERNATIONAL STANDARD
ITU-T RECOMMENDATION
Information technology – Digital compression and coding of continuous-tone still images:
Reference software
1 Scope
This Specification provides reference software for the coding technology specified in Recommendation ITU-T T.81 |
ISO/IEC 10918-1. While the reference implementations also provide an encoder, conformance testing of their encoding
process is beyond the scope of this Specification.
2 Normative references
The following Recommendations and International Standards contain provisions which, through reference in this text,
constitute provisions of this Recommendation | International Standard. For dated references, only the edition cited
applies. For undated references, the latest edition of the referenced document (including any amendments) applies. At
the time of publication, the editions indicated in dated references were valid. All Recommendations and Standards are
subject to revision, and parties to agreements based on this Recommendation | International Standard are encouraged to
investigate the possibility of applying the most recent edition of the Recommendations and Standards listed below.
Members of IEC and ISO maintain registers of currently valid International Standards. The Telecommunication
Standardization Bureau of the ITU maintains a list of currently valid ITU-T Recommendations.
– Recommendation ITU-T T.81 (latest) | ISO/IEC 10918-1 (latest), Information technology – Digital
compression and coding of continuous-tone still images: Requirements and guidelines.
3 Definitions
For the purposes of this Specification, the terms and definitions specified in Rec. ITU-T T.81 | ISO/IEC 10918-1 and
the following apply.
3.1 codestream; JPEG file: Sequence of bytes.
3.2 pgx format; portable graphics format: Image format describing integer-based continuous-tone images.
NOTE – For the purposes of this Specification, the image format is as specified in Rec. ITU-T T.803 | ISO/IEC 15444-4.
3.3 pnm format; portable any map format: Image format describing integer-based continuous-tone images of
either one or three components consisting of a header determining image dimensions and sample precision and
component-interleaved image samples encoded as 8-bit or 16-bit big-endian integers.
NOTE – For a specification of the pnm format, see Bourke (1997).
3.4 R′G′B′: Colour space that describes a colour by three gamma-corrected coordinates relative to three colour
primaries.
3.5 upsampling: Procedure that increases the spatial or temporal sampling rate of a time-discretely sampled
signal.
3.6 Y′CBCR: Colour space that describes a colour by 1 luma coordinate and 2 chroma coordinates derived from a
gamma-corrected R′G′B′ colour space by a linear transformation.
4 Abbreviations
For the purposes of this Recommendation | International Standard, the following abbreviations apply:
DCT Discrete Cosine Transform
DNL Define Number of Lines
IDCT Inverse Discrete Cosine Transform
MCU Minimum Coded Unit
POSIX Portable Operating System Interface
Rec. ITU-T T.873 (V3) (09/2023) 1
5 Conventions
Text in Times New Roman provides instructions, comments or details for the reader.
Text in Courier New indicates program input or output as necessary to either run the software or as generated by the
software on the console.
6 Reference software
6.1 Purpose
The purpose of this Specification is to provide:
– a reference decoder software capable of decoding codestreams that conform to Rec. ITU-T T.81 |
ISO/IEC 10918-1;
– a sample encoder software capable of producing codestreams that conform to Rec. ITU-T T.81 |
ISO/IEC 10918-1.
The use of the reference software is not required to implement an encoder or decoder in conformance to Rec.
ITU-T T.81 | ISO/IEC 10918-1. Requirements established in Rec. ITU-T T.81 | ISO/IEC 10918-1 take precedence over
the behaviour of the reference software.
6.2 Examples of use
Some examples of use for the reference decoder software implementations are:
– as an illustration of how to perform the decoding processes specified in Rec. ITU-T T.81 |
ISO/IEC 10918-1;
– as the starting basis for the implementation of a decoder that conforms to Rec. ITU-T T.81 |
ISO/IEC 10918-1;
– for (non-exhaustive) testing of the conformance of a codestream (or file) to the constraints specified in
Rec. ITU-T T.81 | ISO/IEC 10918-1.
NOTE 1 – The lack of detection of any conformance violation by any reference software implementation cannot be considered as
a definitive proof that the codestream under test conforms to Rec. ITU-T T.81 | ISO/IEC 10918-1.
Some examples of use for reference encoder software are as:
– an illustration of how to implement an encoding process that produces codestreams that conform to Rec.
ITU-T T.81 | ISO/IEC 10918-1;
– a starting point for an implementation of an encoder that conforms to Rec. ITU-T T.81 |
ISO/IEC 10918-1;
– a means of generating codestreams conforming to Rec. ITU-T T.81 | ISO/IEC 10918-1 for testing
purposes;
– a means of demonstrating and evaluating examples of the quality that can be achieved by an encoding
process that conforms to Rec. ITU-T T.81 | ISO/IEC 10918-1.
NOTE 2 – No guarantee of the quality that will be achieved by an encoder is provided by its conformance to Rec. ITU-T T.81 |
ISO/IEC 10918-1, as the conformance is only defined in terms of specific constraints imposed on the syntax of the generated
codestream and maximum tolerable errors of the discrete cosine transform (DCT) coefficients after reconstruction. In particular,
while sample encoder software implementations could suffice to provide some illustrative examples of which quality can be
achieved within Rec. ITU-T T.81 | ISO/IEC 10918-1, they provide neither an assurance of minimum guaranteed image encoding
quality nor maximum achievable image encoding quality.
NOTE 3 – The computation resource characteristics in terms of program or data memory usage, execution speed, etc. of sample
software encoder or decoder implementations cannot be construed as representative of the typical, minimal or maximal
computational resource characteristics to be exhibited by implementations of some parts of Rec. ITU-T T.81 | ISO/IEC 10918-1.
6.3 General
The reference software implementations for Rec. ITU-T T.81 | ISO/IEC 10918-1 are available from ISO at
https://standards.iso.org/iso-iec/10918/-7/ed-3/en and also from ITU at https://www.itu.int/rec/T-REC-T.873/en. Each
of the two zip archives contains one reference software implementation.
2 Rec. ITU-T T.873 (V3) (09/2023)
– The file "referenceA.zip" contains a reference implementation for all processes of Rec. ITU-T T.81 |
ISO/IEC 10918-1. Unpacking and compilation of this software is explained in Annex A. Guidance on
how to use this software is given in Annex B.
– The file "referenceB.zip" contains a reference implementation for the baseline and extended Huffman
and arithmetic coding DCT processes of Rec. ITU-T T.81 | ISO/IEC 10918-1. This software does not
implement the hierarchical processes of Rec. ITU-T T.81 | ISO/IEC 10918-1. Unpacking and
compilation of this software is explained in Annex C. Guidance on how to use this software is given in
Annex D.
Rec. ITU-T T.873 (V3) (09/2023) 3
Annex A
Unpacking and compiling reference software A
(This annex does not form an integral part of this document.)
Source code of the reference software implementation is provided in a zip archive available at
https://standards.iso.org/iso-iec/10918/-7/ed-3/en, and https://www.itu.int/rec/T-REC-T.873/en. Unpacking a zip file is
operating system specific.
To compile the software, follow these steps:
– for portable operating system interface (POSIX) compliant operating systems, go to the directory into
which the electronic attachment was unpacked, then enter on the command line
./configure
make
This assumes that a POSIX compliant shell is available, and the GNU compiler (make, gcc compiler and linker) are
installed on the system. The reference software will then be built in the current directory, and a binary named "jpeg"
will be created.
– For Microsoft Windows, the Visual Studio VS2010 or VS2013 compiler suite provides another option
for building the software. A VS2010 solution file allowing loading and compiling the project can be
found in the directory "vs10.0/jpeg". A solution file for VS2013 can be found in the directory
"vs12.0/jpeg".
The compiler will generate a command line tool without any graphical interface that compresses images represented in
the pnm format into JPEG and expands JPEG images into pnm or pgx files. pnm-files represent one component integer
grey-scale or three-component integer colour data, whereas pgx files describe non-upsampled N-component raw sample
data bare any colour interpretation.
For the purpose of testing for conformance to Rec. ITU-T T.81 | ISO/IEC 10918-1, the pgx output is preferable as it
includes neither a transformation from Y′C C to R′G′B′ and nor an upsampling process. These processes are not
B R
formally part of Rec. ITU-T T.81 | ISO/IEC 10918-1, but have been included in later standards, such as Rec.
ITU-T T.871 | ISO/IEC 10918-5, also known as JFIF, or ISO/IEC 18477-1.
4 Rec. ITU-T T.873 (V3) (09/2023)
...








Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...