1、INTERNATIONAL TELECOMMUN CATION UN ION ITU-T TELECOMMUNICATION STANDARDIZATION SECTOR OF TU T.87 (06/98) SERIES T: TERMINALS FOR TELEMATIC SERVICES Information technology - Lossless and near-lossless compression of continuous-tone still images - Baseline ITU-T Recommendation T.87 (Previously CCITT R
2、ecommendation) STD=ITU-T RECMN T-87-ENGL 1998 II 4862593 0663738 038 5 ITU-T T-SERIES RECOMMENDATIONS TERMINALS FOR TELEMATIC SERVICES For further details, please refer to ITU-T List of Reconinieridatioris. STD-ITU-T RECMN T-87-ENGL 3998 W 48b259L Ob63739 T74 INTERNATIONAL STANDARD 14495-1 ITU-T REC
3、OMMENDATION T.87 INFORMATION TECHNOLOGY - LOSSLESS AND NEAR-LOSSLESS COMPRESSION OF CONTINUOUS-TONE STILL IMAGES - BASELINE Summary This ITU-T Recommendation I ISO/IEC International Standard defines a set of lossless (bit-preserving) and nearly lossless (where the error for each reconstructed sample
4、 is bounded by a pre-defined value) compression methods for coding continuous-tone, gray-scale, or colour digital still images. This ITU-T Recommendation I ISOAEC International Standard: - - - - specifies a process for converting source image data to compressed image data; specifies processes for co
5、nverting compressed image data to reconstructed image data; specifies coded representations for compressed image data; provides guidance on how to implement these processes in practice. Source The ITU-T Recommendation T.87 was approved on the 18th of June 1998. The identical text is also published a
6、s ISOAEC International Standard 14495-1. ITU-T Rec. T.87 (1998 E) i FOREWORD ITU (International Telecommunication Union) is the United Nations Specialized Agency in the field of telecommuni- cations. The ITU Telecommunication Standardization Sector (ITU-T) is a permanent organ of the ITU. The ITU-T
7、is responsible for studying technical, operating and tariff questions and issuing Recommendations on them with a view to standardizing telecommunications on a worldwide basis. The World Telecommunication Standardization Conference (WTSC), which meets every four years, establishes the topics for stud
8、y by the ITU-T Study Groups which, in their turn, produce Recommendations on these topics. The approval of Recommendations by the Members of the ITU-T is covered by the procedure laid down in WTSC Resolution No. 1. In some areas of information technology which fall within ITU-Ts purview, the necessa
9、ry standards are prepared on a collaborative basis with IS0 and IEC. NOTE In this Recommendation the term recognized operating agem) (RUA) includes any individual, company, corporation or governmental organization that operates a public correspondence service. The terms Administrarion, RUA and publi
10、c correspondence are defined in the Consrirurior2 of the ITU (Geneva, 1992). INTELLECTUAL PROPERTY RIGHTS The ITU draws attention to the possibility that the practice or implementation of this Recommendation may involve the use of a claimed Intellectual Property Right. The ITU takes no position conc
11、erning the evidence, validity or applicability of claimed Intellectual Property Rights, whether asserted by ITU members or others outside of the Recommendation development process. As of the date of approval of this Recommendation, the ITU had not received notice of intellectual property, protected
12、by patents, which may be required to implement this Recommendation. However, implementors are cautioned that this may not represent the latest information and are therefore strongly urged to consult the TSB patent database. O ITU 1999 All rights reserved. No part of this publication may be reproduce
13、d or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from the ITU. 11 ITU-T Rec. T.87 (1998 E) STDmITU-T RECMN T-87-ENGL 1998 W 4862591 0661743 b22 CONTENTS Page 1 Scope 1 2 Normative references 1 2.1 Identical Recom
14、mendations I International Standards . 1 2.2 Additional references . 1 2 . 2 3 Definitions, abbreviations, symbols and conventions . 3.1 Definitions . 3.2 Abbreviations . 4 3.3 Symbols 5 4 General description 4.1 Purpose 4.2 Coding principles . 4.3 Source image . 4.4 Encodin0 rocess OP 4.5 Decoding
15、process 4.6 Coding of multiple component images 4.7 Compressed image data . 4.8 Interchange format 7 7 7 8 9 IO 10 10 10 11 5 Interchange format requirements . . 6 Encoder requirements . 11 7 Decoder requirements . . 11 8 Conformance testing . 8.2 Encoder conformance tests. 8.3 Decoder conformance t
16、ests . . Annex A - Encoding procedures for a single component . A. 1 A.2 Initialisations and conventions A.3 Context determination A.4 Prediction Coding parameters and compressed image data AS Prediction error encoding . A.6 Update variables . A.1 Run mode . A.8 Flow of encoding procedures 12 12 12
17、12 16 16 16 18 19 21 22 23 26 Annex B - Multi-component images 28 B. 1 Introduction . 28 B.2 Line interleaved mode . 28 B.3 Sample interleaved mode 29 B.4 Minimum Coded Unit (MCU) . 30 31 Annex C - Compressed data format . C. 1 General aspects of the compressed data format specification . 31 C.3 Abb
18、reviated format for compressed image data 37 C.4 Abbreviated format for table-specification data . 37 C.2 General JPEG-LS coding syntax . 3 1 . ITU-T Rec. T.87 (1998 E) 111 Annex D . Control procedures D.l Control procedure for encoding an image . D.2 D.3 D.4 D.5 Control procedure for encoding a fra
19、me . Control procedure for encoding a scan Control procedure for encoding a restart interval Control procedure for encoding a Minimum Coded Unit (MCU) . Annex E - Conformance Tests E.l Test images Annex F - Decoding procedures . F . 1 Process flow Annex G - Description of the coding process . . G.l
20、Context modelling . . G.2 Encoding in the regular coding mode . . G.3 Encoding in t Annex H - Examples and guidelines H.l Introduction . . H.2 Example of h am H.3 Detailed coding example H.5 H.4 Example image data . Use of SPIFF with JPEG-LS compressed image data . Annex I - Bibliography Included di
21、skette: - JPEG-LS reference implementation - - JPEG-LS conformance testing image set Auxiliary programs and examples . Page 38 38 38 38 40 40 42 42 45 45 47 47 48 50 51 51 51 51 57 63 65 iv ITU-T Rec . T.87 (1998 E) - - . STD.1TIJ-T RECMN T*B7-ENGL 1778 48bZ591 OLb1743 4TC ISO/IEC 14495-1 : 1999 (E)
22、 INTERNATIONAL STANDARD ITU-T RECOMMENDATION INFORMATION TECHNOLOGY - LOSSLESS AND NEAR-LOSSLESS COMPRESSION OF CONTINUOUS-TONE STILL IMAGES - BASELINE 1 Scope This Recommendation I International Standard defines a set of lossless (bit-preserving) and nearly lossless (where the error for each recons
23、tructed sample is bounded by a pre-defined value) compression methods for coding continuous- tone, gray-scale, or colour digital still images. This Recommendation I International Standard - - - - specifies a process for converting source image data to compressed image data; specifies processes for c
24、onverting compressed image data to reconstructed image data; specifies coded representations for compressed image data; provides guidance on how to implement these processes in practice. 2 Normative references The following Recommendations and International Standards contain provisions which, throug
25、h references in this text, constitute provisions of this Recommendation I International Standard. At the time of publication, the editions indicated were valid. All Recommendations and Standards are subject to revision, and parties to agreements based on this Recommendation I International Standard
26、are encouraged to investigate the possibility of applying the most recent edition of the Recommendations and Standards listed below. Members of IEC and IS0 maintain registers of currently valid International Standards. The Telecommunication Standardization Bureau of the ITU maintains a list of the c
27、urrently valid ITU-T Recommendations. 2.1 Identical Recommendations I International Standards - CCITT Recommendation T.8 1 (1 992) I ISO/iEC 109 1 8- 1 : 1994, Irformatiori technology - Digital compression and coding of continuous-tone still images: Requirements and guidelines. - ITU-T Recommendatio
28、n T.83 (1994) I ISO/IEC 1091 8-2: 1995, Informatiori technology - Digital - ITU-T Recommendation T.84 (i 996)l ISO/IEC 109 18-3: 1997, Information technology - Digital I ISO/IEC 109 18-3/Amd. 1 I, Informution technology - Digital compression and coding of continuous-tone still images: Compliance tes
29、ting. compression and coding of continuous-tone still images: Extensions. ITU-T Recommendation T.84/Amd. 1 compression and coding of continuous-tone still images: Extensions -Amendment i. - 2.2 Additional references - ISOiEC 646: 1991, Information technology - IS0 7-bit coded character set for infor
30、mation interchange - IS0 5807: 1985, Information processing - Documentation symbols and conventions for data, program and system flowcharts, program network charts and system resources charts. ISODEC 9899: 1990, Programming languages - C. - Currently at the stage of draft. ITU-T Rec. T.87 (1998 E) 1
31、 STD-ITU-T RECMN T.87-ENGL 3998 48b259b Obb37Li4 331 ISO/IEC 14495-1 : 1999 (E) 3 Definitions, abbreviations, symbols and conventions 3.1 Definitions For the purposes of this Recommendation I International Standard, the following definitions apply. 3.1.1 L i 1, floor: Indicates the largest integer n
32、ot exceeding i. 3.1.2 r i 1, ceiling: Indicates the smallest integer not exceeded by i. 3.1.3 abs(i): The absolute value of i : -i if i j, j otherwise. 3.1.48 min(ij): The smallest of i or j : i if i Right CI a) Source image with multiple components Bottom T0828130-98/d02 b) Characteristics of an im
33、age component Figure 2 - Source image characteristics 4.4 Encoding process 4.4.1 Context modelling - Basics The encoding process is described in outline below. The encoding process is specified in Annexes A, B, and D. An informative Annex, G, is included for additional explanation. In this Recommend
34、ation I International Standard, the modelling approach used is based on the notion of “context“. In context modelling, the encoding of each sample value is performed by conditioning on a small number of neighbouring samples. The context modelling procedure determines a probability distribution used
35、to encode the current sample, whose position, x, is shown in Figure 3. The context is determined from four neighbourhood reconstructed samples at positions a, 0, c, and d of the same component, as shown in Figure 3. From the values of the reconstructed samples at a, b, c, and d, the context first de
36、termines if the information in the sample x should be encoded in the regular or run mode: the run mode is selected when it is estimated from the context that successive samples are very likely to be nearly identical within the tolerances required for near-lossless coding (identical, for lossless cod
37、ing); the regular mode is selected when it is estimated from the context that samples are not very likely to be nearly identical within the tolerances required for near-lossless coding (identical, for lossless coding). - - 4.4.2 In the regular mode, the context determination procedure is followed by
38、 a prediction procedure. The predictor combines the reconstructed values of the three neighbourhood samples at positions a, b, and c to form a predicted sample value at position x as shown in Figure 3. The prediction error is computed as the difference between the actual sample value at position x a
39、nd its predicted value. This prediction error is then corrected by a context-dependent term to compensate for systematic biases in prediction. In the case of near-lossiess coding, the prediction error is then quantized. Regular mode: Prediction and error encoding Figure 3 - Causal template used for
40、context modelling and prediction The corrected prediction error (further quantized for near-lossless coding) is then encoded using a procedure derived from Golomb coding (specified in Annex A and further described in Annex G). NOTE - Golomb coding corresponds to Huffman coding for a geometric distri
41、bution. ITU-T Rec. T.87 (1998 E) 9 STD-ITU-T RECMN T-87-ENGL 2478 t862592 0661752 400 ISO/IEC 13495-1 : 1999 (E) The Golonib coding procedures specified in this Recommendation I International Standard depend on the context as well as prediction errors previously encoded for the same context. 4.4.3 R
42、un mode If the reconstructed values of the samples at a, b, c, and d are identical for lossless coding, or the differences between them (the local gradients, specified in Annex A) are within the bounds set for near-lossless coding, the context modelling procedure selects the run mode and the encodin
43、g process skips the prediction and error encoding procedures. In run mode, the encoder looks, starting at x, for a sequence of consecutive samples with values identical (or within the bound specified for near-lossiess coding) to the reconstructed value of the sample at a. A run is ended by a sample
44、of a different value (or one which exceeds the bound specified for near-lossless coding), or by the end of the current line, whichever comes first. The length information, which also specifies one of the above two run-ending alternatives, is encoded using a procedure specified in Annex A, which is e
45、xtended from Golomb coding but has improved performance and adaptability. 4.5 Decoding process The encoding and decoding processes are approximately symmetrical. Annex A specifies the encoding process, and Annex F describes the decoding process. The decoding process is followed by a sample mapping p
46、rocedure which uses the value of each decoded sample as an index to a look-up table, provided in the compressed image data. The corresponding table entry might be of a different precision to that of the encoded sample. NOTE - The sample mapping procedure is aimed at facilitating the use of this Reco
47、mmendation I International Standard for the encoding of palletised and symbolic images. In the case of palietised images, the encoder would encode only one component, and the difference in precision would permit, for example, the display of single-component images as pseudo-colour ones. In the case
48、of symbolic images, each decoded sample is a representation of the real image value, which is in the corresponding entry in the look-up table. If no table is provided for a specific component, the output of the sample mapping procedure is identical to the input. The use of sample mapping is specifie
49、d in Annex C. 4.6 Coding of multiple component images The coding processes described in this Recommendation I International Standard can be applied to multiple components of an image, as well as to a single component image. Annex B describes how the coding processes shall be applied to images containing multiple components. 4.7 Compressed image data The compressed image data output by the encoding process consists of marker segments and coded image data segments. The marker segments contain information required by the decoding process, including the image dimensions. The