background image
ISO/IEC 10918-1 : 1993(E)
The probability estimation tables are defined by Table D.3. The statistics areas are initialized to an MPS sense of 0 and a
Qe index of zero as defined by Table D.3. The stack count (ST) is cleared, the code register (C) is cleared, and the interval
register is set to X'10000'. The counter (CT) is set to 11, reflecting the fact that when A is initialized to X'10000' three
spacer bits plus eight output bits in C must be filled before the first byte is removed. Note that BP is initialized to point to
the byte before the start of the entropy-coded segment (which is at BPST). Note also that the statistics areas are initialized
for all values of context-index S to MPS(S) = 0 and Index(S) = 0.
NOTE ­ Although the probability interval is initialized to X'10000' in both Initenc and Initdec, the precision of
the probability interval register can still be limited to 16 bits. When the precision of the interval register is 16 bits, it is initialized to
zero.
D.1.8
Termination of encoding
The Flush procedure is used to terminate the arithmetic encoding procedures and prepare the entropy-coded segment for
the addition of the X'FF' prefix of the marker which follows the arithmetically coded data. Figure D.13 shows this flush
procedure. The first step in the procedure is to set as many low order bits of the code register to zero as possible without
pointing outside of the final interval. Then, the output byte is aligned by shifting it left by CT bits; Byte_out then removes
it from C. C is then shifted left by 8 bits to align the second output byte and Byte_out is used a second time. The
remaining low order bits in C are guaranteed to be zero, and these trailing zero bits shall not be written to the entropy-
coded segment.
TISO1130-93/d051
Flush
Done
Byte_out
C = SLL C 8
C = SLL C CT
Clear_final_bits
Byte_out
Discard_final_zeros
Figure D.13 ­ Flush procedure
Figure D.13 [D51], = 15.5 cm = 606.%
CCITT Rec. T.81 (1992 E)
67
[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]