XenevaOS
Loading...
Searching...
No Matches
aacdec.h
Go to the documentation of this file.
1/* ***** BEGIN LICENSE BLOCK *****
2 * Source last modified: $Id: aacdec.h,v 1.8 2005/11/10 00:15:08 margotm 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(_WIN32) && !defined(_WIN32_WCE)
50#
51#elif defined(_WIN32) && defined(_WIN32_WCE) && defined(ARM)
52#
53#elif defined(_WIN32) && defined(WINCE_EMULATOR)
54#
55#elif defined (__arm) && defined (__ARMCC_VERSION)
56#
57#elif defined(_SYMBIAN) && defined(__WINS__)
58#
59#elif defined(__GNUC__) && defined(__arm__)
60#
61#elif defined(__GNUC__) && defined(__i386__)
62#
63#elif defined(__GNUC__) && defined(__amd64__)
64#
65#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__POWERPC__))
66#
67#elif defined(__GNUC__) && defined(__APPLE__)
68#
69#elif defined(_OPENWAVE_SIMULATOR) || defined(_OPENWAVE_ARMULATOR)
70#
71#elif defined(_SOLARIS) && !defined(__GNUC__)
72#
73#elif defined(ARDUINO) || defined(ESP32) || defined(ESP_PLATFORM) || defined(__ZEPHYR__)
74#
75#else
76#error No platform defined. See valid options in aacdec.h
77#endif
78
79#ifndef USE_DEFAULT_STDLIB
80#define USE_DEFAULT_STDLIB
81#endif
82
83
84#ifdef __cplusplus
85extern "C" {
86#endif
87
88/* according to spec (13818-7 section 8.2.2, 14496-3 section 4.5.3)
89 * max size of input buffer =
90 * 6144 bits = 768 bytes per SCE or CCE-I
91 * 12288 bits = 1536 bytes per CPE
92 * 0 bits = 0 bytes per CCE-D (uses bits from the SCE/CPE/CCE-I it is coupled to)
93 */
94#ifndef AAC_MAX_NCHANS /* if max channels isn't set in makefile, */
95#define AAC_MAX_NCHANS 2 /* set to default max number of channels */
96#endif
97#define AAC_MAX_NSAMPS 1024
98#define AAC_MAINBUF_SIZE (768 * AAC_MAX_NCHANS)
99
100#define AAC_NUM_PROFILES 3
101#define AAC_PROFILE_MP 0
102#define AAC_PROFILE_LC 1
103#define AAC_PROFILE_SSR 2
104
105#define AAC_ENABLE_MPEG4
106
107enum {
117
125
132
134
135 ERR_AAC_UNKNOWN = -9999
137
149
150typedef void *HAACDecoder;
151
152/* public C API */
154HAACDecoder AACInitDecoderPre(void *ptr, int sz);
155void AACFreeDecoder(HAACDecoder hAACDecoder);
156int AACDecode(HAACDecoder hAACDecoder, unsigned char **inbuf, int *bytesLeft, short *outbuf);
157
158int AACFindSyncWord(unsigned char *buf, int nBytes);
159void AACGetLastFrameInfo(HAACDecoder hAACDecoder, AACFrameInfo *aacFrameInfo);
160int AACSetRawBlockParams(HAACDecoder hAACDecoder, int copyLast, AACFrameInfo *aacFrameInfo);
161int AACFlushCodec(HAACDecoder hAACDecoder);
162
163#ifdef HELIX_CONFIG_AAC_GENERATE_TRIGTABS_FLOAT
164int AACInitTrigtabsFloat(void);
165void AACFreeTrigtabsFloat(void);
166#endif
167
168#ifdef __cplusplus
169}
170#endif
171
172#endif /* _AACDEC_H */
void AACGetLastFrameInfo(HAACDecoder hAACDecoder, AACFrameInfo *aacFrameInfo)
Definition aacdec.c:167
int AACSetRawBlockParams(HAACDecoder hAACDecoder, int copyLast, AACFrameInfo *aacFrameInfo)
Definition aacdec.c:214
@ ERR_AAC_SBR_BITSTREAM
Definition aacdec.h:127
@ ERR_AAC_STEREO_PROCESS
Definition aacdec.h:119
@ ERR_AAC_SBR_PCM_FORMAT
Definition aacdec.h:129
@ ERR_AAC_SBR_DATA
Definition aacdec.h:128
@ ERR_AAC_MPEG4_UNSUPPORTED
Definition aacdec.h:114
@ ERR_AAC_SBR_SINGLERATE_UNSUPPORTED
Definition aacdec.h:131
@ ERR_AAC_CHANNEL_MAP
Definition aacdec.h:115
@ ERR_AAC_SBR_NCHANS_TOO_HIGH
Definition aacdec.h:130
@ ERR_AAC_TNS
Definition aacdec.h:122
@ ERR_AAC_SBR_INIT
Definition aacdec.h:126
@ ERR_AAC_INVALID_ADIF_HEADER
Definition aacdec.h:112
@ ERR_AAC_INVALID_FRAME
Definition aacdec.h:113
@ ERR_AAC_INDATA_UNDERFLOW
Definition aacdec.h:109
@ ERR_AAC_PNS
Definition aacdec.h:120
@ ERR_AAC_RAWBLOCK_PARAMS
Definition aacdec.h:133
@ ERR_AAC_IMDCT
Definition aacdec.h:123
@ ERR_AAC_DEQUANT
Definition aacdec.h:118
@ ERR_AAC_SYNTAX_ELEMENT
Definition aacdec.h:116
@ ERR_AAC_SHORT_BLOCK_DEINT
Definition aacdec.h:121
@ ERR_AAC_UNKNOWN
Definition aacdec.h:135
@ ERR_AAC_NCHANS_TOO_HIGH
Definition aacdec.h:124
@ ERR_AAC_NONE
Definition aacdec.h:108
@ ERR_AAC_INVALID_ADTS_HEADER
Definition aacdec.h:111
@ ERR_AAC_NULL_POINTER
Definition aacdec.h:110
struct _AACFrameInfo AACFrameInfo
HAACDecoder AACInitDecoderPre(void *ptr, int sz)
Definition aacdec.c:84
int AACFindSyncWord(unsigned char *buf, int nBytes)
Definition aacdec.c:139
int AACFlushCodec(HAACDecoder hAACDecoder)
Definition aacdec.c:239
void AACFreeDecoder(HAACDecoder hAACDecoder)
Definition aacdec.c:113
HAACDecoder AACInitDecoder(void)
Definition aacdec.c:66
int AACDecode(HAACDecoder hAACDecoder, unsigned char **inbuf, int *bytesLeft, short *outbuf)
Definition aacdec.c:291
void * HAACDecoder
Definition aacdec.h:150
Definition aacdec.h:138
int bitsPerSample
Definition aacdec.h:143
int bitRate
Definition aacdec.h:139
int outputSamps
Definition aacdec.h:144
int tnsUsed
Definition aacdec.h:146
int profile
Definition aacdec.h:145
int pnsUsed
Definition aacdec.h:147
int nChans
Definition aacdec.h:140
int sampRateCore
Definition aacdec.h:141
int sampRateOut
Definition aacdec.h:142