1219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard/*
2219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** Copyright 2003-2010, VisualOn, Inc.
3219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard **
4219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** Licensed under the Apache License, Version 2.0 (the "License");
5219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** you may not use this file except in compliance with the License.
6219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** You may obtain a copy of the License at
7219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard **
8219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard **     http://www.apache.org/licenses/LICENSE-2.0
9219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard **
10219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** Unless required by applicable law or agreed to in writing, software
11219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** distributed under the License is distributed on an "AS IS" BASIS,
12219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** See the License for the specific language governing permissions and
14219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard ** limitations under the License.
15219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard */
16219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard/*******************************************************************************
17219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	File:		voAMRWB.h
18219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
19219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	Content:	AMR-WB codec APIs & data types
20219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
21219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard*******************************************************************************/
22219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#ifndef  __VOAMRWB_H__
23219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#define  __VOAMRWB_H__
24219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
25219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#include  "voAudio.h"
26219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#ifdef __cplusplus
27219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgardextern "C" {
28219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#endif /* __cplusplus */
29219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#pragma pack(push, 4)
30219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
31219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard/*!* the bit rate the codec supports*/
32219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgardtypedef enum {
33219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MDNONE		= -1,	/*!< Invalid mode */
34219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD66		= 0,	/*!< 6.60kbps   */
35219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD885		= 1,    /*!< 8.85kbps   */
36219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD1265		= 2,	/*!< 12.65kbps  */
37219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD1425		= 3,	/*!< 14.25kbps  */
38219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD1585		= 4,	/*!< 15.85bps   */
39219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD1825		= 5,	/*!< 18.25bps   */
40219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD1985		= 6,	/*!< 19.85kbps  */
41219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD2305		= 7,    /*!< 23.05kbps  */
42219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MD2385          = 8,    /*!< 23.85kbps> */
43219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_N_MODES 	= 9,	/*!< Invalid mode */
44219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_MODE_MAX    = VO_MAX_ENUM_VALUE
45219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
46219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard}VOAMRWBMODE;
47219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
48219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard/*!* the frame format the codec supports*/
49219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgardtypedef enum {
50219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_DEFAULT  	= 0,	/*!< the frame type is the header (defined in RFC3267) + rawdata*/
51219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	/*One word (2-byte) for sync word (0x6b21)*/
52219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	/*One word (2-byte) for frame length N.*/
53219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	/*N words (2-byte) containing N bits (bit 0 = 0x007f, bit 1 = 0x0081).*/
54219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_ITU         = 1,
55219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	/*One word (2-byte) for sync word (0x6b21).*/
56219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	/*One word (2-byte) to indicate the frame type.*/
57219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	/*One word (2-byte) to indicate the mode.*/
58219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	/*N words  (2-byte) containing N bits (bit 0 = 0xff81, bit 1 = 0x007f).*/
59219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard	VOAMRWB_RFC3267		= 2,	/* see RFC 3267 */
60219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard    VOAMRWB_TMAX        = VO_MAX_ENUM_VALUE
61219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard}VOAMRWBFRAMETYPE;
62219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
63219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
64219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#define    VO_PID_AMRWB_Module							0x42261000
65219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#define    VO_PID_AMRWB_FORMAT                          (VO_PID_AMRWB_Module | 0x0002)
66219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#define    VO_PID_AMRWB_CHANNELS                        (VO_PID_AMRWB_Module | 0x0003)
67219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#define    VO_PID_AMRWB_SAMPLERATE                      (VO_PID_AMRWB_Module | 0x0004)
68219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#define    VO_PID_AMRWB_FRAMETYPE                       (VO_PID_AMRWB_Module | 0x0005)
69219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#define    VO_PID_AMRWB_MODE                            (VO_PID_AMRWB_Module | 0x0006)
70219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#define    VO_PID_AMRWB_DTX                             (VO_PID_AMRWB_Module | 0x0007)
71219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
72219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard/**
73219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard * Get audio codec API interface
74219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard * \param pEncHandle [out] Return the AMRWB Encoder handle.
75219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard * \retval VO_ERR_OK Succeeded.
76219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard */
77219e2627f1e062c10645664b0d2470d4dfaf5083Mans RullgardVO_S32 VO_API voGetAMRWBEncAPI(VO_AUDIO_CODECAPI *pEncHandle);
78219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
79219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
80219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#pragma pack(pop)
81219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#ifdef __cplusplus
82219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard} /* extern "C" */
83219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#endif /* __cplusplus */
84219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
85219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
86219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard#endif   //__VOAMRWB_H__
87219e2627f1e062c10645664b0d2470d4dfaf5083Mans Rullgard
88