ISO/IEC 10918-7:2019
(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
Frequently Asked Questions
ISO/IEC 10918-7:2019 is a standard published by the International Organization for Standardization (ISO). Its full title is "Information technology - Digital compression and coding of continuous-tone still images - Part 7: Reference software". This standard covers: 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.
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.
ISO/IEC 10918-7:2019 is classified under the following ICS (International Classification for Standards) categories: 35.040.30 - Coding of graphical and photographical information. The ICS classification helps identify the subject area and facilitates finding related standards.
ISO/IEC 10918-7:2019 has the following relationships with other standards: It is inter standard links to ISO/IEEE 11073-10408:2022, ISO/IEC 10918-7:2021. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.
You can purchase ISO/IEC 10918-7:2019 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of ISO standards.
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 10918-7
First edition
2019-12
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 2019
© ISO/IEC 2019
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
Fax: +41 22 749 09 47
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO/IEC 2019 – 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. This document was drafted in accordance with the editorial
rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives).
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 http://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.
This document was prepared by ITU-T as ITU-T T.873 (05/2019) and drafted in accordance
with its editorial rules. It was assigned to Joint Technical Committee ISO/IEC JTC 1, Information
technology, Subcommittee SC 29, Coding of audio, picture, multimedia and hypermedia information.
A list of all parts in the ISO/IEC 10918 series can be found on the ISO website.
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.
iii
© ISO/IEC 2019 – All rights reserved
Table of 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 . 3
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 . 9
D.1 General . 9
D.2 Encoder options defining the quality of the base and full image . 9
D.3 Encoder options controlling the colour space . 9
D.4 Encoder options controlling the scan generation and entropy coding . 9
D.5 Encoder options controlling the DCT implementation . 10
D.6 Encoder options controlling the subsampling of components . 10
D.7 Miscellaneous encoder options . 10
D.8 Decoder options controlling the choice of the inverse discrete cosine transform . 11
D.9 Decoder options selecting the output file format. 11
D.10 Decoder options controlling the rendering of the output image . 11
D.11 Miscellaneous decoder options . 12
D.12 Decompressing to pgx . 12
Bibliography . 13
Electronic attachment with two reference implementations of Rec. ITU-T T.81 | ISO/IEC 10918-1.
Rec. ITU-T T.873 (05/2019) v
© ISO/IEC 2019 – All rights reserved
Introduction
The ITU-T T.80-series | ISO/IEC 10918-series establishes guidelines and specifies requirements for coding of continuous-
tone still images known under the name JPEG. Rec. ITU-T T.81 | ISO/IEC 10918-1 specifies the codestream format and
the decoding process. Rec. ITU-T T.81 | ISO/IEC 10918-1 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.
vi Rec. ITU-T T.873 (05/2019)
© ISO/IEC 2019 – All rights reserved
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′C C : Colour space that describes a colour by 1 luma coordinate and 2 chroma coordinates derived from a
B R
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 (05/2019) 1
© ISO/IEC 2019 – All rights reserved
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
For the purposes of this Recommendation | International Standard, the codestream shall conform to Rec. ITU-T T.81 |
ISO/IEC 10918-1.
The purpose of this Specification is to provide:
– reference decoder software capable of decoding codestreams that conform to Rec. ITU-T T.81 | ISO/IEC
10918-1;
– 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-1/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 (05/2019)
© ISO/IEC 2019 – All rights reserved
– The file "reference1.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 "reference2.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 lossless and 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 (05/2019) 3
© ISO/IEC 2019 – All rights reserved
Annex A
Unpacking and compiling reference software A
(This annex does not form an integral part of this Recommendation | International Standard.)
Source code of the reference software implementation is provided in a zip archive available at
https://standards.iso.org/iso-iec/10918/-7/ed-1/en, and https://www.itu.int/rec/T-REC-T.873/en. Unpacking a zip file is
operating system specific. Under portable operating system interface (POSIX) compliant operating systems, open a
command line window and enter
unzip reference1.zip
This will unpack all components of the software into the current directory.
To compile the software, follow these steps:
– for 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 formally
B R
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 (05/2019)
© ISO/IEC 2019 – All rights reserved
Annex B
Using reference software A
(This annex does not form an integral part of this Recommendation | International Standard.)
B.1 General
This annex describes the usage of the software prepared and compiled with the instructions given in Annex A.
The software can both compress images to JPEG files and expand such files back to pnm or pgx. The encoder and decoder
are both contained in the same executable, named "jpeg". If a quality parameter (see clause B.2) is included on the
command line, or the command line parameters request lossless coding, the executable encodes images. If only an input
and an output file are provided, the software attempts to expand the input file to the output file.
The encoder requires one input image encoded in the pnm format that is to be compressed. For lossy compression, the
-q parameter defines a quality parameter between 0 and 100. The -p parameter will enable lossless compression.
The command line parameters for the encoders are as follows:
jpeg [options] source target
where options is a set of command line options, all starting with a hyphen, source is the source image to be compressed,
and the target is the output file to which the encoder writes the output codestream. Command line switches control the
operations of the software. They are listed in clauses B.2 to B.8.
Decoding from a JPEG file to a ppm or pfm file requires only the input and output file name:
jpeg [options] source target
The only command line options recognized for decoding are –c and –U, which are described in subclause B.3.
B.2 Encoder options defining the quality of the image
The following options control the quality of the encoded images.
-q quality selects the encoding mode and defines the quality of the base image
B.3 Options controlling the colour space
The following options control how out of gamut colours and gamut extension is handled:
-c inserts a marker into the codestream that signals that the transformation from Y′C C to R′G′B′
B R
is disabled by the decoder
NOTE - Colour space interpretation and specifically the usage of this marker is beyond the scope of Rec. ITU-T T.81 |
ISO/IEC 10918-1 and is further specified in Rec. ITU-T T.871 | ISO/IEC 10918-5 and ISO/IEC 18447-1.
B.4 Options controlling the scan generation and entropy coding
The following parameters control the entropy coding and generation of scan patterns for JPEG scans. Especially the -h
parameter (optimize Huffman tables) is recommended, and for most configurations even necessary as Rec. ITU-T T.81 |
ISO/IEC 10918-1 does not provide for all modes examples for tables the encoder could choose.
-h
optimize the Huffman tables
-v
use progressive instead of sequential encoding
-p use the lossless (predictive) mode of Rec. ITU-T T.81 | ISO/IEC 10918-1
-y N
use hierarchical coding with N hierarchical layers. If N is 0, a two-scan hierarchical process is
initiated of which the first scan is a DCT process and the second hierarchical scan is a lossless
coding process
Rec. ITU-T T.873 (05/2019) 5
© ISO/IEC 2019 – All rights reserved
...








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...