Information technology — JPEG XS low-latency lightweight image coding system — Part 1: Core coding system

This document defines a syntax (and an accompanying decompression process) that is capable to represent continuous-tone grey-scale, or continuous-tone colour digital images without visual loss at moderate compression rates. Typical compression rates are between 2:1 and 6:1 but can also be higher depending on the nature of the image. In particular, the syntax and the decoding process specified in this document allow lightweight encoder and decoder implementations that limit the end-to-end latency to a fraction of the frame size. However, the definition of transmission channel buffer models necessary to ensure such latency is beyond the scope of this document. This document: — specifies a decoding process for converting compressed image data to reconstructed image data; — specifies a codestream syntax containing information for interpreting the compressed image data; — provides guidance on encoding processes for converting source image data to compressed image data.

Titre manque — Partie 1: Titre manque

General Information

Status
Withdrawn
Publication Date
01-May-2019
Current Stage
9599 - Withdrawal of International Standard
Start Date
29-Mar-2022
Completion Date
30-Oct-2025
Ref Project

Relations

Standard
ISO/IEC 21122-1:2019 - Information technology — JPEG XS low-latency lightweight image coding system — Part 1: Core coding system Released:5/2/2019
English language
70 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


INTERNATIONAL ISO/IEC
STANDARD 21122-1
First edition
2019-05
Information technology — JPEG XS
low-latency lightweight image coding
system —
Part 1:
Core coding system
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

Contents Page
Foreword .iv
Introduction .v
1 Scope . 1
2 Normative references . 1
3 Terms and definitions, abbreviated terms and symbols . 1
3.1 Terms and definitions . 1
3.2 Abbreviated terms . 5
3.3 Symbols . 6
4 Conventions . 8
4.1 Conformance language . 8
4.2 Operators . 8
4.2.1 Arithmetic operators . 8
4.2.2 Logical operators . 9
4.2.3 Relational operators . 9
4.2.4 Precedence order of operators . 9
4.2.5 Mathematical functions . 9
5 Functional concepts .10
5.1 Sample grid, sampling and components .10
5.2 Wavelet decomposition .10
5.3 Codestream .10
6 Encoder requirements .11
7 Decoder .11
7.1 Decoding process general provisions .11
7.2 Decoder requirements.13
Annex A (normative) Codestream syntax .14
Annex B (normative) Image data structures .23
Annex C (normative) Entropy decoding .32
Annex D (normative) Quantization .48
Annex E (normative) Discrete wavelet transformation .52
Annex F (normative) Multiple component transformations .61
Annex G (normative) DC level shifting and output clipping .63
Annex H (informative) Examples and guidelines .65
Bibliography .70
© ISO/IEC 2019 – All rights reserved iii

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 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 21122 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.
iv © ISO/IEC 2019 – All rights reserved

Introduction
The International Organization for Standardization (ISO) and 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:
INTOPIX SA
Rue Emile Francqui 9
B-1435 Mont-Saint-Guibert, Belgium
Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. for its Fraunhofer Institute
for Integrated Circuits IIS
Am Wolfsmantel 33
91058 Erlangen, Germany
Attention is drawn to the possibility that some of the elements of this document may be the subject of
patent rights other than those identified above. ISO and IEC shall not be held responsible for identifying
any or all such patent rights.
© ISO/IEC 2019 – All rights reserved v

INTERNATIONAL STANDARD ISO/IEC 21122-1:2019(E)
Information technology — JPEG XS low-latency lightweight
image coding system —
Part 1:
Core coding system
1 Scope
This document defines a syntax (and an accompanying decompression process) that is capable to
represent continuous-tone grey-scale, or continuous-tone colour digital images without visual loss at
moderate compression rates. Typical compression rates are between 2:1 and 6:1 but can also be higher
depending on the nature of the image. In particular, the syntax and the decoding process specified
in this document allow lightweight encoder and decoder implementations that limit the end-to-end
latency to a fraction of the frame size. However, the definition of transmission channel buffer models
necessary to ensure such latency is beyond the scope of this document.
This document:
— specifies a decoding process for converting compressed image data to reconstructed image data;
— specifies a codestream syntax containing information for interpreting the compressed image data;
— provides guidance on encoding processes for converting source image data to compressed image data.
2 Normative references
There are no normative references in this document.
3 Terms and definitions, abbreviated terms and symbols
3.1 Terms and definitions
For the purposes of this document, the following terms and definitions apply.
ISO and IEC maintain terminological databases for use in standardization at the following addresses:
— ISO Online browsing platform: available at https: //www .iso .org/obp
— IEC Electropedia: available at http: //www .electropedia .org/
3.1.1
band
input data to a specific wavelet filter type (3.1.49) that contributes to the generation of one of the
components (3.1.13) of the image
3.1.2
band type
single number collapsing the information on the component (3.1.13), and horizontal and vertical wavelet
filter types (3.1.49) that are applied in the filter cascade reconstructing spatial image samples (3.1.42)
from inversely quantized wavelet coefficients (3.1.10)
© ISO/IEC 2019 – All rights reserved 1

3.1.3
bit
binary choice encoded as either 0 or 1
3.1.4
bitplane
array of bits (3.1.3) having all the same significance (3.1.31)
3.1.5
bitplane count
number of significant bitplanes (3.1.4) of a code group (3.1.9), counting from the LSB up to the most
significant, non-empty bitplane
3.1.6
bitplane count subpacket
subset of a packet (3.1.34) which decodes to the bitplane counts (3.1.5) of all code groups (3.1.9) within a
packet, followed by padding (3.1.35) and optional filler bytes (3.1.24)
Note 1 to entry: See subclause C.5.3.
3.1.7
byte
group of 8 bits (3.1.3)
3.1.8
codestream
compressed image data representation that includes all necessary data to allow a (full or approximate)
reconstruction of the sample (3.1.42) values of a digital image
3.1.9
code group
group of quantization indices (3.1.40) in sign-magnitude representation before inverse quantization
(3.1.25)
3.1.10
coefficient
input value to the inverse wavelet transformation resulting from inverse quantization (3.1.25)
3.1.11
column
set of vertically aligned precincts (3.1.36)
3.1.12
compression
process of reducing the number of bits (3.1.3) used to represent source image data
3.1.13
component
two-dimensional array of samples (3.1.42) having the same designation such as red, green or blue in the
output or display device
3.1.14
continuous-tone image
image whose components (3.1.13) have more than one bit (3.1.3) per sample (3.1.42)
3.1.15
data subpacket
subset of a packet (3.1.34) which consists of the quantization index magnitudes (3.1.41), followed by
padding (3.1.35) and optional filler bytes (3.1.24)
Note 1 to entry: See subclause C.5.4.
2 © ISO/IEC 2019 – All rights reserved

3.1.16
deadzone quantizer
quantizer whose zero bucket has a size different from all other buckets
Note 1 to entry: Based on this, inverse deadzone quantizers can be defined as inverse quantizers whose zero
bucket has a size different from all other buckets.
3.1.17
decoder
embodiment of a decoding process (3.1.18)
3.1.18
decoding process
process which takes as its input a codestream (3.1.8) and outputs a continuous-tone image (3.1.14)
3.1.19
decomposition level
set of wavelet coefficients (3.1.10) resulting from a particular level of recursive application of a wavelet
transform
3.1.20
encoder
embodiment of an encoding process (3.1.23)
3.1.21
encoding process
process which outputs compressed image data in the form of a codestream (3.1.8)
3.1.22
entropy decoding
lossless (3.1.28) procedure (3.1.38) which recovers the sequence of symbols from the sequence of bits
(3.1.3) produced by an entropy encoding (3.1.23) procedure
3.1.23
entropy encoding
lossless (3.1.28) procedure (3.1.38) which converts a sequence of input symbols into a sequence of bits
(3.1.3) such that the average number of bits per symbol approaches the entropy of the input symbols
3.1.24
filler bytes
integer number of bytes (3.1.7) a decoder (3.1.17) will skip over on decoding without interpreting the
values of the bytes itself
3.1.25
inverse quantization
inverse procedure (3.1.38) to quantization (3.1.39) by which the decoder (3.1.17) recovers a
representation of the coefficients (3.1.10)
3.1.26
inverse reversible multi component transformation
inverse RCT
inverse transformation across multiple component (3.1.13) sample (3.1.42) values located at the same
sample grid (3.1.43) point that is invertible without loss
Note 1 to entry: See subclauses F.3 and F.4.
3.1.27
LL band
input to a series of wavelet filters where only inverse low-pass filters are applied in horizontal and
vertical direction
© ISO/IEC 2019 – All rights reserved 3

3.1.28
lossless
being such that, for encoding and decoding procedures (3.1.38), the output of the decoding procedure(s)
is identical to the input to the encoding procedure(s)
3.1.29
lossless coding
mode of operation which refers to any one of the coding processes defined in this document in which all
of the procedures (3.1.38) are lossless (3.1.28)
3.1.30
sign subpacket
subset of a packet (3.1.34) that consists of the sign information of all non-zero quantization indices
(3.1.40) within a packet, followed by padding (3.1.35) and optional filler bytes (3.1.24)
Note 1 to entry: See subclause C.5.5.
3.1.31
significance
attribute of code groups (3.1.9) that applies if, depending on the Run Mode flag in the picture header,
either at least one of coefficients (3.1.10) in the code group is non-zero, or the bitplane count (3.1.5)
prediction residual of the code group is non-zero
3.1.32
significance group
group of horizontally adjacent code groups (3.1.9) sharing the same significance (3.1.31) information in
the significance subpacket (3.1.33)
3.1.33
significance subpacket
subset of a packet (3.1.34) that identifies which significance groups (3.1.32) within a packet are
insignificant, followed by padding (3.1.35) and optional filler bytes (3.1.24)
Note 1 to entry: See subclause C.5.2.
3.1.34
packet
segment of the codestream (3.1.8) containing entropy coded information on a single precinct (3.1.36),
line and a subset of the bands (3.1.1) within this precinct and line
3.1.35
padding
bits (3.1.3) within the codestream (3.1.8) whose only purpose is to align syntax elements to byte (3.1.7)
boundaries and that carry no information
3.1.36
precinct
collection of quantization indices (3.1.40) of all bands (3.1.1) contributing to a given spatial region of
the image
3.1.37
precision
number of bits (3.1.3) allocated to a particular sample (3.1.42), coefficient (3.1.10), or other binary
numerical representation
3.1.38
procedure
set of steps which accomplishes one of the tasks which comprise an encoding (3.1.23) or decoding
process (3.1.18)
4 © ISO/IEC 2019 – All rights reserved

3.1.39
quantization
method of reducing the precision (3.1.37) of the individual coefficients (3.1.10)
3.1.40
quantization index
input to the inverse quantization (3.1.25) process which reconstructs a wavelet coefficient (3.1.10)
3.1.41
quantization index magnitude
absolute value of a quantization index (3.1.40)
3.1.42
sample
single element in the two-dimensional image array which comprises a component (3.1.13)
3.1.43
sample grid
common coordinate system for all samples (3.1.42) of an image, where the samples at the top left edge
of the image have the coordinates (0,0), the first coordinate increases towards the right, the second
towards the bottom
3.1.44
slice
integral number of precincts (3.1.36) whose wavelet coefficients (3.1.10) can be entropy-decoded
independently
3.1.45
subpacket
substructure of a packet (3.1.34) containing information of one or multiple bands (3.1.1) of one line of a
single precinct (3.1.36)
3.1.46
truncation position
number of least significant bitplanes (3.1.4) not included in the quantization index (3.1.40) of a wavelet
coefficient (3.1.10)
3.1.47
uniform quantizer
quantizer whose buckets are all of equal size
Note 1 to entry: Based in this, inverse uniform quantizers can be defined as inverse quantizers whose buckets
are all of equal size.
3.1.48
upsampling
procedure (3.1.38) by which the spatial resolution of a component (3.1.13) is increased
3.1.49
wavelet filter type
single number that uniquely identifies each element of the wavelet filter with regard to the number and
type of horizontal and vertical decompositions
Note 1 to entry: Unlike the band type, the wavelet filter type does not include component information.
3.2 Abbreviated terms
LSB least significant bit
MSB most significant bit
© ISO/IEC 2019 – All rights reserved 5

3.3 Symbols
B[c] bit precision of component c
β wavelet filter type
b band type
Bw nominal overall bit precision of the wavelet data
B number of bits required to encode a bitplane count in raw
r
Cpih colour transformation type
c[p,λ,b,x] wavelet coefficient in precinct p, line λ, band b and position x
C width of precincts other than the rightmost precinct in sample grid positions
s
Cw width of precincts in multiples of 8 LL subsampled band sample grid positions
D[p,b] bitplane count coding mode of band b in precinct p
D [p,s] raw coding mode override flag for packet s in precinct p
r
Fs sign packing flag
Fslc slice coding mode
Fq number of fractional bits in the representation of wavelet coefficients
G[b] gain of subband b
H [a] height of subband a in wavelet coefficients
b
H [i] height of the component i in sample points
c
H height of the image in sampling grid points
f
H height of a precinct in lines
p
H height of a slice in precincts
sl
I[p,b,λ,s] line inclusion flag, set if line λ of band b and precinct p is included in packet s, reset
otherwise
L [p,b] first line of band b in precinct p
L [p,b] last line + 1 of band b in precinct p
Lcod codestream length in bytes
Ldat[p,s] size of the data subpacket of precinct p and packet s in bytes
Lcnt[p,s] size of the bitplane count subpacket of precinct p and packet s in bytes
Lsgn[p,s] size of the sign subpacket of precinct p and packet s in bytes
Lprc[p] length of the entropy coded data in precinct p
Lslc slice length in bytes
6 © ISO/IEC 2019 – All rights reserved

M[p,λ,b,g] bitplane count of precinct p, line λ, band b and code group g
M [p,λ,b,g] vertical predictor of the bitplane count of precinct p, line λ, band b and code group g
top
N number of components in an image
c
N [p,b] number of code groups in precinct p and band b
cg
N number of bands per component
β
N number of coefficients in a code group
g
N [p,b] number of significance groups per line band b of precinct p
s
N [t] number of precincts in slice t
p
N number of bands in the wavelet decomposition of the image (wavelet filter types times
L
components)
N number of horizontal decomposition levels
L,x
N number of vertical decomposition levels
L,y
N number of precincts per sampling grid line
p,x
N number of precincts per sampling grid column
p,y
N [p] number of packets in precinct p
pc
O[c,x,y] unscaled output of the inverse wavelet transformation at coordinates x and y of the
component c
Ω[c,x,y] output of the inverse multiple component transformation at position x,y for component c
P[b] priority of band b
Plev level a particular codestream complies to
Ppih profile a particular codestream complies to
Ppoc progression order in which bands are transmitted in the codestream
Q[p] quantization parameter of precinct p
Qpih quantization type of the picture
Rm run mode used for significance coding
R[p] refinement of precinct p
R[c,x,y] reconstructed sample value at position x,y for component c
S size of a significance group in code groups
s
s [i] sampling factor of component i in horizontal direction
x
s [i] sampling factor of component i in vertical direction
y
s[p,λ,b,x] sign of the wavelet coefficient in precinct p, line λ, band b and position x
T[p,b] truncation position of precinct p and band b
© ISO/IEC 2019 – All rights reserved 7

T [p,b] vertical truncation position predictor of precinct p and band b
top
T[β,x,y] temporary wavelet coefficient of filter type β at location x,y
v[x,y] sample value at the sample grid position x,y
v[p,λ,b,x] quantization index magnitude of the wavelet coefficient in precinct p, line λ, band b
and position x
W [b] width of band b in wavelet coefficients
b
W [i] width of component i in samples
c
W width of the image in sampling grid points
f
W [p] width of the precinct p in sampling grid points
p
W [p,b] width of subband b of precinct p in coefficients
pb
Wt wavelet filter type for horizontal filtering
x
Wt wavelet filter type for vertical filtering
y
X[y] one-dimensional temporal array of wavelet coefficients
Yslh vertical slice order within the picture
Z[p,λ,b,j] significance flag of precinct p, line λ, band b and significance group j
4 Conventions
4.1 Conformance language
The keyword "reserved" indicates a provision that is not specified at this time, shall not be used, and
may be specified in the future. The keyword "forbidden" indicates "reserved" and in addition indicates
that the provision will never be specified in the future.
4.2 Operators
NOTE Many of the operators used in document are similar to those used in the C programming language.
4.2.1 Arithmetic operators
+ addition
− subtraction (as a binary operator) or negation (as a unary prefix operator)
× multiplication
/ division without truncation or rounding
s
<< left shift: x< >>
s
 
right shift: x>>s is defined as x/2
 
Umod x umod a is the unique value y between 0 and a–1 for which y+Na = x with a suitable
integer N
8 © ISO/IEC 2019 – All rights reserved

4.2.2 Logical operators
|| logical OR
&& logical AND
! logical NOT
4.2.3 Relational operators
> greater than
≥ greater than or equal to
< less than
≤ less than or equal to
== equal to
!= not equal to
4.2.4 Precedence order of operators
NOTE Operators are listed below in descending order of precedence. If several operators appear in the same
line, they have equal precedence. When several operators of equal precedence appear at the same level in an
expression, evaluation proceeds according to the associativity of the operator either from right to left or from
left to right.
Operators Type of operation Associativity
() expression left to right
[] indexing of arrays left to right
– unary negation
×, / multiplication, division left to right
Umod modulo (remainder) left to right
+, − addition and subtraction left to right
<<, >> left shift and right shift left to right
< , >, ≤, ≥ relational left to right
& bitwise AND left to right
4.2.5 Mathematical functions
ceil of x: returns the smallest integer that is greater than or equal to x
x
 
 
floor of x: returns the largest integer that is less than or equal to x
x
 
 
|x| absolute value of x, |x| equals –x for x < 0, otherwise x
© ISO/IEC 2019 – All rights reserved 9

sign(x) sign of x, 0 if x is 0, +1 if x is positive, -1 if x is negative
clamp(x,min,max) clamp x to the range [min,max]
clamp(x,min,max) equals min if x < min, max if x > max or otherwise x
max (x ) maximum of a sequence of numbers {x } enumerated by the index i
i i i
5 Functional concepts
5.1 Sample grid, sampling and components
An image is defined as a rectangular array of scalar or vectorial samples regularly aligned along a
sample grid of W sample positions horizontally and H sample positions vertically. W is called the
f f f
width and H is called the height of the image. The vector dimension of the image samples corresponds
f
to the number of colour components present and is indicated by N , the number of components of the
c
image. Each dimension of this vectorial data corresponds to one component of the image, and typically
represents one of multiple colour channels of the data. Components may be red, green and blue, or
Luma (Y) and Chroma (Cb,Cr). These are only non-exhaustive examples of components, and other uses
are possible.
A given component may or may not populate every point on the sample grid. The distance, or sampling
factor, between sample points of a component shall be constant in each spatial dimension throughout
the image. The horizontal and vertical sampling factors of component i of an image are denoted by s [i]
x
respectively s [i] where i enumerates the components. Annex B provides further specifications on
y
component sampling.
This document does not specify how to interpret the sample values, or how to reconstruct from
subsampled components an array of samples that populates the entire sample grid, i.e. it does not
specify how to upsample components to the full resolution of the sampling grid. It neither specifies
the registration of the components relative to each other. The sampling grid provides only an abstract
coordinate system for the computation of positions and dimensions of codestream elements.
5.2 Wavelet decomposition
This document provides an efficient representation of image signals through the mathematical tool
of wavelet analysis. The wavelet filter process specified in Annex E separates each component into
multiple bands, where each band consists of multiple coefficients describing the image signal of a
given component within a frequency domain specific to the wavelet filter type, i.e. the particular filter
corresponding to the band.
Wavelet coefficients are grouped into precincts, where each precinct includes all coefficients over all
bands that contribute to a spatial region of the image. Each precinct is encoded into one or multiple
packets in the codestream syntax specified in Annex A.
Precincts are furthermore grouped into slices. Wavelet coefficients in precincts that are part of different
slices can be decoded independently from each other. However, the wavelet transformation runs across
slice boundaries. A slice always extends over the full width of the image, but may only cover parts of its
height. Bands, band types, precincts and slices are formally defined in Annex B.
5.3 Codestream
The codestream is a linear stream of bits from the first bit to the last bit. For convenience, it can be
divided into (8-bit) bytes, starting with the first bit of the codestream. Bits within bytes are enumerated
from the LSB to the MSB, with the least significant bit having the index zero. Bits within bytes are
transmitted in decreasing magnitude order, with the MSB of a byte transmitted first and the LSB
transmitted last.
10 © ISO/IEC 2019 – All rights reserved

Annex A specifies the codestream syntax that defines the coded representation of compressed image
data for exchange between application environments. Any compressed image data shall comply with
the syntax and code assignments appropriate for the decoding processes defined in this document.
The codestream consists of multiple syntax elements: marker segments define control information
necessary to steer the decoding process, and entropy coded data organized in packets that represent
image information itself. Packets are further grouped into subpackets, each of which includes particular
information such as magnitude, signs or significance of parts of the encoded image data.
All marker segments defined in this document are specified in Annex A. This annex also provides an
overview on the organization of the codestream. Packets and subpackets are specified in Annex C.
6 Encoder requirements
An encoder is an embodiment of a process that generates a codestream that conforms to the syntactical
requirements specified in Annex A. Annex C to Annex G include informative subclauses that indicate
how an encoder may be implemented.
7 Decoder
7.1 Decoding process general provisions
Figure 1 provides an overview on the decoding process and the layout of this document. Codestream
decoding can be grouped into a syntax analysis part in block 1, an entropy decoding stage consisting of
multiple blocks 2.1 to 2.4, an inverse quantization in block 3, an inverse wavelet transformation in block
4 and an inverse multiple component transformation in block 5. In block 6, sample values are scaled, a
DC offset is added, and they are clamped to their nominal ranges.
© ISO/IEC 2019 – All rights reserved 11

Figure 1 — Decoder overview
In Block 1, described in Annex A, the decoder analyses the codestream syntax and retrieves information
on the layout of the sampling grid, and the dimensions of slices and precincts.
The subpackets of the entropy coded data segment of the codestream are then decoded by the
procedures given in Annex C to form significance information, sign information, bitplane count
information and quantization indices. This operation is performed in blocks 2.1 to 2.4 in Figure 1.
In block 2.1, significance information is decoded from the significance subpacket as specified in subclause
C.5.2. Denoted by the array Z[p,λ,b,j], significance information indicates the presence of significant
th
code groups within the j significance group. Each significance group corresponds to a run of code
groups indexed by precinct p, line λ and band b. A code group is significant if, depending on the Run
Mode flag Rm in the picture header, it either contains non-zero coefficients, or has a non-zero bitplane
count prediction residual.
In block 2.2, bitplane counts are decoded from the Bitplane count subpacket as specified in subclause
C.5.3 by the procedures specified in subclause C.6. The integer array M[p,λ,b,g] indicates the bitplane
counts of the wavelet coefficients in the code group g indexed by precinct p, line λ and band b.
In block 2.3, Quantization index magnitudes v[p,λ,b,x] in precinct p, line λ, band b, and horizontal
position x are decoded from the data subpacket as specified in subclause C.5.4.
In block 2.4, the signs of the quantization indices s[p,λ,b,x] are either interleaved in the data subpacket,
or included in a separate sign subpacket as specified in subclause C.5.5.
In block 3, decoded quantization index magnitudes v[p,λ,b,x] and signs s[p,λ,b,x] are then inversely
quantized by the dequantizer specified in Annex D, giving wavelet coefficients c[p,λ,b,x].
12 © ISO/IEC 2019 – All rights reserved

In block 4, wavelet coefficients c[p,λ,b,x] are inversely wavelet transformed by the procedure specified
in Annex E. This process generates spatial sample values for all components, denoted by O[x,y,c].
Coordinates x and y are here subsampled sampling grid positions of component c.
In block 5, spatial sample values O[x,y,c] undergo optionally an inverse multiple component
transformation, giving intermediate image sample values Ω[x,y,c]. The inverse multiple component
transformation is specified in Annex F.
In block 6, a DC offset is added to the decorrelated sample values Ω[x,y,c], they are scaled to their
nominal range and then clamped to the range of the bit-precision of the output, giving the final
reconstructed output sample values R[x,y,c] populating the sample grid positions x×s[c], y×s[c]. This
x y
procedure is specified in Annex G.
7.2 Decoder requirements
A decoder is an embodiment of the decoding process. The decoding process converts a codestream by
performing the process specified in this document to sample values arranged on a rectangular sampling
grid. Annexes A to G describe and specify the decoding process. All decoding processes are normative,
in the sense that the decoded output image produced by an implementation of a decoder shall be the
same as the decoded output image produced by the decoding processes specified in this document,
including those processes specified in Annexes A through G.
There is no normative or required specification for the particular internal steps or ordering of internal
operations to be performed within the decoder that are used to produce the normatively specified
result. Only the result that is externally observable as the decoded output image produced by the
decoder is required to match the result produced by the decoding processes specified in this document.
The descriptions use particular implementation techniques for illustrative purposes only, and any
implementation that is able to reproduce the same result as those generated by the algorithms specified
herein is conforming to this document.
© ISO/IEC 2019 – All rights reserved 13

Annex A
(normative)
Codestream syntax
A.1 General
A.1.1 Marker segments and entropy coded data
The compressed data format consists of an ordered collection of syntax elements. This document
distinguishes between three types of syntax elements: Marker, marker segments and entropy coded data.
Markers serve to identify the various structural parts of the codestream. Most markers start marker
segments, where marker segments signal the characteristics of the encoded image and encapsulate
parameters configuring the decoder. Some markers stand alone. Entropy coded data consists of the input
to the decoding procedure described in Annexes C to G which reconstructs this data to the output image.
A.1.2 Key to syntax information
JPEG XS codestream syntax elements belong to one of two categories: fixed-length numerical values, or
variable-length codes. In the syntax tables, the “Syntax” column indicates the category to which each
codestream syntax element belongs, in the “Size” column the size of each field is identified (if applicable).
Fixed-length numerical values are unsigned integers and are denoted by u(n), where n is the number
of bits used to represent the value. Variable-length codes are denoted by vlc; see subclause C.7 for the
normative decoding procedure of variable length codes. Bit strings and variable-length codes appear in
the codestream with the left bit first; numerical values appear most-significant bit first. The notation
pad(n) indicates a variable number of padding bits. Padding aligns the bitstream to an n-bit boundary,
i.e. to an integer multiple of n bits relative to the start of the bitstream. Thus, pad(n) expands to 0 to
n−1 bits depending on the position within the bitstream. While padding bits can have arbitrary values,
a decoder shall ignore their value. The notation fill() indicates an arbitrary number of filler bytes a
decoder shall remove without interpreting their value. The amount of filler bytes can be inferred from a
length field of a corresponding syntax element.
Syntax elements may be conditionally included in the codestream; this is indicated by “if” clauses in the
“Syntax” column of the syntax tables. All syntactical elements enclosed in curly brackets following the
“if” clause are only included if the expression following the “if” clause is non-zero.
The sequence of multiple similar elements is indicated by “for” clauses in the “Syntax” column of the
syntax tables. The elements to repeat are enclosed in curly braces. The loop itself is specified through
three syntax elements: an initializer setting a dummy count variable indicating the current iteration
position of the loop, a condition on the count variable for continuing the loop, and an iteration statement
that updates the count variable for the next loop. The three expressions are separated by semicola.
NOTE The loop syntax and the syntax for conditional inclusion of elements follow closely the syntax of the C
language.
A.2 Codestream syntax general provisions
A JPEG XS codestream describes an image consisting of 1 to 8 components aligned along a regular
rectangular sampling grid. Each component is a rectangular arrangement of integer sample values on
the sampling grid of the image. The samples of a component may not populate every possible position
on the sampling grid; see subclause B.1. The horizontal and vertical spacing between populated sample
positions of a component relative to the sampling grid are denoted the horizontal and vertical sampling
factors of the component and are indicated by the symbols s [i] and s [i]. Subsampling factors vary
x y
14 © ISO/IEC 2019 – All rights reserved

between 1 and 2. The codestream reconstruction process described by this document assigns to each
sample of each image component an integer precision between 8 and 16 bits.
The dimensions of the image, along with the number of components, the sampling factors and the
precision of the components are encoded in a syntax element denoted as Picture Header. The samples
in the image are reconstructed by an inverse wavelet transformation from entropy coded wavelet
coefficients arranged in multiple wavelet bands; see Annex B for details. The wavelet reconstruction
algorithm is specified in Annex E.
Wavelet coefficients are grouped into precincts. A precinct includes entropy coded data decoding to
a rectangular array of wavelet coefficients per bands such that the included wavelet coefficients
contribute to a given spatial region of the image. A precinct is represented in the codestream by a
precinct header, entropy coded data followed by filler bytes.
The entropy coded data is organized in multiple packets, where each packet s contributes to one line
λ and one or multiple bands b of a precinct p. Each packet consists of multiple subpackets where each
subpacket contributes to one aspect of the data, such as significance, bitplane counts, magnitude and
signs. Filler bytes and padding does not have any impact on the decoded image. The purpose of the
filler bytes is to prevent buffer underflow of a potential transmission buffer, the purpose of padding is
to align the syntax elements in the bitstream to byte boundaries. Decoders learn the number of filler
bytes following the precinct from the precinct header specified in subclause C.2, and the number of
filler bytes in the subpackets from the subpacket header specified in subclause C.3. Decoders shall
ignore the value of the filler bytes.
NOTE 1 Filler bytes are in no relation to the output of the pad() function defined in subclause A.1.2 whose
purpose is to ensure alignment of the codestream to byte boundaries only.
NOTE 2 Buffer models, profiles and levels are specified in ISO/IEC 21122-2 and are beyond the scope of this
document.
Precincts are grouped into slices. Each slice consists of an integral number of precincts, and extends
over the full width of the image. Even though the wavelet coefficients within each slice can be decoded
independently, the wavelet transformation runs across slices. A slice is represented in the codestream
by a slice header and one or multiple precincts following the slice header.
Figure 1 gives an overview of the hierarchy of JPEG XS codestream syntax structures. Table A.1 defines
the overall codestream syntax
Table A.1 — JPEG XS codestream syntax overview
Syntax Notes Defined in
Picture() {
SOC_marker() Identifies this codestream as JPEG XS codestream Table A.3
Identifies the capabilities a decoder needs to support
capabilities_marker() Table A.5
to be able to decode the codestream
picture_header() Defines the overall structure of the codestream Table A.6
Defines the precision and sampling factors of all
component_table() Table A.13
components in the image
Defines weight and gain factors that steer the decod-
weights_table() Table A.16
ing process
extension_marker() Optional extension of the codestream syntax Table A.14
Loop over all slices until all wavelet coefficients of
for(t=0,p=0;!endofimage;t=t+1) { the image have been decoded, where t is the slice
index and p the precinct index
slice_header() Id
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.