vo_glamo: sub.h was moved to sub directory in c9026cb3210205b07e2e068467a18ee40f9259a3
[mplayer/glamo.git] / mp3lib / mpg123.h
blob0b9f781f80fbb1ad907879652c6e9f1c363a794f
1 /*
2 * Modified for use with MPlayer, for details see the changelog at
3 * http://svn.mplayerhq.hu/mplayer/trunk/
4 * $Id$
5 */
7 /*
8 * mpg123 defines
9 * used source: musicout.h from mpegaudio package
12 #ifndef MPLAYER_MP3LIB_MPG123_H
13 #define MPLAYER_MP3LIB_MPG123_H
15 #include "config.h"
17 #ifndef M_PI
18 #define M_PI 3.141592653589793238462
19 #endif
20 #ifndef M_SQRT2
21 #define M_SQRT2 1.414213562373095048802
22 #endif
23 #define REAL_IS_FLOAT
24 #define NEW_DCT9
26 #undef MPG123_REMOTE /* Get rid of this stuff for Win32 */
28 typedef float real;
31 # define real float
32 # define real long double
33 # define real double
34 #include "audio.h"
36 // #define AUDIOBUFSIZE 4096
39 #define FALSE 0
40 #define TRUE 1
42 #define MAX_NAME_SIZE 81
43 #define SBLIMIT 32
44 #define SCALE_BLOCK 12
45 #define SSLIMIT 18
47 #define MPG_MD_STEREO 0
48 #define MPG_MD_JOINT_STEREO 1
49 #define MPG_MD_DUAL_CHANNEL 2
50 #define MPG_MD_MONO 3
52 /* #define MAXOUTBURST 32768 */
54 /* Pre Shift fo 16 to 8 bit converter table */
55 #define AUSHIFT (3)
57 struct al_table
59 short bits;
60 short d;
63 struct frame {
64 struct al_table *alloc;
65 int (*synth)(real *,int,unsigned char *,int *);
66 int (*synth_mono)(real *,unsigned char *,int *);
67 int stereo;
68 int jsbound;
69 int single;
70 int II_sblimit;
71 int down_sample_sblimit;
72 int lsf;
73 int mpeg25;
74 int down_sample;
75 int header_change;
76 int lay;
77 int error_protection;
78 int bitrate_index;
79 int sampling_frequency;
80 int padding;
81 int extension;
82 int mode;
83 int mode_ext;
84 int copyright;
85 int original;
86 int emphasis;
87 int framesize; /* computed framesize */
91 struct gr_info_s {
92 int scfsi;
93 unsigned part2_3_length;
94 unsigned big_values;
95 unsigned scalefac_compress;
96 unsigned block_type;
97 unsigned mixed_block_flag;
98 unsigned table_select[3];
99 unsigned subblock_gain[3];
100 unsigned maxband[3];
101 unsigned maxbandl;
102 unsigned maxb;
103 unsigned region1start;
104 unsigned region2start;
105 unsigned preflag;
106 unsigned scalefac_scale;
107 unsigned count1table_select;
108 real *full_gain[3];
109 real *pow2gain;
112 struct III_sideinfo
114 unsigned main_data_begin;
115 unsigned private_bits;
116 struct {
117 struct gr_info_s gr[2];
118 } ch[2];
121 extern real mp3lib_decwin[(512+32)];
122 extern real *mp3lib_pnts[];
124 int synth_1to1_pent( real *, int, short * );
125 int synth_1to1_MMX( real *, int, short * );
126 int synth_1to1_MMX_s(real *, int, short *, short *, int *);
128 void dct36_3dnow(real *, real *, real *, real *, real *);
129 void dct36_3dnowex(real *, real *, real *, real *, real *);
130 void dct36_sse(real *, real *, real *, real *, real *);
132 void dct64_MMX(short *, short *, real *);
133 void dct64_MMX_3dnow(short *, short *, real *);
134 void dct64_MMX_3dnowex(short *, short *, real *);
135 void dct64_sse(short *, short *, real *);
136 void dct64_altivec(real *, real *, real *);
137 extern void (*dct64_MMX_func)(short *, short *, real *);
139 void mp3lib_dct64(real *, real *, real *);
141 typedef int (*synth_func_t)( real *,int,short * );
142 typedef void (*dct36_func_t)(real *,real *,real *,real *,real *);
144 #endif /* MPLAYER_MP3LIB_MPG123_H */