Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
G.726
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Endianness and payload type== Since the byte order for data protocols in the context of the internet was generally defined as big endian and called simply ''network byte order'', as stated (among others) by the deprecated RFC 1700, the deprecated RFC 1890 did not explicitly define the endianness of the predecessor of G.726, G.721, in RTP either. Instead of that, in the deprecated RFC 1890, the use of big endian by the term network byte order was generally stated for all mentioned codecs again: {{quote|"For multi-octet encodings, octets are transmitted in network byte order (i.e., most significant octet first)."<br> β IETF, [https://tools.ietf.org/html/rfc1890#section-4.2 the deprecated RFC 1890, section 4.2]}} The payload type for G.721 was defined by the deprecated RFC 1890 as ''2'', thus <code>a=rtpmap:2 G721/8000</code>. In drafts for newer version of this RFC, it was reused for G.726, i.e. <code>a=rtpmap:2 G726-32/8000</code>. 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 big 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: {{quote|"Note that the "little-endian" direction in which samples are packed into octets in the G726-16, -24, -32 and -40 payload formats specified here is consistent with ITU-T Recommendation X.420, but is the opposite of what is specified in ITU-T Recommendation I.366.2 Annex E for ATM AAL2 transport. A second set of RTP payload formats matching the packetization of I.366.2 Annex E and identified by MIME subtypes AAL2-G726-16, -24, -32 and -40 will be specified in a separate document."<br> β IETF, [https://tools.ietf.org/html/rfc3551#section-4.5.4 RFC 3551, section 4.5.4]}} {{quote|"Payload type 2 was assigned to G721 in RFC 1890 and to its equivalent successor G726-32 in draft versions of this specification, but its use is now deprecated and that static payload type is marked reserved due to conflicting use for the payload formats G726-32 and AAL2-G726-32 (see Section 4.5.4)"<br> β IETF, [https://tools.ietf.org/html/rfc3551#section-6 RFC 3551, section 6]}} {| class="wikitable" |- ! little endian<br>(X.420 and RFC 3551) !! big endian<br>(I.366.2 Annex E and RFC 3551) !! deprecated RFC 1890 |- | G726-16 <code>a=rtpmap:{from 96 to 127} G726-16/8000</code> || AAL2-G726-16 <code>a=rtpmap:{from 96 to 127} AAL2-G726-16/8000</code> || <code>a=rtpmap:2 G726-16/8000</code> |- | G726-24 <code>a=rtpmap:{from 96 to 127} G726-24/8000</code> || AAL2-G726-24 <code>a=rtpmap:{from 96 to 127} AAL2-G726-24/8000</code> || <code>a=rtpmap:2 G726-24/8000</code> |- | G726-32 <code>a=rtpmap:{from 96 to 127} G726-32/8000</code> || AAL2-G726-32 <code>a=rtpmap:{from 96 to 127} AAL2-G726-32/8000</code> || <code>a=rtpmap:2 G726-32/8000</code> |- | G726-40 <code>a=rtpmap:{from 96 to 127} G726-40/8000</code> || AAL2-G726-40 <code>a=rtpmap:{from 96 to 127} AAL2-G726-40/8000</code> || <code>a=rtpmap:2 G726-40/8000</code> |} 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: <code>a=rtpmap:96 G726-32/8000</code> β dynamic payload type ''96'' and G.726 according to X.420, thus little endian, as defined in RFC 3551<br> <code>a=rtpmap:97 AAL2-G726-32/8000</code> β dynamic payload type ''97'' and G.726 according to I.366.2 Annex E, thus big endian, as defined in RFC 3551<br> <code>a=rtpmap:2 G726-32/8000</code> β static payload type ''2'' and G.726 with unpredictable endianness, like G.721 according to the deprecated RFC 1890
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)