RFC 3802 DRAFT STANDARD EMAIL · MIME · AUDIO

audio/32KADPCM: Toll Quality Voice - 32 kbit/s Adaptive Differential Pulse Code Modulation (ADPCM) MIME Sub-type Registration

Registers the MIME type that carries 32 kbit/s ADPCM telephone-quality voice, with a fixed bit order.

On rfc-editor.org ↗
PUBLISHED
June 2004
AUTHORS
G. Vaudreuil, G. Parsons
STREAM
IETF
BUILDS ON
RFC 2422 — ADPCM MIME Type
MEDIA TYPE
audio/32KADPCM
BIT RATE
32 kbit/s
SAMPLING
8000 samples/second
FILE EXTENSION
.726
CODE WORD SIZE
4 bits
DOI
10.17487/RFC3802

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                       G. Vaudreuil
Request for Comments: 3802                           Lucent Technologies
Obsoletes: 2422                                               G. Parsons
Category: Standards Track                                Nortel Networks
                                                               June 2004


    Toll Quality Voice - 32 kbit/s Adaptive Differential Pulse Code
             Modulation (ADPCM) MIME Sub-type Registration

Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2004).

Abstract

   This document describes the registration of the MIME sub-type
   audio/32KADPCM Adaptive Differential Pulse Code Modulation for toll
   quality audio.  This audio encoding is defined by the ITU-T in
   Recommendation G.726.

1.  Introduction

   This document describes the registration of the MIME sub-type
   audio/32KADPCM for toll quality audio.  This audio encoding is
   defined by the ITU-T in Recommendation G.726.  This document
   obsoletes an earlier sub-type registration contained in RFC 1911.
   This document also obsoletes RFC 2422.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [REQ].

2.  ITU-T Definition

   Recommendation G.726 [G726] defines the characteristics that are
   recommended for the conversion of a 64 kbit/s A-law or m-law pulse
   code modulation (PCM) channel at 8000 samples/second to and from a
   40, 32, 24 or 16 kbit/s channel.  The conversion is applied to the
   PCM bit stream using an adaptive differential pulse code modulation
   (ADPCM) transcoding technique.  This Recommendation obsoletes G.721
   which only defined the 32 kbit/s characteristics.

   Recommendation G.726 was prepared by Study Group 15 of the
   Telecommunications Standardization Sector of the International
   Telecommunication Union (ITU-T) and was approved under the ITU's
   Resolution No. 2 procedure on the 14 of December 1990.

3.  MIME Definition

3.1.  audio/32KADPCM

   CCITT Recommendation G.726 [G726] describes the algorithm recommended
   for conversion of a 64 kbit/s A-law or u-law PCM channel to and from
   a 32 kbit/s channel (this is the same algorithm as described in the
   deprecated G.721).  The conversion is applied to the PCM stream using
   an Adaptive Differential Pulse Code Modulation (ADPCM) transcoding
   technique.

   The MIME sub-type audio/32KADPCM is defined to hold binary audio data
   encoded in 32 kbit/s ADPCM exactly as defined by ITU-T Recommendation
   G.726.  No header information shall be included as part of the audio
   data.  The content transfer encoding is typically either binary or
   base64.

   An additional consideration that this document defines for clarity is
   the choice of little endian ordering of the four bit code words. This
   default ordering is defined in ITU-T Recommendation X.420 [X420] for
   the equivalent X.400 body part, but is also detailed below in the
   IANA Registration.

3.2.  VPIM Usage

   The audio/32KADPCM sub-type is a primary component of the VPIM
   specification [VPIM].  In this context, the Content-Description and
   Content-Disposition headers are used to succinctly describe the
   contents of the audio body.  As well, only the little endian bit
   ordering is valid.  Refer to the VPIM Specification for proper usage.

4.  IANA Registration

      To: ietf-types@iana.org
      Subject: Registration of MIME media type audio/32KADPCM

      MIME media type name: audio

      MIME subtype name: 32KADPCM

      Required parameters: none

      Optional parameters: none

      Encoding considerations:

         Binary or Base-64 generally preferred

      Security considerations:

         There are no known security risks with the sending or playing
         of raw audio data  Audio data is typically interpreted only by
         an audio codec.  Unintended information introduced into the
         data stream will result in noise.

      Interoperability considerations:

         The four bit code word ordering within a byte may differ
         between existing implementations of G.726 codecs.  Since this
         content only permits the little endian ordering, codecs that
         support the opposite ordering must reorder the code words
         before storing to or retrieving from this content type.

      Published specification:

         ITU-T G.726 with little endian ordering

      Applications which use this media type:

         Primarily voice messaging

      Additional information:

         Magic number(s): ? File extension(s): .726 Macintosh File Type
         Code(s):  APCM
          Little Endian Ordering:

          The 4-bit code words of the G.726 encoding MUST be packed into
          octets/bytes as follows:  the first code word (A) is placed in
          the four least significant bits of the first octet, with the
          least significant bit (LSB) of the code word (A0) in the least
          significant bit of the octet;  the second code word (B) is
          placed in the four most significant bits of the first octet,
          with the most significant bit (MSB) of the code word (B3) in
          the most significant bit of the octet. Subsequent pairs of the
          code words shall be packed in the same way into successive
          octets, with the first code word of each pair placed in the
          least significant four bits of the octet.  It is preferred
          that the voice sample be extended with silence such that the
          encoded value comprises an even number of code words.
          However, if the voice sample comprises an odd number of code
          words, then the last code word shall be discarded.

                  +--+--+--+--+--+--+--+--+
                  |B3|B2|B1|B0|A3|A2|A1|A0|
                  +--+--+--+--+--+--+--+--+
          MSB ->  | 7| 6| 5| 4| 3| 2| 1| 0|  <- LSB
                  +--+--+--+--+--+--+--+--+

                  32K ADPCM / Octet Mapping

      Person & email address to contact for further information:

        Glenn W. Parsons gparsons@NortelNetworks.com

        Gregory M. Vaudreuil GregV@ieee.org

      Intended usage: COMMON

      Author/Change controller:

        Glenn W. Parsons & Gregory M. Vaudreuil

5.  Security Considerations

   There are no known security risks with the sending or playing of raw
   audio data  Audio data is typically interpreted only by an audio
   codec.  Unintended information introduced into the data stream will
   result in noise.

6.  References

6.1.  Normative References

   [G726]     CCITT Recommendation G.726 (1990), General Aspects of
              Digital Transmission Systems, Terminal Equipment - 40, 32,
              24,16 kbit/s Adaptive Differential Pulse Code Modulation
              (ADPCM).

   [VPIM2R2]  Vaudreuil, G., and G. Parsons, "Voice Profile for Internet
              Mail - version 2 (VPIMv2)", RFC 3801, June 2004.

   [REQ]      Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

6.2.  Informative References

   [RFC 3023] Murata, M., St. Laurent, S. and D. Kohn, "XML Media
              Types", RFC 3023, January 2001.

   [VPIM1]    Vaudreuil, G., "Voice Profile for Internet Mail", RFC
              1911, February 1996.

   [VPIM2]    Vaudreuil, G., and G. Parsons, "Voice Profile for Internet
              Mail - version 2", RFC 2421, September 1998.

   [X420]     ITU-T Recommendation X.420 (1996) - ISO/IEC 10021-7:1996,
              Message handling systems: Interpersonal messaging.

7.  Changes from RFC 2422

   Only editorial and boilerplate changes from RFC 2422 have been made
   to this document.

8.  Authors' Addresses

   Gregory M. Vaudreuil
   Lucent Technologies
   7291 Williamson Rd
   Dallas, TX  75214
   United States

   EMail: gregv@ieee.org


   Glenn W. Parsons
   Nortel Networks
   P.O. Box 3511, Station C
   Ottawa, ON  K1Y 4H7
   Canada

   Phone: +1-613-763-7582
   Fax:   +1-613-763-2697
   EMail: gparsons@nortelnetworks.com

9.  Full Copyright Statement

   Copyright (C) The Internet Society (2004).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at ietf-
   ipr@ietf.org.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.

AI ELI5

On this page
PROBLEMVoice messaging over Internet mail needs a registered MIME type for 32 kbit/s ADPCM audio, and implementations of G.726 disagree on the order of the four-bit code words in a byte.
MECHANISMThe RFC registers audio/32KADPCM, which holds raw G.726 data with no header and permits only little endian packing of code words.
WHY IT MATTERSIt obsoletes RFC 2422 with only editorial and boilerplate changes, and also obsoletes the earlier registration in RFC 1911.

§1Introduction

RFC 3802 registers the MIME sub-type audio/32KADPCM for toll quality audio. The encoding itself is defined by the ITU-T in Recommendation G.726. The RFC obsoletes an earlier sub-type registration in RFC 1911 and also obsoletes RFC 2422.

A section titled Changes from RFC 2422 states that only editorial and boilerplate changes were made.

This note gives an official name to one kind of phone-quality sound so email programs know what it is.

§2The ITU-T Definition

Recommendation G.726 defines the recommended conversion of a 64 kbit/s A-law or mu-law pulse code modulation (PCM) channel at 8000 samples/second to and from a 40, 32, 24 or 16 kbit/s channel. The conversion uses an adaptive differential pulse code modulation (ADPCM) transcoding technique.

The Recommendation was prepared by ITU-T Study Group 15 and approved on 14 December 1990. It obsoletes G.721, which defined only the 32 kbit/s characteristics.

Phone calls are turned into numbers many times a second. This method squeezes those numbers so the sound takes about half the space, and the 32 in the name is how many thousand bits per second remain.

§3The MIME Type Definition

The sub-type audio/32KADPCM holds binary audio data encoded in 32 kbit/s ADPCM exactly as defined by G.726. This is the same algorithm as in the deprecated G.721. No header information shall be included in the audio data, and the content transfer encoding is typically binary or base64.

For clarity the RFC adds one rule: little endian ordering of the four-bit code words. That is the default in ITU-T X.420 for the equivalent X.400 body part.

The type is a primary component of the Voice Profile for Internet Mail (VPIM). There, the Content-Description and Content-Disposition headers describe the audio body, and only little endian bit ordering is valid.

The audio is sent as a plain stream of sound numbers with no cover page. The only extra rule is about which half of each byte holds the first number.

§4Packing Code Words into Bytes

The 4-bit code words MUST be packed into octets so that the first code word (A) goes in the four least significant bits of the first octet, and the second code word (B) in the four most significant bits. Later pairs are packed the same way into successive octets.

Encoders should preferably extend the sample with silence so there is an even number of code words. If a sample has an odd number of code words, the last code word shall be discarded.

Because implementations of G.726 may order the code words differently within a byte, a codec that supports the opposite ordering must reorder the code words before storing or retrieving this content type.

Each byte holds two small numbers like two eggs in a box. The first egg always goes in the right-hand slot. If there is one egg left over at the end, it is thrown away.

32K ADPCM / OCTET MAPPING (RFC 3802)
Two code words in one octet
FieldNameSizeValueDescription
BB3-B04 bitsSecond code word, most significant four bits of the octet.
AA3-A04 bitsFirst code word, least significant four bits of the octet.

§5IANA Registration Details

The registration template gives media type audio, sub-type 32KADPCM, no required and no optional parameters, and says binary or base64 is generally preferred. The published specification is ITU-T G.726 with little endian ordering. The listed applications are primarily voice messaging, the file extension is .726, the Macintosh file type code is APCM, and the intended usage is COMMON. The magic number entry is given as a question mark.

The authors are listed as the contacts and change controllers.

This is the form filled in to get the name officially written in the list of sound types.

§6Security Considerations

The RFC says there are no known security risks with sending or playing raw audio data. Audio data is typically interpreted only by an audio codec, and any unintended information introduced into the data stream will result in noise.

Sound data is only played by a sound program, so stray bits just make crackling noise instead of causing harm.

§7References