annotate mp3lib/mpg123.h @ 24476:b42dd327f81f

Another piece of duplicate code
author reimar
date Fri, 14 Sep 2007 19:34:17 +0000
parents ccf4719617b6
children 9e739bdb049c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15167
07e7a572bd84 Mark modified imported files as such to comply with (L)GPL ¡ø2a.
diego
parents: 12131
diff changeset
1 /*
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 16989
diff changeset
2 * Modified for use with MPlayer, for details see the changelog at
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 16989
diff changeset
3 * http://svn.mplayerhq.hu/mplayer/trunk/
15167
07e7a572bd84 Mark modified imported files as such to comply with (L)GPL ¡ø2a.
diego
parents: 12131
diff changeset
4 * $Id$
07e7a572bd84 Mark modified imported files as such to comply with (L)GPL ¡ø2a.
diego
parents: 12131
diff changeset
5 */
07e7a572bd84 Mark modified imported files as such to comply with (L)GPL ¡ø2a.
diego
parents: 12131
diff changeset
6
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 * mpg123 defines
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * used source: musicout.h from mpegaudio package
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11
16989
e7a129082fda Unify include paths, -I.. is in CFLAGS.
diego
parents: 16852
diff changeset
12 #include "config.h"
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13
1256
a738eae695cc #ifndef M_PI and M_SQRT2 added while fearing from redefining :)
alex
parents: 1245
diff changeset
14 #ifndef M_PI
a738eae695cc #ifndef M_PI and M_SQRT2 added while fearing from redefining :)
alex
parents: 1245
diff changeset
15 #define M_PI 3.141592653589793238462
a738eae695cc #ifndef M_PI and M_SQRT2 added while fearing from redefining :)
alex
parents: 1245
diff changeset
16 #endif
a738eae695cc #ifndef M_PI and M_SQRT2 added while fearing from redefining :)
alex
parents: 1245
diff changeset
17 #ifndef M_SQRT2
a738eae695cc #ifndef M_PI and M_SQRT2 added while fearing from redefining :)
alex
parents: 1245
diff changeset
18 #define M_SQRT2 1.414213562373095048802
a738eae695cc #ifndef M_PI and M_SQRT2 added while fearing from redefining :)
alex
parents: 1245
diff changeset
19 #endif
a738eae695cc #ifndef M_PI and M_SQRT2 added while fearing from redefining :)
alex
parents: 1245
diff changeset
20 #define REAL_IS_FLOAT
a738eae695cc #ifndef M_PI and M_SQRT2 added while fearing from redefining :)
alex
parents: 1245
diff changeset
21 #define NEW_DCT9
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 #undef MPG123_REMOTE /* Get rid of this stuff for Win32 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 # define real float
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 # define real long double
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 # define real double
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 #include "audio.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 // #define AUDIOBUFSIZE 4096
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 #define FALSE 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 #define TRUE 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 #define MAX_NAME_SIZE 81
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 #define SBLIMIT 32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 #define SCALE_BLOCK 12
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 #define SSLIMIT 18
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 #define MPG_MD_STEREO 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 #define MPG_MD_JOINT_STEREO 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 #define MPG_MD_DUAL_CHANNEL 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 #define MPG_MD_MONO 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 /* #define MAXOUTBURST 32768 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 /* Pre Shift fo 16 to 8 bit converter table */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 #define AUSHIFT (3)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 struct al_table
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 short bits;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 short d;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 struct frame {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 struct al_table *alloc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 int (*synth)(real *,int,unsigned char *,int *);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 int (*synth_mono)(real *,unsigned char *,int *);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 int stereo;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 int jsbound;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 int single;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 int II_sblimit;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 int down_sample_sblimit;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 int lsf;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 int mpeg25;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 int down_sample;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 int header_change;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 int lay;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 int error_protection;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 int bitrate_index;
23434
d986b47f1451 Use int and uint32_t instead of long and unsigned long, when appropriate.
zuxy
parents: 18783
diff changeset
74 int sampling_frequency;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 int padding;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76 int extension;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 int mode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 int mode_ext;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 int copyright;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 int original;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 int emphasis;
23434
d986b47f1451 Use int and uint32_t instead of long and unsigned long, when appropriate.
zuxy
parents: 18783
diff changeset
82 int framesize; /* computed framesize */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 struct gr_info_s {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 int scfsi;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 unsigned part2_3_length;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 unsigned big_values;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 unsigned scalefac_compress;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 unsigned block_type;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 unsigned mixed_block_flag;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 unsigned table_select[3];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 unsigned subblock_gain[3];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 unsigned maxband[3];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 unsigned maxbandl;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 unsigned maxb;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98 unsigned region1start;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99 unsigned region2start;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100 unsigned preflag;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 unsigned scalefac_scale;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 unsigned count1table_select;
10343
b277842a74a2 merged with mpg123 0.59s-pre
arpi
parents: 8560
diff changeset
103 real *full_gain[3];
b277842a74a2 merged with mpg123 0.59s-pre
arpi
parents: 8560
diff changeset
104 real *pow2gain;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107 struct III_sideinfo
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109 unsigned main_data_begin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 unsigned private_bits;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111 struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 struct gr_info_s gr[2];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 } ch[2];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115
8560
1320f1b3229d fixing that f*cking linker 'bug' e.g. naming config with libmp3lame
alex
parents: 1256
diff changeset
116 extern real mp3lib_decwin[(512+32)];
12131
d155623271e3 fix symbol clashes when linking with libmp3lame including mp3 decoder, man, mp3lib is so much bloated
alex
parents: 10343
diff changeset
117 extern real *mp3lib_pnts[];
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118
1245
03b7e2955a20 Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
nick
parents: 787
diff changeset
119 extern int synth_1to1_pent( real *,int,short * );
03b7e2955a20 Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
nick
parents: 787
diff changeset
120 extern int synth_1to1_MMX( real *,int,short * );
03b7e2955a20 Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
nick
parents: 787
diff changeset
121 extern int synth_1to1_MMX_s(real *, int, short *, short *, int *);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122
1245
03b7e2955a20 Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
nick
parents: 787
diff changeset
123 extern void dct36_3dnow(real *,real *,real *,real *,real *);
03b7e2955a20 Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
nick
parents: 787
diff changeset
124 extern void dct36_3dnowex(real *,real *,real *,real *,real *);
03b7e2955a20 Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
nick
parents: 787
diff changeset
125 extern void dct36_sse(real *,real *,real *,real *,real *);
787
9bc104531aec mp3lib sse support - disabled by default
arpi_esp
parents: 736
diff changeset
126
1245
03b7e2955a20 Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
nick
parents: 787
diff changeset
127 typedef int (*synth_func_t)( real *,int,short * );
03b7e2955a20 Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
nick
parents: 787
diff changeset
128 typedef void (*dct36_func_t)(real *,real *,real *,real *,real *);