background image
ISO/IEC 10918-1 : 1993(E)
Annex H
Lossless mode of operation
(This annex forms an integral part of this Recommendation | International Standard)
ISO/IEC 10918-1 : 1993(E)
CCITT Rec. T.81 (1992 E)
This annex provides a functional specification of the following coding processes for the lossless mode of operation:
1)
lossless processes with Huffman coding;
2)
lossless processes with arithmetic coding.
For each of these, the encoding process is specified in H.1, and the decoding process is specified in H.2. The functional
specification is presented by means of specific procedures which comprise these coding processes.
NOTE ­ There is no requirement in this Specification that any encoder or decoder which embodies one of the above-named
processes shall implement the procedures in precisely the manner specified in this annex. It is necessary only that an encoder or decoder
implement the function specified in this annex. The sole criterion for an encoder or decoder to be considered in compliance with this
Specification is that it satisfy the requirements given in clause 6 (for encoders) or clause 7 (for decoders), as determined by the
compliance tests specified in Part 2.
The processes which provide for sequential lossless encoding and decoding are not based on the DCT. The processes used
are spatial processes based on the coding model developed for the DC coefficients of the DCT. However, the model is
extended by incorporating a set of selectable one- and two-dimensional predictors, and for interleaved data the ordering of
samples for the one-dimensional predictor can be different from that used in the DCT-based processes.
Either Huffman coding or arithmetic coding entropy coding may be employed for these lossless encoding and decoding
processes. The Huffman code table structure is extended to allow up to 16-bit precision for the input data. The arithmetic
coder statistical model is extended to a two-dimensional form.
H.1
Lossless encoder processes
H.1.1
Lossless encoder control procedures
Subclause E.1 contains the encoder control procedures. In applying these procedures to the lossless encoder, the data unit
is one sample.
Input data precision may be from 2 to 16 bits/sample. If the input data path has different precision from the input data, the
data shall be aligned with the least significant bits of the input data path. Input data is represented as unsigned integers
and is not level shifted prior to coding.
When the encoder is reset in the restart interval control procedure (see E.1.4), the prediction is reset to a default value. If
arithmetic coding is used, the statistics are also reset.
For the lossless processes the restart interval shall be an integer multiple of the number of MCU in an MCU-row.
H.1.2
Coding model for lossless encoding
The coding model developed for encoding the DC coefficients of the DCT is extended to allow a selection from a set of
seven one-dimensional and two-dimensional predictors. The predictor is selected in the scan header (see Annex B). The
same predictor is used for all components of the scan. Each component in the scan is modeled independently, using
predictions derived from neighbouring samples of that component.
H.1.2.1
Prediction
Figure H.1 shows the relationship between the positions (a, b, c) of the reconstructed neighboring samples used for
prediction and the position of x, the sample being coded.
132
CCITT Rec. T.81 (1992 E)
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186]