CONTENTS

 0     Introduction    vii
        0.1     Interpretation and use of the requirements   vii
                  0.1.1     Subject matter for JBIG2 coding    vii
                  0.1.2     Relationship between segments and documents   viii
                  0.1.3     Structure and use of segments   viii
                  0.1.4     Internal representations   viii
                  0.1.5     Decoding results   x
                  0.1.6     Decoding procedures   x
        0.2     Lossy coding    xi
                  0.2.1     Symbol coding    xi
                  0.2.2     Generic coding    xi
                  0.2.3     Halftone coding    xii
                  0.2.4     Consequences of inadequate segmentation    xii
 1     Scope
 2     Normative References
 3     Terms and Definitions
 4     Symbols and Abbreviations
        4.1     Abbreviations
        4.2     Symbol definitions
        4.3     Operator definitions
 5     Conventions
        5.1     Typographic conventions
        5.2     Binary notation
        5.3     Hexadecimal notation
        5.4     Integer value syntax
                  5.4.1     Bit packing
                  5.4.2     Multi-byte values
                  5.4.3     Bit numbering
                  5.4.4     Signedness
        5.5     Array notation and conventions
        5.6     Image and bitmap conventions
 6     Decoding Procedures
        6.1     Introduction to decoding procedures
        6.2     Generic region decoding procedure
                  6.2.1     General description
                  6.2.2     Input parameters
                  6.2.3     Return value
                  6.2.4     Variables used in decoding
                  6.2.5     Decoding using a template and arithmetic coding
                  6.2.6     Decoding using MMR coding
        6.3     Generic Refinement Region Decoding Procedure
                  6.3.1     General description
                  6.3.2     Input parameters
                  6.3.3     Return value
                  6.3.4     Variables used in decoding
                  6.3.5     Decoding using a template and arithmetic coding
        6.4     Text Region Decoding Procedure
                  6.4.1     General description
                  6.4.2     Input parameters
                  6.4.3     Return value
                  6.4.4     Variables used in decoding
                  6.4.5     Decoding the text region
                  6.4.6     Strip delta T
                  6.4.7     First symbol instance S coordinate
                  6.4.8     Subsequent symbol instance S coordinate
                  6.4.9     Symbol instance T coordinate
                 6.4.10     Symbol instance symbol ID
                 6.4.11     Symbol instance bitmap
        6.5     Symbol Dictionary Decoding Procedure
                  6.5.1     General description
                  6.5.2     Input parameters
                  6.5.3     Return value
                  6.5.4     Variables used in decoding
                  6.5.5     Decoding the symbol dictionary
                  6.5.6     Height class delta height
                  6.5.7     Delta width
                  6.5.8     Symbol bitmap
                  6.5.9     Height class collective bitmap
                 6.5.10     Exported symbols
        6.6     Halftone Region Decoding Procedure
                  6.6.1     General description
                  6.6.2     Input parameters
                  6.6.3     Return value
                  6.6.4     Variables used in decoding
                  6.6.5     Decoding the halftone region
        6.7     Pattern Dictionary Decoding Procedure
                  6.7.1     General description
                  6.7.2     Input parameters
                  6.7.3     Return value
                  6.7.4     Variables used in decoding
                  6.7.5     Decoding the pattern dictionary
 7     Control Decoding Procedure
        7.1     General description
        7.2     Segment header syntax
                  7.2.1     Segment header fields
                  7.2.2     Segment number
                  7.2.3     Segment header flags
                  7.2.4     Referred-to segment count and retention flags
                  7.2.5     Referred-to segment numbers
                  7.2.7     Segment data length
                  7.2.8     Segment header example
        7.3     Segment types
                  7.3.1     Rules for segment references
        7.4     Segment syntaxes
                  7.4.1     Region segment information field
                  7.4.2     Symbol dictionary segment syntax
                  7.4.3     Text region segment syntax
                  7.4.4     Pattern dictionary segment syntax
                  7.4.5     Halftone region segment syntax
                  7.4.6     Generic region segment syntax
                  7.4.7     Generic refinement region syntax
                  7.4.8     Page information segment syntax

                 7.4.10     End of stripe segment syntax
                 7.4.11     End of file segment syntax
                 7.4.12     Profiles segment syntax
                 7.4.13     Code table segment syntax
                 7.4.14     Extension segment syntax
                 7.4.15     Defined extension types
        8.1     Decoder model
        8.2     Page image composition
Annex  A  –  Arithmetic Integer Decoding Procedure
        A.1     General description
        A.2     Procedure for decoding values (except IAID)
        A.3     The IAID decoding procedure
Annex  B  –  Huffman Table Decoding Procedure
        B.1     General description
        B.2     Code table structure
                  B.2.1     Code table flags
                  B.2.2     Code table lowest value
                  B.2.3     Code table highest value
        B.3     Assigning the prefix codes
        B.4     Using a Huffman table
        B.5     Standard Huffman tables
Annex   C  –  Gray-scale Image Decoding Procedure
        C.1     General description
        C.2     Input parameters
        C.3     Return value
        C.4     Variables used in decoding
        C.5     Decoding the gray-scale image
Annex  D  –  File Formats
        D.1     Sequential organisation
        D.2     Random-access organisation
        D.3     Embedded organisation
        D.4     File header syntax
                  D.4.1     ID string
                  D.4.2     File header flags
Annex  E  –  Arithmetic Coding
        E.1     Binary encoding
                  E.1.1     Recursive interval subdivision
                  E.1.2     Coding conventions and approximations
        E.2    Description of the arithmetic encoder
                  E.2.1     Encoder code register conventions
                  E.2.2     Encoding a decision (ENCODE)
                  E.2.3     Encoding a 1 or 0 (CODE1 and CODE0)
                  E.2.4     Encoding an MPS or LPS (CODEMPS and CODELPS)
                  E.2.5     Probability estimation
                  E.2.6     Renormalisation in the encoder (RENORME)
                  E.2.7     Compressed data output (BYTEOUT)
                  E.2.8     Initialisation of the encoder (INITENC)
                  E.2.9     Termination of encoding (FLUSH)
                 E.2.10      Minimisation of the compressed data

Page
        E.3     Arithmetic decoding procedure
                  E.3.1     Decoder code register conventions
                  E.3.2     Decoding a decision (DECODE)
                  E.3.3     Renormalisation in the decoder (RENORMD)
                  E.3.4     Compressed data input (BYTEIN)
                  E.3.5     Initialisation of the decoder (INITDEC)
                  E.3.6     Resynchronisation of the decoder
                  E.3.7     Resetting arithmetic coding statistics
                  E.3.8     Saving arithmetic coding statistics
Annex F – Profiles
Annex G – Arithmetic Decoding Procedure (Software Conventions)
Annex H – Datastream Example and Test Sequence
        H.1     Datastream example
        H.2     Test sequence for arithmetic coder
Bibliography