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 **
|
10989
|
25 ** $Id: decoder.h,v 1.1 2003/08/30 22:30:21 arpi Exp $
|
10725
|
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
|
10989
|
114 void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, int32_t frame);
|
|
115
|
10725
|
116 void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
|
|
117 faacDecFrameInfo *hInfo,
|
|
118 uint8_t *buffer,
|
|
119 uint32_t buffer_size);
|
|
120
|
|
121 element *decode_sce_lfe(faacDecHandle hDecoder,
|
|
122 faacDecFrameInfo *hInfo, bitfile *ld,
|
10989
|
123 real_t **spec_coef, uint8_t id_syn_ele);
|
10725
|
124 element *decode_cpe(faacDecHandle hDecoder,
|
|
125 faacDecFrameInfo *hInfo, bitfile *ld,
|
10989
|
126 real_t **spec_coef, uint8_t id_syn_ele);
|
10725
|
127 element **raw_data_block(faacDecHandle hDecoder, faacDecFrameInfo *hInfo,
|
|
128 bitfile *ld, element **elements,
|
10989
|
129 real_t **spec_coef, program_config *pce, drc_info *drc);
|
10725
|
130
|
|
131 #ifdef _WIN32
|
|
132 #pragma pack(pop)
|
|
133 #endif
|
|
134
|
|
135 #ifdef __cplusplus
|
|
136 }
|
|
137 #endif
|
|
138 #endif
|