background image
ISO/IEC 10918-1 : 1993(E)
Non-zero coefficients with zero history are coded with a composite code of the form:
HUFFCO(RRRRSSSS) + additional bit (rule a) + correction bits (rule b)
In addition whenever zero runs are coded with ZRL or EOBn codes, correction bits for those coefficients with non-zero
history contained within the zero run are appended according to rule b above.
For the Huffman coding version of Encode_AC_Coefficients_SA the EOB is defined to be the position of the last point
transformed coefficient of magnitude 1 in the band. If there are no coefficients of magnitude 1, the EOB is defined to be
zero.
NOTE ­ The definition of EOB is different for Huffman and arithmetic coding procedures.
In Figures G.7 and G.8 BE is the count of buffered correction bits at the start of coding of the block. BE is initialized to
zero at the start of each restart interval. At the end of each restart interval any remaining buffered bits are appended to the
bit stream following the last EOBn Huffman code and associated appended bits.
In Figures G.7 and G.9, BR is the count of buffered correction bits which are appended to the bit stream according to rule
b. BR is set to zero at the beginning of each Encode_AC_Coefficients_SA. At the end of each restart interval any
remaining buffered bits are appended to the bit stream following the last Huffman code and associated appended bits.
G.1.3
Progressive encoding procedures with arithmetic coding
G.1.3.1 Progressive encoding of DC coefficients with arithmetic coding
The first scan for a given component shall encode the DC coefficient values using the procedures described in F.1.4.1. If
the successive approximation bit position parameter is not zero, the coefficient values shall be reduced in precision by the
point transform described in Annex A before coding.
In subsequent scans using successive approximation the least significant bits shall be coded as binary decisions using a
fixed probability estimate of 0.5 (Qe
=
X'5A1D', MPS
=
0).
G.1.3.2 Progressive encoding of AC coefficients with arithmetic coding
Except for the point transform scaling of the DCT coefficients and the grouping of the coefficients into bands, the first
scan(s) of successive approximation is identical to the sequential encoding procedure described in F.1.4. If Kmin is
equated to Ss, the index of the first AC coefficient index in the band, the flow chart shown in Figure F.5 applies. The
EOB decision in that figure refers to the "end-of-band" rather than the "end-of-block". For the arithmetic coding version
of Encode_AC_Coefficients_SA (and all other AC coefficient coding procedures) the EOB is defined to be the position
following the last non-zero coefficient in the band.
NOTE - The definition of EOB is different for Huffman and arithmetic coding procedures.
The statistical model described in F.1.4 also holds. For this model the default value of Kx is 5. Other values of Kx may be
specified using the DAC marker code (Annex B). The following calculation for Kx has proven to give good results for 8-
bit precision samples:
Kx
=
Kmin
+
SRL (8
+
Se ­ Kmin) 4
This expression reduces to the default of Kx
=
5 when the band is from index 1 to index 63.
126
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]