annotate libmpcodecs/native/decode144.h @ 12713:13f9a831474f

100l, stripping credits when applying patches is NOT a good way to get developers!!
author rfelker
date Mon, 28 Jun 2004 13:46:19 +0000
parents 597ad4eb02fc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10260
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
1 #ifndef DECODE144_H
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
2 #define DECODE144_H
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
3
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
4 /* internal globals */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
5 typedef struct {
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
6 unsigned int resetflag, val, oldval;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
7 unsigned int unpacked[28]; /* buffer for unpacked input */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
8 unsigned int *iptr; /* pointer to current input (from unpacked) */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
9 unsigned int gval;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
10 unsigned short *gsp;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
11 unsigned int gbuf1[8];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
12 unsigned short gbuf2[120];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
13 signed short output_buffer[40];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
14 unsigned int *decptr; /* decoder ptr */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
15 signed short *decsp;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
16
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
17 /* the swapped buffers */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
18 unsigned int swapb1a[10];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
19 unsigned int swapb2a[10];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
20 unsigned int swapb1b[10];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
21 unsigned int swapb2b[10];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
22 unsigned int *swapbuf1;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
23 unsigned int *swapbuf2;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
24 unsigned int *swapbuf1alt;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
25 unsigned int *swapbuf2alt;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
26
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
27 unsigned int buffer[5];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
28 unsigned short int buffer_2[148];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
29 unsigned short int buffer_a[40];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
30 unsigned short int buffer_b[40];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
31 unsigned short int buffer_c[40];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
32 unsigned short int buffer_d[40];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
33
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
34 unsigned short int work[50];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
35 unsigned short *sptr;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
36
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
37 int buffer1[10];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
38 int buffer2[10];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
39
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
40 signed short wavtable1[2304];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
41 unsigned short wavtable2[2304];
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
42 } Real_internal;
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
43
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
44 /* consts */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
45 #define NBLOCKS 4 /* number of segments within a block */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
46 #define BLOCKSIZE 40 /* (quarter) block size in 16-bit words (80 bytes) */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
47 #define HALFBLOCK 20 /* BLOCKSIZE/2 */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
48 #define BUFFERSIZE 146 /* for do_output */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
49
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
50 /* prototypes */
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
51 static int t_sqrt (unsigned int x);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
52 static void do_voice (int *a1, int *a2);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
53 static void do_output_subblock (Real_internal *glob, int x);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
54 static void rotate_block (short *source, short *target, int offset);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
55 static int irms (short *data, int factor);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
56 static void add_wav (Real_internal *glob, int n, int f, int m1, int m2, int m3, short *s1, short *s2, short *s3, short *dest);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
57 static void final (Real_internal *glob, short *i1, short *i2, void *out, int *statbuf, int len);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
58 static void unpack_input (unsigned char *input, unsigned int *output);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
59 static unsigned int rms (int *data, int f);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
60 static void dec1 (Real_internal *glob, int *data, int *inp, int n, int f);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
61 static void dec2 (Real_internal *glob, int *data, int *inp, int n, int f, int *inp2, int l);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
62 static int eq (Real_internal *glob, short *in, int *target);
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
63
597ad4eb02fc RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
64 #endif /* !DECODE144_H */