frame_type_3gpp.h revision 448239b929de32621e26504b86482ab4d436a5e3
1/* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 * express or implied.
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
17 */
18/****************************************************************************************
19Portions of this file are derived from the following 3GPP standard:
20
21    3GPP TS 26.073
22    ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
23    Available from http://www.3gpp.org
24
25(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
26Permission to distribute, modify and use this file under the standard license
27terms listed above has been obtained from the copyright holder.
28****************************************************************************************/
29/*
30
31 Pathname: ./audio/gsm-amr/c/include/frame_type_3gpp.h
32
33------------------------------------------------------------------------------
34 REVISION HISTORY
35
36 Description: Updated to new PV C header template.
37
38 Description: Added #ifdef __cplusplus after Include section.
39
40 Who:                       Date:
41 Description:
42
43------------------------------------------------------------------------------
44 INCLUDE DESCRIPTION
45
46 This file contains the definition of the 3GPP frame types.
47
48------------------------------------------------------------------------------
49*/
50
51#ifndef FRAME_TYPE_3GPP_H
52#define FRAME_TYPE_3GPP_H
53
54/*----------------------------------------------------------------------------
55; INCLUDES
56----------------------------------------------------------------------------*/
57
58
59/*--------------------------------------------------------------------------*/
60#ifdef __cplusplus
61extern "C"
62{
63#endif
64
65    /*----------------------------------------------------------------------------
66    ; MACROS
67    ; Define module specific macros here
68    ----------------------------------------------------------------------------*/
69
70    /*----------------------------------------------------------------------------
71    ; DEFINES
72    ; Include all pre-processor statements here.
73    ----------------------------------------------------------------------------*/
74
75    /*----------------------------------------------------------------------------
76    ; EXTERNAL VARIABLES REFERENCES
77    ; Declare variables used in this module but defined elsewhere
78    ----------------------------------------------------------------------------*/
79
80    /*----------------------------------------------------------------------------
81    ; SIMPLE TYPEDEF'S
82    ----------------------------------------------------------------------------*/
83
84    /*----------------------------------------------------------------------------
85    ; ENUMERATED TYPEDEF'S
86    ----------------------------------------------------------------------------*/
87
88    enum Frame_Type_3GPP
89    {
90        AMR_475 = 0,        /* 4.75 kbps    */
91        AMR_515,            /* 5.15 kbps    */
92        AMR_59,             /* 5.9 kbps     */
93        AMR_67,             /* 6.7 kbps     */
94        AMR_74,             /* 7.4 kbps     */
95        AMR_795,            /* 7.95 kbps    */
96        AMR_102,            /* 10.2 kbps    */
97        AMR_122,            /* 12.2 kbps    */
98        AMR_SID,            /* GSM AMR DTX  */
99        GSM_EFR_SID,        /* GSM EFR DTX  */
100        TDMA_EFR_SID,       /* TDMA EFR DTX */
101        PDC_EFR_SID,        /* PDC EFR DTX  */
102        FOR_FUTURE_USE1,    /* Unused 1     */
103        FOR_FUTURE_USE2,    /* Unused 2     */
104        FOR_FUTURE_USE3,    /* Unused 3     */
105        AMR_NO_DATA         /* No data      */
106    };
107
108typedef enum
109{
110    /*
111     *    One word (2-byte) to indicate type of frame type.
112     *    One word (2-byte) to indicate frame type.
113     *    One word (2-byte) to indicate mode.
114     *    N words (2-byte) containing N bits (bit 0 = 0xff81, bit 1 = 0x007f).
115     */
116    ETS = 0, /* Both AMR-Narrowband and AMR-Wideband */
117
118    /*
119     *    One word (2-byte) for sync word (good frames: 0x6b21, bad frames: 0x6b20)
120     *    One word (2-byte) for frame length N.
121     *    N words (2-byte) containing N bits (bit 0 = 0x007f, bit 1 = 0x0081).
122     */
123    ITU, /* AMR-Wideband */
124
125    /*
126     *   AMR-WB MIME/storage format, see RFC 3267 (sections 5.1 and 5.3) for details
127     */
128    MIME_IETF,
129
130    WMF, /* AMR-Narrowband */
131
132    IF2  /* AMR-Narrowband */
133
134} bitstream_format;
135
136    /*----------------------------------------------------------------------------
137    ; STRUCTURES TYPEDEF'S
138    ----------------------------------------------------------------------------*/
139
140    /*----------------------------------------------------------------------------
141    ; GLOBAL FUNCTION DEFINITIONS
142    ; Function Prototype declaration
143    ----------------------------------------------------------------------------*/
144#ifdef __cplusplus
145}
146#endif
147
148
149#endif  /* _FRAME_TYPE_3GPP_H_ */
150
151
152