📄 rfc3551.txt
字号:
The transmitted parameters of a G.729/G.729A 10-ms frame, consisting of 80 bits, are defined in Recommendation G.729, Table 8/G.729. The mapping of the these parameters is given below in Fig. 4. The diagrams show the bit packing in "network byte order", also known as big-endian order. The bits of each 32-bit word are numbered 0 to 31, with the most significant bit on the left and numbered 0. The octets (bytes) of each word are transmitted most significant octet first. The bits of each data field are numbered in the order as produced by the G.729 C code reference implementation. The packing of the G.729 Annex B comfort noise frame is shown in Fig. 5. 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |L| LSF1 | LSF2 | GAIN |R| |S| | | |E| |F| | | |S| |0|0 1 2 3 4|0 1 2 3|0 1 2 3 4|V| RESV = Reserved (zero) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 5: G.729 Annex B bit packingSchulzrinne & Casner Standards Track [Page 21]RFC 3551 RTP A/V Profile July 20034.5.7 G729D and G729E Annexes D and E to ITU-T Recommendation G.729 provide additional data rates. Because the data rate is not signaled in the bitstream, the different data rates are given distinct RTP encoding names which are mapped to distinct payload type numbers. G729D indicates a 6.4 kbit/s coding mode (G.729 Annex D, for momentary reduction in channel capacity), while G729E indicates an 11.8 kbit/s mode (G.729 Annex E, for improved performance with a wide range of narrow-band input signals, e.g., music and background noise). Annex E has two operating modes, backward adaptive and forward adaptive, which are signaled by the first two bits in each frame (the most significant two bits of the first octet). The voice activity detector (VAD) and comfort noise generator (CNG) algorithm specified in Annex B of G.729 may be used with Annex D and Annex E frames in addition to G.729 and G.729 Annex A frames. The algorithm details for the operation of Annexes D and E with the Annex B CNG are specified in G.729 Annexes F and G. Note that Annexes F and G do not introduce any new encodings. Receivers MUST accept comfort noise frames if restriction of their use has not been signaled. The MIME registrations for G729D and G729E in RFC 3555 [7] specify a parameter that MAY be used with MIME or SDP to restrict the use of comfort noise frames. For G729D, an RTP packet may consist of zero or more G.729 Annex D frames, followed by zero or one G.729 Annex B frame. Similarly, for G729E, an RTP packet may consist of zero or more G.729 Annex E frames, followed by zero or one G.729 Annex B frame. The presence of a comfort noise frame can be deduced from the length of the RTP payload. A single RTP packet must contain frames of only one data rate, optionally followed by one comfort noise frame. The data rate may be changed from packet to packet by changing the payload type number. G.729 Annexes D, E and H describe what the encoding and decoding algorithms must do to accommodate a change in data rate. For G729D, the bits of a G.729 Annex D frame are formatted as shown below in Fig. 6 (cf. Table D.1/G.729). The frame length is 64 bits.Schulzrinne & Casner Standards Track [Page 22]RFC 3551 RTP A/V Profile July 2003 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |L| L1 | L2 | L3 | P1 | C1 | |0| | | | | | | |0 1 2 3 4 5 6|0 1 2 3 4|0 1 2 3 4|0 1 2 3 4 5 6 7|0 1 2 3 4 5| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | C1 |S1 | GA1 | GB1 | P2 | C2 |S2 | GA2 | GB2 | | | | | | | | | | | |6 7 8|0 1|0 1 2|0 1 2|0 1 2 3|0 1 2 3 4 5 6 7 8|0 1|0 1 2|0 1 2| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 6: G.729 Annex D bit packing The net bit rate for the G.729 Annex E algorithm is 11.8 kbit/s and a total of 118 bits are used. Two bits are appended as "don't care" bits to complete an integer number of octets for the frame. For G729E, the bits of a data frame are formatted as shown in the next two diagrams (cf. Table E.1/G.729). The fields for the G729E forward adaptive mode are packed as shown in Fig. 7. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0|L| L1 | L2 | L3 | P1 |P| C0_1| | |0| | | | |0| | | | |0 1 2 3 4 5 6|0 1 2 3 4|0 1 2 3 4|0 1 2 3 4 5 6 7| |0 1 2| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | C1_1 | C2_1 | C3_1 | C4_1 | | | | | | | |3 4 5 6|0 1 2 3 4 5 6|0 1 2 3 4 5 6|0 1 2 3 4 5 6|0 1 2 3 4 5 6| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GA1 | GB1 | P2 | C0_2 | C1_2 | C2_2 | | | | | | | | |0 1 2|0 1 2 3|0 1 2 3 4|0 1 2 3 4 5 6|0 1 2 3 4 5 6|0 1 2 3 4 5| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | C3_2 | C4_2 | GA2 | GB2 |DC | | | | | | | | |6|0 1 2 3 4 5 6|0 1 2 3 4 5 6|0 1 2|0 1 2 3|0 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 7: G.729 Annex E (forward adaptive mode) bit packing The fields for the G729E backward adaptive mode are packed as shown in Fig. 8.Schulzrinne & Casner Standards Track [Page 23]RFC 3551 RTP A/V Profile July 2003 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1 1| P1 |P| C0_1 | C1_1 | | | |0| 1 1 1| | | |0 1 2 3 4 5 6 7|0|0 1 2 3 4 5 6 7 8 9 0 1 2|0 1 2 3 4 5 6 7| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | C2_1 | C3_1 | C4_1 |GA1 | GB1 |P2 | | | | | | | | | |8 9|0 1 2 3 4 5 6|0 1 2 3 4 5 6|0 1 2 3 4 5 6|0 1 2|0 1 2 3|0 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | C0_2 | C1_2 | C2_2 | | | 1 1 1| | | |2 3 4|0 1 2 3 4 5 6 7 8 9 0 1 2|0 1 2 3 4 5 6 7 8 9|0 1 2 3 4 5| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | C3_2 | C4_2 | GA2 | GB2 |DC | | | | | | | | |6|0 1 2 3 4 5 6|0 1 2 3 4 5 6|0 1 2|0 1 2 3|0 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 8: G.729 Annex E (backward adaptive mode) bit packing4.5.8 GSM GSM (Group Speciale Mobile) denotes the European GSM 06.10 standard for full-rate speech transcoding, ETS 300 961, which is based on RPE/LTP (residual pulse excitation/long term prediction) coding at a rate of 13 kb/s [11,12,13]. The text of the standard can be obtained from: ETSI (European Telecommunications Standards Institute) ETSI Secretariat: B.P.152 F-06561 Valbonne Cedex France Phone: +33 92 94 42 00 Fax: +33 93 65 47 16 Blocks of 160 audio samples are compressed into 33 octets, for an effective data rate of 13,200 b/s.4.5.8.1 General Packaging Issues The GSM standard (ETS 300 961) specifies the bit stream produced by the codec, but does not specify how these bits should be packed for transmission. The packetization specified here has subsequently been adopted in ETSI Technical Specification TS 101 318. Some software implementations of the GSM codec use a different packing than that specified here.Schulzrinne & Casner Standards Track [Page 24]RFC 3551 RTP A/V Profile July 2003 field field name bits field field name bits ________________________________________________ 1 LARc[0] 6 39 xmc[22] 3 2 LARc[1] 6 40 xmc[23] 3 3 LARc[2] 5 41 xmc[24] 3 4 LARc[3] 5 42 xmc[25] 3 5 LARc[4] 4 43 Nc[2] 7 6 LARc[5] 4 44 bc[2] 2 7 LARc[6] 3 45 Mc[2] 2 8 LARc[7] 3 46 xmaxc[2] 6 9 Nc[0] 7 47 xmc[26] 3 10 bc[0] 2 48 xmc[27] 3 11 Mc[0] 2 49 xmc[28] 3 12 xmaxc[0] 6 50 xmc[29] 3 13 xmc[0] 3 51 xmc[30] 3 14 xmc[1] 3 52 xmc[31] 3 15 xmc[2] 3 53 xmc[32] 3 16 xmc[3] 3 54 xmc[33] 3 17 xmc[4] 3 55 xmc[34] 3 18 xmc[5] 3 56 xmc[35] 3 19 xmc[6] 3 57 xmc[36] 3 20 xmc[7] 3 58 xmc[37] 3 21 xmc[8] 3 59 xmc[38] 3 22 xmc[9] 3 60 Nc[3] 7 23 xmc[10] 3 61 bc[3] 2 24 xmc[11] 3 62 Mc[3] 2 25 xmc[12] 3 63 xmaxc[3] 6 26 Nc[1] 7 64 xmc[39] 3 27 bc[1] 2 65 xmc[40] 3 28 Mc[1] 2 66 xmc[41] 3 29 xmaxc[1] 6 67 xmc[42] 3 30 xmc[13] 3 68 xmc[43] 3 31 xmc[14] 3 69 xmc[44] 3 32 xmc[15] 3 70 xmc[45] 3 33 xmc[16] 3 71 xmc[46] 3 34 xmc[17] 3 72 xmc[47] 3 35 xmc[18] 3 73 xmc[48] 3 36 xmc[19] 3 74 xmc[49] 3 37 xmc[20] 3 75 xmc[50] 3 38 xmc[21] 3 76 xmc[51] 3 Table 2: Ordering of GSM variablesSchulzrinne & Casner Standards Track [Page 25]RFC 3551 RTP A/V Profile July 2003 Octet Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 _____________________________________________________________________ 0 1 1 0 1 LARc0.0 LARc0.1 LARc0.2 LARc0.3 1 LARc0.4 LARc0.5 LARc1.0 LARc1.1 LARc1.2 LARc1.3 LARc1.4 LARc1.5 2 LARc2.0 LARc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 20 bc2.1 Mc2.0 Mc2.1 xmaxc20 xmaxc21 xmaxc22 xmaxc23 xmaxc24 21 xmaxc25 xmc26.0 xmc26.1 xmc26.2 xmc27.0 xmc27.1 xmc27.2 xmc28.0 22 xmc28.1 xmc28.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -