comparison spandsp-0.0.6pre17/src/spandsp/private/t30_dis_dtc_dcs_bits.h @ 4:26cd8f1ef0b1

import spandsp-0.0.6pre17
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 15:50:58 +0200
parents
children
comparison
equal deleted inserted replaced
3:c6c5a16ce2f2 4:26cd8f1ef0b1
1 /*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * t30_dis_dtc_dcs_bits.h - ITU T.30 fax control bits definitions
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2009 Steve Underwood
9 *
10 * All rights reserved.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 2.1,
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * $Id: t30_dis_dtc_dcs_bits.h,v 1.1.4.1 2009/12/19 09:47:57 steveu Exp $
26 */
27
28 /*! \file */
29
30 #if !defined(_SPANDSP_PRIVATE_T30_DIS_DTC_DCS_BITS_H_)
31 #define _SPANDSP_PRIVATE_T30_DIS_DTC_DCS_BITS_H_
32
33 /* Indicates that the terminal has the Simple mode capability defined in ITU-T Rec. T.37.
34 Internet address signals CIA, TSA or CSA can be sent and received. The recipient terminal
35 may process or ignore this signal. */
36 #define T30_DIS_BIT_T37 1
37 #define T30_DCS_BIT_T37 1
38
39 /* Indicates that the terminal has the capability to communicate using ITU-T Rec. T.38.
40 Internet address signals CIA, TSA or CSA can be sent and received. The recipient terminal
41 may process or ignore this signal. */
42 #define T30_DIS_BIT_T38 3
43 #define T30_DCS_BIT_T38 3
44
45 /* Bit 4 set to "1" indicates 3rd Generation Mobile Network Access to the GSTN Connection.
46 Bit 4 set to "0" conveys no information about the type of connection. */
47 #define T30_DIS_BIT_3G_MOBILE 4
48 #define T30_DCS_BIT_3G_MOBILE 4
49
50 /* When ISDN mode is used, in DIS/DTC bit 6 shall be set to "0". */
51 #define T30_DIS_BIT_V8_CAPABILITY 6
52
53 /* When ISDN mode is used, in DIS/DTC bit 7 shall be set to "0". */
54 #define T30_DIS_BIT_64_OCTET_ECM_FRAMES_PREFERRED 7
55
56 /* Bit 9 indicates that there is a facsimile document ready to be polled from the answering
57 terrminal. It is not an indication of a capability. */
58 #define T30_DIS_BIT_READY_TO_TRANSMIT_FAX_DOCUMENT 9
59
60 /* In DIS/DTC bit 10 indicates that the answering terminal has receiving capabilities.
61 In DCS it is a command to the receiving terminal to set itself in the receive mode. */
62 #define T30_DIS_BIT_READY_TO_RECEIVE_FAX_DOCUMENT 10
63 #define T30_DCS_BIT_RECEIVE_FAX_DOCUMENT 10
64
65 /* Bits 11, 12, 13, 14 - modem type */
66
67 #define T30_DIS_BIT_200_200_CAPABLE 15
68 #define T30_DCS_BIT_200_200 15
69
70 #define T30_DIS_BIT_2D_CAPABLE 16
71 #define T30_DCS_BIT_2D_CODING 16
72
73 /* Standard facsimile terminals conforming to ITU-T Rec. T.4 must have the following capability:
74 Paper length = 297 mm. */
75
76 /* Bits 17, 18 - recording width */
77
78 /* Bits 19, 20 - paper length */
79
80 /* Bits 21, 22, 23 - min scan line time */
81
82 /* When ISDN mode is used, in DIS/DTC bits 21 to 23 shall be set to "1". */
83
84 #define T30_DIS_BIT_UNCOMPRESSED_CAPABLE 26
85 #define T30_DCS_BIT_UNCOMPRESSED_MODE 26
86
87 /* When ISDN mode is used, in DIS/DTC bit 27 shall be set to "1". */
88 #define T30_DIS_BIT_ECM_CAPABLE 27
89 #define T30_DCS_BIT_ECM 27
90
91 /* The value of bit 28 in the DCS command is only valid when ECM is selected. */
92 #define T30_DCS_BIT_64_OCTET_ECM_FRAMES 28
93
94 /* The value of bit 31 in the DCS command is only valid when ECM is selected. */
95 #define T30_DIS_BIT_T6_CAPABLE 31
96 #define T30_DCS_BIT_T6_MODE 31
97
98 #define T30_DIS_BIT_FNV_CAPABLE 33
99 #define T30_DCS_BIT_FNV_CAPABLE 33
100
101 #define T30_DIS_BIT_MULTIPLE_SELECTIVE_POLLING_CAPABLE 34
102
103 #define T30_DIS_BIT_POLLED_SUBADDRESSING_CAPABLE 35
104
105 #define T30_DIS_BIT_T43_CAPABLE 36
106 #define T30_DCS_BIT_T43_CODING 36
107
108 #define T30_DIS_BIT_PLANE_INTERLEAVE_CAPABLE 37
109 #define T30_DCS_BIT_PLANE_INTERLEAVE 37
110
111 #define T30_DIS_BIT_G726_CAPABLE 38
112 #define T30_DCS_BIT_G726 38
113
114 #define T30_DIS_BIT_200_400_CAPABLE 41
115 #define T30_DCS_BIT_200_400 41
116
117 #define T30_DIS_BIT_300_300_CAPABLE 42
118 #define T30_DCS_BIT_300_300 42
119
120 #define T30_DIS_BIT_400_400_CAPABLE 43
121 #define T30_DCS_BIT_400_400 43
122
123 /* Bits 44 and 45 are used only in conjunction with bits 15 and 43. Bit 44 in DCS, when used,
124 shall correctly indicate the resolution of the transmitted document, which means that bit 44 in DCS may
125 not always match the indication of bits 44 and 45 in DIS/DTC. Cross selection will cause the distortion
126 and reduction of reproducible area.
127 If a receiver indicates in DIS that it prefers to receive metric-based information, but the transmitter has
128 only the equivalent inch-based information (or vice versa), then communication shall still take place.
129 Bits 44 and 45 do not require the provision of any additional features on the terminal to
130 indicate to the sending or receiving user whether the information was transmitted or received on a metric-metric,
131 inch-inch, metric-inch, inch-metric basis. */
132
133 #define T30_DIS_BIT_INCH_RESOLUTION_PREFERRED 44
134 #define T30_DCS_BIT_INCH_RESOLUTION 44
135
136 #define T30_DIS_BIT_METRIC_RESOLUTION_PREFERRED 45
137
138 #define T30_DIS_BIT_MIN_SCAN_TIME_HALVES 46
139
140 #define T30_DIS_BIT_SELECTIVE_POLLING_CAPABLE 47
141
142 #define T30_DIS_BIT_SUBADDRESSING_CAPABLE 49
143 #define T30_DCS_BIT_SUBADDRESS_TRANSMISSION 49
144
145 #define T30_DIS_BIT_PASSWORD 50
146 #define T30_DCS_BIT_SENDER_ID_TRANSMISSION 50
147
148 /* Bit 51 indicates that there is a data file ready to be polled from the answering terminal. It is
149 not an indication of a capability. This bit is used in conjunction with bits 53, 54, 55 and 57. */
150 #define T30_DIS_BIT_READY_TO_TRANSMIT_DATA_FILE 51
151
152 /* The binary file transfer protocol is described in ITU-T Rec. T.434. */
153 #define T30_DIS_BIT_BFT_CAPABLE 53
154 #define T30_DCS_BIT_BFT 53
155
156 #define T30_DIS_BIT_DTM_CAPABLE 54
157 #define T30_DCS_BIT_DTM 54
158
159 #define T30_DIS_BIT_EDI_CAPABLE 55
160 #define T30_DCS_BIT_EDI 55
161
162 #define T30_DIS_BIT_BTM_CAPABLE 57
163 #define T30_DCS_BIT_BTM 57
164
165 /* Bit 59 indicates that there is a character-coded or mixed-mode document ready to be polled
166 from the answering terminal. It is not an indication of a capability. This bit is used in
167 conjunction with bits 60, 62 and 65. */
168 #define T30_DIS_BIT_READY_TO_TRANSMIT_MIXED_MODE_DOCUMENT 59
169
170 #define T30_DIS_BIT_CHARACTER_MODE 60
171 #define T30_DCS_BIT_CHARACTER_MODE 60
172
173 #define T30_DIS_BIT_MIXED_MODE 62
174 #define T30_DCS_BIT_MIXED_MODE 62
175
176 #define T30_DIS_BIT_PROCESSABLE_MODE_26 65
177
178 #define T30_DIS_BIT_DIGITAL_NETWORK_CAPABLE 66
179 #define T30_DCS_BIT_DIGITAL_NETWORK_CAPABLE 66
180
181 #define T30_DIS_BIT_DUPLEX_CAPABLE 67
182 #define T30_DCS_BIT_DUPLEX_CAPABLE 67
183
184 #define T30_DIS_BIT_T81_CAPABLE 68
185 #define T30_DCS_BIT_FULL_COLOUR_MODEX 68
186
187 #define T30_DIS_BIT_FULL_COLOUR_CAPABLE 69
188 #define T30_DCS_BIT_FULL_COLOUR_MODE 69
189
190 /* In a DIS/DTC frame, setting bit 71 to "0" indicates that the called terminal can only accept
191 image data which has been digitized to 8 bits/pel/component for JPEG mode. This is also true for T.43
192 mode if bit 36 is also set to "1". Setting bit 71 to "1" indicates that the called terminal can also accept
193 image data that are digitized to 12 bits/pel/component for JPEG mode. This is also true for T.43 mode if
194 bit 36 is also set to "1". In a DCS frame, setting bit 71 to "0" indicates that the calling terminal's image
195 data are digitized to 8 bits/pel/component for JPEG mode. This is also true for T.43 mode if bit 36 is also
196 set to "1". Setting bit 71 to "1" indicates that the calling terminal transmits image data which has been
197 digitized to 12 bits/pel/component for JPEG mode. This is also true for T.43 mode if bit 36 is also set
198 to "1". */
199 #define T30_DIS_BIT_12BIT_CAPABLE 71
200 #define T30_DCS_BIT_12BIT_COMPONENT 71
201
202 #define T30_DIS_BIT_NO_SUBSAMPLING 73
203 #define T30_DCS_BIT_NO_SUBSAMPLING 73
204
205 #define T30_DIS_BIT_CUSTOM_ILLUMINANT 74
206 #define T30_DCS_BIT_CUSTOM_ILLUMINANT 74
207
208 #define T30_DIS_BIT_CUSTOM_GAMUT_RANGE 75
209 #define T30_DCS_BIT_CUSTOM_GAMUT_RANGE 75
210
211 #define T30_DIS_BIT_NORTH_AMERICAN_LETTER_CAPABLE 76
212 #define T30_DCS_BIT_NORTH_AMERICAN_LETTER 76
213
214 #define T30_DIS_BIT_NORTH_AMERICAN_LEGAL_CAPABLE 77
215 #define T30_DCS_BIT_NORTH_AMERICAN_LEGAL 77
216
217 #define T30_DIS_BIT_T85_CAPABLE 78
218 #define T30_DCS_BIT_T85_MODE 78
219
220 #define T30_DIS_BIT_T85_L0_CAPABLE 79
221 #define T30_DCS_BIT_T85_L0_MODE 79
222
223 /* In a DIS/DTC frame, setting bit 97 to "0" indicates that the called terminal does not have the
224 capability to accept 300 pels/25.4 mm x 300 lines/25.4 mm or 400 pels/25.4 mm x 400 lines/25.4 mm
225 resolutions for colour/gray-scale images or T.44 Mixed Raster Content (MRC) mask layer.
226
227 Setting bit 97 to "1" indicates that the called terminal does have the capability to accept
228 300 pels/25.4 mm x 300 lines/25.4 mm or 400 pels/25.4 mm x 400 lines/25.4 mm resolutions for
229 colour/gray-scale images and MRC mask layer. Bit 97 is valid only when bits 68 and 42 or 43
230 (300 pels/25.4 mm x 300 lines/25.4 mm or 400 pels/25.4 mm x 400 lines/25.4 mm) are set to "1".
231
232 In a DCS frame, setting bit 97 to "0" indicates that the calling terminal does not use
233 300 pels/25.4 mm x 300 lines/25.4 mm or 400 pels/25.4 mm x 400 lines/25.4 mm resolutions
234 for colour/gray-scale images and mask layer.
235
236 Setting bit 97 to "1" indicates that the calling terminal uses 300 pels/25.4 mm x 300 lines/25.4 mm
237 or 400 pels/25.4 mm x 400 lines/25.4 mm resolutions for colour/gray-scale images and MRC mask layer.
238 Bit 97 is valid only when bits 68 and 42 or 43 (300 pels/25.4 mm x 300 lines/25.4 mm and
239 400 pels/25.4 mm x 400 lines/25.4 mm) are set to "1".
240
241 In a DIS/DTC frame, combinations of bit 42, bit 43 and bit 97 indicate that the called terminal
242 has higher resolution capabilities as follows:
243
244 Resolution capabilities (pels/25.4 mm)
245 DIS/DTC Monochrome Colour/gray-scale
246 42 43 97 300 x 300 400 x 400 300 x 300 400 x 400
247 0 0 0 no no no no
248 1 0 0 yes no no no
249 0 1 0 no yes no no
250 1 1 0 yes yes no no
251 0 0 1 (invalid)
252 1 0 1 yes no yes no
253 0 1 1 no yes no yes
254 1 1 1 yes yes yes yes
255 "yes" means that the called terminal has the corresponding capability.
256 "no" means that the called terminal does not have the corresponding capability. */
257 #define T30_DIS_BIT_COLOUR_GREY_300_300_400_400_CAPABLE 97
258 #define T30_DCS_BIT_COLOUR_GREY_300_300_400_400 97
259
260 /* In a DIS/DTC frame, setting bit 98 to "0" indicates that the called terminal does not have the
261 capability to accept 100 pels/25.4 mm x 100 lines/25.4 mm spatial resolution for colour or gray-scale
262 images. Setting bit 98 to "1" indicates that the called terminal does have the capability to accept
263 100 pels/25.4 mm x 100 lines/25.4 mm spatial resolution for colour or gray-scale images. Bit 98 is valid
264 only when bit 68 is set to "1". In a DCS frame, setting bit 98 to "0" indicates that the calling terminal does
265 not use 100 pels/25.4 mm x 100 lines/25.4 mm spatial resolution for colour or gray-scale images. Setting
266 bit 98 to "1" indicates that the calling terminal uses 100 pels/25.4 mm x 100 lines/25.4 mm spatial
267 resolution for colour or gray-scale images. */
268 #define T30_DIS_BIT_COLOUR_GREY_100_100_CAPABLE 98
269 #define T30_DCS_BIT_COLOUR_GREY_100_100 98
270
271 /* To provide an error recovery mechanism, when PWD/SEP/SUB/SID/PSA/IRA/ISP frames are sent with DCS or DTC,
272 bits 49, 102 and 50 in DCS or bits 47, 101, 50 and 35 in DTC shall be set to "1" with the following
273 meaning:
274 Bit DIS DTC DCS
275 35 Polled SubAddress capability Polled SubAddress transmission Not allowed – set to "0"
276 47 Selective polling capability Selective polling transmission Not allowed – set to "0"
277 49 Subaddressing capability Not allowed (Set to "0") Subaddressing transmission
278 50 Password Password transmission Sender Identification transmission
279 101 Internet Selective Polling Address capability Internet Selective Polling Address transmission Not allowed – set to "0"
280 102 Internet Routing Address capability Not allowed (Set to "0") Internet Routing Address transmission
281
282 Terminals conforming to the 1993 version of T.30 may set the above bits to "0" even though PWD/SEP/SUB
283 frames are transmitted. */
284 #define T30_DIS_BIT_INTERNET_SELECTIVE_POLLING_ADDRESS 101
285
286 #define T30_DIS_BIT_INTERNET_ROUTING_ADDRESS 102
287 #define T30_DCS_BIT_INTERNET_ROUTING_ADDRESS_TRANSMISSION 102
288
289 #define T30_DIS_BIT_600_600_CAPABLE 105
290 #define T30_DCS_BIT_600_600 105
291
292 #define T30_DIS_BIT_1200_1200_CAPABLE 106
293 #define T30_DCS_BIT_1200_1200 106
294
295 #define T30_DIS_BIT_300_600_CAPABLE 107
296 #define T30_DCS_BIT_300_600 107
297
298 #define T30_DIS_BIT_400_800_CAPABLE 108
299 #define T30_DCS_BIT_400_800 108
300
301 #define T30_DIS_BIT_600_1200_CAPABLE 109
302 #define T30_DCS_BIT_600_1200 109
303
304 #define T30_DIS_BIT_COLOUR_GREY_600_600_CAPABLE 110
305 #define T30_DCS_BIT_COLOUR_GREY_600_600 110
306
307 #define T30_DIS_BIT_COLOUR_GREY_1200_1200_CAPABLE 111
308 #define T30_DCS_BIT_COLOUR_GREY_1200_1200 111
309
310 #define T30_DIS_BIT_ALTERNATE_DOUBLE_SIDED_CAPABLE 113
311 #define T30_DCS_BIT_ALTERNATE_DOUBLE_SIDED_CAPABLE 113
312
313 #define T30_DIS_BIT_CONTINUOUS_DOUBLE_SIDED_CAPABLE 114
314 #define T30_DCS_BIT_CONTINUOUS_DOUBLE_SIDED_CAPABLE 114
315
316 #define T30_DIS_BIT_BLACK_AND_WHITE_MRC 115
317
318 #define T30_DIS_BIT_T45_CAPABLE 116
319 #define T30_DCS_BIT_T45_MODE 116
320
321 /* This bit defines the available colour space, when bit 92, 93 or 94 is set to "1".
322 Available colour space for all combinations of bits 92, 93, 94 and 119 are shown in the following table.
323 It should be noted that terminals which conform to the 2003 and earlier versions of this Recommendation
324 will send LAB with "1" in bit 92, 93 or 94 even if bit 119 is set to "1".
325
326 Available colour space for DIS/DTC bits 92, 93, 94 and 119
327
328 92 93 94 119 Mode of T.44 Available colour space
329 0 0 0 x Not available -
330 1 0 0 0 Mode 1 LAB only
331 1 0 0 1 Mode 1 YCC only
332 x 1 x 0 Mode 2 or higher LAB only
333 x x 1 0 Mode 2 or higher LAB only
334 x 1 x 1 Mode 2 or higher LAB and YCC
335 x x 1 1 Mode 2 or higher LAB and YCC
336
337 Colour space for DCS bits 92, 93, 94 and 119
338
339 92 93 94 119 Mode of T.44 Colour space
340 0 0 0 x* Not available -
341 1 0 0 0 Mode 1 LAB
342 1 0 0 1 Mode 1 YCC
343 x 1 x 0 Mode 2 or higher LAB
344 x x 1 0 Mode 2 or higher LAB
345 x 1 x 1 Mode 2 or higher YCC or mixing of YCC and LAB
346 x x 1 1 Mode 2 or higher YCC or mixing of YCC and LAB */
347 #define T30_DIS_BIT_T44_COLOUR_SPACE 119
348 #define T30_DCS_BIT_T44_COLOUR_SPACE 119
349
350 /* Can only be set in the communication through the T.38 gateway, to cope with delay of network.
351 T.x timer (12+-1s) should be used after emitting RNR or TNR. However, after receiving
352 PPS signal in ECM mode, T.5 timer should be used. */
353 #define T30_DIS_BIT_T38_FLOW_CONTROL_CAPABLE 121
354 #define T30_DCS_BIT_T38_FLOW_CONTROL_CAPABLE 121
355
356 /* For resolutions greater than 200 lines/25.4 mm, 4.2.1.1/T.4 specifies the use of specific K
357 factors for each standardized vertical resolution. To ensure backward compatibility with earlier
358 versions of ITU-T Rec. T.4, bit 122 indicates when such K factors are being used. */
359 #define T30_DIS_BIT_K_GREATER_THAN_4 122
360
361 /* This bit should be set to "1" if the fax device is an Internet-Aware Fax Device as defined in
362 ITU-T Rec. T.38 and if it is not affected by the data signal rate indicated by the DIS and DTC
363 signals when communicating with another Internet-Aware Fax Device operating in T.38 mode. This
364 bit shall not be used in GSTN mode. */
365 #define T30_DIS_BIT_T38_FAX_CAPABLE 123
366 /* This bit should be set to "1" if the fax device elects to operate in an Internet-Aware Fax mode
367 as defined in ITU-T Rec. T.38 in response to a device which has set the related DIS bit to "1".
368 When this bit is set to "1", the data signal rate of the modem (bits 11-14) should be set to "0". */
369 #define T30_DCS_BIT_T38_FAX_MODE 123
370
371 /* When either bit of 31, 36, 38, 51, 53, 54, 55, 57, 59, 60, 62, 65, 68, 78, 79, 115, 116 and 127 is
372 set to "1", ECM must be used. If the value of bit field 92 to 94 is non-zero, then ECM must be used.
373
374 Annex K describes the optional continuous-tone colour and gray scale images mode
375 (sYCC-JPEG mode) protocol. When bit 127 in DIS/DTC frame is set to "1", the called terminal has the
376 capability to accept sYCC-JPEG mode. This is defined with complete independent in the colour space
377 CIELAB. In addition, when bit 127 in DCS frame is set to "1", ECM must be used and bits 15, 17, 18,
378 19, 20, 41, 42, 43, 45, 46, 68, 69, 71, 73, 74, 75, 76, 77, 97, 98, 105, 106, 107, 108,
379 109, 110 and 111 in DCS frame are "Don't care", and should be set to "0". In the case of
380 transmission of multiple images, a post message signal PPS-MPS between pages, PPS-NULL between
381 partial pages and PPS-EOP following the last page should be sent from the calling terminal to the
382 called terminal. */
383 #define T30_DIS_BIT_SYCC_T81_CAPABLE 127
384 #define T30_DCS_BIT_SYCC_T81_MODE 127
385
386 #endif
387 /*- End of file ------------------------------------------------------------*/

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.