CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
aacdec.h
浏览该文件的文档.
1 /* ***** BEGIN LICENSE BLOCK *****
2  * Source last modified: $Id: aacdec.h,v 1.10 2008/06/05 13:00:25 vkathuria Exp $
3  *
4  * Portions Copyright (c) 1995-2005 RealNetworks, Inc. All Rights Reserved.
5  *
6  * The contents of this file, and the files included with this file,
7  * are subject to the current version of the RealNetworks Public
8  * Source License (the "RPSL") available at
9  * http://www.helixcommunity.org/content/rpsl unless you have licensed
10  * the file under the current version of the RealNetworks Community
11  * Source License (the "RCSL") available at
12  * http://www.helixcommunity.org/content/rcsl, in which case the RCSL
13  * will apply. You may also obtain the license terms directly from
14  * RealNetworks. You may not use this file except in compliance with
15  * the RPSL or, if you have a valid RCSL with RealNetworks applicable
16  * to this file, the RCSL. Please see the applicable RPSL or RCSL for
17  * the rights, obligations and limitations governing use of the
18  * contents of the file.
19  *
20  * This file is part of the Helix DNA Technology. RealNetworks is the
21  * developer of the Original Code and owns the copyrights in the
22  * portions it created.
23  *
24  * This file, and the files included with this file, is distributed
25  * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
26  * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
27  * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
28  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
29  * ENJOYMENT OR NON-INFRINGEMENT.
30  *
31  * Technology Compatibility Kit Test Suite(s) Location:
32  * http://www.helixcommunity.org/content/tck
33  *
34  * Contributor(s):
35  *
36  * ***** END LICENSE BLOCK ***** */
37 
38 /**************************************************************************************
39  * Fixed-point HE-AAC decoder
40  * Jon Recker (jrecker@real.com)
41  * February 2005
42  *
43  * aacdec.h - public C API for AAC decoder
44  **************************************************************************************/
45 
46 #ifndef _AACDEC_H
47 #define _AACDEC_H
48 
49 #if defined(__GNUC__) && (defined(ARM) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__))
50 #include "ci130x_system.h"
51 #include "core_cm4.h"
52 #elif defined(__ICCARM__)
53 #include "ci130x_system.h"
54 #include "core_cm4.h"
55 #else
56 #endif
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 /* according to spec (13818-7 section 8.2.2, 14496-3 section 4.5.3)
63  * max size of input buffer =
64  * 6144 bits = 768 bytes per SCE or CCE-I
65  * 12288 bits = 1536 bytes per CPE
66  * 0 bits = 0 bytes per CCE-D (uses bits from the SCE/CPE/CCE-I it is coupled to)
67  */
68 #ifndef AAC_MAX_NCHANS /* if max channels isn't set in makefile, */
69 #define AAC_MAX_NCHANS 2 /* set to default max number of channels */
70 #endif
71 #define AAC_MAX_NSAMPS 1024
72 #define AAC_MAINBUF_SIZE (768 * AAC_MAX_NCHANS)
73 
74 #define AAC_NUM_PROFILES 3
75 #define AAC_PROFILE_MP 0
76 #define AAC_PROFILE_LC 1
77 #define AAC_PROFILE_SSR 2
78 
79 /* define these to enable decoder features */
80 #if defined(HELIX_FEATURE_AUDIO_CODEC_AAC_SBR)
81 #define AAC_ENABLE_SBR
82 #endif // HELIX_FEATURE_AUDIO_CODEC_AAC_SBR.
83 #define AAC_ENABLE_MPEG4
84 
85 enum {
95 
98  ERR_AAC_PNS = -11,
100  ERR_AAC_TNS = -13,
103 
110 
112 
114 };
115 
116 typedef struct _AACFrameInfo {
117  int bitRate;
118  int nChans;
123  int profile;
124  int tnsUsed;
125  int pnsUsed;
126 } AACFrameInfo;
127 
128 typedef void *HAACDecoder;
129 
130 /* public C API */
132 void AACFreeDecoder(HAACDecoder hAACDecoder);
133 int AACClearDecoder(HAACDecoder hAACDecoder);
134 int AACDecode(HAACDecoder hAACDecoder, unsigned char **inbuf, int *bytesLeft, short *outbuf);
135 
136 int AACFindSyncWord(unsigned char *buf, int nBytes);
138 int AACSetRawBlockParams(HAACDecoder hAACDecoder, int copyLast, AACFrameInfo *aacFrameInfo);
139 int AACFlushCodec(HAACDecoder hAACDecoder);
140 
141 #ifdef HELIX_CONFIG_AAC_GENERATE_TRIGTABS_FLOAT
142 int AACInitTrigtabsFloat(void);
143 void AACFreeTrigtabsFloat(void);
144 #endif
145 
146 #ifdef __cplusplus
147 }
148 #endif
149 
150 #endif /* _AACDEC_H */
Definition: aacdec.h:100
Definition: aacdec.h:92
Definition: aacdec.h:99
Definition: aacdec.h:109
Definition: aacdec.h:113
int AACSetRawBlockParams(HAACDecoder hAACDecoder, int copyLast, AACFrameInfo *aacFrameInfo)
Definition: aacdec.c:225
Definition: aacdec.h:93
Definition: aacdec.h:87
Definition: aacdec.h:111
Definition: aacdec.h:96
int AACDecode(HAACDecoder hAACDecoder, unsigned char **inbuf, int *bytesLeft, short *outbuf)
Definition: aacdec.c:302
Definition: aacdec.h:107
Definition: aacdec.h:108
Definition: aacdec.h:90
int bitsPerSample
Definition: aacdec.h:121
Definition: aacdec.h:91
Definition: aacdec.h:116
Definition: aacdec.h:89
int tnsUsed
Definition: aacdec.h:124
void AACGetLastFrameInfo(HAACDecoder hAACDecoder, AACFrameInfo *aacFrameInfo)
Definition: aacdec.c:178
int pnsUsed
Definition: aacdec.h:125
Definition: aacdec.h:98
int AACClearDecoder(HAACDecoder hAACDecoder)
Definition: aacdec.c:117
Definition: aacdec.h:86
int nChans
Definition: aacdec.h:118
Definition: aacdec.h:106
Definition: aacdec.h:105
struct _AACFrameInfo AACFrameInfo
HAACDecoder AACInitDecoder(void)
Definition: aacdec.c:61
Definition: aacdec.h:88
int profile
Definition: aacdec.h:123
Definition: aacdec.h:102
int bitRate
Definition: aacdec.h:117
chip级定义
static AACFrameInfo aacFrameInfo
Definition: audio_play_decoder.c:919
void * HAACDecoder
Definition: aacdec.h:128
int sampRateOut
Definition: aacdec.h:120
Definition: aacdec.h:101
int outputSamps
Definition: aacdec.h:122
int AACFlushCodec(HAACDecoder hAACDecoder)
Definition: aacdec.c:250
int sampRateCore
Definition: aacdec.h:119
Definition: aacdec.h:94
int AACFindSyncWord(unsigned char *buf, int nBytes)
Definition: aacdec.c:150
Definition: aacdec.h:97
Definition: aacdec.h:104
void AACFreeDecoder(HAACDecoder hAACDecoder)
Definition: aacdec.c:91