annotate Input/mpg123/getbits.h @ 34:ffddef61dd83 trunk

[svn] Rebuild configure.
author nenolod
date Wed, 26 Oct 2005 00:42:55 -0700
parents cb178e5ad177
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 /*
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 * This does the same as getbits.c but with defines to
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * force inlining
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 #define mpg123_backbits(nob) \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 do { \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 bsi.bitindex -= nob; \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 bsi.wordpointer += (bsi.bitindex >> 3); \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 bsi.bitindex &= 0x7; \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 } while (0)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 #define mpg123_getbitoffset() ((-bsi.bitindex) & 0x7)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 #define mpg123_getbyte() (*bsi.wordpointer++)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 #define mpg123_getbits(nob) \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 (rval = bsi.wordpointer[0], \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 rval <<= 8, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 rval |= bsi.wordpointer[1], \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 rval <<= 8, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 rval |= bsi.wordpointer[2], \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 rval <<= bsi.bitindex, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 rval &= 0xffffff, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 bsi.bitindex += (nob), \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 rval >>= (24-(nob)), \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 bsi.wordpointer += (bsi.bitindex>>3), \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28 bsi.bitindex &= 7, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29 rval)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 #define mpg123_getbits_fast(nob) \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 (rval = (unsigned char) (bsi.wordpointer[0] << bsi.bitindex), \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 rval |= ((unsigned long) bsi.wordpointer[1] << bsi.bitindex) >> 8, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 rval <<= (nob), \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 rval >>= 8, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 bsi.bitindex += (nob), \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 bsi.wordpointer += (bsi.bitindex >> 3), \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 bsi.bitindex &= 7, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 rval)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41 #define mpg123_get1bit() \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 (rval_uc = *bsi.wordpointer << bsi.bitindex, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 bsi.bitindex++, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 bsi.wordpointer += (bsi.bitindex>>3), \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 bsi.bitindex &= 7, \
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 rval_uc >> 7)