10725
|
1 /*
|
|
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
|
|
3 ** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
|
|
4 **
|
|
5 ** This program is free software; you can redistribute it and/or modify
|
|
6 ** it under the terms of the GNU General Public License as published by
|
|
7 ** the Free Software Foundation; either version 2 of the License, or
|
|
8 ** (at your option) any later version.
|
|
9 **
|
|
10 ** This program is distributed in the hope that it will be useful,
|
|
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 ** GNU General Public License for more details.
|
|
14 **
|
|
15 ** You should have received a copy of the GNU General Public License
|
|
16 ** along with this program; if not, write to the Free Software
|
|
17 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
18 **
|
|
19 ** Any non-GPL usage of this software or parts of this software is strictly
|
|
20 ** forbidden.
|
|
21 **
|
|
22 ** Commercial non-GPL licensing of this software is possible.
|
|
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
|
|
24 **
|
|
25 ** $Id: decoder.h,v 1.26 2003/07/29 08:20:12 menno Exp $
|
|
26 **/
|
|
27
|
|
28 #ifndef __DECODER_H__
|
|
29 #define __DECODER_H__
|
|
30
|
|
31 #ifdef __cplusplus
|
|
32 extern "C" {
|
|
33 #endif
|
|
34
|
|
35 #ifdef _WIN32
|
|
36 #pragma pack(push, 8)
|
|
37 #ifndef FAADAPI
|
|
38 #define FAADAPI __cdecl
|
|
39 #endif
|
|
40 #else
|
|
41 #ifndef FAADAPI
|
|
42 #define FAADAPI
|
|
43 #endif
|
|
44 #endif
|
|
45
|
|
46 #include "bits.h"
|
|
47 #include "syntax.h"
|
|
48 #include "drc.h"
|
|
49 #include "specrec.h"
|
|
50 #include "filtbank.h"
|
|
51 #include "ic_predict.h"
|
|
52
|
|
53
|
|
54 /* library output formats */
|
|
55 #define FAAD_FMT_16BIT 1
|
|
56 #define FAAD_FMT_24BIT 2
|
|
57 #define FAAD_FMT_32BIT 3
|
|
58 #define FAAD_FMT_FLOAT 4
|
|
59 #define FAAD_FMT_DOUBLE 5
|
|
60 #define FAAD_FMT_16BIT_DITHER 6
|
|
61 #define FAAD_FMT_16BIT_L_SHAPE 7
|
|
62 #define FAAD_FMT_16BIT_M_SHAPE 8
|
|
63 #define FAAD_FMT_16BIT_H_SHAPE 9
|
|
64
|
|
65 #define FAAD_FMT_DITHER_LOWEST FAAD_FMT_16BIT_DITHER
|
|
66
|
|
67 #define LC_DEC_CAP (1<<0)
|
|
68 #define MAIN_DEC_CAP (1<<1)
|
|
69 #define LTP_DEC_CAP (1<<2)
|
|
70 #define LD_DEC_CAP (1<<3)
|
|
71 #define ERROR_RESILIENCE_CAP (1<<4)
|
|
72 #define FIXED_POINT_CAP (1<<5)
|
|
73
|
|
74 #define FRONT_CHANNEL_CENTER (1)
|
|
75 #define FRONT_CHANNEL_LEFT (2)
|
|
76 #define FRONT_CHANNEL_RIGHT (3)
|
|
77 #define SIDE_CHANNEL_LEFT (4)
|
|
78 #define SIDE_CHANNEL_RIGHT (5)
|
|
79 #define BACK_CHANNEL_LEFT (6)
|
|
80 #define BACK_CHANNEL_RIGHT (7)
|
|
81 #define BACK_CHANNEL_CENTER (8)
|
|
82 #define LFE_CHANNEL (9)
|
|
83 #define UNKNOWN_CHANNEL (0)
|
|
84
|
|
85 int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
|
|
86
|
|
87 uint32_t FAADAPI faacDecGetCapabilities();
|
|
88
|
|
89 faacDecHandle FAADAPI faacDecOpen();
|
|
90
|
|
91 faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder);
|
|
92
|
|
93 uint8_t FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
|
|
94 faacDecConfigurationPtr config);
|
|
95
|
|
96 /* Init the library based on info from the AAC file (ADTS/ADIF) */
|
|
97 int32_t FAADAPI faacDecInit(faacDecHandle hDecoder,
|
|
98 uint8_t *buffer,
|
|
99 uint32_t buffer_size,
|
|
100 uint32_t *samplerate,
|
|
101 uint8_t *channels);
|
|
102
|
|
103 /* Init the library using a DecoderSpecificInfo */
|
|
104 int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer,
|
|
105 uint32_t SizeOfDecoderSpecificInfo,
|
|
106 uint32_t *samplerate, uint8_t *channels);
|
|
107
|
|
108 /* Init the library for DRM */
|
|
109 int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
|
|
110 uint8_t channels);
|
|
111
|
|
112 void FAADAPI faacDecClose(faacDecHandle hDecoder);
|
|
113
|
|
114 void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
|
|
115 faacDecFrameInfo *hInfo,
|
|
116 uint8_t *buffer,
|
|
117 uint32_t buffer_size);
|
|
118
|
|
119 element *decode_sce_lfe(faacDecHandle hDecoder,
|
|
120 faacDecFrameInfo *hInfo, bitfile *ld,
|
|
121 int16_t **spec_data, real_t **spec_coef,
|
|
122 uint8_t id_syn_ele);
|
|
123 element *decode_cpe(faacDecHandle hDecoder,
|
|
124 faacDecFrameInfo *hInfo, bitfile *ld,
|
|
125 int16_t **spec_data, real_t **spec_coef,
|
|
126 uint8_t id_syn_ele);
|
|
127 element **raw_data_block(faacDecHandle hDecoder, faacDecFrameInfo *hInfo,
|
|
128 bitfile *ld, element **elements,
|
|
129 int16_t **spec_data, real_t **spec_coef,
|
|
130 program_config *pce, drc_info *drc);
|
|
131
|
|
132 #ifdef _WIN32
|
|
133 #pragma pack(pop)
|
|
134 #endif
|
|
135
|
|
136 #ifdef __cplusplus
|
|
137 }
|
|
138 #endif
|
|
139 #endif
|