Введение
Рекомендация ITU T G.726 — это стандарт речевого кодека ITU T ADPCM, охватывающий передачу голоса со скоростями 16, 24, 32 и 40 кбит/с. Он был разработан для замены кодеков G.721, который поддерживал ADPCM со скоростью 32 кбит/с, и G.723, описывавшего ADPCM для 24 и 40 кбит/с. G.726 также ввел новую скорость 16 кбит/с. Четыре скорости передачи, связанные с G.726, часто обозначаются размером выборки в битах: 2, 3, 4 и 5 бит соответственно. Соответствующий широкополосный кодек, основанный на той же технологии, — G.722. Наиболее часто используемым режимом является 32 кбит/с, который удваивает полезную пропускную способность сети, используя вдвое меньшую скорость, чем у G.711. Он в основном используется на международных линиях связи в телефонной сети и является стандартным кодеком, применяемым в беспроводных телефонных системах DECT. Основное применение каналов со скоростью 24 и 16 кбит/с — это каналы перегрузки, предназначенные для передачи голоса в оборудовании цифрового мультиплексирования каналов (DCME). Основное применение каналов со скоростью 40 кбит/с — передача сигналов модемов передачи данных в DCME, особенно для модемов, работающих со скоростью выше 4800 бит/с.
G.726 is an ITU T ADPCM speech codec standard covering the transmission of voice at rates of 16, 24, 32, and 40 kbit/s. It was introduced to supersede both G.721, which covered ADPCM at 32 kbit/s, and G.723, which described ADPCM for 24 and 40 kbit/s. G.726 also introduced a new 16 kbit/s rate. The four bit rates associated with G.726 are often referred to by the bit size of a sample, which are 2, 3, 4, and 5 bits respectively. The corresponding wide band codec based on the same technology is G.722. The most commonly used mode is 32 kbit/s, which doubles the usable network capacity by using half the rate of G.711. It is primarily used on international trunks in the phone network and is the standard codec used in DECT wireless phone systems. The principal application of 24 and 16 kbit/s channels is for overload channels carrying voice in digital circuit multiplication equipment (DCME). The principal application of 40 kbit/s channels is to carry data modem signals in DCME, especially for modems operating at greater than 4800 bit/s.
История
G.721 был представлен в 1984 году, а G.723 – в 1988 году. В 1990 году они были объединены в G.726. G.727 был представлен одновременно с G.726, включает те же скорости передачи данных, но оптимизирован для среды мультиплексного оборудования с пакетной коммутацией (PCME). Это достигается за счет внедрения 2-битного квантователя в 3-битный квантователь и аналогично для режимов более высокого порядка. Это позволяет отбрасывать младший значащий бит из битового потока без ухудшения качества речевого сигнала.
Концентрация и тип полезной нагрузки
Поскольку порядок байтов для протоколов данных в контексте Интернета обычно определялся как старший (big endian) и назывался просто порядком байтов сети, как указано (в частности) в устаревшем RFC 1700, устаревший RFC 1890 также не определял порядок байтов предшественника G.726, G.721, в RTP. Вместо этого, в устаревшем RFC 1890 использование старшего порядка байтов под термином "порядок байтов сети" в целом декларировалось для всех упомянутых кодеков: Тип полезной нагрузки для G.721 был определен устаревшим RFC 1890 как 2, то есть a=rtpmap:2 G721/8000. В черновиках более новой версии этого RFC он был повторно использован для G.726, то есть a=rtpmap:2 G726 32/8000. В отличие от этого, ITU явно определил порядок байтов в своих рекомендациях относительно G.726 или, соответственно, ADPCM, но двумя различными способами. Рекомендация X.420 указывает, что он должен быть младшим (little endian), а в соответствии с приложением E рекомендации I.366.2 – старшим. Это привело к противоречивым решениям в различных реализациях, поскольку некоторые производители выбирали младший порядок байтов, а другие – старший. В результате эти реализации оказались несовместимыми, поскольку декодирование с использованием неправильного порядка байтов приводило к сильно искаженному аудиосигналу. Поэтому неоднозначное определение было уточнено в RFC 3551, который заменяет RFC 1890. Раздел 4.5.4 RFC 3551 определяет классические типы MIME G726 16, 24, 32 и 40 как little endian и вводит новые типы MIME для big endian, которые являются AAL2 G726 16, 24, 32 и 40. Тип полезной нагрузки был изменен на динамический, чтобы избежать путаницы. Вместо типа полезной нагрузки 2 следует использовать динамический тип полезной нагрузки в диапазоне от 96 до 127:
The payload type for G.721 was defined by the deprecated RFC 1890 as 2, thus a=rtpmap:2 G721/8000. In drafts for newer version of this RFC, it was reused for G.726, i. e. a=rtpmap:2 G726 32/8000. Contrary to that the ITU explicitly defined the byte order in its recommendations regarding G.726 or respectively ADPCM, but in two different ways. Recommendation X.420 states, that it shall be little endian, respecting recommendation I.366.2 Annex E it should be big endian. This led to contradicting decisions in various implementations, as some manufacturers opted for little endian and others for big endian. The consequence was, that these implementations were incompatible, as decoding using the wrong byte order results in a heavily distorted audio signal. Therefore the unclear definition was fixed by the RFC 3551, which replaces RFC 1890. Section 4.5.4 in RFC 3551 defines the classical MIME types G726 16, 24, 32 and 40 as little endian and introduces new MIME types for bis endian, which are AAL2 G726 16, 24, 32 and 40. The payload type was changed to dynamic, in order to prevent confusion. Instead of payload type 2 a dynamic payload in the range from 96 to 127 shall be used:
little endian(X.420 and RFC 3551) big endian(I.366.2 Annex E and RFC 3551) deprecated RFC 1890 G726 16 a=rtpmap:{from 96 to 127} G726 16/8000 AAL2 G726 16 a=rtpmap:{from 96 to 127} AAL2 G726 16/8000 a=rtpmap:2 G726 16/8000 G726 24 a=rtpmap:{from 96 to 127} G726 24/8000 AAL2 G726 24 a=rtpmap:{from 96 to 127} AAL2 G726 24/8000 a=rtpmap:2 G726 24/8000 G726 32 a=rtpmap:{from 96 to 127} G726 32/8000 AAL2 G726 32 a=rtpmap:{from 96 to 127} AAL2 G726 32/8000 a=rtpmap:2 G726 32/8000 G726 40 a=rtpmap:{from 96 to 127} G726 40/8000 AAL2 G726 40 a=rtpmap:{from 96 to 127} AAL2 G726 40/8000 a=rtpmap:2 G726 40/8000
Newer implementations respect the RFC 3551 and clearly distinct between G726 xx (little endian) and AAL2 G726 xx (big endian). The Gigaset C610 IP DECT phone, e. g., generates the following code in its SIP INVITE:
a=rtpmap:96 G726 32/8000 → dynamic payload type 96 and G.726 according to X.420, thus little endian, as defined in RFC 3551
a=rtpmap:97 AAL2 G726 32/8000 → dynamic payload type 97 and G.726 according to I.366.2 Annex E, thus big endian, as defined in RFC 3551
a=rtpmap:2 G726 32/8000 → static payload type 2 and G.726 with unpredictable endianness, like G.721 according to the deprecated RFC 1890
little endian (X.420 и RFC 3551) big endian (I.366.2 Приложение E и RFC 3551) устаревший RFC 1890 G726 16 a=rtpmap:{от 96 до 127} G726 16/8000 AAL2 G726 16 a=rtpmap:{от 96 до 127} AAL2 G726 16/8000 a=rtpmap:2 G726 16/8000 G726 24 a=rtpmap:{от 96 до 127} G726 24/8000 AAL2 G726 24 a=rtpmap:{от 96 до 127} AAL2 G726 24/8000 a=rtpmap:2 G726 24/8000 G726 32 a=rtpmap:{от 96 до 127} G726 32/8000 AAL2 G726 32 a=rtpmap:{от 96 до 127} AAL2 G726 32/8000 a=rtpmap:2 G726 32/8000 G726 40 a=rtpmap:{от 96 до 127} G726 40/8000 AAL2 G726 40 a=rtpmap:{от 96 до 127} AAL2 G726 40/8000 a=rtpmap:2 G726 40/8000
The payload type for G.721 was defined by the deprecated RFC 1890 as 2, thus a=rtpmap:2 G721/8000. In drafts for newer version of this RFC, it was reused for G.726, i. e. a=rtpmap:2 G726 32/8000. Contrary to that the ITU explicitly defined the byte order in its recommendations regarding G.726 or respectively ADPCM, but in two different ways. Recommendation X.420 states, that it shall be little endian, respecting recommendation I.366.2 Annex E it should be big endian. This led to contradicting decisions in various implementations, as some manufacturers opted for little endian and others for big endian. The consequence was, that these implementations were incompatible, as decoding using the wrong byte order results in a heavily distorted audio signal. Therefore the unclear definition was fixed by the RFC 3551, which replaces RFC 1890. Section 4.5.4 in RFC 3551 defines the classical MIME types G726 16, 24, 32 and 40 as little endian and introduces new MIME types for bis endian, which are AAL2 G726 16, 24, 32 and 40. The payload type was changed to dynamic, in order to prevent confusion. Instead of payload type 2 a dynamic payload in the range from 96 to 127 shall be used:
little endian(X.420 and RFC 3551) big endian(I.366.2 Annex E and RFC 3551) deprecated RFC 1890 G726 16 a=rtpmap:{from 96 to 127} G726 16/8000 AAL2 G726 16 a=rtpmap:{from 96 to 127} AAL2 G726 16/8000 a=rtpmap:2 G726 16/8000 G726 24 a=rtpmap:{from 96 to 127} G726 24/8000 AAL2 G726 24 a=rtpmap:{from 96 to 127} AAL2 G726 24/8000 a=rtpmap:2 G726 24/8000 G726 32 a=rtpmap:{from 96 to 127} G726 32/8000 AAL2 G726 32 a=rtpmap:{from 96 to 127} AAL2 G726 32/8000 a=rtpmap:2 G726 32/8000 G726 40 a=rtpmap:{from 96 to 127} G726 40/8000 AAL2 G726 40 a=rtpmap:{from 96 to 127} AAL2 G726 40/8000 a=rtpmap:2 G726 40/8000
Newer implementations respect the RFC 3551 and clearly distinct between G726 xx (little endian) and AAL2 G726 xx (big endian). The Gigaset C610 IP DECT phone, e. g., generates the following code in its SIP INVITE:
a=rtpmap:96 G726 32/8000 → dynamic payload type 96 and G.726 according to X.420, thus little endian, as defined in RFC 3551
a=rtpmap:97 AAL2 G726 32/8000 → dynamic payload type 97 and G.726 according to I.366.2 Annex E, thus big endian, as defined in RFC 3551
a=rtpmap:2 G726 32/8000 → static payload type 2 and G.726 with unpredictable endianness, like G.721 according to the deprecated RFC 1890
Более новые реализации соответствуют RFC 3551 и четко различают G726 xx (little endian) и AAL2 G726 xx (big endian). Например, IP DECT телефон Gigaset C610 IP генерирует следующий код в своем SIP INVITE:
The payload type for G.721 was defined by the deprecated RFC 1890 as 2, thus a=rtpmap:2 G721/8000. In drafts for newer version of this RFC, it was reused for G.726, i. e. a=rtpmap:2 G726 32/8000. Contrary to that the ITU explicitly defined the byte order in its recommendations regarding G.726 or respectively ADPCM, but in two different ways. Recommendation X.420 states, that it shall be little endian, respecting recommendation I.366.2 Annex E it should be big endian. This led to contradicting decisions in various implementations, as some manufacturers opted for little endian and others for big endian. The consequence was, that these implementations were incompatible, as decoding using the wrong byte order results in a heavily distorted audio signal. Therefore the unclear definition was fixed by the RFC 3551, which replaces RFC 1890. Section 4.5.4 in RFC 3551 defines the classical MIME types G726 16, 24, 32 and 40 as little endian and introduces new MIME types for bis endian, which are AAL2 G726 16, 24, 32 and 40. The payload type was changed to dynamic, in order to prevent confusion. Instead of payload type 2 a dynamic payload in the range from 96 to 127 shall be used:
little endian(X.420 and RFC 3551) big endian(I.366.2 Annex E and RFC 3551) deprecated RFC 1890 G726 16 a=rtpmap:{from 96 to 127} G726 16/8000 AAL2 G726 16 a=rtpmap:{from 96 to 127} AAL2 G726 16/8000 a=rtpmap:2 G726 16/8000 G726 24 a=rtpmap:{from 96 to 127} G726 24/8000 AAL2 G726 24 a=rtpmap:{from 96 to 127} AAL2 G726 24/8000 a=rtpmap:2 G726 24/8000 G726 32 a=rtpmap:{from 96 to 127} G726 32/8000 AAL2 G726 32 a=rtpmap:{from 96 to 127} AAL2 G726 32/8000 a=rtpmap:2 G726 32/8000 G726 40 a=rtpmap:{from 96 to 127} G726 40/8000 AAL2 G726 40 a=rtpmap:{from 96 to 127} AAL2 G726 40/8000 a=rtpmap:2 G726 40/8000
Newer implementations respect the RFC 3551 and clearly distinct between G726 xx (little endian) and AAL2 G726 xx (big endian). The Gigaset C610 IP DECT phone, e. g., generates the following code in its SIP INVITE:
a=rtpmap:96 G726 32/8000 → dynamic payload type 96 and G.726 according to X.420, thus little endian, as defined in RFC 3551
a=rtpmap:97 AAL2 G726 32/8000 → dynamic payload type 97 and G.726 according to I.366.2 Annex E, thus big endian, as defined in RFC 3551
a=rtpmap:2 G726 32/8000 → static payload type 2 and G.726 with unpredictable endianness, like G.721 according to the deprecated RFC 1890
a=rtpmap:96 G726 32/8000 → динамический тип полезной нагрузки 96 и G.726 согласно X.420, таким образом, little endian, как определено в RFC 3551
a=rtpmap:97 AAL2 G726 32/8000 → динамический тип полезной нагрузки 97 и G.726 согласно приложению E рекомендации I.366.2, таким образом, big endian, как определено в RFC 3551
a=rtpmap:2 G726 32/8000 → статический тип полезной нагрузки 2 и G.726 с непредсказуемым порядком байтов, как G.721 согласно устаревшему RFC 1890
The payload type for G.721 was defined by the deprecated RFC 1890 as 2, thus a=rtpmap:2 G721/8000. In drafts for newer version of this RFC, it was reused for G.726, i. e. a=rtpmap:2 G726 32/8000. Contrary to that the ITU explicitly defined the byte order in its recommendations regarding G.726 or respectively ADPCM, but in two different ways. Recommendation X.420 states, that it shall be little endian, respecting recommendation I.366.2 Annex E it should be big endian. This led to contradicting decisions in various implementations, as some manufacturers opted for little endian and others for big endian. The consequence was, that these implementations were incompatible, as decoding using the wrong byte order results in a heavily distorted audio signal. Therefore the unclear definition was fixed by the RFC 3551, which replaces RFC 1890. Section 4.5.4 in RFC 3551 defines the classical MIME types G726 16, 24, 32 and 40 as little endian and introduces new MIME types for bis endian, which are AAL2 G726 16, 24, 32 and 40. The payload type was changed to dynamic, in order to prevent confusion. Instead of payload type 2 a dynamic payload in the range from 96 to 127 shall be used:
little endian(X.420 and RFC 3551) big endian(I.366.2 Annex E and RFC 3551) deprecated RFC 1890 G726 16 a=rtpmap:{from 96 to 127} G726 16/8000 AAL2 G726 16 a=rtpmap:{from 96 to 127} AAL2 G726 16/8000 a=rtpmap:2 G726 16/8000 G726 24 a=rtpmap:{from 96 to 127} G726 24/8000 AAL2 G726 24 a=rtpmap:{from 96 to 127} AAL2 G726 24/8000 a=rtpmap:2 G726 24/8000 G726 32 a=rtpmap:{from 96 to 127} G726 32/8000 AAL2 G726 32 a=rtpmap:{from 96 to 127} AAL2 G726 32/8000 a=rtpmap:2 G726 32/8000 G726 40 a=rtpmap:{from 96 to 127} G726 40/8000 AAL2 G726 40 a=rtpmap:{from 96 to 127} AAL2 G726 40/8000 a=rtpmap:2 G726 40/8000
Newer implementations respect the RFC 3551 and clearly distinct between G726 xx (little endian) and AAL2 G726 xx (big endian). The Gigaset C610 IP DECT phone, e. g., generates the following code in its SIP INVITE:
a=rtpmap:96 G726 32/8000 → dynamic payload type 96 and G.726 according to X.420, thus little endian, as defined in RFC 3551
a=rtpmap:97 AAL2 G726 32/8000 → dynamic payload type 97 and G.726 according to I.366.2 Annex E, thus big endian, as defined in RFC 3551
a=rtpmap:2 G726 32/8000 → static payload type 2 and G.726 with unpredictable endianness, like G.721 according to the deprecated RFC 1890