]> 4ch.mooo.com Git - 16.git/blob - src/lib/doslib/ext/faad/syntax.h
2a1fc6d93875a89616067974f4b05c68f2bbff57
[16.git] / src / lib / doslib / ext / faad / syntax.h
1 /*
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3 ** Copyright (C) 2003-2005 M. Bakker, Nero 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 ** The "appropriate copyright message" mentioned in section 2c of the GPLv2
23 ** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
24 **
25 ** Commercial non-GPL licensing of this software is possible.
26 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
27 **
28 ** $Id: syntax.h,v 1.60 2009/01/26 23:51:17 menno Exp $
29 **/
30
31 #ifndef __SYNTAX_H__
32 #define __SYNTAX_H__
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #include "bits.h"
39
40 #define MAIN       1
41 #define LC         2
42 #define SSR        3
43 #define LTP        4
44 #define HE_AAC     5
45 #define LD        23
46 #define ER_LC     17
47 #define ER_LTP    19
48 #define DRM_ER_LC 27 /* special object type for DRM */
49
50 /* header types */
51 #define RAW        0
52 #define ADIF       1
53 #define ADTS       2
54 #define LATM       3
55
56 /* SBR signalling */
57 #define NO_SBR           0
58 #define SBR_UPSAMPLED    1
59 #define SBR_DOWNSAMPLED  2
60 #define NO_SBR_UPSAMPLED 3
61
62 /* DRM channel definitions */
63 #define DRMCH_MONO          1
64 #define DRMCH_STEREO        2
65 #define DRMCH_SBR_MONO      3
66 #define DRMCH_SBR_STEREO    4
67 #define DRMCH_SBR_PS_STEREO 5
68
69
70 /* First object type that has ER */
71 #define ER_OBJECT_START 17
72
73
74 /* Bitstream */
75 #define LEN_SE_ID 3
76 #define LEN_TAG   4
77 #define LEN_BYTE  8
78
79 #define EXT_FIL            0
80 #define EXT_FILL_DATA      1
81 #define EXT_DATA_ELEMENT   2
82 #define EXT_DYNAMIC_RANGE 11
83 #define ANC_DATA           0
84
85 /* Syntax elements */
86 #define ID_SCE 0x0
87 #define ID_CPE 0x1
88 #define ID_CCE 0x2
89 #define ID_LFE 0x3
90 #define ID_DSE 0x4
91 #define ID_PCE 0x5
92 #define ID_FIL 0x6
93 #define ID_END 0x7
94
95 #define ONLY_LONG_SEQUENCE   0x0
96 #define LONG_START_SEQUENCE  0x1
97 #define EIGHT_SHORT_SEQUENCE 0x2
98 #define LONG_STOP_SEQUENCE   0x3
99
100 #define ZERO_HCB       0
101 #define FIRST_PAIR_HCB 5
102 #define ESC_HCB        11
103 #define QUAD_LEN       4
104 #define PAIR_LEN       2
105 #define NOISE_HCB      13
106 #define INTENSITY_HCB2 14
107 #define INTENSITY_HCB  15
108
109 #define INVALID_SBR_ELEMENT 255
110
111 int8_t GASpecificConfig(bitfile *ld, mp4AudioSpecificConfig *mp4ASC,
112                         program_config *pce);
113
114 uint8_t adts_frame(adts_header *adts, bitfile *ld);
115 void get_adif_header(adif_header *adif, bitfile *ld);
116 void raw_data_block(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
117                     bitfile *ld, program_config *pce, drc_info *drc);
118 uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
119                                 int16_t *spectral_data);
120 #ifdef DRM
121 void DRM_aac_scalable_main_element(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
122                                    bitfile *ld, program_config *pce, drc_info *drc);
123 #endif
124 uint32_t faad_latm_frame(latm_header *latm, bitfile *ld);
125
126 #ifdef __cplusplus
127 }
128 #endif
129 #endif