hash
stringlengths
32
32
doc_id
stringlengths
5
12
section
stringlengths
5
1.47k
content
stringlengths
0
6.67M
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
7.2.2.2 Error correction facsimile data
As these facsimile coded data between the fax adaptor and the facsimile terminal are structured in HDLC frames, the handling of this procedure segment will exploit such formatting. The content of such an HDLC frame is further on called a block. Each such block is included in the information field of a error correction data element of the FA protocol which is processed for transmission across the radio interface as outlined in clause 6. The message phase (see figure II.8/GSM 03.46) at both the PLMN ends is triggered by the transit of a confirmation frame (CFR, MCF, PPR, CTR or ERR) sent by the receiving terminal and marking the end of the BCS phase. If four consecutive PPR are counted within the same "partial page", the BCS phase continues. The transmitter adaptation function will enter the message phase as per CCITT Recommendation T.30 standard procedure. The terminal adaptation function associated with the receiving terminal after receiving facsimile coded data or autonomously 5.5s after detecting the trigger frame will change the modem function to V.27ter or V.29 CCITT Recommendation and initiate the training at the applicable speed. Following the training segment, HDLC flags will be stuffed towards the facsimile terminal until a FCD frame is detected, that will mark the beginning of the real phase C. If due to a preceding error the message phase cannot be entered, this training must be aborted when a new BCS element is received by the transmitting fax adaptor.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
7.2.2.3 Buffering of facsimile coded data
The following subclauses only apply, when using the normal facsimile data transfer, i.e. not with the error correction mode.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
7.2.2.3.1 Transmitter adaptation function
In the transmitter adaptation function the facsimile coded data being received from the facsimile terminal are transcoded stripping of FILL information and written into the buffer. If there is enough information available, this data is read out from the buffer, and a FA protocol element is generated which is processed as described in clause 6 to be transferred to the receiver adaptation function using one of the standard TAFs referred to in subclause 7.1. For that purpose the data is segmented in blocks (see subclause 6.2.5.2). Due to the ARQ techniques of the RLP the throughput across the radio interface may be less than the message speed between the transmitting facsimile terminal and the transmitter adaptation function, i.e. the content of the buffer may increase. When a certain threshold is reached from which the fax adaptor can derive that the actual page cannot be transmitted successfully, the connection may be prematurely released. If the throughput at the radio interface is greater than the message speed between the transmitting facsimile terminal and the transmitter adaptation function (e.g. when the end‑to‑end speed is lower than 9 600 bit/s), the buffer may be empty most of the time.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
7.2.2.3.2 Receiver adaptation function
In the receiver adaptation function FILL information is transmitted to the facsimile terminal at the beginning of each page, if necessary, to bridge the gap between the training sequence and the real facsimile coded data. In case of normal fax data the FILL 0's can be expanded up to 5s only and therefore after these up to two white scan lines should be inserted, if necessary. The facsimile coded data received across the radio interface are re‑generated from the LAPB, L2R and FA protocol elements, reversely transcoded according to the knowledge of the fax adaptor, and written into the buffer. The reverse transcoding consists of insertion of FILL information before the facsimile coded data is forwarded to the facsimile terminal to comply with the recognized minimum line length as defined in CCITT Recommendation T.4. At the beginning of each page the facsimile coded data to be sent to the facsimile terminal is not read out from the buffer until at least 2 instances of EOL or an RTC have been received or the following buffer size limit, depending on the end to end data transfer rate, has been exceeded: 2 kByte for 2,400 bit/s; 4 kByte for 4,800 bit/s; 6 kByte for 7,200 bit/s; 8 kByte for 9,600 bit/s. Once this procedure has been started, i.e. during the page transmission, the facsimile coded data is transmitted, however, the following EOL is delayed by inserting additional FILL information, if necessary, until the pre‑set threshold (2 EOLs or the buffer size limit) is reached again. If the actual coding line is going to exceed 5 s, the threshold is temporarily reduced, i.e. the following EOL is sent. However, the buffering algorithm shall try to reach the pre‑set threshold again as fast as possible (by inserting FILL also before following EOLs). If no EOL is available to be transmitted to the facsimile terminal for a period greater than 5 s, the connection will be released by an ordinary receiving facsimile terminal (ref. CCITT Recommendation T.4).
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
7.2.3 Disconnect procedure
The transmitter adaptation function, upon detection of the DCN frame (see CCITT Recommendation T.30) sent by the local terminal to indicate the end of the facsimile transmission, initiates the disconnect procedure.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
7.2.4 Timeouts
The overall fax adaptation function is in principle bound to the timing constraints associated with the end‑to‑end CCITT Recommendation T.30 procedure. This means that, no matter of the reference configuration used at the mobile station, either the "standard" one (figure 2a/GSM 03.46) or the "GSM facsimile machine" (figure 2d/GSM 03.46), the progress of the call will be mainly subject to the CCITT Recommendation T.30 typical timing protections, settled externally. However, due to the specific conditions caused by the GSM PLMN system, there is the need for a special support with respect to BCS command repetitions as explained above. For that purpose, the fax adaptors will provide means for local time‑out. The timer will be started and stopped as described in the applicable clauses of the CCITT Recommendation T.30.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8 Signalling aspects
GSM 07.03 identifies the bearer capability requirements to be supported by the terminal adaptation function in the MT (see GSM 07.01 for BC and HLC coding). The specific signalling requirements are those for "speech" and "facsimile group 3" or "facsimile group 3" only, respectively. The MT indicates in the call set up request the requirements, e.g. first speech, second facsimile by sending the bearer capability information element(s) in the appropriate order. For an "auto calling" facsimile request, the facsimile group 3 bearer capability is sent as the first or the only bearer capability for Teleservice 61 or 62, respectively. For interworking between Teleservice 61 and Teleservice 62 refer to GSM 02.03 and 07.01.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.1 Handling of tonal signals
Because the CCITT defined service uses modems, there are some signals received from the analogue link at the MSC/IWF and (where used) the fax adaptor which do not have a direct binary representation. These signals cannot therefore be passed across the radio interface in the same way as the CCITT Recommendation T.30 and CCITT Recommendation T.4 information. These signals are the modem called (CED) and calling (CNG) tones sent at the start of each fax data phase of the call; they are generated locally by the FA/MT and/or FA/IWF, exploiting an end‑to‑end time alignment mechanism, triggered by appropriate messages on the GSM signalling channel. The procedure is detailed in the following.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.2 Call establishment
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.2.1 Mobile terminated call
The PSTN facsimile group 3 terminal may be manually or automatically calling.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.2.1.1 Speech then facsimile
Refer to the diagram in figure II.1a/03.46 and II.1b/03.46. In both of the figures the initial call setup is mobile terminated. In figure I.1a/03.46 the DCD is also mobile terminated (MT), while the DCD in figure I.1b/03.46 is mobile originated (MO). In order to make the transition from the speech phase to the facsimile phase, the MODIFY command must be initiated by MMI at the MS. In the case where a GSM facsimile machine is used, it will turn on circuit 108/2 when it is connected to the line by manual intervention. In the case where a fax adaptor at MT is used, it will turn on circuit 108/2, when the mobile fax apparatus is connected to the line by manual intervention. After determination of the DCD and ICM (see subclause 6.4) and on completion of the synchronization process over the radio interface or the RLP establishment, CT107 shall be turned on by the MT; in case where a FA is used, on receipt of CT107 from MT, the FA will complete the tonal handshaking according to the rules in subclause 6.4. The analogue link at the FA/IWF side will be established in accordance with the T.30 rec.; provided the synchronization process is completed (CT108.2 ON condition), the appropriate tone according to the rules in subclause 6.4 shall be transmitted. In case of DCD mobile terminated the CED tone shall be transmitted after a silence of 1.8 to 2.5 sec (see T.30, 4.3.3.2) from the call being answered; during transmission of CED tone (2.6 sec minimum duration, followed by a delay period of 75 +/‑ 20 ms) the FA/IWF will process data received from the GSM‑TCH as usual, but relevant information (e.g. preamble of a BCS frame) shall be discarded without any buffering. Note that circuit 109 and circuit 106 (according CCITT Recommendation V.24) at the R interface of the MT must be turned on by the fax adaptor at the IWF before any further procedure can be carried out between the fax adaptors and consequently end‑to‑end. Once the connection is established, both circuit 106 and circuit 109 are clamped to the ON condition by the fax adaptor at the IWF, so fixing a full duplex mode throughout the whole facsimile phase of the call.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.2.1.2 Auto answer
Refer to diagram in figure II.2/GSM 03.46. A call received from the PSTN will cause the MT to turn on circuit 125 (according to CCITT Recommendation V.24) at the R interface. In the case where a GSM facsimile machine is used, CCITT Recommendation V.25bis auto answering process is handled directly by turning on circuit 108/2. In the case where a fax adaptor is used, circuit 125 will cause ring current to be sent to the mobile facsimile terminal. The fax adaptor will turn on circuit 108/2, when the mobile facsimile terminal answers the call. On receipt of circuit 108/2, the MT will answer the call and initiate the synchronization process and the establishment of the RLP across the radio interface. On completion of the synchronization process or RLP establishment, the modem at IWF will automatically be selected and send CED to PSTN facsimile terminal. Also circuit 107 shall be turned on by the MT. In the case where a fax adaptor is used, on receipt of circuit 107 from MT, the fax adaptor will initiate the tonal hand‑shake by sending CNG (mandatory). The analogue links at both the PSTN side and the mobile side (where a fax adaptor is used) will be established in accordance with the appropriate V. series recommendation. Note that circuit 109 and circuit 106 at the R interface of the MT must be turned on by the fax adaptor at the IWF before any further procedure can be carried out between the fax adaptors and consequently end‑to‑end. Once the connection is established, both circuit 106 and circuit 109 are clamped to the ON condition by the fax adaptor at the IWF, so fixing a full duplex mode throughout the whole facsimile phase of the call.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.2.2 Mobile originated calls
The PSTN facsimile group 3 terminal may be manually or automatically answered.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.2.2.1 Speech then facsimile
Refer to the diagram in figure II.3a/03.46 and figure II.3b/03.46. In both of the figures the initial call setup is mobile terminated. In figure II.3a/03.46 the DCD is also MO, while in figure II.3b/03.46 the DCD is MT. In order to make the transition from the speech phase to the facsimile phase, the MODIFY command must be initiated by MMI at the MS, which will result in an establishment of the RLP across the radio interface and connection to line of the FA/IWF. In the case where a fax adaptor is used, the mobile facsimile terminal must be connected to line by manual intervention at this stage, and will cause the fax adaptor to turn on circuit 108/2 (according to CCITT Recommendation V.24) towards the MT. In the case where a GSM facsimile machine is used, circuit 108/2 shall be turned on when the GSM facsimile machine is connected to line by manual intervention. After determination of the DCD and ICM (see subclause 6.4) and on completion of the synchronization process across the radio interface or the establishment of RLP, the modem at the IWF will be automatically selected and send the appropriate modem tone according to the rules in subclause 6.4 to PSTN facsimile terminal. Also circuit 107 shall be turned on by the MT, whereupon the FA/MT will complete the tonal handshaking according to the rules in subclause 6.4. In the case where a fax adaptor is used, the receipt of circuit 107 shall cause the fax adaptor to connect to line. The analogue links at both the PSTN side and the mobile side (where a fax adaptor is used) will be established in accordance with the appropriate CCITT V. series recommendation. Note that circuit 109 and circuit 106 at the R interface of the MT must be turned on by the fax adaptor at the IWF before any further procedure can be carried out between the fax adaptors and consequently end‑to‑end. Once the connection is established, both circuit 106 and circuit 109 are clamped to the ON condition by the fax adaptor at the IWF, so fixing a full duplex mode throughout the whole facsimile phase of the call.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.2.2.2 Auto calling
Refer to diagram in figure II.4/GSM 03.46. The auto calling procedure of CCITT Recommendation V.25bis is initiated at the CCITT Recommendation V.24 interface. This is done either directly from the GSM facsimile machine or, in the case where a fax adaptor is used, by loop disconnect or DTMF dialling information between the mobile facsimile terminal and the fax adaptor. When the call is answered, the synchronization process will be started and the RLP will be established across the radio interface. On completion of the synchronization process across the radio interface or RLP establishment, the modem at the IWF will be automatically selected and send CNG (mandatory) to PSTN facsimile terminal. Also CT107 shall be turned on by the MT. In the case where a fax adaptor is used, the receipt of circuit 107 shall cause the fax adaptor to connect to line. The analogue links at both the PSTN side and the mobile side (where a fax adaptor is used) will be established in accordance with the appropriate V. series recommendation. Note that circuit 109 and circuit 106 (according to CCITT Recommendation V.24) at the R interface of the MT must be turned on by the fax adaptor at the IWF before any further procedure can be carried out between the fax adaptors and consequently end‑to‑end. Once the connection is established, both circuit 106 and circuit 109 are clamped to the ON condition by the fax adaptor at the IWF, so fixing a full duplex mode throughout the whole facsimile phase of the call.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
8.2.2.3 Manual calling
Refer to diagram in figure II.5/GSM 03.46. When the call is answered, the RLP will be established across the radio interface providing circuit 108/2 in ON condition. In the case where a fax adaptor is used, the mobile facsimile terminal must be connected to line by manual intervention at this stage, and will cause the fax adaptor to turn on circuit 108/2 (according to CCITT Recommendation V.24) towards the MT. In the case where a GSM facsimile machine is used, circuit 108/2 shall be turned on when the GSM facsimile machine is connected to line by manual intervention. On completion of the synchronization process across the radio interface or RLP establishment, the modem at the IWF will be automatically selected and send CNG (mandatory) to PSTN facsimile terminal. Also circuit 107 shall be turned on by the MT. In the case where a fax adaptor is used, the receipt of circuit 107 shall cause the fax adaptor to connect to line. The analogue links at both the PSTN side and the mobile side (where a fax adaptor is used) will be established in accordance with the appropriate CCITT V. series recommendation. Note that circuit 109 and circuit 106 at the R interface of the MT must be turned on by the fax adaptor at the IWF before any further procedure can be carried out between the fax adaptors and consequently end‑to‑end. Once the connection is established, both circuit 106 and circuit 109 are clamped to the ON condition by the fax adaptor at the IWF, so fixing a full duplex mode throughout the whole facsimile phase of the call.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
9 Interworking to fixed networks
PSTN and ISDN only are considered, both used as transit networks to complement the PLMN in the end‑to‑end connection between facsimile group 3 terminal, figure 7/GSM 03.46. I W F ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ :┌────────┐┌─────────┐ : :│Protocol││ V.21 │ : ┌─────┐ :│Control ││ ┌───────┴─┐ : │ │ v v :│Monitor.│└─┤ V.27ter │ : ╔══════════╗2-w ╔╧═════╧╗ ╔═════════════╗╔════╗│ │╔═════════╗:│Trans- │ │ ┌───────┴─┐:───────────╢ PSTN ╟─── ║ TE2 ╟──╢ Fax adaptor ╟╢ MT ╟┘ └╢ BSS/MSC ╟:│coding │ └─┤ V.29 │: ╚══════════╝ ╚═══════╝ ╚═════════════╝╚════╝ ╚═════════╝:│Buffers │ │ Modem │: / \ :│ │ └─────────┘: ┌─────┐ ╔══════════╗ / \ :│ │ :─┤Codec├─┼─╢ ISDN ╟─── / \ :│L2RBOP │┌─────────────┐: └─────┘ : ╚══════════╝ / \ :│Mapping ││Tone handling│: 3.1kHz / \ :└────────┘└─────────────┘: audio ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ :┌─────────┐ ┌────────┐: :│ V.21 │ │Protocol│: :│ ┌───────┴─┐ │Control │: :└─┤ V.27ter │ │Monitor.│: : │ ┌───────┴─┐│Trans- │: 2-w: └─┤ V.29 ││coding │: ────: │ Modem ││Buffers │: : └─────────┘│LAPB- │: : │Handling│: :┌─────────────┐│L2RBOP │: :│Tone handling││Mapping │: :└─────────────┘└────────┘: └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ Figure 7/03.46: Network interworking
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
9.1 Interworking to PSTN
As the standard access of facsimile group 3 terminals for this Teleservice is a 2‑wire analogue interface, all the technical requirements for network interworking to PSTN are identical in principle to those encountered for the terminal connection to the MT. The key functional block is the fax adaptor described in clause 6 of the present document. As far as network interworking is concerned, the main function to be performed by such a block is the correct managing of a composite modem, in accordance with the requirements of CCITT Recommendation T.30: ‑ CCITT Recommendation V.21 synchronous mode, as standard facility for all BCS phases; ‑ CCITT Recommendation V.27ter for message speeds of 4 800 and 2 400 bit/s; ‑ CCITT Recommendation V.29 for message speeds of 9 600 and 7 200 bit/s. The mechanism for selecting the right modem is the following: ‑ the actual message speed is obtained by detecting the DCS frame (see table 2/CCITT Recommendation T.30) while in BCS phase; ‑ on entering the message phase, there is an interchange between the V.21 modem and the actual modem agreed upon between the terminals for message transmission; ‑ on exiting the message phase (RTC) the CCITT Recommendation V.21 modem is selected again. Times for settling the modem will be in accordance with the requirements of CCITT Recommendation T.30.
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
9.2 Interworking to ISDN
The use of 3.1 kHz audio bearer capability of ISDN allows for an interworking of PLMN very similar in practice to the scheme for PSTN, figure 7/GSM 03.46. The fax adaptor function is in conformance with the description given in clause 4 and subclause 7.1 of the present document. Annex A (normative): Structure and contents of the fax adaptor protocol elements
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
1 Principle structure of an element
Each FA protocol element consists of the element discriminator (one single octet) and the optional information field (arbitrary length). The elements are transmitted with octet 0, bit 1 first. Received information is forwarded with the same bit sequence as received. octet: 0 1 ..... n ┌───────────────┬────────────────────────────────────────────┐ │ Element │ CCITT Recommendation T.30 Protocol Element │ │ Discriminator │ (optional) │ └───────────────┴────────────────────────────────────────────┘ │<-- 1 octet -->│<--------------- n octets ----------------->│ Figure A.1/03.46: Principle FA protocol element structure
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2 Element discriminator coding
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2.1 BCS element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ X │ 0 │ y │ y │ 0 │ 0 │ 0 │ 0 │ └───┴───┴───┴───┴───┴───┴───┴───┘ │ └──┬──┘ │ 0 1 = begin of a BCS frame │ 1 0 = end of a BCS frame │ 0 0 = middle of a BCS frame │ 1 1 = entire BCS frame 0 = non-final frame 1 = final frame Figure A.2/03.46: Element discriminator of a BCS element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2.2 BCS abort element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ 1 │ 0 │ 1 │ 0 │ 0 │ 0 │ 0 │ 1 │ └───┴───┴───┴───┴───┴───┴───┴───┘ Figure A.3/03.46: Element discriminator of a BCS abort element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2.3 BCS transmit request element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ 0 │ 1 │ 0 │ 0 │ 0 │ 0 │ 0 │ 1 │ └───┴───┴───┴───┴───┴───┴───┴───┘ Figure A.4/03.46: Element discriminator of a BCS transmit request element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2.4 Preamble element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ 0 │ 1 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ └───┴───┴───┴───┴───┴───┴───┴───┘ Figure A.5/03.46: Element discriminator of a preamble element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2.5 Normal fax data element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ 0 │ 1 │ 0 │ 0 │ 1 │ 0 │ 0 │ 0 │ └───┴───┴───┴───┴───┴───┴───┴───┘ Figure A.6/03.46: Element discriminator of a normal fax data element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2.6 Error correction fax data element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ 0 │ 1 │ 0 │ 0 │ 1 │ 0 │ 0 │ 1 │ └───┴───┴───┴───┴───┴───┴───┴───┘ Figure A.7/03.46: Element discriminator of an error correction fax data element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2.7 End of data element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ 0 │ 1 │ 0 │ 0 │ 1 │ 0 │ 1 │ 0 │ └───┴───┴───┴───┴───┴───┴───┴───┘ Figure A.8/03.46: Element discriminator of an end of data element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
2.8 TCF element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ 1 │ 0 │ 0 │ 1 │ 0 │ 0 │ 0 │ 1 │ └───┴───┴───┴───┴───┴───┴───┴───┘ Figure A.9/03.46: Element discriminator of a TCF element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3 Information field content
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3.1 BCS element
CCITT Recommendation ╔════════════════════════╗ T.30 frame ║ FCF + [FIF] ║ ╚════════════════════════╝ | | FA protocol ╔═══╤════╤════════════════════════╗ element ║ D │ SN │ ║ ╚═══╧════╧════════════════════════╝ D = discriminator octet SN = sequence number (0 .. 255), bit 1 = LSB Figure A.10/03.46: Information field content of a BCS element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3.2 BCS abort element
no information field available
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3.3 BCS transmit request element
FA protocol ╔═══╤════╗ element ║ D │ SN ║ ╚═══╧════╝ D = discriminator octet SN = sequence number (0 .. 255), bit 1 = LSB = Least significant bit
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3.4 Preamble element
no information field available
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3.5 Normal fax data element
transcoded ═╤═══════════════════════════════════════╤═ facsimile │ max. 936 bits of facsimile coded data │ data ═╧═══════════════════════════════════════╧═ │ │ FA protocol ╔═══╤═══════════════════════════════════════╗ element ║ D │ ║ ╚═══╧═══════════════════════════════════════╝ D = discriminator octet Figure A.11/03.46: Information field content of a normal fax data element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3.6 Error correction fax data element
CCITT Recommendation T.4 frame ╔════════════════════════╗ (FCD or RCP) ║ FCF + [FIF] ║ ╚════════════════════════╝ | | FA protocol ╔═══╤════════════════════════╗ element ║ D │ ║ ╚═══╧════════════════════════╝ D = discriminator octet Figure A.12/03.46: Information field content of an error correction fax data element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3.7 End of data element
no information field available
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
3.8 TCF element
bit 8 7 6 5 4 3 2 1 ┌───┬───┬───┬───┬───┬───┬───┬───┐ │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ X │ └───┴───┴───┴───┴───┴───┴───┴───┘ X = 0 : TCF_OK X = 1 : TCF_NOK Figure A.13/03.46: Information field content of a TCF element
1b3a41393e6b9c2d9c5a8ec454e96ca8
03.46
4 Relationship of FA protocol elements with LAPB, L2RBOP and RLP
Refer also to GSM 07.03 FA protocol ╔═╤════════════════════════╗ element ║D│ optional information ║ ╚═╧════════════════════════╝ | | LAPB I-frame ╔═╤═╤══════════════════════════╤═══╗ information ║A│C│ │FCS║ field ╚═╧═╧══════════════════════════╧═══╝ | | ╔══╤══════════════════════════╤══╤══╤═════════╗ L2RBOP PDU ║S1│ │S2│S3│arbitrary║ ╚══╧══════════════════════════╧══╧══╧═════════╝ | | RLP ╔═╤═════════════════════════════════════════════╤═╗ block ║H│ │F║ ╚═╧═════════════════════════════════════════════╧═╝ D = Discriminator octet, A = address field, C = control field, S1, S2, S3 = status octets, H = RLP header, F = RLP FCS Figure A.14/03.46: Mapping for a "short" FA protocol element FA protocol ╔═╤═══════════════════ ═════════╗ element ║D│ information ... ║ ╚═╧═══════════════════ ═════════╝ | | LAPB I-frame ╔═╤═╤═════════════════════ ═════════╤═══╗ information ║A│C│ │ │ ... │ │FCS║ field ╚═╧═╧═════════════════════ ═════════╧═══╝ / / \ \ \ \ ╔══╤════════╗╔══╤════════╗ ╔══╤══════╤══╤══╗ L2RBOP PDUs ║S0│ #1 ║║S0│ #2 ║ ... ║S1│ #n │S2│S3║ ╚══╧════════╝╚══╧════════╝ ╚══╧══════╧══╧══╝ / / \ \ \ \ RLP ╔═╤════════════╤═╗╔═╤════════════╤═╗ ╔═╤═════════════╤═╗ blocks ║H│ │F║║H│ │F║.║H│ │F║ ╚═╧════════════╧═╝╚═╧════════════╧═╝ ╚═╧═════════════╧═╝ D = Discriminator octet, A = address field, C = control field, S0, S1, S2, S3 = status octets, H = RLP header, F = RLP FCS Figure A.15/03.46: Mapping for a "long" FA protocol element Appendix I (informative): Abbreviations from CCITT Recommendation T.30 and T.4 Table I.1/03.46: Abbreviations from CCITT Recommendation T.30 Abbre‑ Function Signal format T.30 T.30 viation standard err.corr. CED Called station identification 2100 Hz X X CFR Confirmation to receive X010 0001 X X CRP Command repeat X101 1000 X X CIG Calling subscriber identification 1000 1000 X X CNG Calling tone 1100 Hz X X CSI Called subscriber identification 0000 0010 X X CTC Continue to correct X100 1000 X CTR Response to continue to correct X010 0011 X DCN Disconnect X101 1111 X X DCS Digital command signal X100 0001 X X DIS Digital identification signal 0000 0001 X X DTC Digital transmit command 1000 0001 X X EOM End of message X111 0001 X EOP End of procedure X111 0100 X EOR End of retransmission X111 0011 X ERR Response to end of retransmission X011 1000 X FCD Facsimile coded data 0110 0000 X FCF Facsimile control field ‑‑‑ X X FCS Frame checking sequence 16 bits X X FIF Facsimile information field ‑‑‑ X X FTT Failure to train X010 0010 X X MCF Message confirmation X011 0001 X X MPS Multi‑page signal X111 0010 X NSC Non‑standard facilities command 1000 0100 X X NSF Non‑standard facilities 0000 0100 X X NSS Non‑standard set‑up X100 0100 X X PIN Procedural interrupt negative X011 0100 X X PIP Procedural interrupt positive X011 0101 X X PIS Procedure interrupt signal 462 Hz X X PPR Partial page request X011 1101 X PPS Partial page signal X111 1101 X PRI Procedure interrupt X111 XXXX X RCP Return to control for partial page 0110 0001 X RNR Receive not ready X011 0111 X RR Receive ready X111 0110 X RTN Retrain negative X011 0010 X X RTP Retrain positive X011 0011 X X TCF Training check frame 0... 1.5s X X TSI Transmitting subscriber identification X100 0010 X X Table I.2/03.46: Abbreviations from CCITT Recommendation T.4 Abbre‑ Function Signal format viation EOL End of line 0000 0000 0001 RTC Return to control 6 * EOL Appendix II (informative): Procedure examples 106, 107, 108/2, 109: circuits according to CCITT Recommendation V.24 (1) manual intervention (2) mandatory (3) locally generated by the fax adaptor at IWF (4) optionally (5) triggered by delayed CT108.2 (3 sec) Figure II.1a/03.46: Mobile terminated call ‑ speech then facsimile DCD mobile terminated 106, 107, 108/2, 109: circuits according to CCITT Recommendation V.24 (1) manual intervention (2) mandatory (3) locally generated by fax adaptor at IWF (4) optionally (5) triggered by delayed CT108.2 (3 sec) (6) transmitted only if neither CED nor BCS is already received Figure II.1b/03.46: Mobile terminated call ‑ speech then facsimile DCD mobile originated 106, 107, 108/2, 109, 125: circuits according to CCITT Recommendation V.24 (1) manual or automatic operation (2) mandatory (3) either after synchronization or RLP establishment (4) locally generated by fax adaptor at IWF Figure II.2/03.46: Mobile terminated call ‑ auto answer 106, 107, 108/2, 109: circuits according to CCITT Recommendation V.24 (1) manual intervention (2) mandatory (3) locally generated by fax adaptor at IWF (4) optionally (5) triggered by delayed CT108.2 (3 sec) Figure II.3a/03.46: Mobile originated call ‑ speech then facsimile DCD mobile terminated 106, 107, 108/2, 109: circuits according to CCITT Recommendation V.24 (1) manual intervention (2) mandatory (3) locally generated by fax adaptor at IWF (4) optionally (5) triggered by delayed CT108.2 (3 sec) (6) transmitted only if neither CED nor BCS is already received Figure II.3b/03.46: Mobile originated call ‑ speech then facsimile DCD mobile originated 106, 107, 108/2, 109: circuits according to CCITT Recommendation V.24 (1) manual intervention (2) mandatory (3) PSTN fax terminal may be manually or automatically answered (4) either after synchronization or RLP establishment (5) locally generated by fax adaptor at IWF Figure II.4/03.46: Mobile originated call ‑ auto calling 106, 107, 108/2, 109: circuits according to CCITT Recommendation V.24 (1) manual intervention (2) mandatory (3) PSTN fax terminal may be manually or automatically answered (4) either after synchronization or RLP establishment (5) locally generated by fax adaptor at IWF Figure II.5/03.46: Mobile originated call ‑ manual calling Figure II.6/03.46: Mobile originated facsimile transmission Figure II.7/03.46: Mobile terminated facsimile transmission Figure II.8/03.46: Mobile originated facsimile transmission (error correction mode) Figure II.9/03.46: Mobile originated facsimile transmission ‑ error recovery (example) Figure II.10/03.46: Mobile terminated facsimile transmission ‑ error recovery (example) Figure II.11/03.46: Mobile originated facsimile transmission ‑ error recovery (example) Figure II.12/03.46: Mobile originated facsimile transmission ‑ error recovery (example) Figure II.13/03.46: Mobile originated facsimile transmission ‑ error recovery (example) Annex B (informative): Change Request History Change history SMG No. TDoc. No. CR. No. Section affected New version Subject/Comments SMG#11 4.1.2 ETSI Publication SMG#20 5.0.0 Release 1996 version SMG#27 6.0.0 Release 1997 version SMG#29 7.0.0 Release 1998version TSG#06 8.0.0 Agreed to be created as a version 8 for Release 1999 History Document history V7.0.0 August 1999 Publication V8.0.0 January 2000
8b410df87e6e8f32e6bbafe6636ff843
06.07
1 Scope
The present document specifies the digital test sequences for the GSM half rate speech codec. These sequences test for a bit exact implementation of the half rate speech transcoder (GSM 06.20 [2]), Voice Activity Detector (GSM 06.42 [6]), comfort noise (GSM 06.22 [4]) and the discontinuous transmission (GSM 06.41 [5]).
8b410df87e6e8f32e6bbafe6636ff843
06.07
2 References
The following documents contain provisions which, through reference in this text, constitute provisions of the present document. • References are either specific (identified by date of publication, edition number, version number, etc.) or non‑specific. • For a specific reference, subsequent revisions do not apply. • For a non-specific reference, the latest version applies. • A non-specific reference to an ETS shall also be taken to refer to later versions published as an EN with the same number. • For this Release 1999 document, references to GSM documents are for Release 1999 versions (version 8.x.y). [1] GSM 01.04: "Digital cellular telecommunications system (Phase 2+); Abbreviations and acronyms". [2] GSM 06.20: "Digital cellular telecommunications system (Phase 2+); Half rate speech; Half rate speech transcoding". [3] GSM 06.21: "Digital cellular telecommunications system (Phase 2+); Half rate speech; Substitution and muting of lost frame for half rate speech traffic channels". [4] GSM 06.22: "Digital cellular telecommunications system (Phase 2+); Half rate speech; Comfort noise aspects for half rate speech traffic channels". [5] GSM 06.41: "Digital cellular telecommunications system (Phase 2+); Half rate speech; Discontinuous Transmission (DTX) for half rate speech traffic channels". [6] GSM 06.42: "Digital cellular telecommunications system (Phase 2+); Half rate speech; Voice Activity Detector (VAD) for half rate speech traffic channels". [7] GSM 06.06: "Digital cellular telecommunications system (Phase 2+); Half rate speech; ANSI‑C code for the GSM half rate speech codec". [8] GSM 06.02: "Digital cellular telecommunications system (Phase 2+); Half rate speech; Half rate speech coding functions".
8b410df87e6e8f32e6bbafe6636ff843
06.07
3 Definitions and abbreviations
8b410df87e6e8f32e6bbafe6636ff843
06.07
3.1 Definitions
Definition of terms used in the present document can be found in GSM 06.20 [2], GSM 06.21 [3], GSM 06.22 [4], GSM 06.41 [5] and GSM 06.42 [6].
8b410df87e6e8f32e6bbafe6636ff843
06.07
3.2 Abbreviations
For the purposes of the present document, the following abbreviations apply: ETS European Telecommunication Standard GSM Global System for Mobile communications For abbreviations not given in this clause, see GSM 01.04 [1].
8b410df87e6e8f32e6bbafe6636ff843
06.07
4 General
Digital test sequences are necessary to test for a bit exact implementation of the half rate speech transcoder (GSM 06.20 [2]), Voice Activity Detector (GSM 06.42 [6]), comfort noise (GSM 06.22 [4]) and the discontinuous transmission (GSM 06.41 [5]). The test sequences may also be used to verify installations of the ANSI C code in GSM 06.06 [7]. Clause 5 describes the format of the files which contain the digital test sequences. Clause 6 describes the test sequences for the speech transcoder. Clause 7 describes the test sequences for the VAD, comfort noise and discontinuous transmission. Clause 8 describes the method by which synchronization is obtained between the test sequences and the speech codec under test. Clause 9 describes the optional acceptance testing of the speech encoder and decoder in the TRAU by means of 8 bit A- or -law compressed test sequences on the A-Interface. Electronic copies of the digital test sequences are provided as clause 10, these digital test sequences are contained in archive en_300968v080001p0.ZIP which accompanies the present document.
8b410df87e6e8f32e6bbafe6636ff843
06.07
5 Test sequence format
This clause provides information on the format of the digital test sequences for the GSM half rate speech transcoder (GSM 06.20 [2]), Voice Activity Detector (GSM 06.42 [6]), comfort noise (GSM 06.22 [4]) and the discontinuous transmission (GSM 06.41 [5]).
8b410df87e6e8f32e6bbafe6636ff843
06.07
5.1 File format
The test sequence files are provided in archive en_300968v080001p0.ZIP which accompanies the present document. Following decompression, by execution of the 11 "disk*.exe" files, four types of file are provided: ‑ Files for input to the GSM half rate speech encoder: *.INP ‑ Files for comparison with the encoder output: *.COD ‑ Files for input to the GSM half rate speech decoder: *.DEC ‑ Files for comparison with the decoder output: *.OUT Tables 1, 2, 3 and 4 define the formats of the four types of file. Each parameter in these tables is contained in a 16 bit word except for the samples of the 8 bit PCM test sequences, which are contained in an 8 bit word each. The left or right justification is indicated in the tables. The size and location of speech parameters in the encoder output (*.COD) and decoder input files (*.DEC) are described in GSM 06.20 [2].
8b410df87e6e8f32e6bbafe6636ff843
06.07
5.2 Codec homing
Each *.INP file includes two homing frames at the start of the test sequence. The function of these frames is to reset the speech encoder state variables to their initial value. In the case of a correct installation of the ANSI‑C simulation (GSM 06.06 [7]), all speech encoder output frames shall be identical to the corresponding frame in the *.COD file. In the case of a correct hardware implementation undergoing type approval, the first speech encoder output frame is undefined and need not be identical to the first frame in the *.COD file, but all remaining speech encoder output frames shall be identical to the corresponding frames in the *.COD file. Each *.DEC file includes two homing frames at the start of the test sequence. The function of these frames is to reset the speech decoder state variables to their initial value. In the case of a correct installation of the ANSI‑C simulation (GSM 06.06 [7]), all speech decoder output frames shall be identical to the corresponding frame in the *.OUT file. In the case of a correct hardware implementation undergoing type approval, the first speech decoder output frame is undefined and need not be identical to first frame in the *.OUT file, but all remaining speech decoder output frames shall be identical to the corresponding frames in the *.OUT file. Table 1: Encoder input sequence (*.INP) format Name Description No. of bits Justification s(n) Encoder input signal 13 Left Table 2: Encoder output sequence (*.COD) format Name Description No. of words Justification Speech Speech parameters to the channel encoder 18 Right Additional information VAD SP Voice activity detection flag SP flag 1 1 Right Right Table 3: Decoder input sequence (*.DEC) format Name Description No. of bits/words Justification Speech parameters Speech parameters to the channel encoder 18 words Right BFI flag UFI flag SID flag TAF flag Bad Frame Indicator Unreliable Frame Indicator SIlence Descriptor Time Alignment Flag 1 bit / 1 word 1 bit / 1 word 2 bits / 1 word 1 bit / 1 word Right Right Right Right Table 4: Decoder output sequence (*.OUT) format Name Description No. of bits Justification s'(n) Decoder output signal 13 Left
8b410df87e6e8f32e6bbafe6636ff843
06.07
6 Speech codec test sequences
This clause describes the test sequences designed to exercise the GSM half rate speech transcoder (GSM 06.20 [2]).
8b410df87e6e8f32e6bbafe6636ff843
06.07
6.1 Codec configuration
The speech encoder shall be configured to operate in the non‑DTX mode. The VAD and SP flags shall be set to 1 at the speech encoder output.
8b410df87e6e8f32e6bbafe6636ff843
06.07
6.2 Speech codec test sequences
Table 5 lists the location and size of the speech codec test sequences.
8b410df87e6e8f32e6bbafe6636ff843
06.07
6.2.1 Speech encoder test sequences
Three encoder input sequences are provided: ‑ SEQ01.INP ‑ Sequence for exercising the LPC vector quantization codebooks; ‑ SEQ02.INP ‑ Sequence for exercising the long term predictor codebooks; ‑ SEQ03.INP ‑ Sequence for exercising the remaining excitation codebooks. The SEQ01.INP sequence causes the GSM half rate speech encoder to select every vector in the three reflection coefficient vector quantizers at least once. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the SEQ01.COD sequence. The SEQ02.INP sequence causes the encoder to select at least once every quantization level in the eight bit table of long term filter lags for the first subframe, and every quantization level in the four bit delta lag quantizer for subframes 2, 3, and 4. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the SEQ02.COD sequence. The SEQ03.INP sequence causes the encoder to select each of the quantization levels at least once for the remaining GSM half rate speech coder parameters: R0 (frame energy), the soft interpolation decision for the LPC coefficients, the four voicing modes, the gain vectors (GSP0) for each of the voicing modes, and the voiced and unvoiced VSELP codebooks. The only exception to this is that two GSP0 levels in the unvoiced mode are not selected. However, these levels are exercised in the GSM half rate speech decoder as described below. In a correct implementation, the resulting speech encoder output parameters shall be identical to those specified in the SEQ03.COD sequence.
8b410df87e6e8f32e6bbafe6636ff843
06.07
6.2.2 Speech decoder test sequences
Four speech decoder input sequences are provided: ‑ SEQ01.DEC; ‑ SEQ02.DEC; ‑ SEQ03.DEC; ‑ SEQ04.DEC. The SEQ01.DEC, SEQ02.DEC, and SEQ03.DEC sequences test the operation of the GSM half rate speech decoder in the absence of channel errors. They are derived from the corresponding SEQXX.INP sequences. In a correct implementation, the resulting speech decoder output shall be identical to the SEQ01.OUT, SEQ02.OUT, and SEQ03.OUT sequences, respectively. Together, these three sequences exercise every quantization level in every codebook in the decoder, with the exception of two GSP0 levels in the unvoiced mode. The SEQ04.DEC sequence is designed to test the GSM half rate speech decoder under conditions which can result from channel errors. In particular, it is the decoding of LTP lags at the lag table boundaries, given delta lag codes which if incorrectly decoded would point outside the eight bit lag table, that is being tested. Also, the two remaining GSP0 levels in the unvoiced mode are exercised by this sequence. In a correct implementation, the resulting speech decoder output shall be identical to the SEQ04.OUT sequence.
8b410df87e6e8f32e6bbafe6636ff843
06.07
6.2.3 Codec homing sequence
In addition to the test sequences described above, two homing sequences are provided to assist in codec type approval testing. SEQ05.INP contains one encoder‑homing‑frame. SEQ05.DEC contains one decoder‑homing‑frame. The use of these sequences is described in GSM 06.02 [8]. Table 5: Location and size of speech codec test sequences Disk No. File Name No. of frames Size (bytes) 1 1 2 2 SEQ01.INP SEQ01.COD SEQ01.DEC SEQ01.OUT 2 359 754 880 94 360 103 796 754 880 1 1 2 2 SEQ02.INP SEQ02.COD SEQ02.DEC SEQ02.OUT 781 249 920 31 240 34 364 249 920 1 1 2 2 SEQ03.INP SEQ03.COD SEQ03.DEC SEQ03.OUT 413 132 160 16 520 18 172 132 160 2 2 SEQ04.DEC SEQ04.OUT 76 3 344 24 320 1 2 SEQ05.INP SEQ05.DEC 1 320 44
8b410df87e6e8f32e6bbafe6636ff843
06.07
7 DTX test sequences
This clause describes the test sequences designed to exercise the VAD algorithm (GSM 06.42 [6]), comfort noise (GSM 06.22 [4]) and discontinuous transmission (GSM 06.41 [5]).
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.1 Codec configuration
The VAD, comfort noise and discontinuous transmission shall be tested in conjunction with the speech encoder [2]). The speech encoder shall be configured to operate in the DTX mode defined in GSM 06.22 [4].
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2 DTX test sequences
Each DTX test sequence consists of four files: ‑ Files for input to the GSM half rate speech encoder: *.INP ‑ Files for comparison with the encoder output *.COD ‑ Files for input to the GSM half rate speech decoder: *.DEC ‑ Files for comparison with the decoder output: *.OUT The *.DEC files are generated from the corresponding *.COD files. In a correct implementation, the speech encoder parameters generated by the *.INP file shall be identical to those specified in the *.COD file; and the speech decoder output generated by the *.DEC file shall be identical to that specified in the *.OUT file. Table 6 lists the DTX test sequences and their size in frames.
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2.1 Predictor values computation
The computation of the predictor values described in GSM 06.42 [6] is not tested explicitly, since the results from the computation are tested many times via the spectral comparison and threshold adaptation tests.
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2.2 Spectral comparison
The spectral comparison algorithm described in GSM 06.42 [6] is tested by the following test sequence: ‑ DTX01.*
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2.3 Threshold adaptation
The threshold adaptation algorithm described in GSM 06.42 [6] is tested by the following test sequence: ‑ DTX02.*
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2.4 Periodicity detection
The periodicity detection algorithm described in GSM 06.42 [6] is tested by the following test sequence: ‑ DTX03.*
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2.5 Tone detection
The tone detection algorithm described in GSM 06.42 [6] is tested by the following test sequence: ‑ DTX04.*
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2.6 Safety and initialization
This sequence checks the safety paths used to prevent zero values being passed to the norm function. It checks the functions described in the adaptive filtering and energy computation, and the prediction values computation given in GSM 06.42 [6]. This sequence also checks the initialization of thvad and the rvad array: ‑ DTX05.*
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2.7 Comfort noise test sequence
The test sequences described in sub‑clauses 7.2.2 to 7.2.6 are designed to exercise the VAD described in GSM 06.42 [6] and the discontinuous transmission described in GSM 06.41 [5]. The following test sequence is defined to exercise the comfort noise algorithm described in GSM 06.22 [4]: ‑ DTX06.*
8b410df87e6e8f32e6bbafe6636ff843
06.07
7.2.8 Real speech and tones
The test sequences cannot be guaranteed to find every possible error. There is therefore a small possibility that an incorrect implementation produces the correct output for the test sequences, but fails with real signals. Consequently, an extra sequence is included, which consists of very clean speech, barely detectable speech and a swept frequency tone: ‑ DTX07.* NOTE: Some of the DTX test sequences contain homing frames. The DTX test sequences are therefore only suitable for testing a single transcoding. Table 6: Location and size of DTX test sequences size (bytes) Disk No. File Name No. of Frames *.INP *.COD *.DEC *.OUT 3 DTX01 460 147 200 18 400 20 240 147 200 3 DTX02 886 283 520 35 440 38 984 283 520 3 DTX03 125 40 000 5 000 5 500 40 000 3 DTX04 317 101 440 12 680 13 948 101 440 3 DTX05 37 11 840 1 480 1 628 11 840 4 DTX06 240 76 800 9 600 10 560 76 800 4 DTX07 1 188 380 160 47 520 52 272 380 160
8b410df87e6e8f32e6bbafe6636ff843
06.07
8 Sequences for finding the 20 ms framing of the GSM half rate speech encoder
When testing the decoder, alignment of the test sequences used to the decoder framing is achieved by the air interface (testing of MS) or can be reached easily on the Abis‑interface (testing on network side). When testing the encoder, usually there is no information available about where the encoder starts its 20 ms segments of speech input to the encoder. In the following, a procedure is described to find the 20 ms framing of the encoder using special synchronization sequences. This procedure can be used for MS as well as for network side. Synchronization can be achieved in two steps. First, bit synchronization has to be found. In a second step, frame synchronization can be determined. This procedure takes advantage of the codec homing feature of the half rate codec, which puts the codec in a defined home state after the reception of the first homing frame. On the reception of further homing frames, the output of the codec is predefined and can be triggered to.
8b410df87e6e8f32e6bbafe6636ff843
06.07
8.1 Bit synchronization
The input to the speech encoder is a series of 13 bit long words (104 kbits/s, 13 bit linear PCM). When starting to test the speech encoder, no knowledge is available on bit synchronization, i.e. where the encoder expects its least significant bits, and where it expects the most significant bits. The encoder homing frame consists of 160 samples, all set to zero with the exception of the least significant bit, which is set to one (0 0000 0000 0001 binary, or 0x0008 hex if written into 16 bit words left justified). If two such encoder homing frames are input to the encoder consecutively, the decoder homing frame is expected at the output as a reaction of the second encoder homing frame. Since there are only 13 possibilities for bit synchronization, after a maximum of 13 trials bit synchronization can be reached. In each trial, three consecutive encoder homing frames are input to the encoder. If the decoder homing frame is not detected at the output, the relative bit position of the three input frames is shifted by one and another trial is performed. As soon as the decoder homing frame is detected at the output, bit synchronization is found, and the first step can be terminated. The reason why three consecutive encoder homing frames are needed is that frame synchronization is not known at this stage. To be sure that the encoder reads two complete homing frames, three frames have to be input. Wherever the encoder has its 20 ms segmentation, it will always read at least two complete encoder homing frames. An example of the 13 different frame triplets is given in sequence BITSYNC.INP (see table 7).
8b410df87e6e8f32e6bbafe6636ff843
06.07
8.2 Frame synchronization
Once bit synchronization is found, frame synchronization can be found by inputting one special frame that delivers 160 different output frames, depending on the 160 different positions that this frame can possibly have with respect to the encoder framing. This special synchronization frame was found by taking one input frame and shifting it through the positions 0 to 159. The corresponding 160 encoded speech frames were calculated and it was verified that all 160 output frames were different. When shifting the input synchronization frame, the samples at the beginning were set to 0x0008 hex, which corresponds to the samples of the encoder homing frame. Before inputting this special synchronization frame to the encoder, again the encoder has to be reset by one encoder homing frame. A second encoder homing frame is needed to provoke a decoder homing frame at the output that can be triggered to. And since the framing of the encoder is not known at that stage, three encoder homing frames have to precede the special synchronization frame to ensure that the encoder reads at least two homing frames, and at least one decoder homing frame is produced at the output, serving as a trigger for recording. The special synchronization frame preceded by the three encoder homing frames are given in SEQSYNC.INP. The corresponding 160 different output frames are given in SYNC000.COD through SYNC159.COD. The three digit number in the filename indicates the number of samples by which the input was retarded with respect to the encoder framing. By a corresponding shift in the opposite direction, alignment with the encoder framing can be reached.
8b410df87e6e8f32e6bbafe6636ff843
06.07
8.3 Formats and sizes of the synchronization sequences
BIT SYNC.INP: This sequence consists of 13 frame triplets. It has the format of the speech encoder input test sequences (13 bit left justified with the three least significant bits set to zero). The size of it is therefore: SIZE (BITSYNC.INP) = 13 * 3 * 160 * 2 bytes = 12480 bytes. SEQSYNC.INP: This sequence consists of 3 encoder reset frames and the special synchronization frame. It has the format of the speech encoder input test sequences (13 bit left justified with the three least significant bits set to zero). The size of it is therefore: SIZE (SEQSYNC.INP) = 4 * 160 * 2 bytes = 1280 bytes. SYNCXXX.COD: These sequences consists of 1 encoder output frame each. They have the format of the speech encoder output test sequences (16 bit words right justified). The values of the VAD and SP flags are set to one in these files. The size of them is therefore: SIZE (SYNCXXX.COD) = (18 + 2) * 2 bytes = 40 bytes Table 7 summarizes this information. Table 7: Location, size and justification of synchronization sequences Disk No. Purpose of Sequence Name of Sequence No. of Frames Size in Bytes Justification 5 Bit Synchronization BITSYNC.INP 39 1 2480 Left 5 Frame Synchronization (input) SEQSYNC.INP 4 1 280 Left 5 Frame Synchronization (output) SYNC000.COD SYNC001.COD SYNC002.COD " " " SYNC159.COD 1 1 1 " " " 1 40 40 40 " " " 40 Right Right Right " " " Right
8b410df87e6e8f32e6bbafe6636ff843
06.07
9 Trau Testing with 8 Bit A- and µ-law PCM Test Sequences
In the previous clauses tests for the transcoder in the TRAU are described using 13 bit linear test sequences. However, these 13 bit test sequences require a special interface in the Trau and do not allow testing in the field. In most cases the TRAU has to be set in special mode before testing. As an option, the speech codec tests can be performed with A/ law compressed 8 bit PCM test sequences on the A interface. These modified input test sequences (*-X.INP) are generated from the original sequences by A or  law compression. As an input to the encoder they result in modified encoder output sequences (*-X.COD). The same *.dec decoder input sequences as in clause 6.2.2. are then used to produce the output sequences *-X.OUT, which are A- or µ-law compressed. The A- and µ-law compression and decompression does not change the homing frames at the encoder input. The format of all A- and -law PCM files *-X.INP and *-X.OUT is one sample (8 bit) per byte. The format of all other files is as described in clause 5. All files are provided in archive en_300968v080001p0.ZIP which accompanies the present document. The 'X' in the tables below with the filenames stands for A (A-law) and U (-law), respectively. The decoder input files *.dec are the same as in Table 5 and are not described in this clause. Table 8: Location and size of compressed 8 bit PCM speech codec test sequences Disk No. File Name No. of frames Size (bytes) 6/7 6/7 6/7 SEQ01-X.INP SEQ01-X.COD SEQ01-X.OUT 2 359 377 440 94 360 377 440 6/7 6/7 6/7 SEQ02-X.INP SEQ02-X.COD SEQ02-X.OUT 781 124 960 31 240 124 960 6/7 6/7 6/7 SEQ03-X.INP SEQ03-X.COD SEQ03-X.OUT 413 66 080 16 520 66 080 6/7 SEQ04-X.OUT 76 12 160 6/7 SEQ05-X.INP 1 160 Table 9: Location and size of compressed 8 bit PCM DTX test sequences size (bytes) Disk No. File Name No. of Frames *.INP *.COD *.OUT 8/9 DTX01-X 460 73 600 18 400 73 600 8/9 DTX02-X 886 141 760 35 440 141 760 8/9 DTX03-X 125 20 000 5 000 20 000 8/9 DTX04-X 317 50 720 12 680 50 720 8/9 DTX05-X 37 5 920 1 480 5 920 8/9 DTX06-X 240 38 400 9 600 38 400 8/9 DTX07-X 1 188 190 080 47 520 190 080 In addition to the testsequences above, special input (seqsyncX.inp) and output (syncxxxX.cod) sequences for frame synchronization are provided. The X again stands for A and  law compressed PCM. The synchronization procedure is described in clause 8. Table 10: Location, size and justification of compressed8 bit PCM test sequences Disk No. Purpose of Sequence Name of Sequence No. of Frames Size in Bytes Justification 10/11 Frame Synchronization (input) SEQSYNCX.INP 4 640 - 10/11 Frame Synchronization (output) SYNC000X.COD SYNC001X.COD SYNC002X.COD " " " SYNC159X.COD 1 1 1 " " " 1 40 40 40 " " " 40 Right Right Right " " " Right
8b410df87e6e8f32e6bbafe6636ff843
06.07
10 Test sequences for the GSM half rate speech codec
NOTE: This clause is contained in archive en_300968v080001p0.ZIP which accompanies the present document. Annex A (informative): Change Request History Change history SMG No. TDoc. No. CR. No. Section affected New version Subject/Comments SMG#16 4.0.3 ETSI Publication SMG#20 5.0.1 Release 1996 version SMG#23 97-737 A003 5.1.1 UAP60 and Supplementary notes on 06.06 Call Graph Changes SMG#27 6.0.0 Release 1997 version SMG#28 6.0.1 ETSI Publication SMG#29 7.0.0 Release 1998 version 7.0.1 Version update to 7.0.1 for Publication SMG#31 8.0.0 Release 1999 version 8.0.1 Update to Version 8.0.1 for Publication History Document history V8.0.0 July 2000 One-step Approval Procedure OAP 20001103: 2000-07-05 to 2000-11-03 V8.0.1 November 2000 Publication
ad3845652ec99fdffd75badceec5143f
06.32
0.1 Scope
The present document specifies the Voice Activity Detector (VAD) to be used in the Discontinuous Transmission (DTX) as described in GSM 06.31. It also specifies the test methods to be used to verify that a VAD complies with the technical specification. The requirements are mandatory on any VAD to be used either in the GSM Mobile Stations (MS)s or Base Station Systems (BSS)s.
ad3845652ec99fdffd75badceec5143f
06.32
0.2 References
The following documents contain provisions which, through reference in this text, constitute provisions of the present document. • References are either specific (identified by date of publication, edition number, version number, etc.) or non‑specific. • For a specific reference, subsequent revisions do not apply. • For a non-specific reference, the latest version applies. • A non-specific reference to an ETS shall also be taken to refer to later versions published as an EN with the same number. • For this Release 1999 document, references to GSM documents are for Release 1999 versions (version 8.x.y). [1] GSM 01.04: "Digital cellular telecommunications system (Phase 2+); Abbreviations and acronyms". [2] GSM 06.10: "Digital cellular telecommunications system(Phase 2+); Full rate speech; Transcoding". [3] GSM 06.12: "Digital cellular telecommunications system(Phase 2+); Full rate speech; Comfort noise aspect for full rate speech traffic channels". [4] GSM 06.31: "Digital cellular telecommunications system(Phase 2+); Full rate speech; Discontinuous Transmission (DTX) for full rate speech traffic channels".
ad3845652ec99fdffd75badceec5143f
06.32
0.3 Abbreviations
Abbreviations used in the present document are listed in GSM 01.04 [1].
ad3845652ec99fdffd75badceec5143f
06.32
1 General
The function of the VAD is to indicate whether each 20 ms frame produced by the speech encoder contains speech or not. The output is a binary flag which is used by the TX DTX handler defined in GSM 06.31 [4]. The ETS is organized as follows. Clause 2 describes the principles of operation of the VAD. In clause 3, the computational details necessary for the fixed point implementation of the VAD algorithm are given. This clause uses the same notation as used for computational details in GSM 06.10. The verification of the VAD is based on the use of digital test sequences. Clause 4 defines the input and output signals and the test configuration, whereas the detailed description of the test sequences is contained in clause A.2. The performance of the VAD algorithm is characterized by the amount of audible speech clipping it introduces and the percentage activity it indicates. These characteristics for the VAD defined in the present document have been established by extensive testing under a wide range of operating conditions. The results are summarized in clause A.3.
ad3845652ec99fdffd75badceec5143f
06.32
2 Functional description
The purpose of this clause is to give the reader an understanding of the principles of operation of the VAD, whereas the detailed description is given in clause 3. In case of discrepancy between the two descriptions, the detailed description of clause 3 shall prevail. In the following clauses of clause 2, a Pascal programming type of notation has been used to describe the algorithm.
ad3845652ec99fdffd75badceec5143f
06.32
2.1 Overview and principles of operation
The function of the VAD is to distinguish between noise with speech present and noise without speech present. The biggest difficulty for detecting speech in a mobile environment is the very low speech/noise ratios which are often encountered. The accuracy of the VAD is improved by using filtering to increase the speech/noise ratio before the decision is made. For a mobile environment, the worst speech/noise ratios are encountered in moving vehicles. It has been found that the noise is relatively stationary for quite long periods in a mobile environment. It is therefore possible to use an adaptive filter with coefficients obtained during noise, to remove much of the vehicle noise. The VAD is basically an energy detector. The energy of the filtered signal is compared with a threshold; speech is indicated whenever the threshold is exceeded. The noise encountered in mobile environments may be constantly changing in level. The spectrum of the noise can also change, and varies greatly over different vehicles. Because of these changes the VAD threshold and adaptive filter coefficients must be constantly adapted. To give reliable detection the threshold must be sufficiently above the noise level to avoid noise being identified as speech but not so far above it that low level parts of speech are identified as noise. The threshold and the adaptive filter coefficients are only updated when speech is not present. It is, of course, potentially dangerous for a VAD to update these values on the basis of its own decision. This adaptation therefore only occurs when the signal seems stationary in the frequency domain but does not have the pitch component inherent in voiced speech. A tone detector is also used to prevent adaptation during information tones. A further mechanism is used to ensure that low level noise (which is often not stationary over long periods) is not detected as speech. Here, an additional fixed threshold is used. A VAD hangover period is used to eliminate mid‑burst clipping of low level speech. Hangover is only added to speech‑bursts which exceed a certain duration to avoid extending noise spikes.
ad3845652ec99fdffd75badceec5143f
06.32
2.2 Algorithm description
The block diagram of the VAD algorithm is shown in figure 2.1. The individual blocks are described in the following clauses. ACF, N and sof are calculated in the speech encoder. Figure 2.1: Functional block diagram of the VAD The global variables shown in the block diagram are described as follows: ‑ ACF are auto‑correlation coefficients which are calculated in the speech encoder defined in GSM 06.10 (clause 3.1.4, see also clause A.1). The inputs to the speech encoder are 16 bit 2's complement numbers, as described in GSM 06.10, clause 4.2.0; ‑ av0 and av1 are averaged ACF vectors; ‑ rav1 are autocorrelated predictor values obtained from av1; ‑ rvad are the autocorrelated predictor values of the adaptive filter; ‑ N is the long term predictor lag value which is obtained every sub‑segment in the speech coder defined in GSM 06.10; ‑ ptch indicates whether the signal has a steady periodic component; ‑ sof is the offset compensated signal frame obtained in the speech coder defined in GSM 06.10; ‑ pvad is the energy in the current frame of the input signal after filtering; ‑ thvad is an adaptive threshold; ‑ stat indicates spectral stationarity; ‑ vvad indicates the VAD decision before hangover is added; ‑ vad is the final VAD decision with hangover included.
ad3845652ec99fdffd75badceec5143f
06.32
2.2.1 Adaptive filtering and energy computation
Pvad is computed as follows: This corresponds to performing an 8th order block filtering on the input samples to the speech encoder, after zero offset compensation and pre‑emphasis. This is explained in clause A.1.
ad3845652ec99fdffd75badceec5143f
06.32
2.2.2 ACF averaging
Spectral characteristics of the input signal have to be obtained using blocks that are larger than one 20 ms frame. This is done by averaging the auto‑correlation values for several consecutive frames. This averaging is given by the following equations: Where n represents the current frame, n‑1 represents the previous frame etc. The values of constants are given in table 2.1. Table 2.1: Constants and variables for ACF averaging Constant Value Variable Initial value frames 4 previous ACF's av0 & av1 All set to 0
ad3845652ec99fdffd75badceec5143f
06.32
2.2.3 Predictor values computation
The filter predictor values aav1 are obtained from the auto‑correlation values av1 according to the equation: where: ‑ ‑ R = | av1[0], av1[1], av1[2], av1[3], av1[4], av1[5], av1[6], av1[7] | | av1[1], av1[0], av1[1], av1[2], av1[3], av1[4], av1[5], av1[6] | | av1[2], av1[1], av1[0], av1[1], av1[2], av1[3], av1[4], av1[5] | | av1[3], av1[2], av1[1], av1[0], av1[1], av1[2], av1[3], av1[4] | | av1[4], av1[3], av1[2], av1[1], av1[0], av1[1], av1[2], av1[3] | | av1[5], av1[4], av1[3], av1[2], av1[1], av1[0], av1[1], av1[2] | | av1[6], av1[5], av1[4], av1[3], av1[2], av1[1], av1[0], av1[1] | | av1[7], av1[6], av1[5], av1[4], av1[3], av1[2], av1[1], av1[0] | ‑ ‑ and: ‑ ‑ ‑ ‑ p = |av1[1]| a = |aav1[1]| |av1[2]| |aav1[2]| |av1[3]| |aav1[3]| |av1[4]| |aav1[4]| |av1[5]| |aav1[5]| |av1[6]| |aav1[6]| |av1[7]| |aav1[7]| |av1[8]| |aav1[8]| ‑ ‑ ‑ ‑ aav1[0] = ‑1 av1 is used in preference to av0 as av0 may contain speech. The autocorrelated predictor values rav1 are then obtained:
ad3845652ec99fdffd75badceec5143f
06.32
2.2.4 Spectral comparison
The spectra represented by the autocorrelated predictor values rav1 and the averaged auto‑correlation values av0 are compared using the distortion measure dm defined below. This measure is used to produce a Boolean value stat every 20 ms, as given by these equations: difference = |dm ‑ lastdm| lastdm = dm stat = difference < thresh The values of constants and initial values are given in table 2.2. Table 2.2: Constants and variables for spectral comparison Constant Value Variable Initial value thresh 0.05 lastdm 0
ad3845652ec99fdffd75badceec5143f
06.32
2.2.5 Periodicity detection
The frequency spectrum of mobile noise is relatively stationary over quite long periods. The Inverse Filter Autocorrelated Predictor coefficients of the adaptive filter rvad are only updated when this stationarity is detected. Vowel sounds however, also have this stationarity, but can be excluded by detecting the periodicity of these sounds using the long term predictor lag values (Nj) which are obtained every sub‑segment from the speech codec defined in GSM 06.10. Consecutive lag values are compared. Cases in which one lag value is a factor of the other are catered for, however cases in which both lag values have a common factor, are not. This case is not important for speech input but this method of periodicity detection may fail for some sine waves. The Boolean variable ptch is updated every 20 ms and is true when periodicity is detected. It is calculated according to the following equation: ptch = oldlagcount + veryoldlagcount >= nthresh The following operations are done after the VAD decision and when the current LTP lag values (N0 .. N3) are available, this reduces the delay of the VAD decision. (N{‑1} = N3 of previous segment.) lagcount = 0 for j = 0 to 3 do begin smallag = maximum(Nj,N{j‑1}) mod minimum(Nj,N{j‑1}) if minimum(smallag,minimum(Nj,N{j‑1})‑smallag) < lthresh then increment(lagcount) end veryoldlagcount = oldlagcount oldlagcount = lagcount The values of constants and initial values are given in table 2.. Table 2.3: Constants and variables for periodicity detection Constant Value Variable Initial value lthresh nthresh 2 4 oldlagcount veryoldlagcount N3 0 0 40
ad3845652ec99fdffd75badceec5143f
06.32
2.2.6 Information tone detection
The tone flag is only evaluated in the downlink VAD. In the uplink VAD, tone detection is not performed and tone = false. Computation of the tone flag is complex. It is therefore evaluated after the processing of the current speech encoder frame. In this way transmission of the speech or SID frame is not delayed. Information tones and environmental noise can be classified by inspecting the short term prediction gain, information tones resulting in higher prediction gains than environmental noise. Tones can therefore be detected by comparing the prediction gain to a fixed threshold. By limiting the prediction gain calculation to a fourth order analysis, information signals consisting of one or two tones can be detected whilst minimizing the prediction gain for environmental noise. The prediction gain decision is implemented by comparing the normalized prediction error with a threshold. This measure is used to evaluate the Boolean variable tone every 20 ms. The signal is classified as a tone if the prediction error is smaller than the threshold predth. This is equivalent to a prediction gain threshold of 13,5 dB. Mobile noise can contain very strong resonances at low frequencies, resulting in a high prediction gain. A further test is therefore made to determine the pole frequency of a second order analysis of the signal frame. The signal is classified as noise if the frequency of the pole is less than 385 Hz. The pole frequency calculation is described in clause A.4. The algorithm for detecting information tones is as follows: tone = false den = a[1]*a[1] num = 4*a[2] ‑ a[1]*a[1] if ( num <= 0 ) return if (( a[1] < 0 ) AND ( num / den < freqth )) return 4 prederr = MULT (1 ‑ RC[i]*RC[i]) i=1 if (prederr < predth) tone = true return The values of the constants are given in table 2.4. The coefficients a[1..2] are transversal filter coefficients calculated from rc[1..2]. The calculation of the reflection coefficients rc[1..4] is described below. The offset compensated signal frame sof[0..159] is multiplied by the Hanning window to give the windowed frame sofh[0..159]: where The auto‑correlation acfh[0..4] of the windowed signal frame is then calculated: rc[1..4] are then calculated from acfh[0..4] using the Schur recursion described in the RPE‑LTP codec. Table 2.4: Constants for information tone detection Constant Value freqth predth 0,0973 0,0158 NOTE: Reflection coefficients are available in the RPE‑LTP codec. However, they are calculated after pre‑emphasis using a rectangular window and do not give good tone detection results.
ad3845652ec99fdffd75badceec5143f
06.32
2.2.7 Threshold adaptation
A check is made every 20 ms to determine whether the VAD decision threshold (thvad) should be changed. This adaptation is carried out according to the flowchart shown in figure 2.2. The constants used are given in table 2.5. Adaptation takes place in two different situations: firstly whenever ACF[0] is very low and secondly whenever there is a very high probability that speech and information tones are not present. In the first case, the threshold is adapted if the energy of the input signal is less than pth. The threshold is set to plev without carrying out any further tests because at these very low levels the effect of the signal quantization makes it impossible to obtain reliable results from these tests. In the second case, the decision threshold (thvad) and the adaptive filter coefficients (rvad) are only updated with the rav1 values when there is a very high probability that speech and information tones are not present. Adaptation occurs if the following conditions are met over a number (adp) of signal frames: ‑ stationarity is detected in the frequency domain; ‑ the signal does not contain a periodic component; ‑ information tones are not present. The step‑size by which the threshold is adapted is not constant but a proportion of the current value (determined by constants dec and inc). The adaptation begins by experimentally multiplying the threshold by a factor of (1‑1/dec). If the new threshold is now higher than or equal to Pvad times fac then the threshold needed to be decreased and it is left at this new lower level. If, on the other hand, the new threshold level is less than Pvad times fac then the threshold either needed to be increased or kept constant. In this case it is set to Pvad times fac unless this would mean multiplying it by more than a factor of (1+1/inc) (in which case it is multiplied by a factor of (1+1/inc)). The threshold is never allowed to be greater than Pvad+margin. Table 2.5: Constants and variables for threshold adaptation Constant Value Variable Initial value pth plev fac adp inc dec margin 300 000 800 000 3.0 8 16 32 80 000 000 adaptcount thvad rvad[0] rvad[1] rvad[2] rvad[3] to rvad[8] 0 1 000 000 6 ‑4 1 All 0 Figure 2.2: Flow diagram for threshold adaptation
ad3845652ec99fdffd75badceec5143f
06.32
2.2.8 VAD decision
Prior to hangover the VAD decision condition is: vvad = pvad > thvad
ad3845652ec99fdffd75badceec5143f
06.32
2.2.9 VAD hangover addition
VAD hangover is only added to bursts of speech greater than or equal to burstconst blocks. The Boolean variable vad indicates the decision of the VAD with hangover included. The values of the constants are given in table 2.6. The hangover algorithm is as follows: if vvad then increment(burstcount) else burstcount = 0 if burstcount >= burstconst then begin hangcount = hangconst; burstcount = burstconst end vad = vvad or (hangcount >= 0) if hangcount >= 0 then decrement(hangcount) Table 2.6: Constants and variables for VAD hangover addition Constant Value Variable Initial value burstconst hangconst 3 5 burstcount hangcount 0 ‑1
ad3845652ec99fdffd75badceec5143f
06.32
3 Computational details
In the next paragraphs, the detailed description of the VAD algorithm follows the preceding high level description. This detailed description is divided in ten clauses related to the blocks of figure 2.1 (except periodicity updating) in the high level description of the VAD algorithm. Those clauses are: 1) adaptive filtering and energy computation; 2) ACF averaging; 3) predictor values computation; 4) spectral comparison; 5) periodicity detection; 6) threshold adaptation; 7) VAD decision; 8) VAD hangover addition; 9) periodicity updating; 10) information tone detection. The VAD algorithm takes as input the following variables of the RPE‑LTP encoder (see the detailed description of the RPE‑LTP encoder GSM 06.10): ‑ L_ACF[0..8], auto‑correlation function (GSM 06.10/4.2.4); ‑ scalauto, scaling factor to compute the L_ACF[0..8] (GSM 06.10/4.2.4); ‑ Nc, LTP lag (one for each sub‑segment, GSM 06.10/4.2.11); ‑ sof, offset compensated signal frame (GSM 06.10/4.2.2). So four Nc values are needed for the VAD algorithm. The VAD computation can start as soon as the L_ACF[0..8] and scalauto variables are known. This means that the VAD computation can take place after part 4.2.4 of GSM 06.10 (Auto‑correlation) of the LPC analysis clause of the RPE‑LTP encoder. This scheme will reduce the delay to yield the VAD information. The periodicity updating (included in clause 2.2.5) and information tone detection, are done after the processing of the current speech encoder frame. All the arithmetic operations and names of the variables follow the RPE‑LTP detailed description. To increase the precision within the fixed point implementation, a pseudo‑floating point representation of some variables is used. This stands for the following variables (and related constants) of the VAD algorithm: pvad: Energy of filtered signal; thvad: Threshold of the VAD decision; acf0: Energy of input signal. For the representation of these variables, two integers (16 bits) are needed: ‑ one for the exponent (e_pvad, e_thvad, e_acf0); ‑ one for the mantissa (m_pvad, m_thvad, m_acf0). The value e_pvad represents the lowest power of 2 just greater or equal to the actual value of pvad and the m_pvad value represents a integer which is always greater or equal to 16384 (normalized mantissa). It means that the pvad value is equal to: This scheme guarantees a large dynamic range for the pvad value and always keeps a precision of 16 bits. All the comparisons are easy to make by comparing the exponents of two variables and the VAD algorithm needs only one pseudo‑floating point addition. All the computations related to the pseudo‑floating point variables require very simple 16 or 32 bits arithmetic operations defined in the detailed description of the RPE‑LTP encoder. This pseudo‑floating point arithmetic is only used in clauses 3.1 and 3.6. Table 3.1 gives a list of all the variables of the VAD algorithm that must be initialized in the reset procedure and kept in memory for processing the subsequent frame of the RPE‑ LTP encoder. The types (16 or 32 bits) and initial values of all these variables are clearly indicated and their related clause is also mentioned. The bit exact implementation uses other temporary variables that are introduced in the detailed description whenever it is needed. Table 3.1: Initial values for variables to be stored in memory Names of variables: type (# of bits): Initialization: Subclause: Adaptive filter coefficients: rvad[0] 16 24 576 3.1, 3.6 rvad[1] 16 ‑16 384 3.1, 3.6 rvad[2] 16 4 096 3.1, 3.6 rvad[3..8] 16 0 3.1, 3.6 Scaling factor of ravd[0..8]: normrvad 16 7 3.1, 3.6 Delay line of the auto‑correlation coefficients: L_sacf[0..26] 32 0 3.2 L_sav0[0..35] 32 0 3.2 Pointers on the delay lines: pt_sacf 16 0 3.2 pt_sav0 16 0 3.2 Distance measure: L_lastdm 32 0 3.4 Periodicity counters: oldlagcount 16 0 3.5, 3.9 veryoldlagcount 16 0 3.5, 3.9 Adaptive threshold: e_thvad (exponent) 16 20 3.6 m_thvad (mantissa) 16 31 250 3.6 Counter for adaptation: adaptcount 16 0 3.6 Hangover flags: burstcount 16 0 3.8 hangcount 16 ‑1 3.8 LTP lag memory: oldlag 16 40 3.9 Tone Detection tone 16 0 3.10
ad3845652ec99fdffd75badceec5143f
06.32
3.1 Adaptive filtering and energy computation
This clause computes the e_pvad and m_pvad variables which represent the pvad value. It needs the L_ACF[0..8] and scalauto variables of the RPE‑LTP algorithm and the rvad[0..8] and normrvad variables produced by clause 3.6 of the VAD algorithm. It also computes a floating point representation of L_ACF[0] (e_acf0 and m_acf0) used in clause 3.6. Test if L_ACF[0] is equal to 0: IF ( scalauto < 0 ) THEN scalvad = 0; ELSE scalvad = scalauto; / keep scalvad for use in clause 3.2 / IF ( L_ACF[0] == 0 ) THEN | e_pvad = ‑32768; | m_pvad = 0; | e_acf0 = ‑32768; | m_acf0 = 0; | EXIT /continue with clause 3.2/ Re‑normalization of the L_ACF[0..8]: normacf = norm( L_ACF[0] ); | FOR i = 0 to 8: | sacf[i] = ( L_ACF[i] << normacf ) >> 19; | NEXT i: Computation of e_acf0 and m_acf0: e_acf0 = add( 32, (scalvad << 1 ) ); e_acf0 = sub( e_acf0, normacf); m_acf0 = sacf[0] << 3; Computation of e_pvad and m_pvad: e_pvad = add( e_acf0, 14 ); e_pvad = sub( e_pvad, normrvad ); L_temp = 0; | FOR i = 1 to 8: | L_temp = L_add( L_temp, L_mult( sacf[i], rvad[i] ) ); | NEXT i: L_temp = L_add( L_temp, L_mult( sacf[0], rvad[0] ) >> 1 ); IF ( L_temp <= 0 ) THEN L_temp = 1; normprod = norm( L_temp ); e_pvad = sub( e_pvad, normprod ); m_pvad = ( L_temp << normprod ) >> 16;
ad3845652ec99fdffd75badceec5143f
06.32
3.2 ACF averaging
This clause uses the L_ACF[0..8] and the scalvad variables to compute the array L_av0[0..8] and L_av1[0..8] used in clause 3.3 and 3.4. Computation of the scaling factor: scal = sub( 10, (scalvad << 1) ); Computation of the arrays L_av0[0..8] and L_av1[0..8]: | FOR i = 0 to 8: | L_temp = L_ACF[i] >> scal; | L_av0[i] = L_add( L_sacf[i], L_temp ); | L_av0[i] = L_add( L_sacf[i+9], L_av0[i] ); | L_av0[i] = L_add( L_sacf[i+18], L_av0[i] ); | L_sacf[ pt_sacf + i ] = L_temp; | L_av1[i] = L_sav0[ pt_sav0 + i ]; | L_sav0[ pt_sav0 + i] = L_av0[i]; | NEXT i: Update of the array pointers: IF ( pt_sacf == 18 ) THEN pt_sacf = 0; ELSE pt_sacf = add( pt_sacf, 9); IF ( pt_sav0 == 27 ) THEN pt_sav0 = 0; ELSE pt_sav0 = add( pt_sav0, 9);
ad3845652ec99fdffd75badceec5143f
06.32
3.3 Predictor values computation
This clause computes the array rav1[0..8] needed for the spectral comparison and the threshold adaptation. It uses the L_av1[0..8] computed in clause 3.2, and is divided in the three following clauses: ‑ Schur recursion to compute reflection coefficients. ‑ Step up procedure to obtain the aav1[0..8]. ‑ Computation of the rav1[0..8].
ad3845652ec99fdffd75badceec5143f
06.32
3.3.1 Schur recursion to compute reflection coefficients
This clause is identical to the one used in the RPE‑LTP algorithm. The array vpar[1..8] is computed with the array L_av1[0..8] as an input. Schur recursion with 16 bits arithmetic: IF( L_av1[0] == 0 ) THEN |== FOR i = 1 to 8: | vpar[i] = 0; |== NEXT i: | EXIT; /continue with clause 3.3.2/ temp = norm( L_av1[0] ); |== FOR k=0 to 8: | sacf[k] = ( L_av1[k] << temp ) >> 16; |== NEXT k: Initialize array P[..] and K[..] for the recursion: |== FOR i=1 to 7: | K[9‑i] = sacf[i]; |== NEXT i: |== FOR i=0 to 8: | P[i] = sacf[i]; |== NEXT i: Compute reflection coefficients: |== FOR n=1 to 8: | IF( P[0] < abs( P[1] ) ) THEN | |== FOR i = n to 8: | | vpar[i] = 0; | |== NEXT i: | | EXIT; /continue with | | clause 3.3.2/ | vpar[n] = div( abs( P[1] ), P[0] ); | IF ( P[1] > 0 ) THEN vpar[n] = sub( 0, vpar[n] ); | IF ( n == 8 ) THEN EXIT; /continue with clause 3.3.2/ | | Schur recursion: | | P[0] = add( P[0], mult_r( P[1], vpar[n] ) ); |==== FOR m=1 to 8‑n: | P[m] = add( P[m+1], mult_r( K[9‑m], vpar[n] ) ); | K[9‑m] = add( K[9‑m], mult_r( P[m+1], vpar[n] ) ); |==== NEXT m: | |== NEXT n:
ad3845652ec99fdffd75badceec5143f
06.32
3.3.2 Step‑up procedure to obtain the aav1[0..8]
Initialization of the step‑up recursion: L_coef[0] = 16384 << 15; L_coef[1] = vpar[1] << 14; Loop on the LPC analysis order: |= FOR m = 2 to 8: |== FOR i = 1 to m‑1: |== temp = L_coef[m‑i] >> 16; / takes the msb / |== L_work[i] = L_add( L_coef[i], L_mult( vpar[m], temp ) ); |== NEXT i |= |== FOR i = 1 to m‑1: |== L_coef[i] = L_work[i]; |== NEXT i |= |= L_coef[m] = vpar[m] << 14; |= NEXT m: Keep the aav1[0..8] on 13 bits for next clause: | FOR i = 0 to 8: | aav1[i] = L_coef[i] >> 19; | NEXT i:
ad3845652ec99fdffd75badceec5143f
06.32
3.3.3 Computation of the rav1[0..8]
|= FOR i= 0 to 8: |= L_work[i] = 0; |== FOR k = 0 to 8‑i: |== L_work[i] = L_add( L_work[i], L_mult( aav1[k], aav1[k+i] ) ); |== NEXT k: |= NEXT i: IF ( L_work[0] == 0 ) THEN normrav1 =0; ELSE normrav1 = norm( L_work[0] ); |= FOR i= 0 to 8: |= rav1[i] = ( L_work[i] << normrav1 ) >> 16; |= NEXT i: Keep the normrav1 for use in clause 3.4 and 3.6.
ad3845652ec99fdffd75badceec5143f
06.32
3.4 Spectral comparison
This clause computes the variable stat needed for the threshold adaptation. It uses the array L_av0[0..8] computed in clause 3.2 and the array rav1[0..8] computed in clause 3.3.3. Re‑normalize L_av0[0..8]: IF ( L_av0[0] == 0 ) THEN | FOR i = 0 to 8: | sav0[i] = 4095; | NEXT i: ELSE | shift = norm( L_av0[0] ); |= FOR i = 0 to 8: |= sav0[i] = ( L_av0[i] << shift‑3 ) >> 16; |= NEXT i: Compute partial  of dm: L_ p = 0; |= FOR i = 1 to 8: |= L_ p = L_add( L_ p, L_mult( rav1[i], sav0[i] ) ); |= NEXT i: Compute the division of partial  by sav0[0]: IF ( L_ p < 0 ) THEN L_temp = L_sub( 0, L_ p ); ELSE L_temp = L_ p; IF ( L_temp == 0 ) THEN | L_dm = 0; | shift = 0; ELSE | sav0[0] = sav0[0] << 3; | shift = norm( L_temp ); | temp = ( L_temp << shift ) >> 16; | IF ( sav0[0] >= temp ) THEN | | divshift = 0; | | temp = div( temp, sav0[0] ); | ELSE | | divshift = 1; | | temp = sub( temp, sav0[0] ); | | temp = div( temp, sav0[0] ); | | IF( divshift == 1 ) THEN L_dm = 32768; | ELSE L_dm = 0; | | L_dm = L_add( L_dm, temp) << 1; | IF( L_ p < 0 ) THEN L_dm = L_sub( 0, L_dm); Re‑normalization and final computation of L_dm: L_dm = ( L_dm << 14 ); L_dm = L_dm >> shift; L_dm = L_add( L_dm, ( rav1[0] << 11 ) ); L_dm = L_dm >> normrav1; Compute the difference and save L_dm: L_temp = L_sub( L_dm, L_lastdm ); L_lastdm = L_dm; IF ( L_temp < 0 ) THEN L_temp = L_sub( 0, L_temp ); L_temp = L_sub( L_temp, 3277 ); Evaluation of the stat flag: IF ( L_temp < 0 ) THEN stat = 1; ELSE stat = 0;
ad3845652ec99fdffd75badceec5143f
06.32
3.5 Periodicity detection
This clause just sets the ptch flag needed for the threshold adaptation. temp = add( oldlagcount, veryoldlagcount ); IF ( temp >= 4 ) THEN ptch = 1; ELSE ptch = 0;
ad3845652ec99fdffd75badceec5143f
06.32
3.6 Threshold adaptation
This clause uses the variables e_pvad, m_pvad, e_acf0 and m_acf0 computed in clause 3.1. It also uses the flags stat (see clause 3.4) and ptch (see clause 3.5). It follows the flowchart represented on figure 2.2. Some constants, represented by a floating point format, are needed and a symbolic name (in capital letter) for their exponent and mantissa is used; table 3.2 lists all these constants with the symbolic names associated and their numerical constant values. Table 3.2: List of constants Constant Exponent Mantissa pth margin plev E_PTH = 19 E_MARGIN = 27 E_PLEV = 20 M_PTH = 18 750 M_MARGIN = 19 531 M_PLEV = 25 000 NOTE: Floating point representation of constants used in clause 3.6: pth = 2(E_PTH)x(M_PTH/32768). margin = 2(E_MARGIN)x(M_MARGIN/32768). plev = 2(E_PLEV)x(M_PLEV/32768). Test if acf0 < pth; if yes set thvad to plev: comp = 0; IF ( e_acf0 < E_PTH ) THEN comp = 1; IF ( e_acf0 == E_PTH ) THEN IF ( m_acf0 < M_PTH ) THEN comp =1; IF ( comp == 1 ) THEN | e_thvad = E_PLEV; | m_thvad = M_PLEV; | EXIT; /continue with clause 3.7/ Test if an adaptation is needed: comp = 0; IF ( ptch == 1 ) THEN comp = 1; IF ( stat == 0 ) THEN comp = 1; IF ( tone == 1 ) THEN comp = 1; IF ( comp == 1 ) THEN | adaptcount = 0; | EXIT; /continue with clause 3.7/ Incrementation of adaptcount: adaptcount = add( adaptcount, 1 ); IF ( adaptcount <= 8 ) THEN EXIT; /continue with clause 3.7/ Computation of thvad‑(thvad/dec): m_thvad = sub( m_thvad, (m_thvad >> 5 ) ); IF ( m_thvad < 16384) THEN | m_thvad = m_thvad << 1; | e_thvad = sub( e_thvad, 1 ); Computation of pvad*fac: L_temp = L_add( m_pvad, m_pvad ); L_temp = L_add( L_temp, m_pvad ); L_temp = L_temp >> 1; e_temp = add( e_pvad, 1 ); IF ( L_temp > 32767 ) THEN | L_temp = L_temp >> 1; | e_temp = add( e_temp, 1 ); m_temp = L_temp; Test if thvad < pvad*fac: comp = 0; IF ( e_thvad < e_temp) THEN comp = 1; IF (e_thvad == e_temp) THEN IF (m_thvad < m_temp) THEN comp =1; Computation of minimum (thvad+(thvad/inc), pvad*fac) if comp = 1: IF ( comp == 1 ) THEN | Compute thvad +(thvad/inc). | L_temp = L_add( m_thvad, (m_thvad >> 4 ) ); | IF ( L_temp > 32767 ) THEN | | m_thvad = L_temp >> 1; | | e_thvad = add( e_thvad,1 ); | ELSE m_thvad = L_temp; | comp2 = 0; | IF ( e_temp < e_thvad) THEN comp2 = 1; | IF (e_temp == e__hvad) THEN IF (m_temp<m_thvad) THEN comp2 = 1; | IF ( comp2 == 1 ) THEN | | e_thvad = e_temp; | | m_thvad = m_temp; Computation of pvad + margin: IF ( e_pvad == E_MARGIN ) THEN | L_temp = L_add(m_pvad, M_MARGIN); | m_temp = L_temp >> 1; | e_temp = add( e_pvad, 1 ); ELSE | IF ( e_pvad > E_MARGIN ) THEN | | temp = sub( e_pvad, E_MARGIN ); | | temp = M_MARGIN >> temp; | | L_temp = L_add( m_pvad, temp ); | | IF ( L_temp > 32767) THEN | | | e_temp = add( e_pvad, 1 ); | | | m_temp = L_temp >> 1; | | ELSE | | | e_temp = e_pvad; | | | m_temp = L_temp; | ELSE | | temp = sub( E_MARGIN, e_pvad ); | | temp = m_pvad >> temp; | | L_temp = L_add( M_MARGIN, temp ); | | IF (L_temp > 32767) THEN | | | e_temp = add( E_MARGIN, 1); | | | m_temp = L_temp >> 1; | | ELSE | | | e_temp = E_MARGIN; | | | m_temp = L_temp; Test if thvad > pvad + margin: comp = 0; IF ( e_thvad > e_temp) THEN comp = 1; IF (e_thvad == e_temp) THEN IF (m_thvad > m_temp) THEN comp =1; IF ( comp == 1 ) THEN | e_thvad = e_temp; | m_thvad = m_temp; Initialize new rvad[0..8] in memory: normrvad = normrav1; |= FOR i = 0 to 8: |= rvad[i] = rav1[i]; |= NEXT i: Set adaptcount to adp + 1: adaptcount = 9;
ad3845652ec99fdffd75badceec5143f
06.32
3.7 VAD decision
This clause only outputs the result of the comparison between pvad and thvad using the pseudo‑floating point representation of thvad and pvad. The values e_pvad and m_pvad are computed in clause 3.1 and the values e_thvad and m_thvad are computed in clause 3.6. vvad = 0; IF (e_pvad > e_thvad) THEN vvad = 1; IF (e_pvad == e_thvad) THEN IF (m_pvad > m_thvad) THEN vvad =1;
ad3845652ec99fdffd75badceec5143f
06.32
3.8 VAD hangover addition
This clause finally sets the vad decision for the current frame to be processed. IF ( vvad == 1 ) THEN burstcount = add( burstcount, 1 ); ELSE burstcount = 0; IF ( burstcount >= 3 ) THEN | hangcount = 5; | burstcount = 3; vad = vvad; IF ( hangcount >= 0 ) THEN | vad = 1; | hangcount = sub( hangcount, 1 );
ad3845652ec99fdffd75badceec5143f
06.32
3.9 Periodicity updating
This clause must be delayed until the LTP lags are computed by the RPE‑LTP algorithm. The LTP lags called Nc in the speech encoder are renamed lags[0..3] (index 0 for the first sub‑ segment of the frame, 1 for the second and so on). Loop on sub‑segments for the frame: lagcount = 0; |= FOR i = 0 to 3: |= Search the maximum and minimum of consecutive lags. |= IF ( oldlag > lags[i] ) THEN |= | minlag = lags[i]; |= | maxlag = oldlag; |= ELSE |= | minlag = oldlag; |= | maxlag = lags[i] ; |= |= Compute smallag (modulo operation not defined ): |= |= smallag = maxlag; |== | FOR j = 0 to 2: |== | IF (smallag >= minlag) THEN smallag =sub( smallag, minlag); |== | NEXT j; |= |= Minimum of smallag and minlag ‑ smallag: |= |= temp = sub( minlag, smallag ); |= IF ( temp < smallag ) THEN smallag = temp; |= IF ( smallag < 2 ) THEN lagcount = add( lagcount, 1 ); |= Save the current LTP lag. |= oldlag = lags[i]; |= NEXT i: Update the veryoldlagcount and oldlagcount: veryoldlagcount = oldlagcount; oldlagcount = lagcount;