1、 INTERNATIONAL TELECOMMUNICATION UNION ITU-T T.870TELECOMMUNICATION STANDARDIZATION SECTOR OF ITU (03/2002) SERIES T: TERMINALS FOR TELEMATIC SERVICES Information technology Lossless and near-lossless compression of continuous-tone still images: Extensions ITU-T Recommendation T.870 ITU-T Rec. T.870
2、 (03/2002) i INTERNATIONAL STANDARD ISO/IEC 14495-2 ITU-T RECOMMENDATION T.870 Information technology Lossless and near-lossless compression of continuous-tone still images: Extensions Summary This Recommendation | International Standard defines a set of lossless (bit-preserving) and nearly lossless
3、 (where the error for each reconstructed sample is bounded by a predefined value) compression methods for coding continuous-tone (including bi-level), gray-scale, or colour digital still images. This Recommendation | International Standard: specifies extensions (including arithmetic coding, extensio
4、n of near lossless coding, extension of prediction and extension of Golomb coding) to processes for converting source image data to compressed image data; specifies extensions to processes for converting compressed image data to reconstructed image data including an extension for sample tranformatio
5、n for inverse colour transforms; specifies coded representations for compressed image data; provides guidance on how to implement these processes in practice. Source ITU-T Recommendation T.870 was prepared by ITU-T Study Group 16 (2001-2004) and approved on 29 March 2002. An identical text is also p
6、ublished as ISO/IEC 14495-2. ii ITU-T Rec. T.870 (03/2002) FOREWORD The International Telecommunication Union (ITU) is the United Nations specialized agency in the field of telecommunications. The ITU Telecommunication Standardization Sector (ITU-T) is a permanent organ of ITU. ITU-T is responsible
7、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 Assembly (WTSA), which meets every four years, establishes the topics for study by the ITU-T st
8、udy groups which, in turn, produce Recommendations on these topics. The approval of ITU-T Recommendations is covered by the procedure laid down in WTSA Resolution 1. In some areas of information technology which fall within ITU-Ts purview, the necessary standards are prepared on a collaborative basi
9、s with ISO and IEC. NOTE In this Recommendation, the expression “Administration“ is used for conciseness to indicate both a telecommunication administration and a recognized operating agency. INTELLECTUAL PROPERTY RIGHTS ITU draws attention to the possibility that the practice or implementation of t
10、his Recommendation may involve the use of a claimed Intellectual Property Right. ITU takes no position concerning 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 da
11、te of approval of this Recommendation, ITU had received notice of intellectual property, protected 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 th
12、e TSB patent database. ITU 2002 All rights reserved. No part of this publication may be reproduced, by any means whatsoever, without the prior written permission of ITU. ITU-T Rec. T.870 (03/2002) iii CONTENTS Page 1 Scope 1 2 Normative references . 1 2.1 Identical Recommendations | International St
13、andards 1 2.2 Additional references 1 3 Definitions, abbreviations, symbols and conventions 2 3.1 Definitions. 2 3.2 Abbreviations 2 3.3 Symbols. 2 4 General . 3 4.1 Extensions specified by this Recommendation | International Standard. 4 4.1.1 Encoding with arithmetic coding 4 4.1.2 Extension of nea
14、r-lossless coding . 4 4.1.3 Extension of prediction . 5 4.1.4 Extension of Golomb coding 5 4.1.5 Fixed length coding. 5 4.1.6 Sample transformation for inverse colour transforms . 5 4.2 Descriptions of extended functions . 5 5 Interchange format requirements 6 6 Encoder requirements. 6 7 Decoder req
15、uirements. 6 8 Conformance testing for extensions . 7 8.1 Purpose 7 8.2 Encoder conformance tests 7 8.3 Decoder conformance tests . 7 Annex A Encoding procedures with arithmetic coding for a single component. 10 A.1 Coding parameters and compressed image data 10 A.2 Initializations and conventions 1
16、0 A.2.1 Initializations. 10 A.2.2 Conventions for figures. 12 A.3 Context determination. 12 A.3.1 Local gradient computation. 12 A.3.2 Flat region detection 13 A.3.3 Local gradient quantization. 13 A.3.4 Quantized gradient merging 14 A.3.5 Adjustment of error tolerance for near-lossless coding with
17、visual quantization 14 A.4 Prediction 14 A.4.1 Edge-detecting predictor . 14 A.4.2 Prediction correction . 14 A.4.3 Computation of prediction error 15 A.4.4 Error quantization for near-lossless coding, and reconstructed value computation 16 A.4.5 Modulo reduction of the prediction error 16 A.5 Predi
18、ction error encoding 16 A.5.1 Error mapping . 17 A.5.2 Binarization of MErrval with the Golomb code tree. 17 A.5.3 Mapped-error encoding. 18 A.6 Update variables 18 A.6.1 Update. 18 A.6.2 Bias computation. 21 A.7 Flow of encoding procedures 22 iv ITU-T Rec. T.870 (03/2002) Page Annex B Arithmetic co
19、ding 24 B.1 Arithmetic encoding procedures . 24 B.1.1 Binary arithmetic encoding principles 24 B.1.2 Procedures of arithmetic coding 25 B.2 Arithmetic decoding procedures . 28 B.2.1 Binary arithmetic decoding principles 28 B.2.2 Procedures of arithmetic decoding 28 Annex C Encoding with arithmetic c
20、oding for multiple component images 30 C.1 Introduction. 30 C.2 Line interleaved mode. 30 C.2.1 Description 30 C.2.2 Process flow 30 C.3 Sample interleaved mode 30 C.3.1 Description 30 C.3.2 Process flow 31 C.4 Minimum coded unit (MCU) 31 Annex D Extended functions for the baseline coding model 32 D
21、.1 Extensions of near-lossless coding 32 D.1.1 Near-lossless coding with visual quantizaion . 32 D.1.2 Near-lossless coding with NEAR value re-specification 32 D.2 Extensions of prediction on baseline coding model 33 D.2.1 Initializations. 33 D.2.2 Prediction correction . 33 D.2.3 Symbol packing. 33
22、 D.2.4 Update variables 34 D.2.5 Run interruption sample encoding 35 D.2.6 Flow of encoding procedures 35 D.3 Extension of Golomb coding. 35 D.3.1 Golomb code completion 36 D.3.2 Run interruption handling for qbpp=1 36 Annex E Fixed length coding . 37 E.1 Introduction. 37 E.2 Fixed length coding. 37
23、 Annex F Sample transformation for inverse colour transform . 38 F.1 Inverse colour transform . 38 F.2 Example and guideline (Informative) 39 Annex G Compressed data format 41 G.1 General aspects of the compressed data format specification . 41 G.1.1 Marker assignments 41 G.1.2 JPEG-LS preset parame
24、ters specification syntax 41 Annex H Control procedures for extensions. 48 H.1 Control procedure for encoding a restart interval 48 H.2 Control procedure for encoding a minimum coded unit (MCU) with fixed length code (FLC) . 48 Annex I Conformance tests. 51 I.1 Test images . 51 I.1.1 Source images .
25、 51 I.1.2 Compressed image data. 51 I.1.3 Test image formats 51 Annex J Patents 53 J.1 List of patents 53 Annex K Bibliography 55 ISO/IEC 14495-2:2003 (E) ITU-T Rec. T.870 (03/2002) 1 INTERNATIONAL STANDARD ITU-T RECOMMENDATION Information technology Lossless and near-lossless compression of continu
26、ous-tone still images: Extensions 1 Scope This Recommendation | International Standard defines a set of lossless (bit-preserving) and nearly lossless (where the error for each reconstructed sample is bounded by a predefined value) compression methods for coding continuous-tone (including bi-level),
27、gray-scale, or colour digital still images. This Recommendation | International Standard: specifies extensions (including arithmetic coding, extension of near lossless coding, extension of prediction and extension of Golomb coding) to processes for converting source image data to compressed image da
28、ta; specifies extensions to processes for converting compressed image data to reconstructed image data including an extension for sample tranformation for inverse colour transforms; specifies coded representations for compressed image data; provides guidance on how to implement these processes in pr
29、actice. 2 Normative references The following Recommendations and International Standards contain provisions which, through references in this text, constitute provisions of this Recommendation | International Standard. At the time of publication, the editions indicated were valid. All Recommendation
30、s and Standards are subject to revision, and parties to agreements based on this Recommendation | International Standard are encouraged to investigate the possibility of applying the most recent edition of the Recommendations and Standards listed below. Members of IEC and ISO maintain registers of c
31、urrently valid International Standards. The Telecommunication Standardization Bureau of the ITU maintains a list of currently valid ITU-T Recommendations. 2.1 Identical Recommendations | International Standards CCITT Recommendation T.81 (1992) | ISO/IEC 10918-1:1994, Information technology Digital c
32、ompression and coding of continuous-tone still images: Requirements and guidelines. ITU-T Recommendation T.83 (1994) | ISO/IEC 10918-2:1995, Information technology Digital compression and coding of continuous-tone still images: Compliance testing. ITU-T Recommendation T.84 (1996) | ISO/IEC 10918-3:1
33、997, Information technology Digital compression and coding of continuous-tone still images: Extensions. ITU-T Recommendation T.87 (1998) | ISO/IEC 14495-1:2000, Information technology Lossless and near-lossless compression of continuous-tone still images: Baseline. 2.2 Additional references ISO/IEC
34、646:1991, Information technology ISO 7-bit coded character set for information interchange. ISO 5807:1985, Information processing Documentation symbols and conventions for data, program and system flowcharts, program network charts and system resources charts. ISO/IEC 9899:1999, Programming language
35、s C. ISO/IEC 14495-2:2003 (E) 2 ITU-T Rec. T.870 (03/2002) 3 Definitions, abbreviations, symbols and conventions 3.1 Definitions For the purposes of this Recommendation | International Standard, the following definitions apply in addition to the definitions used in ITU-T Rec. T.87 | ISO/IEC 14495-1.
36、 3.1.1 arithmetic encoder: An embodiment of an arithmetic encoding procedure. 3.1.2 arithmetic encoding: A procedure which encodes a sample as a binary representation of the sequence of previously encoded samples by means of a recursive subdivision of a unit interval. 3.1.3 arithmetic decoder: An em
37、bodiment of an arithmetic decoding procedure. 3.1.4 arithmetic decoding: A procedure which recovers source data from an encoded bit stream produced by an arithmetic encoder. 3.1.5 binary context: Context used to determine the binary arithmetic coding of the present binary decision. 3.1.6 binary deci
38、sion: Choice between two alternatives. 3.1.7 colour transform: A procedure for sample transformation for inverse colour transform. 3.1.8 sign flipping: The procedure which reverses the sign of a prediction error according to accumulated prediction errors. 3.1.9 symbol packing: A procedure which may
39、be applied to source images in which sample values are sparsely distributed. 3.1.10 visual quantization: An extended function of near-lossless coding which enables to change the difference bound according to the context. 3.2 Abbreviations In additions to the abbreviations used in ITU-T Rec. T.87 | I
40、SO/IEC 14495-1, the abbreviations used in this Recommendation | International Standard are listed below. FLC Fixed length code LPS Less probable symbol MPS More probable symbol 3.3 Symbols In addition to the symbols used in ITU-T Rec. T.87 | ISO/IEC 14495-1, the symbols used in this Recommendation |
41、 International Standard are listed below. A convention is used that parameters which are fixed in value during the encoding of a scan are indicated in boldface capital letters, and variables which change in value during the encoding of a scan are indicated in italicised letters. Areg current numeric
42、al-line interval being renormalized ArithmeticEncode() a function in the C programming language Av030 31 constants corresponding to LPS probability estimate Avd auxiliary variable storing modified Av BASIC_T1, BASIC_T2, BASIC_T3, BASIC_T4 basic default threshold values Bin binary decision Buf 01 byt
43、es stored to avoid carry-over propagation to the encoded bit stream Creg value of code register storing the trailing bits of the encoded bit stream ENT indication of the coding process used for the scan Flag0MAXVAL MAXVAL+1 flags which indicate if corresponding sample values already occurred ISO/IEC
44、 14495-2:2003 (E) ITU-T Rec. T.870 (03/2002) 3 GetBinaryContext() a function in the C programming language GetByte() a function in the C programming language GetGolombk() a function in the C programming language Hd auxiliary variable storing an integer value corresponding to a half of the full range
45、 but shifted according to the size of the current interval LPScnt0MAXS accumulated occurrence count of the LPS (less probable symbol) at each binary context MAXcnt threshold value at which MLcnt and LPScnt are halved MAXS maximum index of binary contexts MLcnt0MAXS accumulated occurrence count of ea
46、ch binary context MPSvalue0MAXS sense of the MPS (more probable symbol) at each binary context nearq context-dependent difference bound for near-lossless coding using visual quantization NEARRUN difference bound for near-lossless coding in run mode NMCU number of MCUs Prob LPS probability estimated
47、from MLcnt and LPScnt Qx the (quantized) value of a sample to be encoded with fixed length code S index for binary contexts SOF57 JPEG-LS frame marker for this extension SPf 0RANGE RANGE+1 flags indicating if corresponding mapped error values already occurred SPm0RANGE mapping table of MErrval or EM
48、Errval for symbol packing SPt the smallest positive integer greater than all mapped error values that occurred in the scan up to this point SPx number of the different mapped error values that already occurred T1, T2, T3 thresholds for local gradients T4 threshold for an additional local gradient TE
49、MErrval auxiliary variable storing EMErrval Th029 threshold to determine suitable value of Av TMErrval auxiliary variable storing MErrval TQ visual quantization threshold wct number of bits by which Areg is shifted Zerograd flag indicating local gradients are all zero 4 General The purpose of this clause is to give an overview of this Recommendation | International Standard. This Recommendation | International Standard defines extensions to the elements specified in ITU-T Rec. T.8