replaced libart with new polygon code
[swftools.git] / lib / bladeenc / encoder.h
1 /*
2                         (c) Copyright 1998-2001 - Tord Jansson
3                         ======================================
4
5                 This file is part of the BladeEnc MP3 Encoder, based on
6                 ISO's reference code for MPEG Layer 3 compression, and might
7                 contain smaller or larger sections that are directly taken
8                 from ISO's reference code.
9
10                 All changes to the ISO reference code herein are either
11                 copyrighted by Tord Jansson (tord.jansson@swipnet.se)
12                 or sublicensed to Tord Jansson by a third party.
13
14         BladeEnc is free software; you can redistribute this file
15         and/or modify it under the terms of the GNU Lesser General Public
16         License as published by the Free Software Foundation; either
17         version 2.1 of the License, or (at your option) any later version.
18
19
20
21         ------------    Changes    ------------
22
23         2000-12-11  Andre Piotrowski
24
25         -       reformatted, redesigned
26 */
27
28 #ifndef         __ENCODER__
29 #define         __ENCODER__
30
31
32
33
34
35 #define         ORG_BUFFERS                             0   /* 1 = use original buffer concept */
36
37
38
39
40
41 /***********************************************************************
42 *
43 *  Encoder Definitions
44 *
45 ***********************************************************************/
46
47 /* Psychoacoustic Model 2 Definitions */
48
49 #define BLKSIZE         1024
50 #define HBLKSIZE        513
51 #define CBANDS          63
52
53
54
55
56
57 /***********************************************************************
58 *
59 *  Encoder Function Prototype Declarations
60 *
61 ***********************************************************************/
62
63
64 void                                    initWindowFilterSubband (void);
65
66
67
68
69 #if ORG_BUFFERS
70
71         void                                    rebuffer_audio
72         (
73                 short                                   buffer[2][1152],
74                 short                                   *insamp,
75                 unsigned int                    samples_read,
76                 int                                             stereo
77         );
78         void                                    windowFilterSubband
79         (
80                 short                                   *pBuffer,
81                 int                                             ch,
82                 double                                  s[SBLIMIT]
83         );
84
85 #else
86
87         void                                    rebuffer_audio
88         (
89                 const short                             *insamp,
90                 FLOAT                                   buffer[2][2048],
91                 int                                             *buffer_idx,
92                 unsigned int                    samples_read,
93                 int                                             stereo
94         );
95         void                                    windowFilterSubband
96         (
97                 const FLOAT                             *buffer,
98                 int                                             buffer_idx,
99                 double                                  s[SBLIMIT]
100         );
101
102 #endif
103
104
105
106
107
108 #endif          /* __ENCODER__ */