background image
ISO/IEC 10918-1 : 1993(E)
K.8.2
Quantized AC prediction
The prediction equations can be mapped to a form which uses quantized values of the DC coefficients and which
computes quantized AC coefficients using integer arithmetic. The quantized DC coefficients need to be scaled, however,
such that the predicted coefficients have fractional bit precision.
First, the prediction equation coefficients are scaled by 32 and rounded to the nearest integer. Thus,
1,13885
×
32
=
36
0,27881
×
32
=
3
9
0,16213
×
32
=
3
5
The multiplicative factors are then scaled by the ratio of the DC and AC quantization factors and rounded appropriately.
The normalization defined for the DCT introduces another factor of 8 in the unquantized DC values. Therefore, in terms
of the quantized DC values, the predicted quantized AC coefficients are given by the equations below. Note that if (for
example) the DC values are scaled by a factor of 4, the AC predictions will have 2 fractional bits of precision relative to
the quantized DCT coefficients.
QAC
01
=
( (R
d
×
Q
01
)
+
(36
×
Q
00
×
(QDC
4
­ QDC
6
)))/(256
×
Q
01
)
QAC
10
=
( (R
d
×
Q
10
)
+
(36
×
Q
00
×
(QDC
2
­ QDC
8
)))/(256
×
Q
10
)
QAC
20
=
( (R
d
×
Q
20
)
+
( 9
×
Q
00
×
(QDC
2
+
QDC
8
­ 2
×
QDC
5
)))/(256
×
Q
20
)
QAC
11
=
( (R
d
×
Q
11
)
+
( 5
×
Q
00
×
((QDC
1
­ QDC
3
) ­ (QDC
7
­ QDC
9
))))/(256
×
Q
11
)
QAC
02
=
( (R
d
×
Q
02
)
+
( 9
×
Q
00
×
(QDC
4
+
QDC
6
­ 2
×
QDC
5
)))/(256
×
Q
02
)
where QDC
x
and QAC
xy
are the quantized and scaled DC and AC coefficient values. The constant Rd is added to get a
correct rounding in the division. Rd is 128 for positive numerators, and ­128 for negative numerators.
Predicted values should not override coded values. Therefore, predicted values for coefficients which are already non-zero
should be set to zero. Predictions should be clamped if they exceed a value which would be quantized to a non-zero value
for the current precision in the successive approximation.
K.9
Modification of dequantization to improve displayed image quality
For a progression where the first stage successive approximation bit, Al, is set to 3, uniform quantization of the DCT gives
the following quantization and dequantization levels for a sequence of successive approximation scans, as shown in
Figure K.8:
­8
r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t
_ r _ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r ¯ t ¯ r
­7
­6
­5
­4
­3
­2
­1
0
+1
+2
+3
+4
+5
+6
+7
+8
0
r ¯ t
r ¯ t
t ¯ r ¯ x
1
2
r ¯ t
r
t ¯ r
3
x ¯
r ¯ t
x ¯
r ¯ t
x ¯
r
t ¯ r
t ¯ r ¯ x
t ¯ r ¯ x
r ¯ t
x
r ¯ t
r
t ¯ r
t ¯ r
x
T0812990-93/d118
Al
F i gu r e K .8 ­ I l l u st r at i on of t w o r econ st r u ct i on st r at egi es
Quantized DCT coefficient value
Figure K.8 [D118] = 6 cm = 234 %
The column to the left labelled "Al" gives the bit position specified in the scan header. The quantized DCT coefficient
magnitudes are therefore divided by 2
Al
during that scan.
CCITT Rec. T.81 (1992 E)
177
[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]