background image
ISO/IEC 10918-1 : 1993(E)
Figure G.5 [99] = 7 cm = 273 %
TISO1620-93/d100
Encode_R_ZZ(K)
SSSS = CSIZE(ZZ(K))
I = (16 × R) + SSSS
Append EHUFSI(I)
bits of EHUFCO(I)
ZZ(K) < 0
?
Yes
No
ZZ(K) = ZZ(K) ­ 1
Append SSSS low order
bits of ZZ(K)
R = 0
Done
Figure G.6 ­ Encoding of the zero run and non-zero coefficient
Figure G.6 [D100] = 12.5 cm = 489 %
G.1.2.3 Coding model for subsequent scans of successive approximation
The Huffman coding structure of the subsequent scans of successive approximation for a given component is similar to the
coding structure of the first scan of that component.
The structure of the AC code table is identical to the structure described in G.1.2.2. Each non-zero point transformed
coefficient that has a zero history (i.e. that has a value
±
1, and therefore has not been coded in a previous scan) is defined
by a composite 8-bit run length-magnitude value of the form:
RRRRSSSS
The four most significant bits, RRRR, give the number of zero coefficients that are between the current coefficient and the
previously coded coefficient (or the start of band). Coefficients with non-zero history (a non-zero value coded in a
previous scan) are skipped over when counting the zero coefficients. The four least significant bits, SSSS, provide the
magnitude category of the non-zero coefficient; for a given component the value of SSSS can only be one.
The run length-magnitude composite value is Huffman coded and each Huffman code is followed by additional bits:
a)
One bit codes the sign of the newly non-zero coefficient. A 0-bit codes a negative sign; a 1-bit codes a
positive sign.
b)
For each coefficient with a non-zero history, one bit is used to code the correction. A 0-bit means no
correction and a 1-bit means that one shall be added to the (scaled) decoded magnitude of the coefficient.
CCITT Rec. T.81 (1992 E)
125
[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]