4 Revision 1.15 2004/06/26 03:50:14 markster
5 Merge source cleanups (bug #1911)
7 Revision 1.14 2003/02/12 13:59:15 matteo
8 mer feb 12 14:56:57 CET 2003
10 Revision 1.1.1.1 2003/02/12 13:59:15 matteo
11 mer feb 12 14:56:57 CET 2003
13 Revision 1.2 2000/01/05 08:20:39 markster
14 Some OSS fixes and a few lpc changes to make it actually work
16 * Revision 1.2 1996/08/20 20:41:32 jaf
17 * Removed all static local variables that were SAVE'd in the Fortran
18 * code, and put them in struct lpc10_decoder_state that is passed as an
21 * Removed init function, since all initialization is now done in
22 * init_lpc10_decoder_state().
24 * Revision 1.1 1996/08/19 22:30:49 jaf
30 /* -- translated by f2c (version 19951025).
31 You must link the resulting object file with the libraries:
32 -lf2c -lm (in that order)
37 #ifdef P_R_O_T_O_T_Y_P_E_S
38 extern integer random_(struct lpc10_decoder_state *st);
41 /* ********************************************************************** */
43 /* RANDOM Version 49 */
46 * Revision 1.15 2004/06/26 03:50:14 markster
47 * Merge source cleanups (bug #1911)
49 * Revision 1.14 2003/02/12 13:59:15 matteo
50 * mer feb 12 14:56:57 CET 2003
52 * Revision 1.1.1.1 2003/02/12 13:59:15 matteo
53 * mer feb 12 14:56:57 CET 2003
55 * Revision 1.2 2000/01/05 08:20:39 markster
56 * Some OSS fixes and a few lpc changes to make it actually work
58 * Revision 1.2 1996/08/20 20:41:32 jaf
59 * Removed all static local variables that were SAVE'd in the Fortran
60 * code, and put them in struct lpc10_decoder_state that is passed as an
63 * Removed init function, since all initialization is now done in
64 * init_lpc10_decoder_state().
66 * Revision 1.1 1996/08/19 22:30:49 jaf
69 /* Revision 1.3 1996/03/20 16:13:54 jaf */
70 /* Rearranged comments a little bit, and added comments explaining that */
71 /* even though there is local state here, there is no need to create an */
72 /* ENTRY for reinitializing it. */
74 /* Revision 1.2 1996/03/14 22:25:29 jaf */
75 /* Just rearranged the comments and local variable declarations a bit. */
77 /* Revision 1.1 1996/02/07 14:49:01 jaf */
78 /* Initial revision */
81 /* ********************************************************************* */
83 /* Pseudo random number generator based on Knuth, Vol 2, p. 27. */
85 /* Function Return: */
86 /* RANDOM - Integer variable, uniformly distributed over -32768 to 32767 */
88 /* This subroutine maintains local state from one call to the next. */
89 /* In the context of the LPC10 coder, there is no reason to reinitialize */
90 /* this local state when switching between audio streams, because its */
91 /* results are only used to generate noise for unvoiced frames. */
93 integer random_(struct lpc10_decoder_state *st)
95 /* Initialized data */
101 /* System generated locals */
104 /* Parameters/constants */
106 /* The following is a 16 bit 2's complement addition, */
107 /* with overflow checking disabled */
113 y[*k - 1] += y[*j - 1];