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

This document defines the 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 decoding processes 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.

Technologies de l'information — Système de codage d'images léger à faible latence JPEG XS — Partie 1: Système de codage de noyau

General Information

Status
Published
Publication Date
28-Mar-2022
Current Stage
9599 - Withdrawal of International Standard
Start Date
26-Jul-2024
Completion Date
30-Oct-2025
Ref Project

Relations

Standard
ISO/IEC 21122-1:2022 - Information technology — JPEG XS low-latency lightweight image coding system — Part 1: Core coding system Released:3/29/2022
English language
100 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


INTERNATIONAL ISO/IEC
STANDARD 21122-1
Second edition
2022-03
Information technology — JPEG XS
low-latency lightweight image coding
system —
Part 1:
Core coding system
Technologies de l'information — Système de codage d'images léger à
faible latence JPEG XS —
Partie 1: Système de codage de noyau
Reference number
© ISO/IEC 2022
© 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
ii
© ISO/IEC 2022 – 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 . 6
3.3 Symbols . 6
4 Conventions . 9
4.1 Conformance language . 9
4.2 Operators . 9
4.2.1 Arithmetic operators . 9
4.2.2 Logical operators . 10
4.2.3 Relational operators . 10
4.2.4 Precedence order of operators . 10
4.2.5 Mathematical functions . 11
5 Functional concepts . .11
5.1 Sample grid, sampling and components . 11
5.2 Interpretation of CFA data .12
5.3 Wavelet decomposition .12
5.4 Codestream. 13
6 Encoder requirements .13
7 Decoder .13
7.1 Decoding process general provisions . 13
7.2 Decoder requirements .15
Annex A (normative) Codestream syntax .16
Annex B (normative) Image data structures .29
Annex C (normative) Entropy decoding .42
Annex D (normative) Quantization .60
Annex E (normative) Discrete wavelet transformation .64
Annex F (normative) Multiple component transformations .74
Annex G (normative) DC level shifting, non-linear transform and output clipping .85
Annex H (informative) Example weight tables .92
Bibliography . 100
iii
© ISO/IEC 2022 – 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 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 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-1:2019), which has been
technically revised.
The main changes are as follows:
— coding tools for compressing colour filter array images (CFA images) have been added;
— coding tools that enable lossless coding of images with up to 12 bits per sample have been added;
— support for 4:2:0 sampled images has been added.
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.
iv
© ISO/IEC 2022 – 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 patents.
ISO and IEC take no position concerning the evidence, validity and scope of these patent rights.
The holders of these patent rights have assured ISO and IEC that they are willing to negotiate licences
under reasonable and non-discriminatory terms and conditions with applicants throughout the world.
In this respect, the statements of the holders of these patent rights are registered with ISO and IEC.
Information may be obtained from the patent database available at www.iso.org/patents.
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.
v
© ISO/IEC 2022 – All rights reserved

INTERNATIONAL STANDARD ISO/IEC 21122-1:2022(E)
Information technology — JPEG XS low-latency lightweight
image coding system —
Part 1:
Core coding system
1 Scope
This document defines the 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 decoding processes 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 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/
3.1.1
band
input data to a specific wavelet filter type (3.1.58) that contributes to the generation of one of the
components (3.1.14) of the image
3.1.2
band type
single number collapsing the information on the component, and horizontal and vertical wavelet
filter types that are applied in the filter cascade reconstructing spatial image samples from inversely
quantized wavelet coefficients
© ISO/IEC 2022 – All rights reserved

3.1.3
bit
binary choice encoded as either 0 or 1
3.1.4
bitplane
array of bits having all the same significance
3.1.5
bitplane count
number of significant bitplanes of a code group, counting from the LSB up to the most significant, non-
empty bitplane
3.1.6
bitplane count subpacket
subset of a packet which decodes to the bitplane counts of all code groups within a packet, followed by
padding and optional filler bytes
Note 1 to entry: See subclause C.5.3.
3.1.7
byte
group of 8 bits
3.1.8
colour filter array
CFA
rectangular array of sensor elements yielding a 1-component picture where the colour to which a sensor
element is sensitive to depends on the position of the sensor element
3.1.9
codestream
compressed image data representation that includes all necessary data to allow a (full or approximate)
reconstruction of the sample values of a digital image
3.1.10
code group
group of quantization indices in sign-magnitude representation before inverse quantization
3.1.11
coefficient
input value to the inverse wavelet transformation resulting from inverse quantization
3.1.12
coefficient group
number of horizontally adjacent wavelet coefficients from the same band
3.1.13
column
set of vertically aligned precincts
3.1.14
component
two-dimensional array of samples having the same designation such as red, green or blue in the output
or display device
3.1.15
compression
process of reducing the number of bits used to represent source image data
© ISO/IEC 2022 – All rights reserved

3.1.16
continuous-tone image
image whose components have more than one bit per sample
3.1.17
data subpacket
subset of a packet which consists of the quantization index magnitudes, followed by padding and
optional filler bytes
Note 1 to entry: See subclause C.5.4.
3.1.18
deadzone quantizer
quantizer whose zero bucket has a size different from all other buckets
3.1.19
decoder
embodiment of a decoding process
3.1.20
decoding process
process which takes as its input a codestream and outputs a continuous-tone image
3.1.21
decomposition level
set of wavelet coefficients resulting from a particular level of recursive application of a wavelet
transform
3.1.22
downsampling
procedure by which the spatial resolution of a component is reduced
3.1.23
encoder
embodiment of an encoding process.
3.1.24
encoding process
process which outputs compressed image data in the form of a codestream
3.1.25
entropy decoder
embodiment of an entropy decoding procedure
3.1.26
entropy decoding
lossless procedure which recovers the sequence of symbols from the sequence of bits produced by the
entropy encoder
3.1.27
entropy encoder
embodiment of an entropy encoding procedure
3.1.28
entropy encoding
lossless procedure which converts a sequence of input symbols into a sequence of bits such that the
average number of bits per symbol approaches the entropy of the input symbols
© ISO/IEC 2022 – All rights reserved

3.1.29
filler bytes
integer number of bytes a decoder will skip over on decoding without interpreting the values of the
bytes itself
3.1.30
grayscale image
continuous-tone image that has only one component
3.1.31
inverse quantization
inverse procedure to quantization by which the decoder recovers a representation of the coefficients
3.1.32
inverse reversible multi component transformation
inverse RCT
inverse transformation across multiple component sample values located at the same sample grid point
that is invertible without loss
Note 1 to entry: See subclauses F.3 and F.4.
3.1.33
LL band
input to a series of wavelet filters where only inverse low-pass filters are applied in horizontal and
vertical direction
3.1.34
lossless
descriptive term for encoding and decoding processes and procedures in which the output of the
decoding procedure(s) is identical to the input to the encoding procedure(s)
3.1.35
lossless coding
mode of operation which refers to any one of the coding processes defined in this document in which all
of the procedures are lossless
3.1.36
lossy
descriptive term for encoding and decoding processes which are not lossless
3.1.37
packet
segment of the codestream containing entropy coded information on a single precinct, line and a subset
of the bands within this precinct and line
3.1.38
padding
bits within the codestream whose only purpose is to align syntax elements to byte boundaries and that
carry no information
3.1.39
precinct
collection of quantization indices of all bands contributing to a given spatial region of the image
3.1.40
precision
number of bits allocated to a particular sample, coefficient, or other binary numerical representation
3.1.41
procedure
set of steps which accomplishes one of the tasks which comprise an encoding or decoding process
© ISO/IEC 2022 – All rights reserved

3.1.42
quantization
method of reducing the precision of the individual coefficients
3.1.43
quantization index
input to the inverse quantization process which reconstructs the quantization index to a wavelet
coefficient
3.1.44
quantization index magnitude
absolute value of a quantization index
3.1.45
sample
one element in the two-dimensional image array which comprises a component
3.1.46
sample grid
common coordinate system for all samples of an image, 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.47
sign subpacket
subset of a packet that consists of the sign information of all non-zero quantization indices within a
packet, followed by padding and optional filler bytes
Note 1 to entry: See subclause C.5.5.
3.1.48
significance
attribute of code groups that applies if, depending on the Run Mode flag in the picture header, either at
least one of coefficients in the code group is non-zero, or the bitplane count prediction residual of the
code group is non-zero
3.1.49
significance group
group of a horizontally adjacent code groups sharing the same significance information in the
significance subpacket
3.1.50
significance subpacket
subset of a packet that identifies which significance groups within a packet are insignificant, followed
by padding and optional filler bytes
Note 1 to entry: see subclause C.5.2
3.1.51
slice
integral number of precincts whose wavelet coefficients can be entropy-decoded independently
3.1.52
star-tetrix
decorrelation transformation that combines a spatial with an inter-component decorrelation
transformation particularly tuned for CFA pattern compression
Note 1 to entry: see subclause F.5
© ISO/IEC 2022 – All rights reserved

3.1.53
subpacket
substructure of a packet containing information of one or multiple bands of one line of a single precinct
3.1.54
super pixel
2×2 arrangement of sensor elements in a CFA pattern array containing at least one sensor element for
each colour filter type
3.1.55
truncation position
number of least significant bitplanes not included in the quantization index of a wavelet coefficient
3.1.56
uniform quantizer
quantizer whose buckets are all of equal size
3.1.57
upsampling
procedure by which the spatial resolution of a component is increased
3.1.58
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
JPEG XS informal name of this standard where XS stands for “extra speed”
LSB least significant bit
MSB most significant bit
3.3 Symbols
B[c] bit precision of component c
β wavelet filter type
b band type
b [β,i] band existence flag for filter type β in component i. 1 if the filter exists, 0 otherwise.
x
b' [b] band existence flag for band type b. 1 if the filter exists, 0 otherwise.
x
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
C colour transformation CFA pattern type derived from the component registration
t
© ISO/IEC 2022 – All rights reserved

C colour transformation reflection and extension flags
f
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
DCO DC offset
d [β,i] horizontal decomposition level of wavelet filter type β of component i
x
d [β,i] vertical decomposition level of wavelet filter type β of component i
y
δ [c] horizontal position of component c in a CFA super pixel
x
δ [c] vertical position of component c in a CFA super pixel
y
E exponent of the slope of the linear region of the extended non-linearity
e colour transformation exponent of first chroma component
e colour transformation exponent of second chroma component
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 [β,k] height of filter type β of component k 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
k[δ , δ ] Component within CFA super pixel at position δ , δ
x y x y
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
L [p,s] size of the bitplane count subpacket of precinct p and packet s in bytes
cnt
L [p,s] size of the data subpacket of precinct p and packet s in bytes
dat
Lh long header flag in in the picture header, set if long headers are enforced, reset otherwise
L [p] length of the entropy coded data in precinct p
prc
L [p,s] size of the sign subpacket of precinct p and packet s in bytes
sgn
© ISO/IEC 2022 – All rights reserved

L [p,s] size of the significance subpacket of precinct p and packet s in bytes
sig
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 maximal number of horizontal decomposition levels
L,x
N' [i] number of horizontal decomposition levels of component i
L,x
N maximal number of vertical decomposition levels over all components
L,y
N' [i] number of vertical decomposition levels of component i
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 com-
ponent 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
Rl raw-mode selection per packet flag
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
Sd number of components for which wavelet decomposition is suppressed
© ISO/IEC 2022 – All rights reserved

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.
T1 first threshold of the extended non-linearity
T2 second threshold of the extended non-linearity
T[p,b] truncation position of precinct p and band b
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 [β,k] width of filter type β of component k 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
Xcrg[c] horizontal component registration of component c relative to the sample grid
Ycrg[c] vertical component registration of component c relative to the sample grid
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
© ISO/IEC 2022 – All rights reserved

& bitwise AND operation
+ 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
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
mod modulo (remainder) left to right
+, − addition and subtraction left to right
© ISO/IEC 2022 – All rights reserved

<<, >> left shift and right shift left to right
< , >, ≤, ≥ relational left to right
& bitwise AND left to right
4.2.5 Mathematical functions
⎾x⏋ 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| absolute value of x, |x| equals –x for x < 0, otherwise x
log (x) logarithm to the basis of 2, e.g. log (1)=0 and log (2)=1
2 2 2
sign(x) sign of x, 0 if x is 0, +1 if x is positive, -1 if x is negative
square root of x, i.e. non-negative number y such that y×y=x
x
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
max(a,b) a if a>b, otherwise b
min (x ) minimum of a sequence of numbers {x } enumerated by the index i
i i i
min(a,b) a if a 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] respectively s [i] where i enumerates the components. Annex B provides further specifications on
x 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. The sampling grid
provides only an abstract coordinate system for the computation of positions and dimensions of
codestream elements.
© ISO/IEC 2022 – All rights reserved

5.2 Interpretation of CFA data
This document defines coding tools and signalling for compression of Bayer-type CFA image data.
According to this specification, each sampling grid point represents a super pixel of four sensor elements
containing at least one sample of each component. Thus CFA data is interpreted as an image having
four components, where each sampling grid point describes four spatially disjoint sensor elements (one
element per channel).
Squares represent individual sensor elements and circles represent sampling grid points. Groups of four sensor
elements overlapping with the same sampling grid point form one super pixel.
Figure 1 — Example of the interpretation of a GRBG Bayer-type CFA image
Moreover, regardless of the CFA sensor spatial subpixel arrangement, the Star-Tetrix colour transform
of this document defines a strict order on the components assigning the red channel to component 0,
the green channels to components 1 and 2, and the blue channel to component 3. The spatial subpixel
arrangement is signalled by the CRG marker. Figure 1 shows only one of the four potential subpixel
arrangements of a Bayer-type CFA.
5.3 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. Note, however, that 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.
© ISO/IEC 2022 – All rights reserved

5.4 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.
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 text 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 2 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 2022 – All rights reserved

Figure 2 — 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 2.
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
th
significant 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 E.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].
© ISO/IEC 2022 – 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], an optional non-linear
transformation is applied, 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 procedure is specified in Annex G.
x y
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.
Decoder conformance and test procedures to test for conformance are specified in ISO/IEC 21122-4.
There is no normative or required specification for the particular internal steps or ordering of internal
operations to be performed within the decoder that is 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 up to a
conformance-level dependent error bound that is specified in ISO/IEC 21122-4. 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 2022 – All rights reserved

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 and 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 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 need 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
© ISO/IEC 2022 – 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...