background image
ISO/IEC 10918-1 : 1993(E)
D.1.3
Encoder code register conventions
The flow charts in this annex assume the register structures for the encoder as shown in Table D.2.
Table D.2 ­ Encoder register connections
MSB
LSB
C-register
0000cbbb,
bbbbbsss,
xxxxxxxx,
xxxxxxxx
A-register
00000000,
00000000,
aaaaaaaa,
aaaaaaaa
The "a" bits are the fractional bits in the A-register (the current probability interval value) and the "x" bits are the
fractional bits in the code register. The "s" bits are optional spacer bits which provide useful constraints on carry-over, and
the "b" bits indicate the bit positions from which the completed bytes of data are removed from the C-register. The "c" bit
is a carry bit. Except at the time of initialization, bit 15 of the A-register is always set and bit 16 is always clear (the LSB
is bit 0).
These register conventions illustrate one possible implementation. However, any register conventions which allow
resolution of carry-over in the encoder and which produce the same entropy-coded segment may be used. The handling of
carry-over and the byte stuffing following X'FF' will be described in a later part of this annex.
D.1.4
Code_1(S) and Code_0(S) procedures
When a given binary decision is coded, one of two possibilities occurs ­ either a 1-decision or a 0-decision is coded.
Code_1(S) and Code_0(S) are shown in Figures D.1 and D.2. The Code_1(S) and Code_0(S) procedures use probability
estimates with a context-index S. The context-index S is determined by the statistical model and is, in general, a function
of the previous coding decisions; each value of S identifies a particular conditional probability estimate which is used in
encoding the binary decision.
TISO1800-93/d039
Code_1(S)
No
Yes
MPS(S) = 1
?
Code_LPS(S)
Code_MPS(S)
Done
Figure D.1 ­ Code_1(S) procedure
Figure D.1 [D39], = 9 cm = 352.%
56
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]