annotate libfaad2/dither.h @ 11266:6beea1683618

reverting my last change as buggy gcc 3.x fails with it :(
author alex
date Sat, 25 Oct 2003 23:13:54 +0000
parents 3185f64f6350
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
1 /* This program is licensed under the GNU Library General Public License, version 2,
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
2 * a copy of which is included with this program (with filename LICENSE.LGPL).
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
3 *
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
4 * (c) 2002 John Edwards
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
5 *
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
6 * rand_t header.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
7 *
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
8 * last modified: $ID:$
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
9 */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
10
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
11 #include "common.h"
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
12
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
13 #ifndef __RAND_T_H
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
14 #define __RAND_T_H
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
15
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
16 #ifdef __cplusplus
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
17 extern "C" {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
18 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
19
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
20 #ifndef FIXED_POINT
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
21
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
22 typedef struct {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
23 const float32_t* FilterCoeff;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
24 uint64_t Mask;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
25 double Add;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
26 float32_t Dither;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
27 float32_t ErrorHistory [2] [16]; // max. 2 channels, 16th order Noise shaping
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
28 float32_t DitherHistory [2] [16];
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
29 int32_t LastRandomNumber [2];
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
30 } dither_t;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
31
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
32 extern dither_t Dither;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
33 extern double doubletmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
34 //static const uint8_t Parity [256];
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
35 uint32_t random_int ( void );
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
36 extern double scalar16 ( const float32_t* x, const float32_t* y );
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
37 extern double Random_Equi ( double mult );
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
38 extern double Random_Triangular ( double mult );
10989
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
39 void Init_Dither ( uint8_t bits, uint8_t shapingtype );
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
40
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
41 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
42
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
43 #ifdef __cplusplus
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
44 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
45 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
46
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
47 #endif