summaryrefslogtreecommitdiff
path: root/src/libfaad/dither.h
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-16 18:59:50 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-16 18:59:50 +0000
commit94ef6649dd5f4e95337af00dcede2337ea7cfb49 (patch)
tree07d679ce92b4e4517815abc42394480eebf44904 /src/libfaad/dither.h
parent48f4c5809db11a6df4a5e7285d5e60a2ed924e2a (diff)
downloadxine-lib-94ef6649dd5f4e95337af00dcede2337ea7cfb49.tar.gz
xine-lib-94ef6649dd5f4e95337af00dcede2337ea7cfb49.tar.bz2
updated libfaad
CVS patchset: 3560 CVS date: 2002/12/16 18:59:50
Diffstat (limited to 'src/libfaad/dither.h')
-rw-r--r--src/libfaad/dither.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/libfaad/dither.h b/src/libfaad/dither.h
new file mode 100644
index 000000000..34fb31996
--- /dev/null
+++ b/src/libfaad/dither.h
@@ -0,0 +1,47 @@
+/* This program is licensed under the GNU Library General Public License, version 2,
+ * a copy of which is included with this program (with filename LICENSE.LGPL).
+ *
+ * (c) 2002 John Edwards
+ *
+ * rand_t header.
+ *
+ * last modified: $ID:$
+ */
+
+#include "common.h"
+
+#ifndef __RAND_T_H
+#define __RAND_T_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef FIXED_POINT
+
+typedef struct {
+ const float32_t* FilterCoeff;
+ uint64_t Mask;
+ double Add;
+ float32_t Dither;
+ float32_t ErrorHistory [2] [16]; // max. 2 channels, 16th order Noise shaping
+ float32_t DitherHistory [2] [16];
+ int32_t LastRandomNumber [2];
+} dither_t;
+
+extern dither_t Dither;
+extern double doubletmp;
+//static const uint8_t Parity [256];
+uint32_t random_int ( void );
+extern double scalar16 ( const float32_t* x, const float32_t* y );
+extern double Random_Equi ( double mult );
+extern double Random_Triangular ( double mult );
+void Init_Dither ( unsigned char bits, unsigned char shapingtype );
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif